Merge branch 'main' into fix/safe-area-layout-fixes

This commit is contained in:
Nathan Walker
2023-02-15 12:29:07 -08:00
committed by GitHub
9 changed files with 48 additions and 34 deletions

View File

@@ -4,7 +4,9 @@
"diagnostics": false,
"paths": {
"~/*": ["src/*"],
"tns-core-modules/*": ["@nativescript/core/*"]
"tns-core-modules/*": ["@nativescript/core/*"],
"@nativescript/core": ["../../packages/core/index.ts"],
"@nativescript/core/*": ["../../packages/core/*"]
}
}
}

20
migrations.json Normal file
View File

@@ -0,0 +1,20 @@
{
"migrations": [
{
"version": "15.7.0-beta.0",
"description": "Split global configuration files into individual project.json files. This migration has been added automatically to the beginning of your migration set to retroactively make them work with the new version of Nx.",
"cli": "nx",
"implementation": "./src/migrations/update-15-7-0/split-configuration-into-project-json-files",
"package": "@nrwl/workspace",
"name": "15-7-0-split-configuration-into-project-json-files"
},
{
"version": "15.7.0-beta.0",
"description": "Split global configuration files (e.g., workspace.json) into individual project.json files.",
"cli": "nx",
"implementation": "./src/migrations/update-15-7-0/split-configuration-into-project-json-files",
"package": "@nrwl/workspace",
"name": "15-7-0-split-configuration-into-project-json-files"
}
]
}

View File

@@ -24,11 +24,11 @@
"devDependencies": {
"@nativescript/hook": "^2.0.0",
"@nativescript/nx": "~4.2.0",
"@nrwl/cli": "15.6.3",
"@nrwl/eslint-plugin-nx": "15.6.3",
"@nrwl/jest": "15.6.3",
"@nrwl/node": "15.6.3",
"@nrwl/workspace": "15.6.3",
"@nrwl/cli": "15.7.0",
"@nrwl/eslint-plugin-nx": "15.7.0",
"@nrwl/jest": "15.7.0",
"@nrwl/node": "15.7.0",
"@nrwl/workspace": "15.7.0",
"@nstudio/focus": "^15.0.0",
"@nstudio/nps-i": "~2.0.0",
"@prettier/plugin-xml": "^2.2.0",
@@ -51,7 +51,7 @@
"module-alias": "^2.2.2",
"nativescript": "~8.4.0",
"nativescript-typedoc-theme": "1.1.0",
"nx": "15.6.3",
"nx": "15.7.0",
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
"parserlib": "^1.1.1",
"prettier": "^2.6.2",

View File

@@ -247,9 +247,8 @@ export class iOSApplication implements iOSApplicationDefinition {
cssFile: getCssFileName(),
});
// this._window will be undefined when NS app is embedded in a native one
if (this._window) {
if (args.root !== null) {
if (args.root !== null && !NativeScriptEmbedder.sharedInstance().delegate) {
this.setWindowContent(args.root);
}
} else {

View File

@@ -10,6 +10,7 @@ import { Observable, EventData } from '../../data/observable';
import { ObservableArray, ChangedData } from '../../data/observable-array';
import { addWeakEventListener, removeWeakEventListener } from '../core/weak-event-listener';
import { CoreTypes } from '../../core-types';
import { isFunction } from '../../utils/types';
const autoEffectiveRowHeight = -1;
@@ -28,8 +29,13 @@ export abstract class ListViewBase extends ContainerView implements ListViewDefi
key: 'default',
createView: () => {
if (__UI_USE_EXTERNAL_RENDERER__) {
} else if (this.itemTemplate) {
return Builder.parse(this.itemTemplate, this);
if (isFunction(this.itemTemplate)) {
return (<Template>this.itemTemplate)();
}
} else {
if (this.itemTemplate) {
return Builder.parse(this.itemTemplate, this);
}
}
return undefined;

View File

@@ -8,6 +8,7 @@ import { ObservableArray, ChangedData } from '../../data/observable-array';
import { addWeakEventListener, removeWeakEventListener } from '../core/weak-event-listener';
import { Builder } from '../builder';
import { profile } from '../../profiling';
import { isFunction } from '../../utils/types';
export interface ItemsSource {
length: number;
@@ -130,7 +131,7 @@ export class Repeater extends CustomLayoutView {
if (!viewToAdd) {
if (__UI_USE_EXTERNAL_RENDERER__) {
viewToAdd = this._getDefaultItemContent(i);
viewToAdd = isFunction(this.itemTemplate) ? (<Template>this.itemTemplate)() : this._getDefaultItemContent(i);
} else {
viewToAdd = this.itemTemplate ? Builder.parse(this.itemTemplate, this) : this._getDefaultItemContent(i);
}

View File

@@ -79,6 +79,7 @@ let currentScopeTag: string = null;
const applicationAdditionalSelectors: RuleSet[] = [];
const applicationKeyframes: any = {};
const animationsSymbol = Symbol('animations');
const kebabCasePattern = /-([a-z])/g;
const pattern = /('|")(.*?)\1/;
class CSSSource {
@@ -575,6 +576,7 @@ export class CssState {
const valuesToApply = {};
const cssExpsProperties = {};
const replacementFunc = (g) => g[1].toUpperCase();
for (const property in newPropertyValues) {
const value = newPropertyValues[property];
@@ -621,7 +623,8 @@ export class CssState {
if (property in view.style) {
view.style[`css:${property}`] = unsetValue;
} else {
// TRICKY: How do we unset local value?
const camelCasedProperty = property.replace(kebabCasePattern, replacementFunc);
view[camelCasedProperty] = unsetValue;
}
}
// Set new values to the style
@@ -631,9 +634,7 @@ export class CssState {
if (property in view.style) {
view.style[`css:${property}`] = value;
} else {
const camelCasedProperty = property.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});
const camelCasedProperty = property.replace(kebabCasePattern, replacementFunc);
view[camelCasedProperty] = value;
}
} catch (e) {

View File

@@ -6,9 +6,10 @@
*/
const spawn = require('child_process').spawn
const kill = require('tree-kill');
const path = require('path');
const TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
const workspaceDir = path.resolve(__dirname, '../..');
const platform = process.argv[2];
const spawned_process = spawn(
"npx",
@@ -20,6 +21,7 @@ const spawned_process = spawn(
"--timeout=600" // 10 minutes, booting avds on CI is very slow...
],
{
cwd: workspaceDir,
stdio: ["inherit", "pipe", "pipe"],
}
);

View File

@@ -1,17 +0,0 @@
{
"version": 2,
"projects": {
"apps-automated": "apps/automated",
"apps-toolbox": "apps/toolbox",
"apps-ui": "apps/ui",
"core": "packages/core",
"core-api-docs": "tools/scripts",
"types": "packages/types",
"types-android": "packages/types-android",
"types-ios": "packages/types-ios",
"types-minimal": "packages/types-minimal",
"ui-mobile-base": "packages/ui-mobile-base",
"webpack5": "packages/webpack5"
},
"$schema": "./node_modules/nx/schemas/workspace-schema.json"
}