Merge remote-tracking branch 'origin/master' into svetoslavtsenov/merge-release-in-master

This commit is contained in:
SvetoslavTsenov
2019-07-16 13:26:15 +03:00
22 changed files with 104 additions and 78 deletions

View File

@@ -53,7 +53,7 @@ const createComponentInstance = profile("createComponentInstance", (elementName:
// Create instance of the component.
instance = new instanceType();
} catch (ex) {
const debug: typeof debugModule = require("utils/debug");
const debug: typeof debugModule = require("../../../utils/debug");
throw new debug.ScopeError(ex, "Module '" + resolvedModuleName + "' not found for element '" + (namespace ? namespace + ":" : "") + elementName + "'.");
}

View File

@@ -37,7 +37,7 @@ function ensuredomNodeModule(): void {
let styleScopeModule: typeof ssm;
function ensureStyleScopeModule() {
if (!styleScopeModule) {
styleScopeModule = require("ui/styling/style-scope");
styleScopeModule = require("../../styling/style-scope");
}
}

View File

@@ -34,7 +34,7 @@ import * as am from "../../animation";
let animationModule: typeof am;
function ensureAnimationModule() {
if (!animationModule) {
animationModule = require("ui/animation");
animationModule = require("../../animation");
}
}

View File

@@ -78,7 +78,7 @@ export module capitalizationType {
let frame: typeof frameModule;
export function getCurrentPage(): Page {
if (!frame) {
frame = require("ui/frame");
frame = require("../frame");
}
let topmostFrame = frame.topmost();
@@ -108,7 +108,7 @@ let textField: View;
export function getButtonColors(): { color: Color, backgroundColor: Color } {
if (!button) {
const Button = require("ui/button").Button;
const Button = require("../button").Button;
button = new Button;
if (isIOS) {
button._setupUI({});
@@ -127,7 +127,7 @@ export function getButtonColors(): { color: Color, backgroundColor: Color } {
export function getLabelColor(): Color {
if (!label) {
const Label = require("ui/label").Label;
const Label = require("../label").Label;
label = new Label;
if (isIOS) {
label._setupUI({});
@@ -144,7 +144,7 @@ export function getLabelColor(): Color {
export function getTextFieldColor(): Color {
if (!textField) {
const TextField = require("ui/text-field").TextField;
const TextField = require("../text-field").TextField;
textField = new TextField();
if (isIOS) {
textField._setupUI({});

View File

@@ -177,7 +177,7 @@ export module AnimationCurve {
export const linear = "linear";
export const spring = "spring";
export function cubicBezier(x1: number, y1: number, x2: number, y2: number): Object {
animation = animation || require("ui/animation");
animation = animation || require("../animation");
return new animation.CubicBezierAnimationCurve(x1, y1 , x2, y2);
}

View File

@@ -46,7 +46,7 @@ let fragmentId = -1;
export let moduleLoaded: boolean;
if (global && global.__inspector) {
const devtools = require("tns-core-modules/debugger/devtools-elements");
const devtools = require("../../debugger/devtools-elements");
devtools.attachDOMInspectorEventCallbacks(global.__inspector);
devtools.attachDOMInspectorCommandCallbacks(global.__inspector);
}
@@ -754,7 +754,7 @@ function ensureFragmentClass() {
}
// this require will apply the FragmentClass implementation
require("ui/frame/fragment");
require("./fragment");
if (!fragmentClass) {
throw new Error("Failed to initialize the extended androidx.fragment.app.Fragment class");

View File

@@ -30,7 +30,7 @@ export class Frame extends View {
* This method will require the module and will check for a Page property in the exports of the module.
* @param pageModuleName The name of the module to require starting from the application root.
* For example if you want to navigate to page called "myPage.js" in a folder called "subFolder" and your root folder is "app" you can call navigate method like this:
* const frames = require("ui/frame");
* const frames = require("tns-core-modules/ui/frame");
* frames.topmost().navigate("app/subFolder/myPage");
*/
navigate(pageModuleName: string);

View File

@@ -8,7 +8,7 @@ import * as utils from "../../utils/utils";
let httpRequest: typeof httpRequestModule;
function ensureHttpRequest() {
if (!httpRequest) {
httpRequest = require("http/http-request");
httpRequest = require("../../http/http-request");
}
}

View File

@@ -35,7 +35,7 @@ import * as kam from "../animation/keyframe-animation";
let keyframeAnimationModule: typeof kam;
function ensureKeyframeAnimationModule() {
if (!keyframeAnimationModule) {
keyframeAnimationModule = require("ui/animation/keyframe-animation");
keyframeAnimationModule = require("../animation/keyframe-animation");
}
}