mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Merge branch 'master' of github.com:NativeScript/NativeScript
# Conflicts: # .eslintrc.json # packages/core/ui/core/bindable/index.ts # tsconfig.eslint.json
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
{
|
||||
"extends": ["plugin:prettier/recommended"],
|
||||
"extends": ["plugin:prettier/recommended"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"project": "tsconfig.eslint.json",
|
||||
"warnOnUnsupportedTypeScriptVersion": false
|
||||
"sourceType": "module",
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"project": "tsconfig.eslint.json",
|
||||
"warnOnUnsupportedTypeScriptVersion": false
|
||||
},
|
||||
"plugins": ["prettier", "@nativescript"],
|
||||
"rules": {
|
||||
|
25
CHANGELOG.md
25
CHANGELOG.md
@ -1,3 +1,28 @@
|
||||
## [8.0.3](https://github.com/NativeScript/NativeScript/compare/8.0.2-core...8.0.3) (2021-04-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **core:** protected class getter/setter webpack issue ([6076047](https://github.com/NativeScript/NativeScript/commit/6076047c4fa557e2eb1217e174c4b700ca4ab61c))
|
||||
* **core:** typings issue around Trace.categories.All ([27c545d](https://github.com/NativeScript/NativeScript/commit/27c545db00bb57a8989612002aba859ff43581f2))
|
||||
|
||||
|
||||
|
||||
## [8.0.2](https://github.com/NativeScript/NativeScript/compare/8.0.1-core...8.0.2) (2021-04-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **a11y:** Accessibility breaks limiting metadata ([#9332](https://github.com/NativeScript/NativeScript/issues/9332)) ([cbdff1f](https://github.com/NativeScript/NativeScript/commit/cbdff1f1550a4e7cf06ccd4f01c5cd743c68e265))
|
||||
* **a11y:** ios voiceover crash during touch ([#9318](https://github.com/NativeScript/NativeScript/issues/9318)) ([9a407ce](https://github.com/NativeScript/NativeScript/commit/9a407ce98964832c52cd51dc0ab60662fc65abb5))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **text-base:** allow subclass to override createFormattedTextNative ([#9334](https://github.com/NativeScript/NativeScript/issues/9334)) ([b29e145](https://github.com/NativeScript/NativeScript/commit/b29e1452bda27183993c2f27ab13f95d9da5ceee))
|
||||
|
||||
|
||||
|
||||
## [8.0.1](https://github.com/NativeScript/NativeScript/compare/8.0.0-core...8.0.1) (2021-04-07)
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
"@nativescript/android": "7.0.1",
|
||||
"@nativescript/ios": "7.2.0",
|
||||
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
|
||||
"typescript": "file:../../node_modules/typescript"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"gitHead": "c06800e52ee1a184ea2dffd12a6702aaa43be4e3",
|
||||
"readme": "NativeScript Application"
|
||||
|
@ -14,6 +14,6 @@
|
||||
"@nativescript/android": "7.0.1",
|
||||
"@nativescript/ios": "7.2.0",
|
||||
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
|
||||
"typescript": "4.0.7"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
"@nativescript/android": "7.0.1",
|
||||
"@nativescript/ios": "7.2.0",
|
||||
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
|
||||
"typescript": "file:../../node_modules/typescript"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
|
||||
"readme": "NativeScript Application",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { EventData, TextBase } from '@nativescript/core';
|
||||
import { EventData, TextBase, parseCSSShadow } from '@nativescript/core';
|
||||
|
||||
// prettier-ignore
|
||||
const possibleValues = [
|
||||
@ -22,10 +22,10 @@ export function buttonTap(args: EventData) {
|
||||
let newIndex = currentIndex++ % possibleValues.length;
|
||||
let newValue = possibleValues[newIndex];
|
||||
|
||||
lbl.textShadow = newValue;
|
||||
btn.textShadow = newValue;
|
||||
textField.textShadow = newValue;
|
||||
textView.textShadow = newValue;
|
||||
lbl.textShadow = parseCSSShadow(newValue);
|
||||
btn.textShadow = parseCSSShadow(newValue);
|
||||
textField.textShadow = parseCSSShadow(newValue);
|
||||
textView.textShadow = parseCSSShadow(newValue);
|
||||
|
||||
if (lbl.text === 'Change text') {
|
||||
lbl.text = btn.text = textField.text = textView.text = 'Text changed';
|
||||
|
@ -3,7 +3,7 @@ import { Page, NavigatedData } from '@nativescript/core/ui/page';
|
||||
import { StackLayout } from '@nativescript/core/ui/layouts/stack-layout';
|
||||
import { ScrollView } from '@nativescript/core/ui/scroll-view';
|
||||
import { Label } from '@nativescript/core/ui/label';
|
||||
import { Enums } from '@nativescript/core';
|
||||
import { CoreTypes } from '@nativescript/core';
|
||||
import * as typeUtils from '@nativescript/core/utils/types';
|
||||
import { Color } from '@nativescript/core/color';
|
||||
import { isIOS } from '@nativescript/core/platform';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Image, Enums } from '@nativescript/core';
|
||||
import { Image, CoreTypes } from '@nativescript/core';
|
||||
import { GridLayout } from '@nativescript/core/ui/layouts/grid-layout';
|
||||
import { Color } from '@nativescript/core/color';
|
||||
import * as imageSource from '@nativescript/core/image-source';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Image, Enums } from '@nativescript/core';
|
||||
import { Image, CoreTypes } from '@nativescript/core';
|
||||
import { Label } from '@nativescript/core/ui/label';
|
||||
import { LayoutBase } from '@nativescript/core/ui/layouts/layout-base';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Enums } from '@nativescript/core';
|
||||
import { CoreTypes } from '@nativescript/core';
|
||||
import * as pageModule from '@nativescript/core/ui/page';
|
||||
import * as model from './myview';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Enums } from '@nativescript/core';
|
||||
import { CoreTypes } from '@nativescript/core';
|
||||
import * as pageModule from '@nativescript/core/ui/page';
|
||||
import * as model from './myview';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Enums } from '@nativescript/core';
|
||||
import { CoreTypes } from '@nativescript/core';
|
||||
import * as pageModule from '@nativescript/core/ui/page';
|
||||
import * as model from './myview';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Enums } from '@nativescript/core';
|
||||
import { CoreTypes } from '@nativescript/core';
|
||||
import * as pageModule from '@nativescript/core/ui/page';
|
||||
import * as model from './myview';
|
||||
|
||||
|
28
package.json
28
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nativescript",
|
||||
"version": "8.0.1",
|
||||
"version": "8.0.3",
|
||||
"license": "MIT",
|
||||
"config": {
|
||||
"npm_alias": "npm"
|
||||
@ -48,31 +48,31 @@
|
||||
"nativescript-theme-core": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nativescript/eslint-plugin": "0.0.1",
|
||||
"@nativescript/eslint-plugin": "~0.0.4",
|
||||
"@nativescript/hook": "^2.0.0",
|
||||
"@nrwl/cli": "11.5.2",
|
||||
"@nrwl/eslint-plugin-nx": "11.5.2",
|
||||
"@nrwl/jest": "11.5.2",
|
||||
"@nrwl/node": "11.5.2",
|
||||
"@nrwl/tao": "11.5.2",
|
||||
"@nrwl/workspace": "11.5.2",
|
||||
"@nrwl/cli": "12.0.8",
|
||||
"@nrwl/eslint-plugin-nx": "12.0.8",
|
||||
"@nrwl/jest": "12.0.8",
|
||||
"@nrwl/node": "12.0.8",
|
||||
"@nrwl/tao": "12.0.8",
|
||||
"@nrwl/workspace": "12.0.8",
|
||||
"@nstudio/focus": "~11.1.0",
|
||||
"@nstudio/nps-i": "~1.1.0",
|
||||
"@prettier/plugin-xml": "^0.13.1",
|
||||
"@types/chai": "^4.2.11",
|
||||
"@types/jest": "~26.0.8",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"@types/node": "12.12.38",
|
||||
"@typescript-eslint/eslint-plugin": "~4.16.0",
|
||||
"@typescript-eslint/parser": "~4.16.0",
|
||||
"@types/node": "14.14.33",
|
||||
"@typescript-eslint/eslint-plugin": "4.19.0",
|
||||
"@typescript-eslint/parser": "4.19.0",
|
||||
"chai": "^4.2.0",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"copyfiles": "^2.4.0",
|
||||
"cpy-cli": "^3.1.1",
|
||||
"css": "^3.0.0",
|
||||
"css-tree": "^1.0.0-alpha.39",
|
||||
"dotenv": "~8.2.0",
|
||||
"eslint": "~7.21.0",
|
||||
"dotenv": "8.2.0",
|
||||
"eslint": "7.22.0",
|
||||
"eslint-config-prettier": "8.1.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"gonzales": "^1.0.7",
|
||||
@ -97,7 +97,7 @@
|
||||
"ts-patch": "^1.3.0",
|
||||
"tslib": "2.1.0",
|
||||
"tslint": "6.1.3",
|
||||
"typescript": "~4.0.3",
|
||||
"typescript": "4.1.4",
|
||||
"webpack": "~4.44.1",
|
||||
"webpack-cli": "~3.3.12"
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "../../.eslintrc",
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {},
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"ignorePatterns": ["!**/*", "**/node_modules/**/*", "**/__tests__/**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
|
@ -222,7 +222,6 @@ export function updateAccessibilityProperties(view: View): void {
|
||||
uiView.accessibilityTraits = a11yTraits;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
export const sendAccessibilityEvent = (): void => {};
|
||||
export const updateContentDescription = (): string | null => null;
|
||||
|
||||
|
@ -4,7 +4,6 @@ import { AndroidActivityBackPressedEventData, AndroidActivityBundleEventData, An
|
||||
|
||||
// TODO: explain why we need to this or remov it
|
||||
// Use requires to ensure order of imports is maintained
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const appCommon = require('./application-common');
|
||||
|
||||
// First reexport so that app module is initialized.
|
||||
|
@ -4,7 +4,6 @@ import { ApplicationEventData, CssChangedEventData, LaunchEventData, LoadAppCSSE
|
||||
|
||||
// TODO: explain why we need to this or remov it
|
||||
// Use requires to ensure order of imports is maintained
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const { displayedEvent, exitEvent, getCssFileName, launchEvent, livesync, lowMemoryEvent, notify, on, orientationChanged, orientationChangedEvent, resumeEvent, setApplication, suspendEvent, systemAppearanceChanged, systemAppearanceChangedEvent } = require('./application-common');
|
||||
// First reexport so that app module is initialized.
|
||||
export * from './application-common';
|
||||
|
@ -12,7 +12,6 @@ interface IConfigPlatform {
|
||||
discardUncaughtJsExceptions?: boolean;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface IConfigIOS extends IConfigPlatform {}
|
||||
|
||||
interface IConfigAndroid extends IConfigPlatform {
|
||||
|
@ -30,7 +30,6 @@ function getActiveNetworkInfo(): android.net.NetworkInfo {
|
||||
}
|
||||
|
||||
function getNetworkCapabilities() {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const connectivityManager: any = getConnectivityManager();
|
||||
const network = connectivityManager.getActiveNetwork();
|
||||
@ -39,7 +38,6 @@ function getNetworkCapabilities() {
|
||||
return connectionType.none;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const NetworkCapabilities = (android as any).net.NetworkCapabilities;
|
||||
|
||||
@ -101,13 +99,11 @@ export function getConnectionType(): number {
|
||||
}
|
||||
|
||||
function startMonitoringLegacy(connectionTypeChangedCallback) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const onReceiveCallback = function onReceiveCallback(context: android.content.Context, intent: android.content.Intent) {
|
||||
const newConnectionType = getConnectionType();
|
||||
connectionTypeChangedCallback(newConnectionType);
|
||||
};
|
||||
const zoneCallback = zonedCallback(onReceiveCallback);
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
androidApp.registerBroadcastReceiver(android.net.ConnectivityManager.CONNECTIVITY_ACTION, zoneCallback);
|
||||
}
|
||||
@ -129,21 +125,18 @@ export function startMonitoring(connectionTypeChangedCallback: (newConnectionTyp
|
||||
if (!networkCallback) {
|
||||
@NativeClass
|
||||
class NetworkCallbackImpl extends ConnectivityManager.NetworkCallback {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
onAvailable(network: android.net.Network) {
|
||||
if (notifyCallback) {
|
||||
notifyCallback();
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
onCapabilitiesChanged(network: android.net.Network, networkCapabilities: android.net.NetworkCapabilities) {
|
||||
if (notifyCallback) {
|
||||
notifyCallback();
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
onLost(network) {
|
||||
if (notifyCallback) {
|
||||
notifyCallback();
|
||||
@ -169,7 +162,6 @@ export function startMonitoring(connectionTypeChangedCallback: (newConnectionTyp
|
||||
|
||||
export function stopMonitoring(): void {
|
||||
if (android.os.Build.VERSION.SDK_INT >= 28) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const manager = getConnectivityManager();
|
||||
if (manager && callback) {
|
||||
|
@ -6,13 +6,11 @@ import { getNodeById } from './dom-node';
|
||||
import { mainThreadify } from '../utils';
|
||||
|
||||
// Use lazy requires for core modules
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const getAppRootView = () => require('../application').getRootView();
|
||||
|
||||
let unsetValue;
|
||||
function unsetViewValue(view, name) {
|
||||
if (!unsetValue) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
unsetValue = require('../ui/core/properties').unsetValue;
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,8 @@ function lazy<T>(action: () => T): () => T {
|
||||
|
||||
return () => _value || (_value = action());
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const percentLengthToStringLazy = lazy<(length) => string>(() => require('../ui/styling/style-properties').PercentLength.convertToString);
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const getSetPropertiesLazy = lazy<(view: ViewBase) => [string, any][]>(() => require('../ui/core/properties').getSetProperties);
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const getComputedCssValuesLazy = lazy<(view: ViewBase) => [string, any][]>(() => require('../ui/core/properties').getComputedCssValues);
|
||||
|
||||
export function registerInspectorEvents(inspector: InspectorEvents) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as inspectorCommandTypes from './InspectorBackendCommands.ios';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const inspectorCommands: typeof inspectorCommandTypes = require('./InspectorBackendCommands');
|
||||
|
||||
import * as debuggerDomains from '.';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as inspectorCommandTypes from './InspectorBackendCommands.ios';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const inspectorCommands: typeof inspectorCommandTypes = require('./InspectorBackendCommands');
|
||||
|
||||
import * as debuggerDomains from '.';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as inspectorCommandTypes from './InspectorBackendCommands.ios';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const inspectorCommands: typeof inspectorCommandTypes = require('./InspectorBackendCommands');
|
||||
|
||||
import * as debuggerDomains from '.';
|
||||
|
@ -74,7 +74,7 @@ export class FileSystemEntity {
|
||||
|
||||
this.removeSync(localError);
|
||||
if (!hasError) {
|
||||
resolve();
|
||||
resolve(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -108,7 +108,7 @@ export class FileSystemEntity {
|
||||
this.renameSync(newName, localError);
|
||||
|
||||
if (!hasError) {
|
||||
resolve();
|
||||
resolve(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -357,7 +357,7 @@ export class File extends FileSystemEntity {
|
||||
.writeTextAsync(this.path, content, encoding)
|
||||
.then(
|
||||
() => {
|
||||
resolve();
|
||||
resolve(true);
|
||||
this._locked = false;
|
||||
},
|
||||
(error) => {
|
||||
@ -434,7 +434,7 @@ export class Folder extends FileSystemEntity {
|
||||
|
||||
this.clearSync(onError);
|
||||
if (!hasError) {
|
||||
resolve();
|
||||
resolve(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
30
packages/core/global-types.d.ts
vendored
30
packages/core/global-types.d.ts
vendored
@ -348,3 +348,33 @@ declare class WeakRef<T> {
|
||||
get(): T;
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Java long from a number
|
||||
*/
|
||||
declare function long(value: number): any;
|
||||
|
||||
/**
|
||||
* Create a Java byte from a number
|
||||
*/
|
||||
declare function byte(value: number): any;
|
||||
|
||||
/**
|
||||
* Create a Java short from a number
|
||||
*/
|
||||
declare function short(value: number): any;
|
||||
|
||||
/**
|
||||
* Create a Java double from a number
|
||||
*/
|
||||
declare function double(value: number): any;
|
||||
|
||||
/**
|
||||
* Create a Java float from a number
|
||||
*/
|
||||
declare function float(value: number): any;
|
||||
|
||||
/**
|
||||
* Create a Java char from a string
|
||||
*/
|
||||
declare function char(value: string): any;
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as tslibType from 'tslib';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const tslib: typeof tslibType = require('tslib');
|
||||
import { Observable } from '../data/observable';
|
||||
import { trace as profilingTrace, time, uptime, level as profilingLevel } from '../profiling';
|
||||
|
@ -3,7 +3,7 @@
|
||||
"main": "index",
|
||||
"types": "index.d.ts",
|
||||
"description": "NativeScript Core Modules",
|
||||
"version": "8.0.1",
|
||||
"version": "8.0.3",
|
||||
"homepage": "https://nativescript.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -25,6 +25,6 @@
|
||||
"androidx.viewpager.widget*:*",
|
||||
"androidx.fragment*:*",
|
||||
"androidx.transition*:*",
|
||||
"android.inputmethodservice*:*"
|
||||
"android.inputmethodservice*:*"
|
||||
]
|
||||
}
|
||||
|
@ -160,7 +160,6 @@ export function enable(mode: InstrumentationMode = 'counters') {
|
||||
}
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const appConfig = require('~/package.json');
|
||||
if (appConfig && appConfig.profiling) {
|
||||
enable(appConfig.profiling);
|
||||
|
2
packages/core/trace/index.d.ts
vendored
2
packages/core/trace/index.d.ts
vendored
@ -121,7 +121,7 @@ export namespace Trace {
|
||||
export const ModuleNameResolver = 'ModuleNameResolver';
|
||||
|
||||
export const separator = ',';
|
||||
export const All: Array<string>;
|
||||
export const All: string;
|
||||
|
||||
export function concat(...args: any): string;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ export namespace Trace {
|
||||
export const ModuleNameResolver = 'ModuleNameResolver';
|
||||
|
||||
export const separator = ',';
|
||||
export const All = [VisualTreeEvents, Layout, Style, ViewHierarchy, NativeLifecycle, Debug, Navigation, Test, Binding, Error, Animation, Transition, Livesync, ModuleNameResolver].join(separator);
|
||||
export const All: string = [VisualTreeEvents, Layout, Style, ViewHierarchy, NativeLifecycle, Debug, Navigation, Test, Binding, Error, Animation, Transition, Livesync, ModuleNameResolver].join(separator);
|
||||
|
||||
export function concat(...args: any): string {
|
||||
let result: string;
|
||||
|
@ -95,7 +95,6 @@ const createComponentInstance = profile('createComponentInstance', (elementName:
|
||||
// Create instance of the component.
|
||||
instance = new instanceType();
|
||||
} catch (ex) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const debug: typeof debugModule = require('../../../utils/debug');
|
||||
throw new debug.ScopeError(ex, "Module '" + (resolvedModuleName || elementName) + "' not found for element '" + (namespace ? namespace + ':' : '') + elementName + "'.");
|
||||
}
|
||||
|
4
packages/core/ui/core/view-base/index.d.ts
vendored
4
packages/core/ui/core/view-base/index.d.ts
vendored
@ -187,14 +187,14 @@ export abstract class ViewBase extends Observable {
|
||||
* @param moduleName - The name of the module to load starting from the application root.
|
||||
* @param modalOptions - A ShowModalOptions instance
|
||||
*/
|
||||
showModal(moduleName: string, modalOptions: ShowModalOptions): ViewBase;
|
||||
showModal(moduleName: string, modalOptions?: ShowModalOptions): ViewBase;
|
||||
|
||||
/**
|
||||
* Shows the view passed as parameter as a modal view.
|
||||
* @param view - View instance to be shown modally.
|
||||
* @param modalOptions - A ShowModalOptions instance
|
||||
*/
|
||||
showModal(view: ViewBase, modalOptions: ShowModalOptions): ViewBase;
|
||||
showModal(view: ViewBase, modalOptions?: ShowModalOptions): ViewBase;
|
||||
|
||||
/**
|
||||
* Closes the current modal view that this page is showing.
|
||||
|
@ -390,10 +390,10 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition
|
||||
return this._isLoaded;
|
||||
}
|
||||
|
||||
get class(): string {
|
||||
get ['class'](): string {
|
||||
return this.className;
|
||||
}
|
||||
set class(v: string) {
|
||||
set ['class'](v: string) {
|
||||
this.className = v;
|
||||
}
|
||||
|
||||
|
@ -67,4 +67,4 @@ export const iosPreferredDatePickerStyleProperty = new Property<DatePickerBase,
|
||||
defaultValue: 0,
|
||||
valueConverter: (v) => parseInt(v),
|
||||
});
|
||||
iosPreferredDatePickerStyleProperty.register(DatePickerBase);
|
||||
iosPreferredDatePickerStyleProperty.register(DatePickerBase);
|
||||
|
@ -268,7 +268,6 @@ let textField: View;
|
||||
|
||||
export function getButtonColors(): { color: Color; backgroundColor: Color } {
|
||||
if (!button) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const Button = require('../button').Button;
|
||||
button = new Button();
|
||||
if (global.isIOS) {
|
||||
@ -288,7 +287,6 @@ export function getButtonColors(): { color: Color; backgroundColor: Color } {
|
||||
|
||||
export function getLabelColor(): Color {
|
||||
if (!label) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const Label = require('../label').Label;
|
||||
label = new Label();
|
||||
if (global.isIOS) {
|
||||
@ -306,7 +304,6 @@ export function getLabelColor(): Color {
|
||||
|
||||
export function getTextFieldColor(): Color {
|
||||
if (!textField) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const TextField = require('../text-field').TextField;
|
||||
textField = new TextField();
|
||||
if (global.isIOS) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import '../../globals';
|
||||
import { setActivityCallbacks, AndroidActivityCallbacks } from '.';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const appModule = require('../../application');
|
||||
|
||||
/**
|
||||
|
@ -289,7 +289,6 @@ export class FrameBase extends CustomLayoutView {
|
||||
}
|
||||
|
||||
private isNestedWithin(parentFrameCandidate: FrameBase): boolean {
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
let frameAncestor: FrameBase = this;
|
||||
while (frameAncestor) {
|
||||
frameAncestor = <FrameBase>getAncestor(frameAncestor, FrameBase);
|
||||
|
@ -41,7 +41,6 @@ let fragmentId = -1;
|
||||
export let moduleLoaded: boolean;
|
||||
|
||||
if (global && global.__inspector) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const devtools = require('../../debugger/devtools-elements');
|
||||
devtools.attachDOMInspectorEventCallbacks(global.__inspector);
|
||||
devtools.attachDOMInspectorCommandCallbacks(global.__inspector);
|
||||
|
@ -31,7 +31,6 @@ function ensureCssAnimationParserModule() {
|
||||
|
||||
let parser: 'rework' | 'nativescript' | 'css-tree' = 'css-tree';
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const appConfig = require('~/package.json');
|
||||
if (appConfig) {
|
||||
if (appConfig.cssParser === 'rework') {
|
||||
|
2
packages/core/ui/time-picker/index.d.ts
vendored
2
packages/core/ui/time-picker/index.d.ts
vendored
@ -77,4 +77,4 @@ export const minMinuteProperty: Property<TimePicker, number>;
|
||||
export const timeProperty: Property<TimePicker, Date>;
|
||||
export const minuteIntervalProperty: Property<TimePicker, number>;
|
||||
|
||||
export const iosPreferredDatePickerStyleProperty: Property<TimePicker, number>;
|
||||
export const iosPreferredDatePickerStyleProperty: Property<TimePicker, number>;
|
||||
|
@ -2,7 +2,6 @@
|
||||
// https://github.com/NativeScript/nativescript-dev-webpack/issues/932
|
||||
|
||||
import * as definition from '.';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const easysax = require('../js-libs/easysax');
|
||||
import { EasySAXParser } from '../js-libs/easysax';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nativescript/types-android",
|
||||
"version": "8.0.0",
|
||||
"version": "8.0.1",
|
||||
"description": "NativeScript Types for Android.",
|
||||
"homepage": "https://nativescript.org",
|
||||
"repository": {
|
||||
|
@ -37,7 +37,7 @@
|
||||
export function readText(path: string, encoding: string, callback: CompleteCallback, context: any);
|
||||
export function read(path: string, callback: CompleteCallback, context: any);
|
||||
export function writeText(path: string, content: string, encoding: string, callback: CompleteCallback, context: any);
|
||||
export function write(path: string, content: native.Array<number>, callback: CompleteCallback, context: any);
|
||||
export function write(path: string, content: androidNative.Array<number>, callback: CompleteCallback, context: any);
|
||||
}
|
||||
|
||||
export module Http {
|
||||
@ -108,9 +108,9 @@
|
||||
context: android.content.Context,
|
||||
backgroundRepeat: string,
|
||||
backgroundPosition: string,
|
||||
backgroundPositionParsedCSSValues: native.Array<CSSValue>,
|
||||
backgroundPositionParsedCSSValues: androidNative.Array<CSSValue>,
|
||||
backgroundSize: string,
|
||||
backgroundSizeParsedCSSValues: native.Array<CSSValue>
|
||||
backgroundSizeParsedCSSValues: androidNative.Array<CSSValue>
|
||||
);
|
||||
|
||||
public getBorderTopColor(): number;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nativescript/types-ios",
|
||||
"version": "8.0.0",
|
||||
"version": "8.0.1",
|
||||
"description": "NativeScript Types for iOS.",
|
||||
"homepage": "https://nativescript.org",
|
||||
"repository": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nativescript/types",
|
||||
"version": "8.0.0",
|
||||
"version": "8.0.1",
|
||||
"description": "NativeScript Types for all supported platforms.",
|
||||
"homepage": "https://nativescript.org",
|
||||
"repository": {
|
||||
@ -12,7 +12,7 @@
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@nativescript/types-ios": "8.0.0",
|
||||
"@nativescript/types-android": "8.0.0"
|
||||
"@nativescript/types-ios": "8.0.1",
|
||||
"@nativescript/types-android": "8.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +102,6 @@
|
||||
"nyc": "^15.1.0",
|
||||
"proxyquire": "~2.1.0",
|
||||
"source-map-support": "^0.5.13",
|
||||
"typescript": "~4.0.0"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ fi
|
||||
|
||||
echo "Creating typings project with @nativescript/ios@$IOS_RUNTIME_VERSION..."
|
||||
rm -rf ios-typings-prj
|
||||
ns create --js ios-typings-prj
|
||||
ns create --template @nativescript/template-blank@7.0.4 ios-typings-prj
|
||||
ns platform add ios@$IOS_RUNTIME_VERSION --path ios-typings-prj/
|
||||
|
||||
if [ -n "$METADATA_GENERATOR_PATH" ]
|
||||
|
@ -1,4 +1,10 @@
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["packages/**/*"]
|
||||
}
|
||||
}
|
||||
=======
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["packages/**/*"]
|
||||
}
|
||||
>>>>>>> 9ec404225ef0cff5f82d759fcdc7b85952e65c0d
|
||||
|
Reference in New Issue
Block a user