mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-19 23:13:04 +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:
@ -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>;
|
||||
|
Reference in New Issue
Block a user