mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 10:01:08 +08:00
feat(android): FlexboxLayout support for isPassThroughParentEnabled (#8798)
This commit is contained in:

committed by
GitHub

parent
39547b3ef6
commit
5fe27428e0
@ -8,12 +8,7 @@
|
||||
},
|
||||
"ignorePatterns": ["**/*"],
|
||||
"plugins": ["prettier", "@typescript-eslint", "@nrwl/nx"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier/@typescript-eslint",
|
||||
"plugin:prettier/recommended"
|
||||
],
|
||||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint", "plugin:prettier/recommended"],
|
||||
"rules": {
|
||||
"prettier/prettier": "warn",
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
|
11
apps/ui/src/flexbox/flexbox-ispassthroughparent-page.ts
Normal file
11
apps/ui/src/flexbox/flexbox-ispassthroughparent-page.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export function onStackLayoutTapped(args) {
|
||||
console.log('The StackLayout is tapped (called method: onStackLayoutTapped)');
|
||||
// Some visual action to execute when the tap is triggered
|
||||
args.object.backgroundColor = !args.object.backgroundColor || args.object.backgroundColor.toString() !== '#FFFF00' ? '#FFFF00' : '#FFFFFF';
|
||||
}
|
||||
|
||||
export function onFlexLayoutTap(args) {
|
||||
console.log('The FlexboxLayout is tapped (called method: onFlexLayoutTap)');
|
||||
// Some visual action to execute when the tap is triggered
|
||||
args.object.backgroundColor = !args.object.backgroundColor || args.object.backgroundColor.toString() !== '#FFFF00' ? '#FFFF00' : '#FFFFFF';
|
||||
}
|
14
apps/ui/src/flexbox/flexbox-ispassthroughparent-page.xml
Normal file
14
apps/ui/src/flexbox/flexbox-ispassthroughparent-page.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<StackLayout tap="onStackLayoutTapped" backgroundColor="#fff">
|
||||
|
||||
<Label text="With 'isPassThroughParentEnabled'" textWrap="true" textAlignment="center" color="#000" fontSize="20"/>
|
||||
<FlexboxLayout tap="onFlexLayoutTap" isPassThroughParentEnabled="true" alignItems="center" justifyContent="center" height="150" backgroundColor="#fff">
|
||||
<Label text="Tap Here to trigger the parent tap! (StackLayout)" textWrap="true" fontSize="24"/>
|
||||
</FlexboxLayout>
|
||||
|
||||
<Label text="Without 'isPassThroughParentEnabled'" textWrap="true" textAlignment="center" color="#000" fontSize="20"/>
|
||||
<FlexboxLayout tap="onFlexLayoutTap" alignItems="center" justifyContent="center" height="150" backgroundColor="#fff">
|
||||
<Label text="Tap Here to trigger both!" textWrap="true" fontSize="24"/>
|
||||
</FlexboxLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
@ -18,6 +18,7 @@ export function loadExamples() {
|
||||
examples.set('flex-perf', 'flexbox/flexbox-perf-comparison-page');
|
||||
examples.set('flexbox-4143', 'flexbox/flexbox-4143-page');
|
||||
examples.set('flexbox-4834', 'flexbox/flexbox-4834-page');
|
||||
examples.set("flexbox-ispassthroughparent", "flexbox/flexbox-ispassthroughparent-page");
|
||||
|
||||
return examples;
|
||||
}
|
||||
|
216
migrations.json
216
migrations.json
@ -1,109 +1,109 @@
|
||||
{
|
||||
"migrations": [
|
||||
{
|
||||
"version": "10.1.0-beta.0",
|
||||
"description": "Migrate .eslintrc files to use tsconfig with a wildcard",
|
||||
"factory": "./src/migrations/update-10-1-0/migrate-eslintrc-tsconfig-wildcard",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "migrate-eslintrc-tsconfig-wildcard"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Add @nrwl/cli as dependency",
|
||||
"factory": "./src/migrations/update-10-3-0/add-cli-dependency",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "add-cli-dependency"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Update typescript to v4",
|
||||
"factory": "./src/migrations/update-10-3-0/update-typescript",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "update-10-3-0"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Adds .vscode/extensions.json to a workspace",
|
||||
"factory": "./src/migrations/update-10-3-0/add-vscode-extensions",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "add-vscode-extensions"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Adds `buildableProjectDepsInPackageJsonType` for web and angular package builders",
|
||||
"factory": "./src/migrations/update-10-3-0/add-buildable-project-deps-in-package-json-type",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "add-buildable-project-deps-in-package-json-type"
|
||||
},
|
||||
{
|
||||
"version": "10.1.0-beta.4",
|
||||
"description": "Update jest to v26",
|
||||
"factory": "./src/migrations/update-10-1-0/update-10-1-0",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-10.1.0"
|
||||
},
|
||||
{
|
||||
"version": "10.2.0",
|
||||
"description": "Remove deprecated jest builder options",
|
||||
"factory": "./src/migrations/update-10-2-0/update-10-2-0",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-10.2.0"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Adds all jest projects into the root jest config",
|
||||
"factory": "./src/migrations/update-10-3-0/update-projects-property",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-projects-property"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Update ts-jest to v26.4",
|
||||
"factory": "./src/migrations/update-10-3-0/update-ts-jest",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-ts-jest"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Adds a jest extension to the recommended extensions for vscode",
|
||||
"factory": "./src/migrations/update-10-3-0/add-jest-extension",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "add-jest-extension"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Update @typescript-eslint to v4.3",
|
||||
"factory": "./src/migrations/update-10-3-0/update-10-3-0",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "update-10.3.0"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Migrate to the new ESLint builder and ESLint config style",
|
||||
"factory": "./src/migrations/update-10-3-0/update-eslint-builder-and-config",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "update-eslint-builder-and-config"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.2",
|
||||
"description": "Add explicit .json file extension to .eslintrc files, not using an extension is deprecated",
|
||||
"factory": "./src/migrations/update-10-3-0/add-json-ext-to-eslintrc",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "add-json-ext-to-eslintrc"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.3",
|
||||
"description": "Update implicitDependencies within nx.json to include root .eslintrc.json",
|
||||
"factory": "./src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "add-root-eslintrc-json-to-workspace-implicit-deps"
|
||||
},
|
||||
{
|
||||
"version": "10.1.0-beta.1",
|
||||
"description": "Removes rootDir from node libs' tsconfig",
|
||||
"factory": "./src/migrations/update-10-1-0/remove-root-dir",
|
||||
"package": "@nrwl/node",
|
||||
"name": "remove-root-dir"
|
||||
}
|
||||
]
|
||||
}
|
||||
"migrations": [
|
||||
{
|
||||
"version": "10.1.0-beta.0",
|
||||
"description": "Migrate .eslintrc files to use tsconfig with a wildcard",
|
||||
"factory": "./src/migrations/update-10-1-0/migrate-eslintrc-tsconfig-wildcard",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "migrate-eslintrc-tsconfig-wildcard"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Add @nrwl/cli as dependency",
|
||||
"factory": "./src/migrations/update-10-3-0/add-cli-dependency",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "add-cli-dependency"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Update typescript to v4",
|
||||
"factory": "./src/migrations/update-10-3-0/update-typescript",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "update-10-3-0"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Adds .vscode/extensions.json to a workspace",
|
||||
"factory": "./src/migrations/update-10-3-0/add-vscode-extensions",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "add-vscode-extensions"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Adds `buildableProjectDepsInPackageJsonType` for web and angular package builders",
|
||||
"factory": "./src/migrations/update-10-3-0/add-buildable-project-deps-in-package-json-type",
|
||||
"package": "@nrwl/workspace",
|
||||
"name": "add-buildable-project-deps-in-package-json-type"
|
||||
},
|
||||
{
|
||||
"version": "10.1.0-beta.4",
|
||||
"description": "Update jest to v26",
|
||||
"factory": "./src/migrations/update-10-1-0/update-10-1-0",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-10.1.0"
|
||||
},
|
||||
{
|
||||
"version": "10.2.0",
|
||||
"description": "Remove deprecated jest builder options",
|
||||
"factory": "./src/migrations/update-10-2-0/update-10-2-0",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-10.2.0"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Adds all jest projects into the root jest config",
|
||||
"factory": "./src/migrations/update-10-3-0/update-projects-property",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-projects-property"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Update ts-jest to v26.4",
|
||||
"factory": "./src/migrations/update-10-3-0/update-ts-jest",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "update-ts-jest"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Adds a jest extension to the recommended extensions for vscode",
|
||||
"factory": "./src/migrations/update-10-3-0/add-jest-extension",
|
||||
"package": "@nrwl/jest",
|
||||
"name": "add-jest-extension"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.1",
|
||||
"description": "Update @typescript-eslint to v4.3",
|
||||
"factory": "./src/migrations/update-10-3-0/update-10-3-0",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "update-10.3.0"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.0",
|
||||
"description": "Migrate to the new ESLint builder and ESLint config style",
|
||||
"factory": "./src/migrations/update-10-3-0/update-eslint-builder-and-config",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "update-eslint-builder-and-config"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.2",
|
||||
"description": "Add explicit .json file extension to .eslintrc files, not using an extension is deprecated",
|
||||
"factory": "./src/migrations/update-10-3-0/add-json-ext-to-eslintrc",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "add-json-ext-to-eslintrc"
|
||||
},
|
||||
{
|
||||
"version": "10.3.0-beta.3",
|
||||
"description": "Update implicitDependencies within nx.json to include root .eslintrc.json",
|
||||
"factory": "./src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps",
|
||||
"package": "@nrwl/linter",
|
||||
"name": "add-root-eslintrc-json-to-workspace-implicit-deps"
|
||||
},
|
||||
{
|
||||
"version": "10.1.0-beta.1",
|
||||
"description": "Removes rootDir from node libs' tsconfig",
|
||||
"factory": "./src/migrations/update-10-1-0/remove-root-dir",
|
||||
"package": "@nrwl/node",
|
||||
"name": "remove-root-dir"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
const _allColors:{[k:string]:number} = {};
|
||||
const _allColors: { [k: string]: number } = {};
|
||||
function registerColor(name: string | string[], value: number): number {
|
||||
if (Array.isArray(name)) {
|
||||
name.forEach(n=>_allColors[n.toLowerCase()] = value)
|
||||
name.forEach((n) => (_allColors[n.toLowerCase()] = value));
|
||||
} else {
|
||||
_allColors[name.toLowerCase()] = value;
|
||||
}
|
||||
@ -26,144 +26,144 @@ export function getKnownColor(name: string): number {
|
||||
}
|
||||
|
||||
export const Transparent = registerColor('Transparent', 0x00000000);
|
||||
export const AliceBlue = registerColor('AliceBlue', 0xffF0F8FF);
|
||||
export const AntiqueWhite = registerColor('AntiqueWhite', 0xffFAEBD7);
|
||||
export const Aqua = registerColor('Aqua', 0xff00FFFF);
|
||||
export const Aquamarine = registerColor('Aquamarine', 0xff7FFFD4);
|
||||
export const Azure = registerColor('Azure', 0xffF0FFFF);
|
||||
export const Beige = registerColor('Beige', 0xffF5F5DC);
|
||||
export const Bisque = registerColor('Bisque', 0xffFFE4C4);
|
||||
export const AliceBlue = registerColor('AliceBlue', 0xfff0f8ff);
|
||||
export const AntiqueWhite = registerColor('AntiqueWhite', 0xfffaebd7);
|
||||
export const Aqua = registerColor('Aqua', 0xff00ffff);
|
||||
export const Aquamarine = registerColor('Aquamarine', 0xff7fffd4);
|
||||
export const Azure = registerColor('Azure', 0xfff0ffff);
|
||||
export const Beige = registerColor('Beige', 0xfff5f5dc);
|
||||
export const Bisque = registerColor('Bisque', 0xffffe4c4);
|
||||
export const Black = registerColor('Black', 0xff000000);
|
||||
export const BlanchedAlmond = registerColor('BlanchedAlmond', 0xffFFEBCD);
|
||||
export const Blue = registerColor('Blue', 0xff0000FF);
|
||||
export const BlueViolet = registerColor('BlueViolet', 0xff8A2BE2);
|
||||
export const Brown = registerColor('Brown', 0xffA52A2A);
|
||||
export const BurlyWood = registerColor('BurlyWood', 0xffDEB887);
|
||||
export const CadetBlue = registerColor('CadetBlue', 0xff5F9EA0);
|
||||
export const Chartreuse = registerColor('Chartreuse', 0xff7FFF00);
|
||||
export const Chocolate = registerColor('Chocolate', 0xffD2691E);
|
||||
export const Coral = registerColor('Coral', 0xffFF7F50);
|
||||
export const CornflowerBlue = registerColor('CornflowerBlue', 0xff6495ED);
|
||||
export const Cornsilk = registerColor('Cornsilk', 0xffFFF8DC);
|
||||
export const Crimson = registerColor('Crimson', 0xffDC143C);
|
||||
export const Cyan = registerColor('Cyan', 0xff00FFFF);
|
||||
export const DarkBlue = registerColor('DarkBlue', 0xff00008B);
|
||||
export const DarkCyan = registerColor('DarkCyan', 0xff008B8B);
|
||||
export const DarkGoldenRod = registerColor('DarkGoldenRod', 0xffB8860B);
|
||||
export const DarkGray = registerColor(['DarkGray', 'DarkGrey'], 0xffA9A9A9);
|
||||
export const BlanchedAlmond = registerColor('BlanchedAlmond', 0xffffebcd);
|
||||
export const Blue = registerColor('Blue', 0xff0000ff);
|
||||
export const BlueViolet = registerColor('BlueViolet', 0xff8a2be2);
|
||||
export const Brown = registerColor('Brown', 0xffa52a2a);
|
||||
export const BurlyWood = registerColor('BurlyWood', 0xffdeb887);
|
||||
export const CadetBlue = registerColor('CadetBlue', 0xff5f9ea0);
|
||||
export const Chartreuse = registerColor('Chartreuse', 0xff7fff00);
|
||||
export const Chocolate = registerColor('Chocolate', 0xffd2691e);
|
||||
export const Coral = registerColor('Coral', 0xffff7f50);
|
||||
export const CornflowerBlue = registerColor('CornflowerBlue', 0xff6495ed);
|
||||
export const Cornsilk = registerColor('Cornsilk', 0xfffff8dc);
|
||||
export const Crimson = registerColor('Crimson', 0xffdc143c);
|
||||
export const Cyan = registerColor('Cyan', 0xff00ffff);
|
||||
export const DarkBlue = registerColor('DarkBlue', 0xff00008b);
|
||||
export const DarkCyan = registerColor('DarkCyan', 0xff008b8b);
|
||||
export const DarkGoldenRod = registerColor('DarkGoldenRod', 0xffb8860b);
|
||||
export const DarkGray = registerColor(['DarkGray', 'DarkGrey'], 0xffa9a9a9);
|
||||
export const DarkGreen = registerColor('DarkGreen', 0xff006400);
|
||||
export const DarkKhaki = registerColor('DarkKhaki', 0xffBDB76B);
|
||||
export const DarkMagenta = registerColor('DarkMagenta', 0xff8B008B);
|
||||
export const DarkOliveGreen = registerColor('DarkOliveGreen', 0xff556B2F);
|
||||
export const DarkOrange = registerColor('DarkOrange', 0xffFF8C00);
|
||||
export const DarkOrchid = registerColor('DarkOrchid', 0xff9932CC);
|
||||
export const DarkRed = registerColor('DarkRed', 0xff8B0000);
|
||||
export const DarkSalmon = registerColor('DarkSalmon', 0xffE9967A);
|
||||
export const DarkSeaGreen = registerColor('DarkSeaGreen', 0xff8FBC8F);
|
||||
export const DarkSlateBlue = registerColor('DarkSlateBlue', 0xff483D8B);
|
||||
export const DarkSlateGray = registerColor(['DarkSlateGray', 'DarkSlateGrey'], 0xff2F4F4F);
|
||||
export const DarkTurquoise = registerColor('DarkTurquoise', 0xff00CED1);
|
||||
export const DarkViolet = registerColor('DarkViolet', 0xff9400D3);
|
||||
export const DeepPink = registerColor('DeepPink', 0xffFF1493);
|
||||
export const DeepSkyBlue = registerColor('DeepSkyBlue', 0xff00BFFF);
|
||||
export const DarkKhaki = registerColor('DarkKhaki', 0xffbdb76b);
|
||||
export const DarkMagenta = registerColor('DarkMagenta', 0xff8b008b);
|
||||
export const DarkOliveGreen = registerColor('DarkOliveGreen', 0xff556b2f);
|
||||
export const DarkOrange = registerColor('DarkOrange', 0xffff8c00);
|
||||
export const DarkOrchid = registerColor('DarkOrchid', 0xff9932cc);
|
||||
export const DarkRed = registerColor('DarkRed', 0xff8b0000);
|
||||
export const DarkSalmon = registerColor('DarkSalmon', 0xffe9967a);
|
||||
export const DarkSeaGreen = registerColor('DarkSeaGreen', 0xff8fbc8f);
|
||||
export const DarkSlateBlue = registerColor('DarkSlateBlue', 0xff483d8b);
|
||||
export const DarkSlateGray = registerColor(['DarkSlateGray', 'DarkSlateGrey'], 0xff2f4f4f);
|
||||
export const DarkTurquoise = registerColor('DarkTurquoise', 0xff00ced1);
|
||||
export const DarkViolet = registerColor('DarkViolet', 0xff9400d3);
|
||||
export const DeepPink = registerColor('DeepPink', 0xffff1493);
|
||||
export const DeepSkyBlue = registerColor('DeepSkyBlue', 0xff00bfff);
|
||||
export const DimGray = registerColor(['DimGray', 'DimGrey'], 0xff696969);
|
||||
export const DodgerBlue = registerColor('DodgerBlue', 0xff1E90FF);
|
||||
export const FireBrick = registerColor('FireBrick', 0xffB22222);
|
||||
export const FloralWhite = registerColor('FloralWhite', 0xffFFFAF0);
|
||||
export const ForestGreen = registerColor('ForestGreen', 0xff228B22);
|
||||
export const Fuchsia = registerColor('Fuchsia', 0xffFF00FF);
|
||||
export const Gainsboro = registerColor('Gainsboro', 0xffDCDCDC);
|
||||
export const GhostWhite = registerColor('GhostWhite', 0xffF8F8FF);
|
||||
export const Gold = registerColor('Gold', 0xffFFD700);
|
||||
export const GoldenRod = registerColor('GoldenRod', 0xffDAA520);
|
||||
export const DodgerBlue = registerColor('DodgerBlue', 0xff1e90ff);
|
||||
export const FireBrick = registerColor('FireBrick', 0xffb22222);
|
||||
export const FloralWhite = registerColor('FloralWhite', 0xfffffaf0);
|
||||
export const ForestGreen = registerColor('ForestGreen', 0xff228b22);
|
||||
export const Fuchsia = registerColor('Fuchsia', 0xffff00ff);
|
||||
export const Gainsboro = registerColor('Gainsboro', 0xffdcdcdc);
|
||||
export const GhostWhite = registerColor('GhostWhite', 0xfff8f8ff);
|
||||
export const Gold = registerColor('Gold', 0xffffd700);
|
||||
export const GoldenRod = registerColor('GoldenRod', 0xffdaa520);
|
||||
export const Gray = registerColor(['Gray', 'Grey'], 0xff808080);
|
||||
export const Green = registerColor('Green', 0xff008000);
|
||||
export const GreenYellow = registerColor('GreenYellow', 0xffADFF2F);
|
||||
export const HoneyDew = registerColor('HoneyDew', 0xffF0FFF0);
|
||||
export const HotPink = registerColor('HotPink', 0xffFF69B4);
|
||||
export const IndianRed = registerColor('IndianRed', 0xffCD5C5C);
|
||||
export const Indigo = registerColor('Indigo', 0xff4B0082);
|
||||
export const Ivory = registerColor('Ivory', 0xffFFFFF0);
|
||||
export const Khaki = registerColor('Khaki', 0xffF0E68C);
|
||||
export const Lavender = registerColor('Lavender', 0xffE6E6FA);
|
||||
export const LavenderBlush = registerColor('LavenderBlush', 0xffFFF0F5);
|
||||
export const LawnGreen = registerColor('LawnGreen', 0xff7CFC00);
|
||||
export const LemonChiffon = registerColor('LemonChiffon', 0xffFFFACD);
|
||||
export const LightBlue = registerColor('LightBlue', 0xffADD8E6);
|
||||
export const LightCoral = registerColor('LightCoral', 0xffF08080);
|
||||
export const LightCyan = registerColor('LightCyan', 0xffE0FFFF);
|
||||
export const LightGoldenRodYellow = registerColor('LightGoldenRodYellow', 0xffFAFAD2);
|
||||
export const LightGray = registerColor(['LightGray', 'LightGrey'], 0xffD3D3D3);
|
||||
export const LightGreen = registerColor('LightGreen', 0xff90EE90);
|
||||
export const LightPink = registerColor('LightPink', 0xffFFB6C1);
|
||||
export const LightSalmon = registerColor('LightSalmon', 0xffFFA07A);
|
||||
export const LightSeaGreen = registerColor('LightSeaGreen', 0xff20B2AA);
|
||||
export const LightSkyBlue = registerColor('LightSkyBlue', 0xff87CEFA);
|
||||
export const GreenYellow = registerColor('GreenYellow', 0xffadff2f);
|
||||
export const HoneyDew = registerColor('HoneyDew', 0xfff0fff0);
|
||||
export const HotPink = registerColor('HotPink', 0xffff69b4);
|
||||
export const IndianRed = registerColor('IndianRed', 0xffcd5c5c);
|
||||
export const Indigo = registerColor('Indigo', 0xff4b0082);
|
||||
export const Ivory = registerColor('Ivory', 0xfffffff0);
|
||||
export const Khaki = registerColor('Khaki', 0xfff0e68c);
|
||||
export const Lavender = registerColor('Lavender', 0xffe6e6fa);
|
||||
export const LavenderBlush = registerColor('LavenderBlush', 0xfffff0f5);
|
||||
export const LawnGreen = registerColor('LawnGreen', 0xff7cfc00);
|
||||
export const LemonChiffon = registerColor('LemonChiffon', 0xfffffacd);
|
||||
export const LightBlue = registerColor('LightBlue', 0xffadd8e6);
|
||||
export const LightCoral = registerColor('LightCoral', 0xfff08080);
|
||||
export const LightCyan = registerColor('LightCyan', 0xffe0ffff);
|
||||
export const LightGoldenRodYellow = registerColor('LightGoldenRodYellow', 0xfffafad2);
|
||||
export const LightGray = registerColor(['LightGray', 'LightGrey'], 0xffd3d3d3);
|
||||
export const LightGreen = registerColor('LightGreen', 0xff90ee90);
|
||||
export const LightPink = registerColor('LightPink', 0xffffb6c1);
|
||||
export const LightSalmon = registerColor('LightSalmon', 0xffffa07a);
|
||||
export const LightSeaGreen = registerColor('LightSeaGreen', 0xff20b2aa);
|
||||
export const LightSkyBlue = registerColor('LightSkyBlue', 0xff87cefa);
|
||||
export const LightSlateGray = registerColor(['LightSlateGray', 'LightSlateGrey'], 0xff778899);
|
||||
export const LightSteelBlue = registerColor('LightSteelBlue', 0xffB0C4DE);
|
||||
export const LightYellow = registerColor('LightYellow', 0xffFFFFE0);
|
||||
export const Lime = registerColor('Lime', 0xff00FF00);
|
||||
export const LimeGreen = registerColor('LimeGreen', 0xff32CD32);
|
||||
export const Linen = registerColor('Linen', 0xffFAF0E6);
|
||||
export const Magenta = registerColor('Magenta', 0xffFF00FF);
|
||||
export const LightSteelBlue = registerColor('LightSteelBlue', 0xffb0c4de);
|
||||
export const LightYellow = registerColor('LightYellow', 0xffffffe0);
|
||||
export const Lime = registerColor('Lime', 0xff00ff00);
|
||||
export const LimeGreen = registerColor('LimeGreen', 0xff32cd32);
|
||||
export const Linen = registerColor('Linen', 0xfffaf0e6);
|
||||
export const Magenta = registerColor('Magenta', 0xffff00ff);
|
||||
export const Maroon = registerColor('Maroon', 0xff800000);
|
||||
export const MediumAquaMarine = registerColor('MediumAquaMarine', 0xff66CDAA);
|
||||
export const MediumBlue = registerColor('MediumBlue', 0xff0000CD);
|
||||
export const MediumOrchid = registerColor('MediumOrchid', 0xffBA55D3);
|
||||
export const MediumPurple = registerColor('MediumPurple', 0xff9370DB);
|
||||
export const MediumSeaGreen = registerColor('MediumSeaGreen', 0xff3CB371);
|
||||
export const MediumSlateBlue = registerColor('MediumSlateBlue', 0xff7B68EE);
|
||||
export const MediumSpringGreen = registerColor('MediumSpringGreen', 0xff00FA9A);
|
||||
export const MediumTurquoise = registerColor('MediumTurquoise', 0xff48D1CC);
|
||||
export const MediumVioletRed = registerColor('MediumVioletRed', 0xffC71585);
|
||||
export const MediumAquaMarine = registerColor('MediumAquaMarine', 0xff66cdaa);
|
||||
export const MediumBlue = registerColor('MediumBlue', 0xff0000cd);
|
||||
export const MediumOrchid = registerColor('MediumOrchid', 0xffba55d3);
|
||||
export const MediumPurple = registerColor('MediumPurple', 0xff9370db);
|
||||
export const MediumSeaGreen = registerColor('MediumSeaGreen', 0xff3cb371);
|
||||
export const MediumSlateBlue = registerColor('MediumSlateBlue', 0xff7b68ee);
|
||||
export const MediumSpringGreen = registerColor('MediumSpringGreen', 0xff00fa9a);
|
||||
export const MediumTurquoise = registerColor('MediumTurquoise', 0xff48d1cc);
|
||||
export const MediumVioletRed = registerColor('MediumVioletRed', 0xffc71585);
|
||||
export const MidnightBlue = registerColor('MidnightBlue', 0xff191970);
|
||||
export const MintCream = registerColor('MintCream', 0xffF5FFFA);
|
||||
export const MistyRose = registerColor('MistyRose', 0xffFFE4E1);
|
||||
export const Moccasin = registerColor('Moccasin', 0xffFFE4B5);
|
||||
export const NavajoWhite = registerColor('NavajoWhite', 0xffFFDEAD);
|
||||
export const MintCream = registerColor('MintCream', 0xfff5fffa);
|
||||
export const MistyRose = registerColor('MistyRose', 0xffffe4e1);
|
||||
export const Moccasin = registerColor('Moccasin', 0xffffe4b5);
|
||||
export const NavajoWhite = registerColor('NavajoWhite', 0xffffdead);
|
||||
export const Navy = registerColor('Navy', 0xff000080);
|
||||
export const OldLace = registerColor('OldLace', 0xffFDF5E6);
|
||||
export const OldLace = registerColor('OldLace', 0xfffdf5e6);
|
||||
export const Olive = registerColor('Olive', 0xff808000);
|
||||
export const OliveDrab = registerColor('OliveDrab', 0xff6B8E23);
|
||||
export const Orange = registerColor('Orange', 0xffFFA500);
|
||||
export const OrangeRed = registerColor('OrangeRed', 0xffFF4500);
|
||||
export const Orchid = registerColor('Orchid', 0xffDA70D6);
|
||||
export const PaleGoldenRod = registerColor('PaleGoldenRod', 0xffEEE8AA);
|
||||
export const PaleGreen = registerColor('PaleGreen', 0xff98FB98);
|
||||
export const PaleTurquoise = registerColor('PaleTurquoise', 0xffAFEEEE);
|
||||
export const PaleVioletRed = registerColor('PaleVioletRed', 0xffDB7093);
|
||||
export const PapayaWhip = registerColor('PapayaWhip', 0xffFFEFD5);
|
||||
export const PeachPuff = registerColor('PeachPuff', 0xffFFDAB9);
|
||||
export const Peru = registerColor('Peru', 0xffCD853F);
|
||||
export const Pink = registerColor('Pink', 0xffFFC0CB);
|
||||
export const Plum = registerColor('Plum', 0xffDDA0DD);
|
||||
export const PowderBlue = registerColor('PowderBlue', 0xffB0E0E6);
|
||||
export const OliveDrab = registerColor('OliveDrab', 0xff6b8e23);
|
||||
export const Orange = registerColor('Orange', 0xffffa500);
|
||||
export const OrangeRed = registerColor('OrangeRed', 0xffff4500);
|
||||
export const Orchid = registerColor('Orchid', 0xffda70d6);
|
||||
export const PaleGoldenRod = registerColor('PaleGoldenRod', 0xffeee8aa);
|
||||
export const PaleGreen = registerColor('PaleGreen', 0xff98fb98);
|
||||
export const PaleTurquoise = registerColor('PaleTurquoise', 0xffafeeee);
|
||||
export const PaleVioletRed = registerColor('PaleVioletRed', 0xffdb7093);
|
||||
export const PapayaWhip = registerColor('PapayaWhip', 0xffffefd5);
|
||||
export const PeachPuff = registerColor('PeachPuff', 0xffffdab9);
|
||||
export const Peru = registerColor('Peru', 0xffcd853f);
|
||||
export const Pink = registerColor('Pink', 0xffffc0cb);
|
||||
export const Plum = registerColor('Plum', 0xffdda0dd);
|
||||
export const PowderBlue = registerColor('PowderBlue', 0xffb0e0e6);
|
||||
export const Purple = registerColor('Purple', 0xff800080);
|
||||
export const RebeccaPurple = registerColor('RebeccaPurple', 0xff663399);
|
||||
export const Red = registerColor('Red', 0xffFF0000);
|
||||
export const RosyBrown = registerColor('RosyBrown', 0xffBC8F8F);
|
||||
export const RoyalBlue = registerColor('RoyalBlue', 0xff4169E1);
|
||||
export const SaddleBrown = registerColor('SaddleBrown', 0xff8B4513);
|
||||
export const Salmon = registerColor('Salmon', 0xffFA8072);
|
||||
export const SandyBrown = registerColor('SandyBrown', 0xffF4A460);
|
||||
export const SeaGreen = registerColor('SeaGreen', 0xff2E8B57);
|
||||
export const SeaShell = registerColor('SeaShell', 0xffFFF5EE);
|
||||
export const Sienna = registerColor('Sienna', 0xffA0522D);
|
||||
export const Silver = registerColor('Silver', 0xffC0C0C0);
|
||||
export const SkyBlue = registerColor('SkyBlue', 0xff87CEEB);
|
||||
export const SlateBlue = registerColor('SlateBlue', 0xff6A5ACD);
|
||||
export const Red = registerColor('Red', 0xffff0000);
|
||||
export const RosyBrown = registerColor('RosyBrown', 0xffbc8f8f);
|
||||
export const RoyalBlue = registerColor('RoyalBlue', 0xff4169e1);
|
||||
export const SaddleBrown = registerColor('SaddleBrown', 0xff8b4513);
|
||||
export const Salmon = registerColor('Salmon', 0xfffa8072);
|
||||
export const SandyBrown = registerColor('SandyBrown', 0xfff4a460);
|
||||
export const SeaGreen = registerColor('SeaGreen', 0xff2e8b57);
|
||||
export const SeaShell = registerColor('SeaShell', 0xfffff5ee);
|
||||
export const Sienna = registerColor('Sienna', 0xffa0522d);
|
||||
export const Silver = registerColor('Silver', 0xffc0c0c0);
|
||||
export const SkyBlue = registerColor('SkyBlue', 0xff87ceeb);
|
||||
export const SlateBlue = registerColor('SlateBlue', 0xff6a5acd);
|
||||
export const SlateGray = registerColor(['SlateGray', 'SlateGrey'], 0xff708090);
|
||||
export const Snow = registerColor('Snow', 0xffFFFAFA);
|
||||
export const SpringGreen = registerColor('SpringGreen', 0xff00FF7F);
|
||||
export const SteelBlue = registerColor('SteelBlue', 0xff4682B4);
|
||||
export const Tan = registerColor('Tan', 0xffD2B48C);
|
||||
export const Snow = registerColor('Snow', 0xfffffafa);
|
||||
export const SpringGreen = registerColor('SpringGreen', 0xff00ff7f);
|
||||
export const SteelBlue = registerColor('SteelBlue', 0xff4682b4);
|
||||
export const Tan = registerColor('Tan', 0xffd2b48c);
|
||||
export const Teal = registerColor('Teal', 0xff008080);
|
||||
export const Thistle = registerColor('Thistle', 0xffD8BFD8);
|
||||
export const Tomato = registerColor('Tomato', 0xffFF6347);
|
||||
export const Turquoise = registerColor('Turquoise', 0xff40E0D0);
|
||||
export const Violet = registerColor('Violet', 0xffEE82EE);
|
||||
export const Wheat = registerColor('Wheat', 0xffF5DEB3);
|
||||
export const White = registerColor('White', 0xffFFFFFF);
|
||||
export const WhiteSmoke = registerColor('WhiteSmoke', 0xffF5F5F5);
|
||||
export const Yellow = registerColor('Yellow', 0xffFFFF00);
|
||||
export const YellowGreen = registerColor('YellowGreen', 0xff9ACD32);
|
||||
export const Thistle = registerColor('Thistle', 0xffd8bfd8);
|
||||
export const Tomato = registerColor('Tomato', 0xffff6347);
|
||||
export const Turquoise = registerColor('Turquoise', 0xff40e0d0);
|
||||
export const Violet = registerColor('Violet', 0xffee82ee);
|
||||
export const Wheat = registerColor('Wheat', 0xfff5deb3);
|
||||
export const White = registerColor('White', 0xffffffff);
|
||||
export const WhiteSmoke = registerColor('WhiteSmoke', 0xfff5f5f5);
|
||||
export const Yellow = registerColor('Yellow', 0xffffff00);
|
||||
export const YellowGreen = registerColor('YellowGreen', 0xff9acd32);
|
||||
|
@ -33,7 +33,6 @@ export interface ChangedData<T> extends EventData {
|
||||
* Number of added items.
|
||||
*/
|
||||
addedCount: number;
|
||||
|
||||
}
|
||||
|
||||
const CHANGE = 'change';
|
||||
@ -116,8 +115,8 @@ export class ObservableArray<T> extends Observable {
|
||||
|
||||
set length(value: number) {
|
||||
if (types.isNumber(value) && this._array && this._array.length !== value) {
|
||||
const added=[];
|
||||
for (let i=this._array.length;i < value;++i) {
|
||||
const added = [];
|
||||
for (let i = this._array.length; i < value; ++i) {
|
||||
added.push(undefined);
|
||||
}
|
||||
this.splice(value, this._array.length - value, ...added);
|
||||
|
2
packages/core/data/observable/index.d.ts
vendored
2
packages/core/data/observable/index.d.ts
vendored
@ -12,13 +12,11 @@ export interface EventData {
|
||||
object: Observable;
|
||||
}
|
||||
|
||||
|
||||
export interface NotifyData extends Partial<EventData> {
|
||||
eventName: string;
|
||||
object?: Observable;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data for the "propertyChange" event.
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ function processFile(file: fs.File) {
|
||||
const loadContent = () => file.readTextSync();
|
||||
|
||||
switch (file.extension.toLocaleLowerCase()) {
|
||||
case '.js':{
|
||||
case '.js': {
|
||||
const noExtPath = filePathRelativeToApp.substr(0, filePathRelativeToApp.length - '.js'.length);
|
||||
|
||||
register(filePathRelativeToApp, function () {
|
||||
|
@ -19,9 +19,9 @@ export type TransformFunctionsInfo = {
|
||||
};
|
||||
|
||||
export interface AnimationPromise extends Promise<any>, Cancelable {
|
||||
then(...args):AnimationPromise
|
||||
catch(...args):AnimationPromise
|
||||
};
|
||||
then(...args): AnimationPromise;
|
||||
catch(...args): AnimationPromise;
|
||||
}
|
||||
|
||||
export interface Pair {
|
||||
x: number;
|
||||
|
@ -340,7 +340,7 @@ export class Animation extends AnimationBase {
|
||||
animators.push(createObjectAnimator(nativeView, 'alpha', propertyAnimation.value));
|
||||
break;
|
||||
|
||||
case Properties.backgroundColor:{
|
||||
case Properties.backgroundColor: {
|
||||
backgroundColorProperty._initDefaultNativeValue(style);
|
||||
|
||||
ensureArgbEvaluator();
|
||||
|
@ -380,7 +380,7 @@ export class Animation extends AnimationBase {
|
||||
toValue = NSValue.valueWithCATransform3D(Animation._createNativeAffineTransform(animation));
|
||||
break;
|
||||
case Properties.width:
|
||||
case Properties.height:{
|
||||
case Properties.height: {
|
||||
const direction: string = animation.property;
|
||||
const isHeight: boolean = direction === 'height';
|
||||
propertyNameToAnimate = 'bounds';
|
||||
|
@ -47,7 +47,7 @@ export interface ShowModalOptions {
|
||||
/**
|
||||
* A function that will be called when the view is closed. Any arguments provided when calling ShownModallyData.closeCallback will be available here.
|
||||
*/
|
||||
closeCallback: (...args)=>void;
|
||||
closeCallback: (...args) => void;
|
||||
|
||||
/**
|
||||
* An optional parameter specifying whether to show the modal view in full-screen mode.
|
||||
@ -100,7 +100,7 @@ export interface ShowModalOptions {
|
||||
cancelable?: boolean;
|
||||
}
|
||||
|
||||
export function getAncestor(view: ViewBaseDefinition, criterion: string | { new() }): ViewBaseDefinition {
|
||||
export function getAncestor(view: ViewBaseDefinition, criterion: string | { new () }): ViewBaseDefinition {
|
||||
let matcher: (view: ViewBaseDefinition) => boolean = null;
|
||||
if (typeof criterion === 'string') {
|
||||
matcher = (view: ViewBaseDefinition) => view.typeName === criterion;
|
||||
|
2
packages/core/ui/core/view/index.d.ts
vendored
2
packages/core/ui/core/view/index.d.ts
vendored
@ -392,7 +392,7 @@ export abstract class View extends ViewBase {
|
||||
* Enables or disables the iosOverflowSafeArea property for all children. This property is iOS specific. Default value: true
|
||||
*/
|
||||
iosOverflowSafeAreaEnabled: boolean;
|
||||
|
||||
|
||||
/**
|
||||
* Gets or sets a value indicating whether the the view should totally ignore safe areas computation. This property is iOS specific. Default value: false
|
||||
*/
|
||||
|
@ -263,8 +263,8 @@ export class View extends ViewCommon implements ViewDefinition {
|
||||
return null;
|
||||
}
|
||||
if (this.iosIgnoreSafeArea) {
|
||||
return frame;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
if (!this.iosOverflowSafeArea || !this.iosOverflowSafeAreaEnabled) {
|
||||
return IOSHelper.shrinkToSafeArea(this, frame);
|
||||
} else if (this.nativeViewProtected && this.nativeViewProtected.window) {
|
||||
@ -278,8 +278,8 @@ export class View extends ViewCommon implements ViewDefinition {
|
||||
const safeAreaInsets = this.nativeViewProtected && this.nativeViewProtected.safeAreaInsets;
|
||||
const insets = { left: 0, top: 0, right: 0, bottom: 0 };
|
||||
if (this.iosIgnoreSafeArea) {
|
||||
return insets;
|
||||
}
|
||||
return insets;
|
||||
}
|
||||
if (safeAreaInsets) {
|
||||
insets.left = layout.round(layout.toDevicePixels(safeAreaInsets.left));
|
||||
insets.top = layout.round(layout.toDevicePixels(safeAreaInsets.top));
|
||||
|
@ -759,7 +759,7 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
||||
public iosOverflowSafeArea: boolean;
|
||||
public iosOverflowSafeAreaEnabled: boolean;
|
||||
public iosIgnoreSafeArea: boolean;
|
||||
|
||||
|
||||
get isLayoutValid(): boolean {
|
||||
return this._isLayoutValid;
|
||||
}
|
||||
@ -1057,8 +1057,8 @@ export const iosOverflowSafeAreaEnabledProperty = new InheritedProperty<ViewComm
|
||||
});
|
||||
iosOverflowSafeAreaEnabledProperty.register(ViewCommon);
|
||||
export const iosIgnoreSafeAreaProperty = new InheritedProperty({
|
||||
name: 'iosIgnoreSafeArea',
|
||||
defaultValue: false,
|
||||
valueConverter: booleanConverter,
|
||||
name: 'iosIgnoreSafeArea',
|
||||
defaultValue: false,
|
||||
valueConverter: booleanConverter,
|
||||
});
|
||||
iosIgnoreSafeAreaProperty.register(ViewCommon);
|
||||
iosIgnoreSafeAreaProperty.register(ViewCommon);
|
||||
|
@ -338,7 +338,7 @@ export class IOSHelper {
|
||||
|
||||
let fullscreen = null;
|
||||
let safeArea = null;
|
||||
let controllerInWindow = {x: 0, y: 0};
|
||||
let controllerInWindow = { x: 0, y: 0 };
|
||||
|
||||
if (viewControllerView) {
|
||||
safeArea = viewControllerView.safeAreaLayoutGuide.layoutFrame;
|
||||
|
@ -328,7 +328,7 @@ export abstract class EditableTextBase extends EditableTextBaseCommon {
|
||||
case 'send':
|
||||
newImeOptions = android.view.inputmethod.EditorInfo.IME_ACTION_SEND;
|
||||
break;
|
||||
default:{
|
||||
default: {
|
||||
const ime = +value;
|
||||
if (!isNaN(ime)) {
|
||||
newImeOptions = ime;
|
||||
@ -383,7 +383,7 @@ export abstract class EditableTextBase extends EditableTextBaseCommon {
|
||||
case 'allcharacters':
|
||||
inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS; //4096 (0x00010000) 13th bit
|
||||
break;
|
||||
default:{
|
||||
default: {
|
||||
const number = +value;
|
||||
// We set the default value.
|
||||
if (!isNaN(number)) {
|
||||
|
@ -428,7 +428,7 @@ export class FrameBase extends CustomLayoutView {
|
||||
object: this,
|
||||
isBack,
|
||||
entry: backstackEntry.entry,
|
||||
fromEntry:this.currentEntry
|
||||
fromEntry: this.currentEntry,
|
||||
});
|
||||
}
|
||||
|
||||
|
2
packages/core/ui/frame/index.d.ts
vendored
2
packages/core/ui/frame/index.d.ts
vendored
@ -6,7 +6,7 @@ import { Transition } from '../transition';
|
||||
|
||||
export * from './frame-interfaces';
|
||||
|
||||
export interface NavigationData extends EventData {
|
||||
export interface NavigationData extends EventData {
|
||||
entry?: NavigationEntry;
|
||||
fromEntry?: NavigationEntry;
|
||||
isBack?: boolean;
|
||||
|
@ -249,7 +249,7 @@ export class Frame extends FrameBase {
|
||||
case 'never':
|
||||
return false;
|
||||
|
||||
case 'auto':{
|
||||
case 'auto': {
|
||||
let newValue: boolean;
|
||||
|
||||
if (page && page.actionBarHidden !== undefined) {
|
||||
|
@ -565,7 +565,7 @@ class CustomRotateGestureDetector {
|
||||
|
||||
switch (event.getActionMasked()) {
|
||||
case android.view.MotionEvent.ACTION_DOWN:
|
||||
case android.view.MotionEvent.ACTION_POINTER_DOWN:{
|
||||
case android.view.MotionEvent.ACTION_POINTER_DOWN: {
|
||||
let assigned = false;
|
||||
if (this.trackedPtrId1 === INVALID_POINTER_ID && pointerID !== this.trackedPtrId2) {
|
||||
this.trackedPtrId1 = pointerID;
|
||||
|
@ -36,7 +36,7 @@ export namespace JustifyContent {
|
||||
export const FLEX_END = 'flex-end' as const;
|
||||
export const CENTER = 'center' as const;
|
||||
export const SPACE_BETWEEN = 'space-between';
|
||||
export const SPACE_AROUND= 'space-around';
|
||||
export const SPACE_AROUND = 'space-around';
|
||||
|
||||
export const isValid = makeValidator<JustifyContent>(FLEX_START, FLEX_END, CENTER, SPACE_BETWEEN, SPACE_AROUND);
|
||||
export const parse = makeParser<JustifyContent>(isValid);
|
||||
@ -50,7 +50,7 @@ export namespace FlexBasisPercent {
|
||||
export type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
||||
export namespace AlignItems {
|
||||
export const FLEX_START = 'flex-start';
|
||||
export const FLEX_END= 'flex-end';
|
||||
export const FLEX_END = 'flex-end';
|
||||
export const CENTER = 'center';
|
||||
export const BASELINE = 'baseline';
|
||||
export const STRETCH = 'stretch';
|
||||
|
@ -463,7 +463,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
|
||||
switch (flexDirection) {
|
||||
case FlexDirection.ROW:
|
||||
case FlexDirection.ROW_REVERSE:{
|
||||
case FlexDirection.ROW_REVERSE: {
|
||||
const widthMode = getMeasureSpecMode(widthMeasureSpec);
|
||||
const widthSize = getMeasureSpecSize(widthMeasureSpec);
|
||||
if (widthMode === EXACTLY) {
|
||||
@ -475,7 +475,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
break;
|
||||
}
|
||||
case FlexDirection.COLUMN:
|
||||
case FlexDirection.COLUMN_REVERSE:{
|
||||
case FlexDirection.COLUMN_REVERSE: {
|
||||
const heightMode = getMeasureSpecMode(heightMeasureSpec);
|
||||
const heightSize = getMeasureSpecSize(heightMeasureSpec);
|
||||
if (heightMode === EXACTLY) {
|
||||
@ -1019,7 +1019,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
childLeft = paddingLeft + spaceBetweenItem / 2.0;
|
||||
childRight = width - paddingRight - spaceBetweenItem / 2.0;
|
||||
break;
|
||||
case JustifyContent.SPACE_BETWEEN:{
|
||||
case JustifyContent.SPACE_BETWEEN: {
|
||||
childLeft = paddingLeft;
|
||||
const denominator = flexLine.itemCount !== 1 ? flexLine.itemCount - 1 : 1.0;
|
||||
spaceBetweenItem = (width - insets.left - insets.right - flexLine.mainSize) / denominator;
|
||||
@ -1110,7 +1110,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
view.layout(left, top - crossSize + view.getMeasuredHeight() + lp.effectiveMarginTop, right, bottom - crossSize + view.getMeasuredHeight() + lp.effectiveMarginTop);
|
||||
}
|
||||
break;
|
||||
case AlignItems.CENTER:{
|
||||
case AlignItems.CENTER: {
|
||||
const topFromCrossAxis = (crossSize - view.getMeasuredHeight()) / 2;
|
||||
if (flexWrap !== FlexWrap.WRAP_REVERSE) {
|
||||
view.layout(left, top + topFromCrossAxis + lp.effectiveMarginTop - lp.effectiveMarginBottom, right, top + topFromCrossAxis + view.getMeasuredHeight() + lp.effectiveMarginTop - lp.effectiveMarginBottom);
|
||||
@ -1163,7 +1163,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
childTop = paddingTop + spaceBetweenItem / 2.0;
|
||||
childBottom = height - paddingBottom - spaceBetweenItem / 2.0;
|
||||
break;
|
||||
case JustifyContent.SPACE_BETWEEN:{
|
||||
case JustifyContent.SPACE_BETWEEN: {
|
||||
childTop = paddingTop;
|
||||
const denominator = flexLine.itemCount !== 1 ? flexLine.itemCount - 1 : 1.0;
|
||||
spaceBetweenItem = (height - insets.top - insets.bottom - flexLine.mainSize) / denominator;
|
||||
@ -1244,7 +1244,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
|
||||
view.layout(left - crossSize + view.getMeasuredWidth() + lp.effectiveMarginLeft, top, right - crossSize + view.getMeasuredWidth() + lp.effectiveMarginLeft, bottom);
|
||||
}
|
||||
break;
|
||||
case AlignItems.CENTER:{
|
||||
case AlignItems.CENTER: {
|
||||
const leftFromCrossAxis = (crossSize - view.getMeasuredWidth()) / 2;
|
||||
if (!isRtl) {
|
||||
view.layout(left + leftFromCrossAxis + lp.effectiveMarginLeft - lp.effectiveMarginRight, top, right + leftFromCrossAxis + lp.effectiveMarginLeft - lp.effectiveMarginRight, bottom);
|
||||
|
@ -94,7 +94,7 @@ export class PageBase extends ContentView {
|
||||
get frame(): Frame {
|
||||
const frame = this.parent;
|
||||
|
||||
return (frame && frame.constructor.name === 'Frame') ? frame as Frame : undefined;
|
||||
return frame && frame.constructor.name === 'Frame' ? (frame as Frame) : undefined;
|
||||
}
|
||||
|
||||
private createNavigatedData(eventName: string, isBackNavigation: boolean): NavigatedData {
|
||||
|
@ -46,7 +46,7 @@ export namespace ad {
|
||||
}
|
||||
const isBorderDrawable = drawable instanceof org.nativescript.widgets.BorderDrawable;
|
||||
const onlyColor = !background.hasBorderWidth() && !background.hasBorderRadius() && !background.clipPath && !background.image && !!background.color;
|
||||
if (drawable instanceof android.graphics.drawable.ColorDrawable && onlyColor) {
|
||||
if (drawable instanceof android.graphics.drawable.ColorDrawable && onlyColor) {
|
||||
drawable.setColor(background.color.android);
|
||||
drawable.invalidateSelf();
|
||||
} else if (isSetColorFilterOnlyWidget(nativeView) && drawable && onlyColor) {
|
||||
|
@ -218,7 +218,7 @@ class CSSSource {
|
||||
this._ast = cssTreeParse(this._source, this._file);
|
||||
|
||||
return;
|
||||
case 'nativescript':{
|
||||
case 'nativescript': {
|
||||
const cssparser = new CSS3Parser(this._source);
|
||||
const stylesheet = cssparser.parseAStylesheet();
|
||||
const cssNS = new CSSNativeScript();
|
||||
|
6
packages/core/utils/native-helper.d.ts
vendored
6
packages/core/utils/native-helper.d.ts
vendored
@ -168,9 +168,9 @@ export namespace iOSNativeHelper {
|
||||
*/
|
||||
export function applyRotateTransform(transform: any /* CATransform3D*/, x: number, y: number, z: number): any; /* CATransform3D*/
|
||||
|
||||
/**
|
||||
* Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
|
||||
*/
|
||||
/**
|
||||
* Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
|
||||
*/
|
||||
export function createUIDocumentInteractionControllerDelegate(): any;
|
||||
|
||||
/**
|
||||
|
@ -74,7 +74,7 @@ import java.util.List;
|
||||
* <li>{@code layout_wrapBefore}</li>
|
||||
* </ul>
|
||||
*/
|
||||
public class FlexboxLayout extends ViewGroup {
|
||||
public class FlexboxLayout extends LayoutBase {
|
||||
|
||||
@IntDef({FLEX_DIRECTION_ROW, FLEX_DIRECTION_ROW_REVERSE, FLEX_DIRECTION_COLUMN,
|
||||
FLEX_DIRECTION_COLUMN_REVERSE})
|
||||
@ -2226,6 +2226,11 @@ public class FlexboxLayout extends ViewGroup {
|
||||
mDividerDrawableHorizontal.draw(canvas);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LayoutParams generateDefaultLayoutParams() {
|
||||
return new FlexboxLayout.LayoutParams();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
|
||||
return p instanceof FlexboxLayout.LayoutParams;
|
||||
|
@ -16,16 +16,16 @@ import android.widget.FrameLayout;
|
||||
*
|
||||
*/
|
||||
public abstract class LayoutBase extends ViewGroup {
|
||||
private boolean passThroughParent;
|
||||
|
||||
public LayoutBase(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public LayoutBase(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private boolean passThroughParent;
|
||||
|
||||
public boolean getPassThroughParent() { return this.passThroughParent; }
|
||||
public void setPassThroughParent(boolean value) { this.passThroughParent = value; }
|
||||
|
||||
|
||||
@Override
|
||||
protected LayoutParams generateDefaultLayoutParams() {
|
||||
return new CommonLayoutParams();
|
||||
@ -91,4 +91,12 @@ public abstract class LayoutBase extends ViewGroup {
|
||||
|
||||
return gravity;
|
||||
}
|
||||
|
||||
public boolean getPassThroughParent() {
|
||||
return this.passThroughParent;
|
||||
}
|
||||
|
||||
public void setPassThroughParent(boolean value) {
|
||||
this.passThroughParent = value;
|
||||
}
|
||||
}
|
@ -126,15 +126,15 @@
|
||||
"builder": "@nrwl/workspace:run-commands",
|
||||
"outputs": ["dist/packages"],
|
||||
"options": {
|
||||
"commands": [
|
||||
"npx rimraf dist/packages/core",
|
||||
"./node_modules/.bin/tsc -p packages/core/tsconfig.lib.json",
|
||||
"./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/**/*.d.ts\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/js-libs/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/cli-hooks/**/*.js\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/platforms/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/fetch/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css-value/**/*\" dist",
|
||||
"cp packages/core/package.json dist/packages/core",
|
||||
"cp LICENSE dist/packages/core",
|
||||
"commands": [
|
||||
"npx rimraf dist/packages/core",
|
||||
"./node_modules/.bin/tsc -p packages/core/tsconfig.lib.json",
|
||||
"./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/**/*.d.ts\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/js-libs/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/cli-hooks/**/*.js\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/platforms/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/fetch/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css/**/*\" dist && ./node_modules/.bin/copyfiles -e \"packages/core/__tests__/**/*\" \"packages/core/css-value/**/*\" dist",
|
||||
"cp packages/core/package.json dist/packages/core",
|
||||
"cp LICENSE dist/packages/core",
|
||||
"cd dist/packages/core && npm pack && mv *.tgz .."
|
||||
],
|
||||
"cwd": ".",
|
||||
],
|
||||
"cwd": ".",
|
||||
"parallel": false
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user