mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 20:00:16 +08:00
chore: cleanup utils packaging
This commit is contained in:
@ -4,7 +4,6 @@ import { BindingOptions } from '@nativescript/core/ui/core/bindable';
|
|||||||
import * as TKUnit from '../../../tk-unit';
|
import * as TKUnit from '../../../tk-unit';
|
||||||
import * as types from '@nativescript/core/utils/types';
|
import * as types from '@nativescript/core/utils/types';
|
||||||
import * as helper from '../../../ui-helper';
|
import * as helper from '../../../ui-helper';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
|
||||||
import * as bindingBuilder from '@nativescript/core/ui/builder/binding-builder';
|
import * as bindingBuilder from '@nativescript/core/ui/builder/binding-builder';
|
||||||
import * as appModule from '@nativescript/core/application';
|
import * as appModule from '@nativescript/core/application';
|
||||||
import { Trace } from '@nativescript/core';
|
import { Trace } from '@nativescript/core';
|
||||||
|
@ -7,7 +7,7 @@ import * as LabelModule from '@nativescript/core/ui/label';
|
|||||||
|
|
||||||
import * as types from '@nativescript/core/utils/types';
|
import * as types from '@nativescript/core/utils/types';
|
||||||
import * as colorModule from '@nativescript/core/color';
|
import * as colorModule from '@nativescript/core/color';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
import * as observableModule from '@nativescript/core/data/observable';
|
import * as observableModule from '@nativescript/core/data/observable';
|
||||||
import * as bindable from '@nativescript/core/ui/core/bindable';
|
import * as bindable from '@nativescript/core/ui/core/bindable';
|
||||||
import { CoreTypes, Span, FormattedString } from '@nativescript/core';
|
import { CoreTypes, Span, FormattedString } from '@nativescript/core';
|
||||||
|
@ -3,7 +3,7 @@ import { Button } from '@nativescript/core/ui/button';
|
|||||||
import * as TKUnit from '../../tk-unit';
|
import * as TKUnit from '../../tk-unit';
|
||||||
import * as helper from '../../ui-helper';
|
import * as helper from '../../ui-helper';
|
||||||
import { CoreTypes } from '@nativescript/core';
|
import { CoreTypes } from '@nativescript/core';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
import * as testModule from '../../ui-test';
|
import * as testModule from '../../ui-test';
|
||||||
import * as layoutHelper from './layout-helper';
|
import * as layoutHelper from './layout-helper';
|
||||||
import * as commonTests from './common-layout-tests';
|
import * as commonTests from './common-layout-tests';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as TKUnit from '../../tk-unit';
|
import * as TKUnit from '../../tk-unit';
|
||||||
// >> article-creating-view
|
// >> article-creating-view
|
||||||
import { isIOS, isAndroid } from '@nativescript/core/platform';
|
import { isIOS, isAndroid } from '@nativescript/core/platform';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
import * as helper from '../../ui-helper';
|
import * as helper from '../../ui-helper';
|
||||||
import * as viewModule from '@nativescript/core/ui/core/view';
|
import * as viewModule from '@nativescript/core/ui/core/view';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as colorModule from '@nativescript/core/color';
|
import * as colorModule from '@nativescript/core/color';
|
||||||
import * as searchBarModule from '@nativescript/core/ui/search-bar';
|
import * as searchBarModule from '@nativescript/core/ui/search-bar';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
|
|
||||||
function getTextView(bar: android.widget.SearchView): android.widget.TextView {
|
function getTextView(bar: android.widget.SearchView): android.widget.TextView {
|
||||||
if (bar) {
|
if (bar) {
|
||||||
|
@ -4,7 +4,7 @@ import { GridLayout } from '@nativescript/core/ui/layouts/grid-layout';
|
|||||||
import { Color } from '@nativescript/core/color';
|
import { Color } from '@nativescript/core/color';
|
||||||
import * as helper from '../../ui-helper';
|
import * as helper from '../../ui-helper';
|
||||||
import * as TKUnit from '../../tk-unit';
|
import * as TKUnit from '../../tk-unit';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
|
|
||||||
export * from './view-tests-common';
|
export * from './view-tests-common';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as TKUnit from '../tk-unit';
|
import * as TKUnit from '../tk-unit';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
import { isIOS } from '@nativescript/core/platform';
|
import { isIOS } from '@nativescript/core/platform';
|
||||||
|
|
||||||
export function test_GC_isDefined() {
|
export function test_GC_isDefined() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { TabView } from '@nativescript/core/ui/tab-view';
|
import { TabView } from '@nativescript/core';
|
||||||
import * as utils from '@nativescript/core/utils/utils';
|
import * as utils from '@nativescript/core/utils';
|
||||||
|
|
||||||
const titles = ['Etiam lacinia', 'Imperdiet ante', 'A interdum', 'Quisque tempus', 'Sodales viverra'];
|
const titles = ['Etiam lacinia', 'Imperdiet ante', 'A interdum', 'Quisque tempus', 'Sodales viverra'];
|
||||||
const bodies = [
|
const bodies = [
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { ad } from '@nativescript/core/utils/utils';
|
import { Utils } from '@nativescript/core';
|
||||||
import { isAndroid } from '@nativescript/core/platform';
|
|
||||||
|
|
||||||
export function onButtonLoaded(args) {
|
export function onButtonLoaded(args) {
|
||||||
if (args.object.android) {
|
if (args.object.android) {
|
||||||
@ -14,7 +13,5 @@ export function onListViewLoaded(args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function hideKeyboard() {
|
export function hideKeyboard() {
|
||||||
if (isAndroid) {
|
Utils.dismissSoftInput();
|
||||||
ad.dismissSoftInput();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as textModule from '../text';
|
import * as textModule from '../text';
|
||||||
import { getNativeApplication } from '../application';
|
import { getNativeApplication } from '../application';
|
||||||
import { SDK_VERSION } from '../utils/utils';
|
import { SDK_VERSION } from '../utils';
|
||||||
|
|
||||||
import type { IFileSystemAccess } from './file-system-access';
|
import type { IFileSystemAccess } from './file-system-access';
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import { ad } from './native-helper';
|
import { ad } from './native-helper';
|
||||||
import { SDK_VERSION } from '../utils';
|
|
||||||
import { FileSystemAccess } from '../file-system/file-system-access';
|
import { FileSystemAccess } from '../file-system/file-system-access';
|
||||||
import { Trace } from '../trace';
|
import { Trace } from '../trace';
|
||||||
|
|
||||||
export { ad, dataDeserialize, dataSerialize, iOSNativeHelper } from './native-helper';
|
export { ad, dataDeserialize, dataSerialize, iOSNativeHelper } from './native-helper';
|
||||||
export * from './utils-common';
|
export * from './common';
|
||||||
export { Source } from './debug';
|
export { Source } from './debug';
|
||||||
|
|
||||||
|
export const SDK_VERSION = android.os.Build.VERSION.SDK_INT;
|
||||||
|
|
||||||
const MIN_URI_SHARE_RESTRICTED_APK_VERSION = 24;
|
const MIN_URI_SHARE_RESTRICTED_APK_VERSION = 24;
|
||||||
|
|
||||||
export function GC() {
|
export function GC() {
|
||||||
|
@ -2,9 +2,11 @@ import { iOSNativeHelper } from './native-helper';
|
|||||||
import { Trace } from '../trace';
|
import { Trace } from '../trace';
|
||||||
|
|
||||||
export { dataDeserialize, dataSerialize, iOSNativeHelper } from './native-helper';
|
export { dataDeserialize, dataSerialize, iOSNativeHelper } from './native-helper';
|
||||||
export * from './utils-common';
|
export * from './common';
|
||||||
export { Source } from './debug';
|
export { Source } from './debug';
|
||||||
|
|
||||||
|
export const SDK_VERSION = parseFloat(UIDevice.currentDevice.systemVersion);
|
||||||
|
|
||||||
export function openFile(filePath: string): boolean {
|
export function openFile(filePath: string): boolean {
|
||||||
try {
|
try {
|
||||||
const appPath = iOSNativeHelper.getCurrentAppPath();
|
const appPath = iOSNativeHelper.getCurrentAppPath();
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
/**
|
|
||||||
* A lot of plugins still used utils/utils
|
|
||||||
* Left here for convenience (over time can eventually remove these)
|
|
||||||
*/
|
|
||||||
export * from './index';
|
|
||||||
|
|
||||||
export const SDK_VERSION = android.os.Build.VERSION.SDK_INT;
|
|
1
packages/core/utils/utils.d.ts
vendored
1
packages/core/utils/utils.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export * from './index';
|
|
@ -1,7 +0,0 @@
|
|||||||
/**
|
|
||||||
* A lot of plugins still used utils/utils
|
|
||||||
* Left here for convenience (over time can eventually remove these)
|
|
||||||
*/
|
|
||||||
export * from './index';
|
|
||||||
|
|
||||||
export const SDK_VERSION = parseFloat(UIDevice.currentDevice.systemVersion);
|
|
Reference in New Issue
Block a user