mirror of
https://gitee.com/openharmony/developtools_ace_ets2bundle
synced 2024-11-26 18:21:00 +00:00
rebuild test for ets-checker and ets-transform Signed-off-by: s00912778 <shijiakai2@huawei.com> Change-Id: If6ea8a9e035d84c3e8f59eaa219a2dc46937be9c
This commit is contained in:
commit
a2b0a0c7ac
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.vscode/
|
||||
compiler/etsTest_build/
|
||||
compiler/arkTest_build/
|
||||
compiler/node_modules/
|
||||
compiler/lib/
|
||||
|
@ -1093,6 +1093,7 @@ function resetProjectConfig() {
|
||||
projectConfig.optLazyForEach = false;
|
||||
projectConfig.hspResourcesMap = false;
|
||||
projectConfig.coldReload = undefined;
|
||||
projectConfig.hotReload = undefined;
|
||||
projectConfig.isFirstBuild = undefined;
|
||||
projectConfig.changedFileList = undefined;
|
||||
projectConfig.patchAbcPath = undefined;
|
||||
|
@ -10,7 +10,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint --fix ./src --ext .ts",
|
||||
"build": "npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts && node uglify-source.js lib",
|
||||
"build": "npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts",
|
||||
"create": "node ./lib/create.js --env projectName",
|
||||
"compile": "webpack --config webpack.config.js --env buildMode=debug projectName",
|
||||
"test": "npm run build && mocha test/test.js && mocha test/test.js --partialUpdate && mocha test/test.js --assertError",
|
||||
@ -23,7 +23,10 @@
|
||||
"arkTest": "npm run generateKitConfigs && ./node_modules/.bin/babel ./test/ark_compiler_ut --out-dir arkTest_build/ark_compiler_ut --extensions .ts && npm run run:arkTest && npm run run:cleanArkTest",
|
||||
"coverage": "node_modules/nyc/bin/nyc.js npm run test:coverage",
|
||||
"duplicate": "jscpd",
|
||||
"generateKitConfigs": "node ./build_kitConfigs_file.js ../../../interface/sdk-js/kits ./kit_configs ../../../interface/sdk-js/api ../../../interface/sdk-js/arkts"
|
||||
"generateKitConfigs": "node ./build_kitConfigs_file.js ../../../interface/sdk-js/kits ./kit_configs ../../../interface/sdk-js/api ../../../interface/sdk-js/arkts",
|
||||
"etsTest": "npm run build && ./node_modules/.bin/babel ./test/transform_ut --ignore ./test/transform_ut/application/** --out-dir etsTest_build/transform_ut --extensions .ts && npm run run:etsTest&& npm run run:cleanEtsTest",
|
||||
"run:etsTest": "mocha \"etsTest_build/transform_ut/**/*.test.js\" --reporter-option maxDiffSize=10000",
|
||||
"run:cleanEtsTest": "rm -rf etsTest_build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.20.7",
|
||||
|
@ -31,10 +31,14 @@
|
||||
{
|
||||
"message": "Then statement cannot be null in if statement.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "'' does not meet UI component syntax.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"idCheck": {
|
||||
"message": "The current component id \"1\" is duplicate with ${path.resolve(__dirname, '../idCheck.ets')}:7:21.",
|
||||
"message": "The current component id \"1\" is duplicate with ${const path = require('path');path.resolve(__dirname, '../../../test/transform_ut/application/entry/src/main/ets/pages/utForValidate/Decorators/process_component_build/idCheck.ets')}:6:21.",
|
||||
"type": "WARN"
|
||||
},
|
||||
"arkUIStandard": {
|
||||
@ -109,18 +113,30 @@
|
||||
"message": "The @Entry component 'Index' cannot have the @Prop property 'message'.",
|
||||
"type": "WARN"
|
||||
},
|
||||
"validateHasIllegalQuestionToken": {
|
||||
"message": "The @ObjectLink property 'message' cannot be an optional parameter.",
|
||||
"type": "WARN"
|
||||
},
|
||||
"validateHasIllegalQuestionToken": [
|
||||
{
|
||||
"message": "The @ObjectLink property 'message' cannot be an optional parameter.",
|
||||
"type": "WARN"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @ObjectLink property 'message' can only be objects of classes decorated with @Observed class decorator in ets (not ts).",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"validateForbiddenUseStateType": {
|
||||
"message": "The @State property 'message' cannot be a 'CustomDialogController' object.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
"validateDuplicateDecorator": {
|
||||
"message": "The inner decorator @State cannot be used together with custom decorator.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
"validateDuplicateDecorator": [
|
||||
{
|
||||
"message": "The inner decorator @State cannot be used together with custom decorator.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The decorator '@opacity' cannot have the same name as the built-in style attribute 'opacity'.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"validateWatchDecorator": {
|
||||
"message": "Regular variable 'message' can not be decorated with @Watch.",
|
||||
"type": "ERROR"
|
||||
@ -271,18 +287,9 @@
|
||||
"message": "@Styles can't have parameters.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
"ExceededPreview": {
|
||||
"message": "A page can contain at most 10 '@Preview' decorators.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
"ExceededEntry": {
|
||||
"message": "A page can't contain more than one '@Entry' decorator",
|
||||
"type": "ERROR"
|
||||
},
|
||||
"OneEntry": {
|
||||
"message": "A page configured in 'undefined or build-profile.json5' must have one and only one '@Entry' decorator.Solutions:>Please make sure that the splash page has one and only one '@Entry' decorator.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
"ExceededPreview": [],
|
||||
"ExceededEntry": [],
|
||||
"OneEntry": [],
|
||||
"notMethodDeco": {
|
||||
"message": "'@State' can not decorate the method.",
|
||||
"type": "ERROR"
|
||||
@ -781,8 +788,216 @@
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"v1ToV2Component.ts": [],
|
||||
"v1ToV2ComponentValidate": [],
|
||||
"v2ToV1ComponentValidate": [],
|
||||
"property_observe_validate": []
|
||||
"v1ToV2Component": [
|
||||
{
|
||||
"message": "Property 'func_value1' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'func_value2' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"v1ToV2ComponentValidate": [
|
||||
{
|
||||
"message": "The type of the @Param property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'param_value' in the @ComponentV2 component 'TestV2Child2' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'param_value_alias_type' in the @ComponentV2 component 'TestV2Child2' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'state_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'prop_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'link_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'provide_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'consume_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'objectLink_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'storage_link_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'storage_prop_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'local_storage_link_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'local_storage_prop_value' in the @ComponentV2 component 'TestV2Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"v2ToV1ComponentValidate": [
|
||||
{
|
||||
"message": "The type of the @Provider property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The @ComponentV2 struct must not contain any @Component with an @Link decorated variable",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'set_value' in the @Component component 'TestV1Child1' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The @ComponentV2 struct must not contain any @Component with an @Link decorated variable",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'set_value' in the @Component component 'TestV1Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'map_value' in the @Component component 'TestV1Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'arr_value' in the @Component component 'TestV1Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'arr_value1' in the @Component component 'TestV1Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'arr_value2' in the @Component component 'TestV1Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "Property 'arr_value3' in the @Component component 'TestV1Child' are not allowed to be assigned values here.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"property_observe_validate": [
|
||||
{
|
||||
"message": "The type of the @State property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @State property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @State property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @State property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @State property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Prop property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Link property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Provide property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Consume property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @StorageLink property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @StorageProp property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @LocalStorageLink property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @LocalStorageProp property can not be a class decorated with @ObservedV2.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Local property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Local property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Local property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Local property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Local property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Local property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Param property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Param property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Param property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Event property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Provider property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
},
|
||||
{
|
||||
"message": "The type of the @Consumer property can not be a class decorated with @Observed.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
],
|
||||
"index": {
|
||||
"message": "The struct 'Button' cannot have the same name as the built-in component 'Button'.",
|
||||
"type": "ERROR"
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "import@CustomDialog_" + ++__generate__Id;
|
||||
}
|
||||
import { CustomDialogExample1 as CustomDialogExample } from '../../../test/import@CustomDialog';
|
||||
class CustomDialogUser extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__textValue = new ObservedPropertySimple('', this, "textValue");
|
||||
this.__inputValue = new ObservedPropertySimple('click me', this, "inputValue");
|
||||
this.dialogController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let jsDialog = new CustomDialogExample("2", this, {
|
||||
cancel: this.onCancel,
|
||||
confirm: this.onAccept,
|
||||
textValue: this.__textValue,
|
||||
inputValue: this.__inputValue
|
||||
});
|
||||
jsDialog.setController(this.dialogController);
|
||||
View.create(jsDialog);
|
||||
},
|
||||
cancel: this.existApp,
|
||||
autoCancel: true,
|
||||
alignment: DialogAlignment.Default,
|
||||
offset: { dx: 0, dy: -20 },
|
||||
gridCount: 4,
|
||||
customStyle: false
|
||||
}, this);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.textValue !== undefined) {
|
||||
this.textValue = params.textValue;
|
||||
}
|
||||
if (params.inputValue !== undefined) {
|
||||
this.inputValue = params.inputValue;
|
||||
}
|
||||
if (params.dialogController !== undefined) {
|
||||
this.dialogController = params.dialogController;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__textValue.aboutToBeDeleted();
|
||||
this.__inputValue.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get textValue() {
|
||||
return this.__textValue.get();
|
||||
}
|
||||
set textValue(newValue) {
|
||||
this.__textValue.set(newValue);
|
||||
}
|
||||
get inputValue() {
|
||||
return this.__inputValue.get();
|
||||
}
|
||||
set inputValue(newValue) {
|
||||
this.__inputValue.set(newValue);
|
||||
}
|
||||
onCancel() {
|
||||
console.info('Callback when the first button is clicked');
|
||||
}
|
||||
onAccept() {
|
||||
console.info('Callback when the second button is clicked');
|
||||
}
|
||||
existApp() {
|
||||
console.info('Click the callback in the blank area');
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
Column.margin({ top: 5 });
|
||||
Button.createWithLabel(this.inputValue);
|
||||
Button.onClick(() => {
|
||||
this.dialogController.open();
|
||||
});
|
||||
Button.backgroundColor(0x317aff);
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new CustomDialogUser("1", undefined, {}));
|
||||
//# sourceMappingURL=import@CustomDialog.js.map
|
@ -0,0 +1,116 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "import@Observed_" + ++__generate__Id;
|
||||
}
|
||||
import { ClassB as ClassA } from '../../../test/import@Observed';
|
||||
class ViewA extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.label = 'ViewA1';
|
||||
this.__a = new SynchedPropertyNesedObject(params.a, this, "a");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.label !== undefined) {
|
||||
this.label = params.label;
|
||||
}
|
||||
this.__a.set(params.a);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__a.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get a() {
|
||||
return this.__a.get();
|
||||
}
|
||||
render() {
|
||||
Row.create();
|
||||
Row.margin({ top: 10 });
|
||||
Button.createWithLabel('ViewA' + JSON.stringify(this.label) + 'this.a.c=' + JSON.stringify(this.a.c));
|
||||
Button.onClick(() => {
|
||||
this.a.c += 1;
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
class ViewB extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__arrA = new ObservedPropertyObject([new ClassA(0), new ClassA(0)], this, "arrA");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.arrA !== undefined) {
|
||||
this.arrA = params.arrA;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arrA.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get arrA() {
|
||||
return this.__arrA.get();
|
||||
}
|
||||
set arrA(newValue) {
|
||||
this.__arrA.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
ForEach.create("3", this, ObservedObject.GetRawObject(this.arrA), (item) => {
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new ViewA("2", this, { label: JSON.stringify(item.id), a: item }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
label: JSON.stringify(item.id), a: item
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
}, (item) => item.id.toString());
|
||||
ForEach.pop();
|
||||
let earlierCreatedChild_4 = (this && this.findChildById) ? this.findChildById("4") : undefined;
|
||||
if (earlierCreatedChild_4 == undefined) {
|
||||
View.create(new ViewA("4", this, { label: JSON.stringify(this.arrA[0]), a: this.arrA[0] }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_4.updateWithValueParams({
|
||||
label: JSON.stringify(this.arrA[0]), a: this.arrA[0]
|
||||
});
|
||||
View.create(earlierCreatedChild_4);
|
||||
}
|
||||
let earlierCreatedChild_5 = (this && this.findChildById) ? this.findChildById("5") : undefined;
|
||||
if (earlierCreatedChild_5 == undefined) {
|
||||
View.create(new ViewA("5", this, { label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1] }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_5.updateWithValueParams({
|
||||
label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1]
|
||||
});
|
||||
View.create(earlierCreatedChild_5);
|
||||
}
|
||||
Button.createWithLabel('ViewB: reset array');
|
||||
Button.margin({ top: 10 });
|
||||
Button.onClick(() => {
|
||||
this.arrA = [new ClassA(0), new ClassA(0)];
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel('ViewB: push');
|
||||
Button.margin({ top: 10 });
|
||||
Button.onClick(() => {
|
||||
this.arrA.push(new ClassA(0));
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel('ViewB: shift');
|
||||
Button.margin({ top: 10 });
|
||||
Button.onClick(() => {
|
||||
this.arrA.shift();
|
||||
});
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ViewB("1", undefined, {}));
|
||||
//# sourceMappingURL=import@Observed.js.map
|
@ -0,0 +1,145 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "importAllEts_" + ++__generate__Id;
|
||||
}
|
||||
import * as AllComponent from '../../../test/NamespaceComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__myState1 = new ObservedPropertyObject(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimple(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimple(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimple('ImportTest', this, "myState4");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new AllComponent.NamespaceComponent1("2", this, {
|
||||
NamespaceComponent1Link1: this.__myState1,
|
||||
NamespaceComponent1Link2: this.__myState2,
|
||||
NamespaceComponent1Link3: this.__myState3,
|
||||
NamespaceComponent1Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new AllComponent.NamespaceComponent1("3", this, {
|
||||
NamespaceComponent1Link1: this.__myState1,
|
||||
NamespaceComponent1Link2: this.__myState2,
|
||||
NamespaceComponent1Link3: this.__myState3,
|
||||
NamespaceComponent1Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
__Common__.pop();
|
||||
let earlierCreatedChild_4 = (this && this.findChildById) ? this.findChildById("4") : undefined;
|
||||
if (earlierCreatedChild_4 == undefined) {
|
||||
View.create(new AllComponent.default("4", this, {
|
||||
NamespaceComponent3Link1: this.__myState1,
|
||||
NamespaceComponent3Link2: this.__myState2,
|
||||
NamespaceComponent3Link3: this.__myState3,
|
||||
NamespaceComponent3Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_4.updateWithValueParams({
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
});
|
||||
View.create(earlierCreatedChild_4);
|
||||
}
|
||||
__Common__.create();
|
||||
__Common__.height(200);
|
||||
let earlierCreatedChild_5 = (this && this.findChildById) ? this.findChildById("5") : undefined;
|
||||
if (earlierCreatedChild_5 == undefined) {
|
||||
View.create(new AllComponent.default("5", this, {
|
||||
NamespaceComponent3Link1: this.__myState1,
|
||||
NamespaceComponent3Link2: this.__myState2,
|
||||
NamespaceComponent3Link3: this.__myState3,
|
||||
NamespaceComponent3Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_5.updateWithValueParams({
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
});
|
||||
View.create(earlierCreatedChild_5);
|
||||
}
|
||||
__Common__.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ImportTest("1", undefined, {}));
|
||||
//# sourceMappingURL=importAllEts.js.map
|
@ -0,0 +1,197 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "importEts_" + ++__generate__Id;
|
||||
}
|
||||
import LinkComponentDefault, { LinkComponent as LinkComponent1Ref, LinkComponent2 as LinkComponent2Ref, LinkComponent3 } from '../../../test/LinkComponent';
|
||||
import DefaultComponent from "../../../test/DefaultComponent";
|
||||
import AMDComponentDefault from '../../../test/AMDComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__myState1 = new ObservedPropertyObject(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimple(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimple(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimple('ImportTest', this, "myState4");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new LinkComponent2Ref("2", this, {
|
||||
LinkComponent2Link1: this.__myState1,
|
||||
LinkComponent2Link2: this.__myState2,
|
||||
LinkComponent2Link3: this.__myState3,
|
||||
LinkComponent2Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent2'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent2'
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Text.create('space');
|
||||
Text.fontSize(20);
|
||||
Text.fontColor(Color.Red);
|
||||
Text.pop();
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new LinkComponent1Ref("3", this, {
|
||||
LinkComponent1Link1: this.__myState1,
|
||||
LinkComponent1Link2: this.__myState2,
|
||||
LinkComponent1Link3: this.__myState3,
|
||||
LinkComponent1Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
let earlierCreatedChild_4 = (this && this.findChildById) ? this.findChildById("4") : undefined;
|
||||
if (earlierCreatedChild_4 == undefined) {
|
||||
View.create(new DefaultComponent("4", this, {
|
||||
DefaultComponentLink1: this.__myState1,
|
||||
DefaultComponentLink2: this.__myState2,
|
||||
DefaultComponentLink3: this.__myState3,
|
||||
DefaultComponentLink4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_4.updateWithValueParams({
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
});
|
||||
View.create(earlierCreatedChild_4);
|
||||
}
|
||||
let earlierCreatedChild_5 = (this && this.findChildById) ? this.findChildById("5") : undefined;
|
||||
if (earlierCreatedChild_5 == undefined) {
|
||||
View.create(new LinkComponentDefault("5", this, {
|
||||
LinkComponent3Link1: this.__myState1,
|
||||
LinkComponent3Link2: this.__myState2,
|
||||
LinkComponent3Link3: this.__myState3,
|
||||
LinkComponent3Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent3'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_5.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent3'
|
||||
});
|
||||
View.create(earlierCreatedChild_5);
|
||||
}
|
||||
let earlierCreatedChild_6 = (this && this.findChildById) ? this.findChildById("6") : undefined;
|
||||
if (earlierCreatedChild_6 == undefined) {
|
||||
View.create(new AMDComponentDefault("6", this, {
|
||||
AMDComponentLink1: this.__myState1,
|
||||
AMDComponentLink2: this.__myState2,
|
||||
AMDComponentLink3: this.__myState3,
|
||||
AMDComponentLink4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_6.updateWithValueParams({
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
});
|
||||
View.create(earlierCreatedChild_6);
|
||||
}
|
||||
let earlierCreatedChild_7 = (this && this.findChildById) ? this.findChildById("7") : undefined;
|
||||
if (earlierCreatedChild_7 == undefined) {
|
||||
View.create(new LinkComponent3("7", this, {
|
||||
LinkComponent3Link1: this.__myState1,
|
||||
LinkComponent3Link2: this.__myState2,
|
||||
LinkComponent3Link3: this.__myState3,
|
||||
LinkComponent3Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_7.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
});
|
||||
View.create(earlierCreatedChild_7);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ImportTest("1", undefined, {}));
|
||||
//# sourceMappingURL=importEts.js.map
|
@ -0,0 +1,111 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "importExportEts_" + ++__generate__Id;
|
||||
}
|
||||
import { AllStarComponent } from '../../../test/ExportStarComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__myState1 = new ObservedPropertyObject(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimple(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimple(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimple('ImportTest', this, "myState4");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new AllStarComponent.ExportComponent("2", this, {
|
||||
ExportComponent1Link1: this.__myState1,
|
||||
ExportComponent1Link2: this.__myState2,
|
||||
ExportComponent1Link3: this.__myState3,
|
||||
ExportComponent1Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new AllStarComponent.default("3", this, {
|
||||
ExportComponent4Link1: this.__myState1,
|
||||
ExportComponent4Link2: this.__myState2,
|
||||
ExportComponent4Link3: this.__myState3,
|
||||
ExportComponent4Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ImportTest("1", undefined, {}));
|
||||
//# sourceMappingURL=importExportEts.js.map
|
@ -0,0 +1,156 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "importExportNest_" + ++__generate__Id;
|
||||
}
|
||||
import { tExtend, tStyles, DivideTest, Base } from '../../../test/ImportNestAll';
|
||||
class ImportTest extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__testText1 = new ObservedPropertySimple('Hello', this, "testText1");
|
||||
this.__testText2 = new ObservedPropertySimple('World', this, "testText2");
|
||||
this.__testText3 = new ObservedPropertySimple('Test', this, "testText3");
|
||||
this.__testText4 = new ObservedPropertySimple('Component', this, "testText4");
|
||||
this.__testState1 = new ObservedPropertySimple('Base', this, "testState1");
|
||||
this.__testState2 = new ObservedPropertySimple(0, this, "testState2");
|
||||
this.__testState3 = new ObservedPropertyObject({ name: 'Base' }, this, "testState3");
|
||||
this.__testState4 = new ObservedPropertySimple(3, this, "testState4");
|
||||
this.__testState5 = new ObservedPropertySimple(10, this, "testState5");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.testText1 !== undefined) {
|
||||
this.testText1 = params.testText1;
|
||||
}
|
||||
if (params.testText2 !== undefined) {
|
||||
this.testText2 = params.testText2;
|
||||
}
|
||||
if (params.testText3 !== undefined) {
|
||||
this.testText3 = params.testText3;
|
||||
}
|
||||
if (params.testText4 !== undefined) {
|
||||
this.testText4 = params.testText4;
|
||||
}
|
||||
if (params.testState1 !== undefined) {
|
||||
this.testState1 = params.testState1;
|
||||
}
|
||||
if (params.testState2 !== undefined) {
|
||||
this.testState2 = params.testState2;
|
||||
}
|
||||
if (params.testState3 !== undefined) {
|
||||
this.testState3 = params.testState3;
|
||||
}
|
||||
if (params.testState4 !== undefined) {
|
||||
this.testState4 = params.testState4;
|
||||
}
|
||||
if (params.testState5 !== undefined) {
|
||||
this.testState5 = params.testState5;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__testText1.aboutToBeDeleted();
|
||||
this.__testText2.aboutToBeDeleted();
|
||||
this.__testText3.aboutToBeDeleted();
|
||||
this.__testText4.aboutToBeDeleted();
|
||||
this.__testState1.aboutToBeDeleted();
|
||||
this.__testState2.aboutToBeDeleted();
|
||||
this.__testState3.aboutToBeDeleted();
|
||||
this.__testState4.aboutToBeDeleted();
|
||||
this.__testState5.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get testText1() {
|
||||
return this.__testText1.get();
|
||||
}
|
||||
set testText1(newValue) {
|
||||
this.__testText1.set(newValue);
|
||||
}
|
||||
get testText2() {
|
||||
return this.__testText2.get();
|
||||
}
|
||||
set testText2(newValue) {
|
||||
this.__testText2.set(newValue);
|
||||
}
|
||||
get testText3() {
|
||||
return this.__testText3.get();
|
||||
}
|
||||
set testText3(newValue) {
|
||||
this.__testText3.set(newValue);
|
||||
}
|
||||
get testText4() {
|
||||
return this.__testText4.get();
|
||||
}
|
||||
set testText4(newValue) {
|
||||
this.__testText4.set(newValue);
|
||||
}
|
||||
get testState1() {
|
||||
return this.__testState1.get();
|
||||
}
|
||||
set testState1(newValue) {
|
||||
this.__testState1.set(newValue);
|
||||
}
|
||||
get testState2() {
|
||||
return this.__testState2.get();
|
||||
}
|
||||
set testState2(newValue) {
|
||||
this.__testState2.set(newValue);
|
||||
}
|
||||
get testState3() {
|
||||
return this.__testState3.get();
|
||||
}
|
||||
set testState3(newValue) {
|
||||
this.__testState3.set(newValue);
|
||||
}
|
||||
get testState4() {
|
||||
return this.__testState4.get();
|
||||
}
|
||||
set testState4(newValue) {
|
||||
this.__testState4.set(newValue);
|
||||
}
|
||||
get testState5() {
|
||||
return this.__testState5.get();
|
||||
}
|
||||
set testState5(newValue) {
|
||||
this.__testState5.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create(this.testText1);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
tExtend(20, this);
|
||||
Text.create(this.testText2);
|
||||
Text.pop();
|
||||
tStyles(this);
|
||||
Button.createWithLabel(this.testText3);
|
||||
Button.pop();
|
||||
Text.create(this.testText4);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new Base("2", this, {
|
||||
testStr: this.__testState1,
|
||||
testNum: this.__testState2,
|
||||
testObj: this.__testState3
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new DivideTest("3", this, {
|
||||
testNum1: this.__testState4,
|
||||
testNum2: this.__testState5
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ImportTest("1", undefined, {}));
|
||||
//# sourceMappingURL=importExportNest.js.map
|
@ -0,0 +1,48 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "importSystemApi_" + ++__generate__Id;
|
||||
}
|
||||
import router from "@system.router";
|
||||
import app from "@system.router";
|
||||
import fetch from "@system.fetch";
|
||||
import http from '@ohos.net.http';
|
||||
class A {
|
||||
pushPage() {
|
||||
router.push({
|
||||
uri: 'pages/routerpage2/routerpage2',
|
||||
params: {
|
||||
data1: 'message',
|
||||
data2: {
|
||||
data3: [123, 456, 789]
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
class Info {
|
||||
getInfo() {
|
||||
let info = app.getInfo();
|
||||
console.log(JSON.stringify(info));
|
||||
}
|
||||
}
|
||||
const json = {
|
||||
data: {
|
||||
responseData: 'NA',
|
||||
url: "test_url",
|
||||
},
|
||||
fetch: function () {
|
||||
var that = this;
|
||||
fetch.fetch({
|
||||
url: that.url,
|
||||
success: function (response) {
|
||||
console.info("fetch success");
|
||||
that.responseData = JSON.stringify(response);
|
||||
},
|
||||
fail: function () {
|
||||
console.info("fetch fail");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
let httpRequest = http.createHttp();
|
||||
//# sourceMappingURL=importSystemApi.js.map
|
@ -0,0 +1,111 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "importTs_" + ++__generate__Id;
|
||||
}
|
||||
import { AllStarComponent } from '../../../test/ExportStarComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__myState1 = new ObservedPropertyObject(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimple(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimple(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimple('ImportTest', this, "myState4");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new AllStarComponent.ExportComponent("2", this, {
|
||||
ExportComponent1Link1: this.__myState1,
|
||||
ExportComponent1Link2: this.__myState2,
|
||||
ExportComponent1Link3: this.__myState3,
|
||||
ExportComponent1Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new AllStarComponent.default("3", this, {
|
||||
ExportComponent4Link1: this.__myState1,
|
||||
ExportComponent4Link2: this.__myState2,
|
||||
ExportComponent4Link3: this.__myState3,
|
||||
ExportComponent4Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ImportTest("1", undefined, {}));
|
||||
//# sourceMappingURL=importTs.js.map
|
@ -0,0 +1,106 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "$$_component_" + ++__generate__Id;
|
||||
}
|
||||
const value5 = [true, false];
|
||||
let value6 = { item1: true };
|
||||
let isCountDown = false;
|
||||
class HomeComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.value1 = "hello world 1";
|
||||
this.value2 = "hello world 2";
|
||||
this.value3 = "hello world 3";
|
||||
this.value4 = false;
|
||||
this.count = 1000;
|
||||
this.myTimeController = new TextTimerController();
|
||||
this.__format = new ObservedPropertySimple("hh:mm:ss:ms", this, "format");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.value1 !== undefined) {
|
||||
this.value1 = params.value1;
|
||||
}
|
||||
if (params.value2 !== undefined) {
|
||||
this.value2 = params.value2;
|
||||
}
|
||||
if (params.value3 !== undefined) {
|
||||
this.value3 = params.value3;
|
||||
}
|
||||
if (params.value4 !== undefined) {
|
||||
this.value4 = params.value4;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
if (params.myTimeController !== undefined) {
|
||||
this.myTimeController = params.myTimeController;
|
||||
}
|
||||
if (params.format !== undefined) {
|
||||
this.format = params.format;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__format.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get format() {
|
||||
return this.__format.get();
|
||||
}
|
||||
set format(newValue) {
|
||||
this.__format.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.height(500);
|
||||
Row.create();
|
||||
Text.create(this.value1);
|
||||
Text.pop();
|
||||
Radio.create({ value: "Radio", group: "1" });
|
||||
Radio.checked(this.value4, newValue => { this.value4 = newValue; });
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Row.width(20);
|
||||
Button.createWithChild();
|
||||
Button.bindPopup({ value: this.value4, changeEvent: newValue => { this.value4 = newValue; } }, { message: "This is $$ for regular" });
|
||||
Button.width(100);
|
||||
Button.height(20);
|
||||
Text.create(this.value1);
|
||||
Text.bindPopup({ value: value5[0], changeEvent: newValue => { value5[0] = newValue; } }, { message: "This is $$ for Array" });
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Text.create(this.value2);
|
||||
Text.fontSize(100);
|
||||
Text.bindPopup({ value: value6.item1, changeEvent: newValue => { value6.item1 = newValue; } }, { message: "This is $$ for Obj" });
|
||||
Text.pop();
|
||||
Text.create(this.value3);
|
||||
Text.pop();
|
||||
Radio.create({ value: "Radio", group: "1" });
|
||||
Radio.checked(value5[0], newValue => { value5[0] = newValue; });
|
||||
Row.pop();
|
||||
Row.create();
|
||||
TextTimer.create({ controller: this.myTimeController, isCountDown: { value: isCountDown, changeEvent: newValue => { isCountDown = newValue; } }, count: { value: this.count, changeEvent: newValue => { this.count = newValue; } } });
|
||||
TextTimer.format(this.format, newValue => { this.format = newValue; });
|
||||
TextTimer.pop();
|
||||
Button.createWithLabel("start");
|
||||
Button.onClick(() => {
|
||||
this.myTimeController.start();
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel("pause");
|
||||
Button.onClick(() => {
|
||||
this.myTimeController.pause();
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel("reset");
|
||||
Button.onClick(() => {
|
||||
this.myTimeController.reset();
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new HomeComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=$$_component.js.map
|
@ -0,0 +1,129 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "custom_component_" + ++__generate__Id;
|
||||
}
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new Banner("2", this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
if (!earlierCreatedChild_2.needsUpdate()) {
|
||||
earlierCreatedChild_2.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new Banner("3", this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({});
|
||||
if (!earlierCreatedChild_3.needsUpdate()) {
|
||||
earlierCreatedChild_3.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
__Common__.pop();
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
__Common__.height(200);
|
||||
let earlierCreatedChild_4 = (this && this.findChildById) ? this.findChildById("4") : undefined;
|
||||
if (earlierCreatedChild_4 == undefined) {
|
||||
View.create(new Banner("4", this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_4.updateWithValueParams({});
|
||||
if (!earlierCreatedChild_4.needsUpdate()) {
|
||||
earlierCreatedChild_4.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_4);
|
||||
}
|
||||
__Common__.pop();
|
||||
let earlierCreatedChild_5 = (this && this.findChildById) ? this.findChildById("5") : undefined;
|
||||
if (earlierCreatedChild_5 == undefined) {
|
||||
View.create(new Banner("5", this, { value: "Hello" }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_5.updateWithValueParams({
|
||||
value: "Hello"
|
||||
});
|
||||
if (!earlierCreatedChild_5.needsUpdate()) {
|
||||
earlierCreatedChild_5.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_5);
|
||||
}
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
let earlierCreatedChild_6 = (this && this.findChildById) ? this.findChildById("6") : undefined;
|
||||
if (earlierCreatedChild_6 == undefined) {
|
||||
View.create(new Banner("6", this, { value: "Hello" }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_6.updateWithValueParams({
|
||||
value: "Hello"
|
||||
});
|
||||
if (!earlierCreatedChild_6.needsUpdate()) {
|
||||
earlierCreatedChild_6.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_6);
|
||||
}
|
||||
__Common__.pop();
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
__Common__.height(200);
|
||||
let earlierCreatedChild_7 = (this && this.findChildById) ? this.findChildById("7") : undefined;
|
||||
if (earlierCreatedChild_7 == undefined) {
|
||||
View.create(new Banner("7", this, { value: "Hello" }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_7.updateWithValueParams({
|
||||
value: "Hello"
|
||||
});
|
||||
if (!earlierCreatedChild_7.needsUpdate()) {
|
||||
earlierCreatedChild_7.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_7);
|
||||
}
|
||||
__Common__.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class Banner extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.value = "Hello";
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.value !== undefined) {
|
||||
this.value = params.value;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create(this.value);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=custom_component.js.map
|
@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "longPressGesture_" + ++__generate__Id;
|
||||
}
|
||||
class LongPressGestureExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__count = new ObservedPropertySimple(0, this, "count");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__count.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get count() {
|
||||
return this.__count.get();
|
||||
}
|
||||
set count(newValue) {
|
||||
this.__count.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(200);
|
||||
Flex.width(300);
|
||||
Flex.padding(60);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(30);
|
||||
Gesture.create(GesturePriority.Low);
|
||||
LongPressGesture.create({ repeat: true });
|
||||
LongPressGesture.onAction((event) => {
|
||||
if (event.repeat) {
|
||||
this.count++;
|
||||
}
|
||||
});
|
||||
LongPressGesture.onActionEnd(() => {
|
||||
this.count = 0;
|
||||
});
|
||||
LongPressGesture.pop();
|
||||
Gesture.pop();
|
||||
Text.create('LongPress onAction:' + this.count);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new LongPressGestureExample("1", undefined, {}));
|
||||
//# sourceMappingURL=longPressGesture.js.map
|
@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "panGestrue_" + ++__generate__Id;
|
||||
}
|
||||
class PanGestureExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__offsetX = new ObservedPropertySimple(0, this, "offsetX");
|
||||
this.__offsetY = new ObservedPropertySimple(0, this, "offsetY");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.offsetX !== undefined) {
|
||||
this.offsetX = params.offsetX;
|
||||
}
|
||||
if (params.offsetY !== undefined) {
|
||||
this.offsetY = params.offsetY;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__offsetX.aboutToBeDeleted();
|
||||
this.__offsetY.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get offsetX() {
|
||||
return this.__offsetX.get();
|
||||
}
|
||||
set offsetX(newValue) {
|
||||
this.__offsetX.set(newValue);
|
||||
}
|
||||
get offsetY() {
|
||||
return this.__offsetY.get();
|
||||
}
|
||||
set offsetY(newValue) {
|
||||
this.__offsetY.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
Flex.padding(20);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(80);
|
||||
Flex.translate({ x: this.offsetX, y: this.offsetY, z: 5 });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
PanGesture.create({});
|
||||
PanGesture.onActionStart((event) => {
|
||||
console.info('Pan start');
|
||||
});
|
||||
PanGesture.onActionUpdate((event) => {
|
||||
this.offsetX = event.offsetX;
|
||||
this.offsetY = event.offsetY;
|
||||
});
|
||||
PanGesture.onActionEnd(() => {
|
||||
console.info('Pan end');
|
||||
});
|
||||
PanGesture.pop();
|
||||
Gesture.pop();
|
||||
Text.create('PanGesture offset X: ' + this.offsetX);
|
||||
Text.pop();
|
||||
Text.create('PanGesture offset Y: ' + this.offsetY);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new PanGestureExample("1", undefined, {}));
|
||||
//# sourceMappingURL=panGestrue.js.map
|
@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "pinchGesture_" + ++__generate__Id;
|
||||
}
|
||||
class PinchGestureExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__scale = new ObservedPropertySimple(1, this, "scale");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.scale !== undefined) {
|
||||
this.scale = params.scale;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__scale.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get scale() {
|
||||
return this.__scale.get();
|
||||
}
|
||||
set scale(newValue) {
|
||||
this.__scale.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
Flex.padding(20);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(80);
|
||||
Flex.scale({ x: this.scale, y: this.scale, z: this.scale });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
PinchGesture.create();
|
||||
PinchGesture.onActionStart((event) => {
|
||||
console.info('Pinch start');
|
||||
});
|
||||
PinchGesture.onActionUpdate((event) => {
|
||||
this.scale = event.scale;
|
||||
});
|
||||
PinchGesture.onActionEnd(() => {
|
||||
console.info('Pinch end');
|
||||
});
|
||||
PinchGesture.pop();
|
||||
Gesture.pop();
|
||||
Text.create('PinchGesture scale:' + this.scale);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new PinchGestureExample("1", undefined, {}));
|
||||
//# sourceMappingURL=pinchGesture.js.map
|
@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "rotationGesture_" + ++__generate__Id;
|
||||
}
|
||||
class RotationGestureExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__angle = new ObservedPropertySimple(0, this, "angle");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.angle !== undefined) {
|
||||
this.angle = params.angle;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__angle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get angle() {
|
||||
return this.__angle.get();
|
||||
}
|
||||
set angle(newValue) {
|
||||
this.__angle.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
Flex.padding(20);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(80);
|
||||
Flex.rotate({ x: 1, y: 2, z: 3, angle: this.angle });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
RotationGesture.create();
|
||||
RotationGesture.onActionStart((event) => {
|
||||
console.log('Rotation start');
|
||||
});
|
||||
RotationGesture.onActionUpdate((event) => {
|
||||
this.angle = event.angle;
|
||||
});
|
||||
RotationGesture.onActionEnd(() => {
|
||||
console.log('Rotation end');
|
||||
});
|
||||
RotationGesture.pop();
|
||||
Gesture.pop();
|
||||
Text.create('RotationGesture angle:' + this.angle);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new RotationGestureExample("1", undefined, {}));
|
||||
//# sourceMappingURL=rotationGesture.js.map
|
@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "swipeGesture_" + ++__generate__Id;
|
||||
}
|
||||
class SwipeGestureExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__rotateAngle = new ObservedPropertySimple(0, this, "rotateAngle");
|
||||
this.__speed = new ObservedPropertySimple(1, this, "speed");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.rotateAngle !== undefined) {
|
||||
this.rotateAngle = params.rotateAngle;
|
||||
}
|
||||
if (params.speed !== undefined) {
|
||||
this.speed = params.speed;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__rotateAngle.aboutToBeDeleted();
|
||||
this.__speed.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get rotateAngle() {
|
||||
return this.__rotateAngle.get();
|
||||
}
|
||||
set rotateAngle(newValue) {
|
||||
this.__rotateAngle.set(newValue);
|
||||
}
|
||||
get speed() {
|
||||
return this.__speed.get();
|
||||
}
|
||||
set speed(newValue) {
|
||||
this.__speed.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.border({ width: 2 });
|
||||
Column.width(260);
|
||||
Column.height(260);
|
||||
Column.rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
SwipeGesture.create({ fingers: 1, direction: SwipeDirection.Vertical });
|
||||
SwipeGesture.onAction((event) => {
|
||||
this.speed = event.speed;
|
||||
this.rotateAngle = event.angle;
|
||||
});
|
||||
SwipeGesture.pop();
|
||||
Gesture.pop();
|
||||
Text.create("SwipGesture speed : " + this.speed);
|
||||
Text.pop();
|
||||
Text.create("SwipGesture angle : " + this.rotateAngle);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new SwipeGestureExample("1", undefined, {}));
|
||||
//# sourceMappingURL=swipeGesture.js.map
|
@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "tapGesture_" + ++__generate__Id;
|
||||
}
|
||||
class TapGestureExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__value = new ObservedPropertySimple('', this, "value");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.value !== undefined) {
|
||||
this.value = params.value;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__value.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get value() {
|
||||
return this.__value.get();
|
||||
}
|
||||
set value(newValue) {
|
||||
this.__value.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(200);
|
||||
Flex.width(300);
|
||||
Flex.padding(60);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(30);
|
||||
Gesture.create(GesturePriority.Low);
|
||||
TapGesture.create({ count: 2 });
|
||||
TapGesture.onAction(() => {
|
||||
this.value = 'TapGesture onAction';
|
||||
});
|
||||
TapGesture.pop();
|
||||
Gesture.pop();
|
||||
Text.create('Click twice');
|
||||
Text.pop();
|
||||
Text.create(this.value);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new TapGestureExample("1", undefined, {}));
|
||||
//# sourceMappingURL=tapGesture.js.map
|
@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "forEach_" + ++__generate__Id;
|
||||
}
|
||||
class Month {
|
||||
constructor(year, month, days) {
|
||||
this.year = year;
|
||||
this.month = month;
|
||||
this.days = days;
|
||||
}
|
||||
}
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.languages = ['ets', 'js', 'java'];
|
||||
this.weekNames = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
this.__calendar = new ObservedPropertyObject([
|
||||
new Month(2020, 1, [...Array(31).keys()]),
|
||||
new Month(2020, 2, [...Array(28).keys()]),
|
||||
new Month(2020, 3, [...Array(31).keys()]),
|
||||
new Month(2020, 4, [...Array(30).keys()]),
|
||||
new Month(2020, 5, [...Array(31).keys()]),
|
||||
new Month(2020, 6, [...Array(30).keys()]),
|
||||
], this, "calendar");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.languages !== undefined) {
|
||||
this.languages = params.languages;
|
||||
}
|
||||
if (params.weekNames !== undefined) {
|
||||
this.weekNames = params.weekNames;
|
||||
}
|
||||
if (params.calendar !== undefined) {
|
||||
this.calendar = params.calendar;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__calendar.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get calendar() {
|
||||
return this.__calendar.get();
|
||||
}
|
||||
set calendar(newValue) {
|
||||
this.__calendar.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.width(100);
|
||||
Row.create();
|
||||
ForEach.create("2", this, ObservedObject.GetRawObject(this.languages), (item, index) => {
|
||||
GridItem.create();
|
||||
Text.create(item);
|
||||
Text.fontSize(30);
|
||||
Text.pop();
|
||||
GridItem.pop();
|
||||
}, (item, index) => item);
|
||||
ForEach.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
ForEach.create("3", this, ObservedObject.GetRawObject(this.weekNames), (item, index) => {
|
||||
GridItem.create();
|
||||
If.create();
|
||||
if (item === '日') {
|
||||
If.branchId(0);
|
||||
Text.create(item);
|
||||
Text.fontSize(20);
|
||||
Text.fontColor(Color.Red);
|
||||
Text.pop();
|
||||
}
|
||||
else {
|
||||
If.branchId(1);
|
||||
Text.create(item);
|
||||
Text.fontSize(10);
|
||||
Text.pop();
|
||||
}
|
||||
If.pop();
|
||||
GridItem.pop();
|
||||
});
|
||||
ForEach.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Button.createWithLabel('next month');
|
||||
Button.onClick(() => {
|
||||
this.calendar.shift();
|
||||
this.calendar.push({
|
||||
year: 2020,
|
||||
month: 7,
|
||||
days: [...Array(31)
|
||||
.keys()]
|
||||
});
|
||||
});
|
||||
Button.pop();
|
||||
ForEach.create("5", this, ObservedObject.GetRawObject(this.calendar), (item) => {
|
||||
Text.create('month:' + item.month);
|
||||
Text.pop();
|
||||
Grid.create();
|
||||
Grid.rowsGap(20);
|
||||
ForEach.create("4", this, ObservedObject.GetRawObject(item.days), (day) => {
|
||||
GridItem.create();
|
||||
Text.create((day + 1).toString());
|
||||
Text.fontSize(30);
|
||||
Text.pop();
|
||||
GridItem.pop();
|
||||
}, (day) => day.toString());
|
||||
ForEach.pop();
|
||||
Grid.pop();
|
||||
}, (item) => (item.year * 12 + item.month).toString());
|
||||
ForEach.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=forEach.js.map
|
@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "forEachSecondFunction_" + ++__generate__Id;
|
||||
}
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__arr = new ObservedPropertyObject([10, 20, 30], this, "arr");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create({ space: 5 });
|
||||
Column.width("100%");
|
||||
Column.height("100%");
|
||||
Button.createWithLabel('Reverse Array');
|
||||
Button.onClick(() => {
|
||||
this.arr.reverse();
|
||||
});
|
||||
Button.pop();
|
||||
ForEach.create("2", this, ObservedObject.GetRawObject(this.arr), (item) => {
|
||||
Text.create('item');
|
||||
Text.fontSize(18);
|
||||
Text.pop();
|
||||
Divider.create();
|
||||
Divider.strokeWidth(2);
|
||||
}, (item) => item.toString());
|
||||
ForEach.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=forEachSecondFunction.js.map
|
@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "forEachTwo_" + ++__generate__Id;
|
||||
}
|
||||
class Index extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__WIDTH_AND_HEIGHT = new ObservedPropertyObject([
|
||||
{ w: 10, h: 10 },
|
||||
{ w: 20, h: 20 },
|
||||
{ w: 30, h: 30 },
|
||||
{ w: 40, h: 40 },
|
||||
{ w: 50, h: 50 }
|
||||
], this, "WIDTH_AND_HEIGHT");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.WIDTH_AND_HEIGHT !== undefined) {
|
||||
this.WIDTH_AND_HEIGHT = params.WIDTH_AND_HEIGHT;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__WIDTH_AND_HEIGHT.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get WIDTH_AND_HEIGHT() {
|
||||
return this.__WIDTH_AND_HEIGHT.get();
|
||||
}
|
||||
set WIDTH_AND_HEIGHT(newValue) {
|
||||
this.__WIDTH_AND_HEIGHT.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Row.create();
|
||||
Row.height('100%');
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
ForEach.create("2", this, ObservedObject.GetRawObject(this.WIDTH_AND_HEIGHT), ({ w, h }) => {
|
||||
Button.createWithLabel();
|
||||
Button.width(w);
|
||||
Button.height(h);
|
||||
Button.pop();
|
||||
}, item => item.toString());
|
||||
ForEach.pop();
|
||||
Column.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new Index("1", undefined, {}));
|
||||
//# sourceMappingURL=forEachTwo.js.map
|
@ -0,0 +1,83 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "if_" + ++__generate__Id;
|
||||
}
|
||||
import { TestComponent } from '../../../../../test/TestComponent';
|
||||
import { Animal } from '../../../../../test/TsModule';
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.pass = true;
|
||||
this.count = 10;
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.pass !== undefined) {
|
||||
this.pass = params.pass;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
If.branchId(0);
|
||||
If.create();
|
||||
if (this.count < 0) {
|
||||
If.branchId(0);
|
||||
Text.create('count is negative');
|
||||
Text.fontSize(32);
|
||||
Text.pop();
|
||||
}
|
||||
else if (this.count % 2 === 0) {
|
||||
If.branchId(1);
|
||||
Divider.create();
|
||||
Text.create('even');
|
||||
Text.fontSize(32);
|
||||
Text.pop();
|
||||
}
|
||||
else {
|
||||
If.branchId(2);
|
||||
Divider.create();
|
||||
Text.create('odd');
|
||||
Text.fontSize(32);
|
||||
Text.pop();
|
||||
}
|
||||
If.pop();
|
||||
}
|
||||
else {
|
||||
If.branchId(1);
|
||||
Text.create('fail');
|
||||
Text.fontSize(32);
|
||||
Text.pop();
|
||||
}
|
||||
If.pop();
|
||||
If.create();
|
||||
if (Animal.Dog) {
|
||||
If.branchId(0);
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new TestComponent("2", this, { content: 'if (import enum)' }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
content: 'if (import enum)'
|
||||
});
|
||||
if (!earlierCreatedChild_2.needsUpdate()) {
|
||||
earlierCreatedChild_2.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Divider.create();
|
||||
}
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=if.js.map
|
@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "lazyForEach_" + ++__generate__Id;
|
||||
}
|
||||
class BasicDataSource {
|
||||
constructor() {
|
||||
this.listeners = [];
|
||||
}
|
||||
totalCount() {
|
||||
return 0;
|
||||
}
|
||||
getData(index) {
|
||||
return undefined;
|
||||
}
|
||||
registerDataChangeListener(listener) {
|
||||
if (this.listeners.indexOf(listener) < 0) {
|
||||
console.info('add listener');
|
||||
this.listeners.push(listener);
|
||||
}
|
||||
}
|
||||
unregisterDataChangeListener(listener) {
|
||||
const pos = this.listeners.indexOf(listener);
|
||||
if (pos >= 0) {
|
||||
console.info('remove listener');
|
||||
this.listeners.splice(pos, 1);
|
||||
}
|
||||
}
|
||||
notifyDataReload() {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataReloaded();
|
||||
});
|
||||
}
|
||||
notifyDataAdd(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataAdd(index);
|
||||
});
|
||||
}
|
||||
notifyDataChange(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataChange(index);
|
||||
});
|
||||
}
|
||||
notifyDataDelete(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataDelete(index);
|
||||
});
|
||||
}
|
||||
notifyDataMove(from, to) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataMove(from, to);
|
||||
});
|
||||
}
|
||||
}
|
||||
class MyDataSource extends BasicDataSource {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.dataArray = ['/path/image0', '/path/image1', '/path/image2', '/path/image3'];
|
||||
}
|
||||
totalCount() {
|
||||
return this.dataArray.length;
|
||||
}
|
||||
getData(index) {
|
||||
return this.dataArray[index];
|
||||
}
|
||||
addData(index, data) {
|
||||
this.dataArray.splice(index, 0, data);
|
||||
this.notifyDataAdd(index);
|
||||
}
|
||||
pushData(data) {
|
||||
this.dataArray.push(data);
|
||||
this.notifyDataAdd(this.dataArray.length - 1);
|
||||
}
|
||||
}
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.data = new MyDataSource();
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.data !== undefined) {
|
||||
this.data = params.data;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
List.create({ space: 3 });
|
||||
LazyForEach.create("2", this, ObservedObject.GetRawObject(this.data), (item) => {
|
||||
this.isRenderingInProgress = true;
|
||||
ListItem.create();
|
||||
ListItem.onClick(() => {
|
||||
this.data.pushData('/path/image' + this.data.totalCount());
|
||||
});
|
||||
Row.create();
|
||||
Row.margin({ left: 10, right: 10 });
|
||||
Image.create(item);
|
||||
Image.width("30%");
|
||||
Image.height(50);
|
||||
Text.create(item);
|
||||
Text.fontSize(20);
|
||||
Text.margin({ left: 10 });
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
ListItem.pop();
|
||||
this.isRenderingInProgress = false;
|
||||
}, item => item);
|
||||
LazyForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=lazyForEach.js.map
|
@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "button_" + ++__generate__Id;
|
||||
}
|
||||
class ButtonExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.create({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Button.createWithLabel('Ok', { type: ButtonType.Normal, stateEffect: true });
|
||||
Button.borderRadius(8);
|
||||
Button.backgroundColor(0x317aff);
|
||||
Button.width(90);
|
||||
Button.pop();
|
||||
Button.createWithChild({ type: ButtonType.Normal, stateEffect: true });
|
||||
Button.borderRadius(8);
|
||||
Button.backgroundColor(0x317aff);
|
||||
Button.width(90);
|
||||
Row.create();
|
||||
Row.alignItems(VerticalAlign.Center);
|
||||
Text.create('loading');
|
||||
Text.fontSize(12);
|
||||
Text.fontColor(0xffffff);
|
||||
Text.margin({ left: 5, right: 12 });
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
Button.pop();
|
||||
Button.createWithLabel('Disable', { type: ButtonType.Normal, stateEffect: false });
|
||||
Button.opacity(0.5);
|
||||
Button.borderRadius(8);
|
||||
Button.backgroundColor(0x317aff);
|
||||
Button.width(90);
|
||||
Button.pop();
|
||||
Flex.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ButtonExample("1", undefined, {}));
|
||||
//# sourceMappingURL=button.js.map
|
@ -0,0 +1,187 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "animateTo_" + ++__generate__Id;
|
||||
}
|
||||
class TransitionExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__btnW = new ObservedPropertySimple(50, this, "btnW");
|
||||
this.__btnH = new ObservedPropertySimple(50, this, "btnH");
|
||||
this.__btn1 = new ObservedPropertySimple(false, this, "btn1");
|
||||
this.__show = new ObservedPropertySimple("show", this, "show");
|
||||
this.__color = new ObservedPropertySimple(Color.Red, this, "color");
|
||||
this.__width1 = new ObservedPropertySimple(100, this, "width1");
|
||||
this.__height1 = new ObservedPropertySimple(100, this, "height1");
|
||||
this.__opacity1 = new ObservedPropertySimple(1, this, "opacity1");
|
||||
this.__borderRaius1 = new ObservedPropertySimple(10, this, "borderRaius1");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.btnW !== undefined) {
|
||||
this.btnW = params.btnW;
|
||||
}
|
||||
if (params.btnH !== undefined) {
|
||||
this.btnH = params.btnH;
|
||||
}
|
||||
if (params.btn1 !== undefined) {
|
||||
this.btn1 = params.btn1;
|
||||
}
|
||||
if (params.show !== undefined) {
|
||||
this.show = params.show;
|
||||
}
|
||||
if (params.color !== undefined) {
|
||||
this.color = params.color;
|
||||
}
|
||||
if (params.width1 !== undefined) {
|
||||
this.width1 = params.width1;
|
||||
}
|
||||
if (params.height1 !== undefined) {
|
||||
this.height1 = params.height1;
|
||||
}
|
||||
if (params.opacity1 !== undefined) {
|
||||
this.opacity1 = params.opacity1;
|
||||
}
|
||||
if (params.borderRaius1 !== undefined) {
|
||||
this.borderRaius1 = params.borderRaius1;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__btnW.aboutToBeDeleted();
|
||||
this.__btnH.aboutToBeDeleted();
|
||||
this.__btn1.aboutToBeDeleted();
|
||||
this.__show.aboutToBeDeleted();
|
||||
this.__color.aboutToBeDeleted();
|
||||
this.__width1.aboutToBeDeleted();
|
||||
this.__height1.aboutToBeDeleted();
|
||||
this.__opacity1.aboutToBeDeleted();
|
||||
this.__borderRaius1.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get btnW() {
|
||||
return this.__btnW.get();
|
||||
}
|
||||
set btnW(newValue) {
|
||||
this.__btnW.set(newValue);
|
||||
}
|
||||
get btnH() {
|
||||
return this.__btnH.get();
|
||||
}
|
||||
set btnH(newValue) {
|
||||
this.__btnH.set(newValue);
|
||||
}
|
||||
get btn1() {
|
||||
return this.__btn1.get();
|
||||
}
|
||||
set btn1(newValue) {
|
||||
this.__btn1.set(newValue);
|
||||
}
|
||||
get show() {
|
||||
return this.__show.get();
|
||||
}
|
||||
set show(newValue) {
|
||||
this.__show.set(newValue);
|
||||
}
|
||||
get color() {
|
||||
return this.__color.get();
|
||||
}
|
||||
set color(newValue) {
|
||||
this.__color.set(newValue);
|
||||
}
|
||||
get width1() {
|
||||
return this.__width1.get();
|
||||
}
|
||||
set width1(newValue) {
|
||||
this.__width1.set(newValue);
|
||||
}
|
||||
get height1() {
|
||||
return this.__height1.get();
|
||||
}
|
||||
set height1(newValue) {
|
||||
this.__height1.set(newValue);
|
||||
}
|
||||
get opacity1() {
|
||||
return this.__opacity1.get();
|
||||
}
|
||||
set opacity1(newValue) {
|
||||
this.__opacity1.set(newValue);
|
||||
}
|
||||
get borderRaius1() {
|
||||
return this.__borderRaius1.get();
|
||||
}
|
||||
set borderRaius1(newValue) {
|
||||
this.__borderRaius1.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, });
|
||||
Flex.height(400);
|
||||
Flex.width("100%");
|
||||
Flex.padding({ top: 100 });
|
||||
Button.createWithLabel(this.show);
|
||||
Button.onClick(() => {
|
||||
Context.animateTo({ duration: 1000 }, () => {
|
||||
this.btn1 = !this.btn1;
|
||||
if (this.btn1) {
|
||||
this.show = "hide";
|
||||
}
|
||||
else {
|
||||
this.show = "show";
|
||||
}
|
||||
});
|
||||
});
|
||||
Button.pop();
|
||||
If.create();
|
||||
if (this.btn1) {
|
||||
If.branchId(0);
|
||||
Button.createWithLabel();
|
||||
Button.width("80%");
|
||||
Button.height(30);
|
||||
Button.transition({ type: TransitionType.Insert, scale: { x: 0, y: 1.0 } });
|
||||
Button.transition({ type: TransitionType.Delete, scale: { x: 1.0, y: 0.0 } });
|
||||
Button.pop();
|
||||
}
|
||||
If.pop();
|
||||
Button.createWithLabel('animation');
|
||||
Context.animation({
|
||||
duration: 1000,
|
||||
curve: Curve.EaseOut,
|
||||
delay: 200,
|
||||
iterations: 1,
|
||||
playMode: PlayMode.Normal // 动画模式
|
||||
});
|
||||
Button.width(this.btnW);
|
||||
Button.height(this.btnH);
|
||||
Button.onClick(() => {
|
||||
this.btnW += 50;
|
||||
});
|
||||
Context.animation(null);
|
||||
Button.pop();
|
||||
Column.create({ space: 5 });
|
||||
Column.width("100%");
|
||||
Column.height("100%");
|
||||
Column.create();
|
||||
Context.animation({ duration: 1000 });
|
||||
Column.opacity(this.opacity1);
|
||||
Column.backgroundColor(this.color);
|
||||
Context.animation(null);
|
||||
Context.animation({ duration: 2000 });
|
||||
Column.width(this.width1);
|
||||
Context.animation(null);
|
||||
Context.animation({ duration: 3000 });
|
||||
Column.height(this.height1);
|
||||
Column.borderRadius(this.borderRaius1);
|
||||
Context.animation(null);
|
||||
Column.onClick(() => {
|
||||
this.color = Color.Green;
|
||||
this.borderRaius1 = 20;
|
||||
this.opacity1 = 0.5;
|
||||
this.height1 = 200;
|
||||
this.width1 = 200;
|
||||
});
|
||||
Column.pop();
|
||||
Column.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new TransitionExample("1", undefined, {}));
|
||||
//# sourceMappingURL=animateTo.js.map
|
@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "pageTransition_" + ++__generate__Id;
|
||||
}
|
||||
class PageTransitionExample1 extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__scale = new ObservedPropertySimple(1, this, "scale");
|
||||
this.__opacity = new ObservedPropertySimple(1, this, "opacity");
|
||||
this.__active = new ObservedPropertySimple(false, this, "active");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.scale !== undefined) {
|
||||
this.scale = params.scale;
|
||||
}
|
||||
if (params.opacity !== undefined) {
|
||||
this.opacity = params.opacity;
|
||||
}
|
||||
if (params.active !== undefined) {
|
||||
this.active = params.active;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__scale.aboutToBeDeleted();
|
||||
this.__opacity.aboutToBeDeleted();
|
||||
this.__active.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get scale() {
|
||||
return this.__scale.get();
|
||||
}
|
||||
set scale(newValue) {
|
||||
this.__scale.set(newValue);
|
||||
}
|
||||
get opacity() {
|
||||
return this.__opacity.get();
|
||||
}
|
||||
set opacity(newValue) {
|
||||
this.__opacity.set(newValue);
|
||||
}
|
||||
get active() {
|
||||
return this.__active.get();
|
||||
}
|
||||
set active(newValue) {
|
||||
this.__active.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.scale({ x: this.scale });
|
||||
Column.opacity(this.opacity);
|
||||
Navigator.create({ target: 'pages/page1', type: NavigationType.Push });
|
||||
Navigator.onClick(() => {
|
||||
this.active = true;
|
||||
});
|
||||
Text.create('page transition');
|
||||
Text.width("100%");
|
||||
Text.height("100%");
|
||||
Text.pop();
|
||||
Navigator.pop();
|
||||
Column.pop();
|
||||
}
|
||||
pageTransition() {
|
||||
PageTransition.create();
|
||||
PageTransitionEnter.create({ duration: 1200, curve: Curve.Linear });
|
||||
PageTransitionEnter.onEnter((type, progress) => {
|
||||
this.scale = 1;
|
||||
this.opacity = progress;
|
||||
});
|
||||
PageTransitionExit.create({ duration: 1500, curve: Curve.Ease });
|
||||
PageTransitionExit.onExit((type, progress) => {
|
||||
this.scale = 1 - progress;
|
||||
this.opacity = 1;
|
||||
});
|
||||
PageTransition.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new PageTransitionExample1("1", undefined, {}));
|
||||
//# sourceMappingURL=pageTransition.js.map
|
@ -0,0 +1,186 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@builder_" + ++__generate__Id;
|
||||
}
|
||||
function noParam(parent = null) {
|
||||
Row.create();
|
||||
Text.create('this is a no param builder');
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
}
|
||||
function specificParam(label1, label2, parent = null) {
|
||||
Column.create();
|
||||
Text.create(label1);
|
||||
Text.pop();
|
||||
Text.create(label2);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||
this.controller = new TabsController();
|
||||
this.__hideBar = new ObservedPropertySimple(true, this, "hideBar");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
if (params.hideBar !== undefined) {
|
||||
this.hideBar = params.hideBar;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__hideBar.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get hideBar() {
|
||||
return this.__hideBar.get();
|
||||
}
|
||||
set hideBar(newValue) {
|
||||
this.__hideBar.set(newValue);
|
||||
}
|
||||
textBuilder(parent = null) {
|
||||
Text.create("文本");
|
||||
Text.fontSize(30);
|
||||
Text.pop();
|
||||
}
|
||||
NavigationTitlePara(label, parent = null) {
|
||||
Column.create();
|
||||
Text.create(label);
|
||||
Text.width(80);
|
||||
Text.bindMenu({ builder: this.textBuilder.bind(this) });
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
MenuBuilder(parent = null) {
|
||||
Flex.create({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center });
|
||||
Flex.width(100);
|
||||
Text.create('Test menu item 1');
|
||||
Text.fontSize(20);
|
||||
Text.pop();
|
||||
Divider.create();
|
||||
Divider.height(10);
|
||||
Text.create('Test menu item 2');
|
||||
Text.fontSize(20);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Row.create();
|
||||
Row.padding(10);
|
||||
Row.bindMenu({ builder: () => {
|
||||
this.NavigationTitlePara.call(this, "111");
|
||||
} });
|
||||
Text.create("Drag Me");
|
||||
Text.onDragStart((event, extraParams) => {
|
||||
console.log('Text onDragStarts, ' + extraParams);
|
||||
});
|
||||
Text.pop();
|
||||
specificParam('test1', 'test2', this);
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Row.padding(10);
|
||||
Row.bindPopup(false, {
|
||||
builder: { builder: this.MenuBuilder.bind(this) },
|
||||
onStateChange: (e) => {
|
||||
if (!e.isVisible) {
|
||||
console.warn(JSON.stringify(e.isVisible));
|
||||
}
|
||||
}
|
||||
});
|
||||
Text.create('Test Text');
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Row.padding(10);
|
||||
Row.bindContextMenu({ builder: this.MenuBuilder.bind(this) }, ResponseType.RightClick);
|
||||
Text.create('rightclick for menu');
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Row.padding(10);
|
||||
Navigation.create();
|
||||
Navigation.title({ builder: noParam.bind(this) });
|
||||
Navigation.menus({ builder: this.textBuilder.bind(this) });
|
||||
Navigation.toolBar({ items: [
|
||||
{ value: 'app', text: 'Grid', action: () => {
|
||||
console.log("app");
|
||||
} },
|
||||
{ value: 'add', text: 'Add', action: () => {
|
||||
console.log("add");
|
||||
} },
|
||||
{ value: 'collect', text: 'Collect', action: () => {
|
||||
console.log("collect");
|
||||
} }
|
||||
] });
|
||||
Navigation.hideToolBar(this.hideBar);
|
||||
List.create({ space: 5, initialIndex: 0 });
|
||||
List.listDirection(Axis.Vertical);
|
||||
List.height(300);
|
||||
List.margin({ top: 10, left: 18 });
|
||||
List.width('100%');
|
||||
ForEach.create("2", this, ObservedObject.GetRawObject(this.arr), (item) => {
|
||||
ListItem.create();
|
||||
ListItem.editable(true);
|
||||
Text.create('' + item);
|
||||
Text.width('90%');
|
||||
Text.height(80);
|
||||
Text.backgroundColor('#3366CC');
|
||||
Text.borderRadius(15);
|
||||
Text.fontSize(16);
|
||||
Text.textAlign(TextAlign.Center);
|
||||
Text.pop();
|
||||
ListItem.pop();
|
||||
}, item => item);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
Button.createWithLabel(this.hideBar ? "tool bar" : "hide bar");
|
||||
Button.onClick(() => {
|
||||
this.hideBar = !this.hideBar;
|
||||
});
|
||||
Button.margin({ left: 135, top: 60 });
|
||||
Button.pop();
|
||||
Navigation.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Row.padding(10);
|
||||
Tabs.create({ barPosition: BarPosition.Start, controller: this.controller });
|
||||
TabContent.create();
|
||||
TabContent.tabBar('pink');
|
||||
Text.create('111');
|
||||
Text.width('100%');
|
||||
Text.height('20');
|
||||
Text.backgroundColor(Color.Pink);
|
||||
Text.pop();
|
||||
TabContent.pop();
|
||||
TabContent.create();
|
||||
TabContent.tabBar('yellow');
|
||||
Text.create('222');
|
||||
Text.width('100%');
|
||||
Text.height('20');
|
||||
Text.backgroundColor(Color.Yellow);
|
||||
Text.pop();
|
||||
TabContent.pop();
|
||||
TabContent.create();
|
||||
TabContent.tabBar('blue');
|
||||
Text.create('333');
|
||||
Text.width('100%');
|
||||
Text.height('20');
|
||||
Text.backgroundColor(Color.Blue);
|
||||
Text.pop();
|
||||
TabContent.pop();
|
||||
Tabs.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=@builder.js.map
|
@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@builderWithForEach_" + ++__generate__Id;
|
||||
}
|
||||
function ComB(param, parent = null) {
|
||||
ForEach.create("3", parent ? parent : this, ObservedObject.GetRawObject(param), item => {
|
||||
__Common__.create();
|
||||
__Common__.backgroundColor('red');
|
||||
let earlierCreatedChild_2 = ((parent ? parent : this) && (parent ? parent : this).findChildById) ? (parent ? parent : this).findChildById(generateId()) : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new ComA("@builderWithForEach_" + __generate__Id, parent ? parent : this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
if (!earlierCreatedChild_2.needsUpdate()) {
|
||||
earlierCreatedChild_2.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
__Common__.pop();
|
||||
});
|
||||
ForEach.pop();
|
||||
}
|
||||
class Index extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__arr = new ObservedPropertyObject(['1', '2', '3', '4', '5'], this, "arr");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
ComB(this.arr, this);
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class ComA extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Row.create();
|
||||
Text.create('自定义组件');
|
||||
Text.fontSize(30);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new Index("1", undefined, {}));
|
||||
//# sourceMappingURL=@builderWithForEach.js.map
|
@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@builderWithLinkData_" + ++__generate__Id;
|
||||
}
|
||||
class TitleComp extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__title = new SynchedPropertySimpleTwoWay(params.title, this, "title");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__title.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get title() {
|
||||
return this.__title.get();
|
||||
}
|
||||
set title(newValue) {
|
||||
this.__title.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Text.create(this.title);
|
||||
Text.pop();
|
||||
}
|
||||
}
|
||||
class TestPage extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__value = new ObservedPropertySimple('hello world', this, "value");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.value !== undefined) {
|
||||
this.value = params.value;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__value.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get value() {
|
||||
return this.__value.get();
|
||||
}
|
||||
set value(newValue) {
|
||||
this.__value.set(newValue);
|
||||
}
|
||||
TitleCompView(parent = null) {
|
||||
let earlierCreatedChild_2 = ((parent ? parent : this) && (parent ? parent : this).findChildById) ? (parent ? parent : this).findChildById(generateId()) : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new TitleComp("@builderWithLinkData_" + __generate__Id, parent ? parent : this, { title: this.__value }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
}
|
||||
render() {
|
||||
Flex.create();
|
||||
this.TitleCompView(this);
|
||||
Flex.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new TestPage("1", undefined, {}));
|
||||
//# sourceMappingURL=@builderWithLinkData.js.map
|
@ -0,0 +1,201 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@builderParam_" + ++__generate__Id;
|
||||
}
|
||||
import { CustomContainerExport } from '../../../../test/TestComponent';
|
||||
class CustomContainer extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.header = "";
|
||||
this.content = undefined;
|
||||
this.callContent = undefined;
|
||||
this.footer = "";
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.header !== undefined) {
|
||||
this.header = params.header;
|
||||
}
|
||||
if (params.content !== undefined) {
|
||||
this.content = params.content;
|
||||
}
|
||||
if (params.callContent !== undefined) {
|
||||
this.callContent = params.callContent;
|
||||
}
|
||||
if (params.footer !== undefined) {
|
||||
this.footer = params.footer;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create(this.header);
|
||||
Text.pop();
|
||||
this.content(this);
|
||||
this.callContent(this);
|
||||
Text.create(this.footer);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class CustomContainer2 extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.header = "";
|
||||
this.content = undefined;
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.header !== undefined) {
|
||||
this.header = params.header;
|
||||
}
|
||||
if (params.content !== undefined) {
|
||||
this.content = params.content;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create(this.header);
|
||||
Text.pop();
|
||||
this.content(this);
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
function specificWithParam(label1, label2, parent = null) {
|
||||
Column.create();
|
||||
Text.create(label1);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
Text.create(label2);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
class CustomContainerUser extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__text = new ObservedPropertySimple('header', this, "text");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.text !== undefined) {
|
||||
this.text = params.text;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__text.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get text() {
|
||||
return this.__text.get();
|
||||
}
|
||||
set text(newValue) {
|
||||
this.__text.set(newValue);
|
||||
}
|
||||
specificParam(parent = null) {
|
||||
Column.create();
|
||||
Text.create("content");
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
callSpecificParam(label1, label2, parent = null) {
|
||||
Column.create();
|
||||
Text.create(label1);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
Text.create(label2);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new CustomContainerExport("2", this, {
|
||||
header: this.text,
|
||||
closer: () => {
|
||||
Column.create();
|
||||
Column.onClick(() => {
|
||||
this.text = "changeHeader";
|
||||
});
|
||||
specificWithParam("111", "22", this);
|
||||
Column.pop();
|
||||
}
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
header: this.text,
|
||||
closer: () => {
|
||||
Column.create();
|
||||
Column.onClick(() => {
|
||||
this.text = "changeHeader";
|
||||
});
|
||||
specificWithParam("111", "22", this);
|
||||
Column.pop();
|
||||
}
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Row.create();
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new CustomContainer("3", this, {
|
||||
header: this.text,
|
||||
content: this.specificParam,
|
||||
callContent: this.callSpecificParam("callContent1", 'callContent2'),
|
||||
footer: "Footer",
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({
|
||||
header: this.text,
|
||||
content: this.specificParam,
|
||||
callContent: this.callSpecificParam("callContent1", 'callContent2'),
|
||||
footer: "Footer"
|
||||
});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
Row.pop();
|
||||
Row.create();
|
||||
let earlierCreatedChild_4 = (this && this.findChildById) ? this.findChildById("4") : undefined;
|
||||
if (earlierCreatedChild_4 == undefined) {
|
||||
View.create(new CustomContainer2("4", this, {
|
||||
header: this.text,
|
||||
content: () => {
|
||||
Column.create();
|
||||
Column.onClick(() => {
|
||||
this.text = "changeHeader";
|
||||
});
|
||||
this.callSpecificParam("111", '222', this);
|
||||
Column.pop();
|
||||
}
|
||||
}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_4.updateWithValueParams({
|
||||
header: this.text,
|
||||
content: () => {
|
||||
Column.create();
|
||||
Column.onClick(() => {
|
||||
this.text = "changeHeader";
|
||||
});
|
||||
this.callSpecificParam("111", '222', this);
|
||||
Column.pop();
|
||||
}
|
||||
});
|
||||
View.create(earlierCreatedChild_4);
|
||||
}
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new CustomContainerUser("1", undefined, {}));
|
||||
//# sourceMappingURL=@builderParam.js.map
|
@ -0,0 +1,165 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@customDialog_" + ++__generate__Id;
|
||||
}
|
||||
class DialogExample extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__count = new SynchedPropertySimpleOneWay(params.count, this, "count");
|
||||
this.__isPlaying = new SynchedPropertySimpleTwoWay(params.isPlaying, this, "isPlaying");
|
||||
this.controller = undefined;
|
||||
this.termsToAccept = "";
|
||||
this.action1 = undefined;
|
||||
this.action2 = undefined;
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
this.count = params.count;
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
if (params.termsToAccept !== undefined) {
|
||||
this.termsToAccept = params.termsToAccept;
|
||||
}
|
||||
if (params.action1 !== undefined) {
|
||||
this.action1 = params.action1;
|
||||
}
|
||||
if (params.action2 !== undefined) {
|
||||
this.action2 = params.action2;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__count.aboutToBeDeleted();
|
||||
this.__isPlaying.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get count() {
|
||||
return this.__count.get();
|
||||
}
|
||||
set count(newValue) {
|
||||
this.__count.set(newValue);
|
||||
}
|
||||
get isPlaying() {
|
||||
return this.__isPlaying.get();
|
||||
}
|
||||
set isPlaying(newValue) {
|
||||
this.__isPlaying.set(newValue);
|
||||
}
|
||||
setController(ctr) {
|
||||
this.controller = ctr;
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Row.create();
|
||||
Button.createWithLabel('current count is: ' + this.count);
|
||||
Button.onClick(() => {
|
||||
this.count++;
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Button.createWithLabel(this.isPlaying ? 'play' : 'pause');
|
||||
Button.onClick(() => {
|
||||
this.isPlaying = !this.isPlaying;
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Button.createWithLabel("Option A");
|
||||
Button.onClick(() => {
|
||||
this.controller.close();
|
||||
this.action1();
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel("Option B");
|
||||
Button.onClick(() => {
|
||||
this.controller.close();
|
||||
this.action2(47, "Option B is great choice");
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class CustomDialogUser extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__countInitValue = new ObservedPropertySimple(10, this, "countInitValue");
|
||||
this.__playingInitValue = new ObservedPropertySimple(false, this, "playingInitValue");
|
||||
this.dialogController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let jsDialog = new DialogExample("2", this, {
|
||||
termsToAccept: "Please accept the terms.",
|
||||
action1: this.onAccept,
|
||||
action2: this.existApp,
|
||||
count: this.countInitValue,
|
||||
isPlaying: this.__playingInitValue
|
||||
});
|
||||
jsDialog.setController(this.dialogController);
|
||||
View.create(jsDialog);
|
||||
},
|
||||
cancel: this.existApp,
|
||||
autoCancel: false
|
||||
}, this);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.countInitValue !== undefined) {
|
||||
this.countInitValue = params.countInitValue;
|
||||
}
|
||||
if (params.playingInitValue !== undefined) {
|
||||
this.playingInitValue = params.playingInitValue;
|
||||
}
|
||||
if (params.dialogController !== undefined) {
|
||||
this.dialogController = params.dialogController;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__countInitValue.aboutToBeDeleted();
|
||||
this.__playingInitValue.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get countInitValue() {
|
||||
return this.__countInitValue.get();
|
||||
}
|
||||
set countInitValue(newValue) {
|
||||
this.__countInitValue.set(newValue);
|
||||
}
|
||||
get playingInitValue() {
|
||||
return this.__playingInitValue.get();
|
||||
}
|
||||
set playingInitValue(newValue) {
|
||||
this.__playingInitValue.set(newValue);
|
||||
}
|
||||
onAccept() {
|
||||
console.log("onAccept");
|
||||
}
|
||||
existApp() {
|
||||
console.log("Cancel dialog!");
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create('current countInitValue is: ' + this.countInitValue);
|
||||
Text.fontSize(20);
|
||||
Text.pop();
|
||||
Text.create('current playingInitValue is: ' + this.playingInitValue);
|
||||
Text.fontSize(20);
|
||||
Text.pop();
|
||||
Button.createWithLabel("Click to open Dialog -1");
|
||||
Button.onClick(() => {
|
||||
this.countInitValue--;
|
||||
this.dialogController.open();
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel("Click to close Dialog +1");
|
||||
Button.onClick(() => {
|
||||
this.countInitValue++;
|
||||
this.dialogController.close();
|
||||
});
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new CustomDialogUser("1", undefined, {}));
|
||||
//# sourceMappingURL=@customDialog.js.map
|
@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@extend_" + ++__generate__Id;
|
||||
}
|
||||
function __Text__fancy(color) {
|
||||
Text.backgroundColor(color);
|
||||
}
|
||||
function __Text__superFancy(size) {
|
||||
Text.fontSize(size);
|
||||
__Text__fancy(Color.Red);
|
||||
}
|
||||
function __Button__fancybut(color) {
|
||||
Button.backgroundColor(color);
|
||||
Button.width(200);
|
||||
Button.height(100);
|
||||
}
|
||||
class FancyUse extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Row.create();
|
||||
Text.create("Just Fancy");
|
||||
__Text__fancy(Color.Yellow);
|
||||
Text.pop();
|
||||
Text.create("Super Fancy Text");
|
||||
__Text__superFancy(24);
|
||||
Text.pop();
|
||||
Button.createWithLabel("Fancy Button");
|
||||
__Button__fancybut(Color.Green);
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Row.create({ space: 10 });
|
||||
Text.create("Fancy");
|
||||
__Text__fancytext(24);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
function __Text__fancytext(fontSize) {
|
||||
Text.fontColor(Color.Red);
|
||||
Text.fontSize(fontSize);
|
||||
Text.fontStyle(FontStyle.Italic);
|
||||
}
|
||||
loadDocument(new FancyUse("1", undefined, {}));
|
||||
//# sourceMappingURL=@extend.js.map
|
@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@preview_" + ++__generate__Id;
|
||||
}
|
||||
class HomePreviewComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.value = "hello world";
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.value !== undefined) {
|
||||
this.value = params.value;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Text.create(this.value);
|
||||
Text.fontSize(50);
|
||||
Text.pop();
|
||||
}
|
||||
}
|
||||
class HomePreviewComponent_Preview extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new HomePreviewComponent("2", this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
if (!earlierCreatedChild_2.needsUpdate()) {
|
||||
earlierCreatedChild_2.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new HomePreviewComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=@preview.js.map
|
@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@styles_" + ++__generate__Id;
|
||||
}
|
||||
class FancyUse extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__enable = new ObservedPropertySimple(true, this, "enable");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.enable !== undefined) {
|
||||
this.enable = params.enable;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__enable.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get enable() {
|
||||
return this.__enable.get();
|
||||
}
|
||||
set enable(newValue) {
|
||||
this.__enable.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create({ space: 10 });
|
||||
Text.create("Fancy");
|
||||
Text.backgroundColor(Color.Red);
|
||||
Text.width(100);
|
||||
Text.height(100);
|
||||
Text.pop();
|
||||
Text.create("Fancy");
|
||||
Text.backgroundColor(Color.Blue);
|
||||
Text.width(100);
|
||||
Text.height(100);
|
||||
Text.pop();
|
||||
Button.createWithChild();
|
||||
Button.enabled(this.enable);
|
||||
Button.onClick(() => {
|
||||
this.enable = false;
|
||||
});
|
||||
ViewStackProcessor.visualState("normal");
|
||||
Button.backgroundColor(Color.Green);
|
||||
ViewStackProcessor.visualState("disabled");
|
||||
Button.backgroundColor(Color.Blue);
|
||||
ViewStackProcessor.visualState("pressed");
|
||||
Button.backgroundColor(Color.Red);
|
||||
ViewStackProcessor.visualState();
|
||||
Text.create("Fancy");
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new FancyUse("1", undefined, {}));
|
||||
//# sourceMappingURL=@styles.js.map
|
@ -0,0 +1,57 @@
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@stylesExport_" + ++__generate__Id;
|
||||
}
|
||||
export class FancyUseExp extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__enable = new ObservedPropertySimple(true, this, "enable");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.enable !== undefined) {
|
||||
this.enable = params.enable;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__enable.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get enable() {
|
||||
return this.__enable.get();
|
||||
}
|
||||
set enable(newValue) {
|
||||
this.__enable.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create({ space: 10 });
|
||||
Text.create("Fancy");
|
||||
Text.backgroundColor(Color.Red);
|
||||
Text.width(100);
|
||||
Text.height(100);
|
||||
Text.pop();
|
||||
Text.create("Fancy");
|
||||
Text.backgroundColor(Color.Blue);
|
||||
Text.width(100);
|
||||
Text.height(100);
|
||||
Text.pop();
|
||||
Button.createWithChild();
|
||||
Button.enabled(this.enable);
|
||||
Button.onClick(() => {
|
||||
this.enable = false;
|
||||
});
|
||||
ViewStackProcessor.visualState("normal");
|
||||
Button.backgroundColor(Color.Green);
|
||||
ViewStackProcessor.visualState("disabled");
|
||||
Button.backgroundColor(Color.Blue);
|
||||
ViewStackProcessor.visualState("pressed");
|
||||
Button.backgroundColor(Color.Red);
|
||||
ViewStackProcessor.visualState();
|
||||
Text.create("Fancy");
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new FancyUseExp("1", undefined, {}));
|
||||
//# sourceMappingURL=@stylesExport.js.map
|
@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@storageLink_" + ++__generate__Id;
|
||||
}
|
||||
let varA = AppStorage.Link('varA');
|
||||
let envLang = AppStorage.Prop('languageCode');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__varA = AppStorage.SetAndLink('varA', 2, this, "varA");
|
||||
this.__lang = AppStorage.SetAndProp('languageCode', 'en', this, "lang");
|
||||
this.label = 'count';
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.label !== undefined) {
|
||||
this.label = params.label;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__varA.aboutToBeDeleted();
|
||||
this.__lang.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get varA() {
|
||||
return this.__varA.get();
|
||||
}
|
||||
set varA(newValue) {
|
||||
this.__varA.set(newValue);
|
||||
}
|
||||
get lang() {
|
||||
return this.__lang.get();
|
||||
}
|
||||
set lang(newValue) {
|
||||
this.__lang.set(newValue);
|
||||
}
|
||||
aboutToAppear() {
|
||||
this.label = (this.lang === 'zh') ? '数' : 'Count';
|
||||
}
|
||||
render() {
|
||||
Row.create({ space: 20 });
|
||||
Button.createWithLabel(this.label + ': ' + this.varA);
|
||||
Button.onClick(() => {
|
||||
AppStorage.Set('varA', AppStorage.Get('varA') + 1);
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel('lang: ' + this.lang);
|
||||
Button.onClick(() => {
|
||||
if (this.lang === 'zh') {
|
||||
AppStorage.Set('languageCode', 'en');
|
||||
}
|
||||
else {
|
||||
AppStorage.Set('languageCode', 'zh');
|
||||
}
|
||||
this.label = (this.lang === 'zh') ? '数' : 'Count';
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=@storageLink.js.map
|
@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@storageProp_" + ++__generate__Id;
|
||||
}
|
||||
let varA = AppStorage.Link('varA');
|
||||
let envLang = AppStorage.Prop('languageCode');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__varA = AppStorage.SetAndLink('varA', 2, this, "varA");
|
||||
this.__lang = AppStorage.SetAndProp('languageCode', 'en', this, "lang");
|
||||
this.label = 'count';
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.label !== undefined) {
|
||||
this.label = params.label;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__varA.aboutToBeDeleted();
|
||||
this.__lang.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get varA() {
|
||||
return this.__varA.get();
|
||||
}
|
||||
set varA(newValue) {
|
||||
this.__varA.set(newValue);
|
||||
}
|
||||
get lang() {
|
||||
return this.__lang.get();
|
||||
}
|
||||
set lang(newValue) {
|
||||
this.__lang.set(newValue);
|
||||
}
|
||||
aboutToAppear() {
|
||||
this.label = (this.lang === 'zh') ? '数' : 'Count';
|
||||
}
|
||||
render() {
|
||||
Row.create({ space: 20 });
|
||||
Button.createWithLabel(this.label + ': ' + this.varA);
|
||||
Button.onClick(() => {
|
||||
AppStorage.Set('varA', AppStorage.Get('varA') + 1);
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel('lang: ' + this.lang);
|
||||
Button.onClick(() => {
|
||||
if (this.lang === 'zh') {
|
||||
AppStorage.Set('languageCode', 'en');
|
||||
}
|
||||
else {
|
||||
AppStorage.Set('languageCode', 'zh');
|
||||
}
|
||||
this.label = (this.lang === 'zh') ? '数' : 'Count';
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=@storageProp.js.map
|
@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "appStorage_" + ++__generate__Id;
|
||||
}
|
||||
let varA = AppStorage.Link('varA');
|
||||
let envLang = AppStorage.Prop('languageCode');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__varA = AppStorage.SetAndLink('varA', 2, this, "varA");
|
||||
this.__lang = AppStorage.SetAndProp('languageCode', 'en', this, "lang");
|
||||
this.label = 'count';
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.label !== undefined) {
|
||||
this.label = params.label;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__varA.aboutToBeDeleted();
|
||||
this.__lang.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get varA() {
|
||||
return this.__varA.get();
|
||||
}
|
||||
set varA(newValue) {
|
||||
this.__varA.set(newValue);
|
||||
}
|
||||
get lang() {
|
||||
return this.__lang.get();
|
||||
}
|
||||
set lang(newValue) {
|
||||
this.__lang.set(newValue);
|
||||
}
|
||||
aboutToAppear() {
|
||||
this.label = (this.lang === 'zh') ? '数' : 'Count';
|
||||
}
|
||||
render() {
|
||||
Row.create({ space: 20 });
|
||||
Button.createWithLabel(this.label + ': ' + this.varA);
|
||||
Button.onClick(() => {
|
||||
AppStorage.Set('varA', AppStorage.Get('varA') + 1);
|
||||
});
|
||||
Button.pop();
|
||||
Button.createWithLabel('lang: ' + this.lang);
|
||||
Button.onClick(() => {
|
||||
if (this.lang === 'zh') {
|
||||
AppStorage.Set('languageCode', 'en');
|
||||
}
|
||||
else {
|
||||
AppStorage.Set('languageCode', 'zh');
|
||||
}
|
||||
this.label = (this.lang === 'zh') ? '数' : 'Count';
|
||||
});
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new MyComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=appStorage.js.map
|
@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "localStorage_" + ++__generate__Id;
|
||||
}
|
||||
let storage = LocalStorage.GetShared();
|
||||
class ClassA {
|
||||
constructor(a) {
|
||||
this.id = 1;
|
||||
this.type = 2;
|
||||
this.a = "aaa";
|
||||
this.a = a;
|
||||
}
|
||||
}
|
||||
class LocalStorageComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__simpleVarName = this.localStorage_.setAndLink("storageSimpleProp", 0, this, "simpleVarName");
|
||||
this.__objectName = this.localStorage_.setAndProp("storageObjectProp", new ClassA("x"), this, "objectName");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__simpleVarName.aboutToBeDeleted();
|
||||
this.__objectName.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get simpleVarName() {
|
||||
return this.__simpleVarName.get();
|
||||
}
|
||||
set simpleVarName(newValue) {
|
||||
this.__simpleVarName.set(newValue);
|
||||
}
|
||||
get objectName() {
|
||||
return this.__objectName.get();
|
||||
}
|
||||
set objectName(newValue) {
|
||||
this.__objectName.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Column.height(500);
|
||||
Text.create(this.objectName.a);
|
||||
Text.onClick(() => {
|
||||
this.simpleVarName += 1;
|
||||
this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no';
|
||||
});
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new LocalStorageComponent("1", undefined, {}, storage));
|
||||
//# sourceMappingURL=localStorage.js.map
|
@ -0,0 +1,146 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@link_" + ++__generate__Id;
|
||||
}
|
||||
class linkComp extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__buttonPlaying = new SynchedPropertySimpleTwoWay(params.buttonPlaying, this, "buttonPlaying");
|
||||
this.__items = new SynchedPropertyObjectTwoWay(params.items, this, "items");
|
||||
this.__obj = new SynchedPropertyObjectTwoWay(params.obj, this, "obj");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__buttonPlaying.aboutToBeDeleted();
|
||||
this.__items.aboutToBeDeleted();
|
||||
this.__obj.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get buttonPlaying() {
|
||||
return this.__buttonPlaying.get();
|
||||
}
|
||||
set buttonPlaying(newValue) {
|
||||
this.__buttonPlaying.set(newValue);
|
||||
}
|
||||
get items() {
|
||||
return this.__items.get();
|
||||
}
|
||||
set items(newValue) {
|
||||
this.__items.set(newValue);
|
||||
}
|
||||
get obj() {
|
||||
return this.__obj.get();
|
||||
}
|
||||
set obj(newValue) {
|
||||
this.__obj.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.buttonPlaying = !this.buttonPlaying;
|
||||
});
|
||||
Text.create(this.buttonPlaying ? 'play' : 'pause');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Row.create();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.items.push(100);
|
||||
});
|
||||
Text.create('push 100');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.items.pop();
|
||||
});
|
||||
Text.create('remove item');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Row.create();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.obj.push({ name: 'xiaohua', age: 18 });
|
||||
});
|
||||
Text.create('新增一人');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class linkPage extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__isPlaying = new ObservedPropertySimple(false, this, "isPlaying");
|
||||
this.__itemsArr = new ObservedPropertyObject([1, 2, 3], this, "itemsArr");
|
||||
this.__peoples = new ObservedPropertyObject([{ name: 'xiaoming', age: 8 }], this, "peoples");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.isPlaying !== undefined) {
|
||||
this.isPlaying = params.isPlaying;
|
||||
}
|
||||
if (params.itemsArr !== undefined) {
|
||||
this.itemsArr = params.itemsArr;
|
||||
}
|
||||
if (params.peoples !== undefined) {
|
||||
this.peoples = params.peoples;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__isPlaying.aboutToBeDeleted();
|
||||
this.__itemsArr.aboutToBeDeleted();
|
||||
this.__peoples.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get isPlaying() {
|
||||
return this.__isPlaying.get();
|
||||
}
|
||||
set isPlaying(newValue) {
|
||||
this.__isPlaying.set(newValue);
|
||||
}
|
||||
get itemsArr() {
|
||||
return this.__itemsArr.get();
|
||||
}
|
||||
set itemsArr(newValue) {
|
||||
this.__itemsArr.set(newValue);
|
||||
}
|
||||
get peoples() {
|
||||
return this.__peoples.get();
|
||||
}
|
||||
set peoples(newValue) {
|
||||
this.__peoples.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new linkComp("2", this, { buttonPlaying: this.__isPlaying, items: this.__itemsArr, obj: this.__peoples }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Text.create('Player is ' + (this.isPlaying ? '' : 'not') + ' playing');
|
||||
Text.pop();
|
||||
ForEach.create("3", this, ObservedObject.GetRawObject(this.itemsArr), item => {
|
||||
Text.create('' + item);
|
||||
Text.pop();
|
||||
}, item => item.toString());
|
||||
ForEach.pop();
|
||||
ForEach.create("4", this, ObservedObject.GetRawObject(this.peoples), item => {
|
||||
Text.create(item.name + ': ' + item.age);
|
||||
Text.pop();
|
||||
});
|
||||
ForEach.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new linkPage("1", undefined, {}));
|
||||
//# sourceMappingURL=@link.js.map
|
@ -0,0 +1,134 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@prop_" + ++__generate__Id;
|
||||
}
|
||||
class ctComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__name = new SynchedPropertySimpleOneWay(params.name, this, "name");
|
||||
this.__canPlay = new SynchedPropertySimpleOneWay(params.canPlay, this, "canPlay");
|
||||
this.__count = new SynchedPropertySimpleOneWay(params.count, this, "count");
|
||||
this.costOfOneAttempt = undefined;
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
this.name = params.name;
|
||||
this.canPlay = params.canPlay;
|
||||
this.count = params.count;
|
||||
if (params.costOfOneAttempt !== undefined) {
|
||||
this.costOfOneAttempt = params.costOfOneAttempt;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__name.aboutToBeDeleted();
|
||||
this.__canPlay.aboutToBeDeleted();
|
||||
this.__count.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get name() {
|
||||
return this.__name.get();
|
||||
}
|
||||
set name(newValue) {
|
||||
this.__name.set(newValue);
|
||||
}
|
||||
get canPlay() {
|
||||
return this.__canPlay.get();
|
||||
}
|
||||
set canPlay(newValue) {
|
||||
this.__canPlay.set(newValue);
|
||||
}
|
||||
get count() {
|
||||
return this.__count.get();
|
||||
}
|
||||
set count(newValue) {
|
||||
this.__count.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
If.create();
|
||||
if (this.canPlay) {
|
||||
If.branchId(0);
|
||||
If.create();
|
||||
if (this.count > 0) {
|
||||
If.branchId(0);
|
||||
Text.create(this.name + ' have ' + this.count + ' Nuggets left');
|
||||
Text.pop();
|
||||
}
|
||||
else {
|
||||
If.branchId(1);
|
||||
Text.create('Sorry, ' + this.name + '. Game over!');
|
||||
Text.pop();
|
||||
}
|
||||
If.pop();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.count -= this.costOfOneAttempt;
|
||||
});
|
||||
Text.create('Try again');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
}
|
||||
else {
|
||||
If.branchId(1);
|
||||
Text.create(this.name + ', sorry. You do not play this game');
|
||||
Text.pop();
|
||||
}
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class PageComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__countDownStartValue = new ObservedPropertySimple(10, this, "countDownStartValue");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.countDownStartValue !== undefined) {
|
||||
this.countDownStartValue = params.countDownStartValue;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__countDownStartValue.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get countDownStartValue() {
|
||||
return this.__countDownStartValue.get();
|
||||
}
|
||||
set countDownStartValue(newValue) {
|
||||
this.__countDownStartValue.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create('Grant ' + this.countDownStartValue + ' nuggets to play');
|
||||
Text.pop();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.countDownStartValue += 1;
|
||||
});
|
||||
Text.create('+1 - Nuggets in New Game');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.countDownStartValue -= 1;
|
||||
});
|
||||
Text.create('-1 - Nuggets in New Game');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new ctComponent("2", this, { name: 'xiaoming', canPlay: true, count: this.countDownStartValue, costOfOneAttempt: 2 }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
name: 'xiaoming', canPlay: true, count: this.countDownStartValue, costOfOneAttempt: 2
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new PageComponent("1", undefined, {}));
|
||||
//# sourceMappingURL=@prop.js.map
|
@ -0,0 +1,107 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@state_" + ++__generate__Id;
|
||||
}
|
||||
class Model {
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__title = new ObservedPropertyObject({ value: 'Hello World' }, this, "title");
|
||||
this.__count = new ObservedPropertySimple(0, this, "count");
|
||||
this.toggle = 'Hello World';
|
||||
this.increaseBy = 1;
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.title !== undefined) {
|
||||
this.title = params.title;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
if (params.toggle !== undefined) {
|
||||
this.toggle = params.toggle;
|
||||
}
|
||||
if (params.increaseBy !== undefined) {
|
||||
this.increaseBy = params.increaseBy;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__title.aboutToBeDeleted();
|
||||
this.__count.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get title() {
|
||||
return this.__title.get();
|
||||
}
|
||||
set title(newValue) {
|
||||
this.__title.set(newValue);
|
||||
}
|
||||
get count() {
|
||||
return this.__count.get();
|
||||
}
|
||||
set count(newValue) {
|
||||
this.__count.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Text.create('title.value: ' + this.title.value);
|
||||
Text.pop();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.title.value = (this.toggle == this.title.value) ? 'Hello World' : 'Hello UI';
|
||||
});
|
||||
Text.create('Click to change title');
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.count += this.increaseBy;
|
||||
});
|
||||
Text.create('Click to increase count=' + this.count);
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class EntryComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new MyComponent("2", this, { count: 1, increaseBy: 2 }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
count: 1, increaseBy: 2
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new MyComponent("3", this, { title: { value: 'Hello, World 2' }, count: 7 }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({
|
||||
title: { value: 'Hello, World 2' }, count: 7
|
||||
});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new EntryComponent("1", undefined, {}));
|
@ -0,0 +1,108 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@consume_@provide_" + ++__generate__Id;
|
||||
}
|
||||
class CompA extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__reviewVotes = new ObservedPropertySimple(0, this, "reviewVotes");
|
||||
this.addProvidedVar("reviewVote", this.__reviewVotes, false);
|
||||
this.addProvidedVar("reviewVotes", this.__reviewVotes, false);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.reviewVotes !== undefined) {
|
||||
this.reviewVotes = params.reviewVotes;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__reviewVotes.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get reviewVotes() {
|
||||
return this.__reviewVotes.get();
|
||||
}
|
||||
set reviewVotes(newValue) {
|
||||
this.__reviewVotes.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new CompB("2", this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({});
|
||||
if (!earlierCreatedChild_2.needsUpdate()) {
|
||||
earlierCreatedChild_2.markStatic();
|
||||
}
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.reviewVotes += 1;
|
||||
});
|
||||
Text.create('' + this.reviewVotes);
|
||||
Text.fontSize(30);
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class CompB extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
let earlierCreatedChild_3 = (this && this.findChildById) ? this.findChildById("3") : undefined;
|
||||
if (earlierCreatedChild_3 == undefined) {
|
||||
View.create(new CompC("3", this, {}));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_3.updateWithValueParams({});
|
||||
View.create(earlierCreatedChild_3);
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
class CompC extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__reviewVotes = this.initializeConsume("reviewVote", "reviewVotes");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__reviewVotes.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get reviewVotes() {
|
||||
return this.__reviewVotes.get();
|
||||
}
|
||||
set reviewVotes(newValue) {
|
||||
this.__reviewVotes.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Button.createWithChild();
|
||||
Button.onClick(() => {
|
||||
this.reviewVotes += 1;
|
||||
});
|
||||
Text.create('' + this.reviewVotes);
|
||||
Text.fontSize(30);
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new CompA("1", undefined, {}));
|
||||
//# sourceMappingURL=@consume_@provide.js.map
|
@ -0,0 +1,94 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@observed_@objectLink_" + ++__generate__Id;
|
||||
}
|
||||
let NextID = 0;
|
||||
let ClassA = class ClassA {
|
||||
constructor(c) {
|
||||
this.id = NextID++;
|
||||
this.c = c;
|
||||
}
|
||||
};
|
||||
ClassA = __decorate([
|
||||
Observed
|
||||
], ClassA);
|
||||
let ClassB = class ClassB {
|
||||
constructor(a) {
|
||||
this.a = a;
|
||||
}
|
||||
};
|
||||
ClassB = __decorate([
|
||||
Observed
|
||||
], ClassB);
|
||||
class ViewA extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__varA = new SynchedPropertyNesedObject(params.varA, this, "varA");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
this.__varA.set(params.varA);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__varA.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get varA() {
|
||||
return this.__varA.get();
|
||||
}
|
||||
render() {
|
||||
Row.create();
|
||||
Text.create('ViewA-' + this.varA.id);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
}
|
||||
}
|
||||
class ViewB extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__varB = new ObservedPropertyObject(new ClassB(new ClassA(0)), this, "varB");
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.varB !== undefined) {
|
||||
this.varB = params.varB;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__varB.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get varB() {
|
||||
return this.__varB.get();
|
||||
}
|
||||
set varB(newValue) {
|
||||
this.__varB.set(newValue);
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Row.create();
|
||||
let earlierCreatedChild_2 = (this && this.findChildById) ? this.findChildById("2") : undefined;
|
||||
if (earlierCreatedChild_2 == undefined) {
|
||||
View.create(new ViewA("2", this, { varA: this.varB.a }));
|
||||
}
|
||||
else {
|
||||
earlierCreatedChild_2.updateWithValueParams({
|
||||
varA: this.varB.a
|
||||
});
|
||||
View.create(earlierCreatedChild_2);
|
||||
}
|
||||
Text.create('ViewB');
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new ViewB("1", undefined, {}));
|
||||
//# sourceMappingURL=@observed_@objectLink.js.map
|
@ -0,0 +1,108 @@
|
||||
"use strict";
|
||||
let __generate__Id = 0;
|
||||
function generateId() {
|
||||
return "@watch_" + ++__generate__Id;
|
||||
}
|
||||
class CompA extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params, localStorage) {
|
||||
super(compilerAssignedUniqueChildId, parent, localStorage);
|
||||
this.__shopBasket = new ObservedPropertyObject([7, 12, 47, 3], this, "shopBasket");
|
||||
this.__totalPurchase = new ObservedPropertySimple(0, this, "totalPurchase");
|
||||
this.__defArray = new ObservedPropertyObject(['c', 'g', 't', 'z'], this, "defArray");
|
||||
this.__resultTip = new ObservedPropertySimple('', this, "resultTip");
|
||||
this.updateWithValueParams(params);
|
||||
this.declareWatch("shopBasket", this.onBasketUpdated);
|
||||
this.declareWatch("defArray", this.onPutItem);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.shopBasket !== undefined) {
|
||||
this.shopBasket = params.shopBasket;
|
||||
}
|
||||
if (params.totalPurchase !== undefined) {
|
||||
this.totalPurchase = params.totalPurchase;
|
||||
}
|
||||
if (params.defArray !== undefined) {
|
||||
this.defArray = params.defArray;
|
||||
}
|
||||
if (params.resultTip !== undefined) {
|
||||
this.resultTip = params.resultTip;
|
||||
}
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__shopBasket.aboutToBeDeleted();
|
||||
this.__totalPurchase.aboutToBeDeleted();
|
||||
this.__defArray.aboutToBeDeleted();
|
||||
this.__resultTip.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id());
|
||||
}
|
||||
get shopBasket() {
|
||||
return this.__shopBasket.get();
|
||||
}
|
||||
set shopBasket(newValue) {
|
||||
this.__shopBasket.set(newValue);
|
||||
}
|
||||
get totalPurchase() {
|
||||
return this.__totalPurchase.get();
|
||||
}
|
||||
set totalPurchase(newValue) {
|
||||
this.__totalPurchase.set(newValue);
|
||||
}
|
||||
get defArray() {
|
||||
return this.__defArray.get();
|
||||
}
|
||||
set defArray(newValue) {
|
||||
this.__defArray.set(newValue);
|
||||
}
|
||||
get resultTip() {
|
||||
return this.__resultTip.get();
|
||||
}
|
||||
set resultTip(newValue) {
|
||||
this.__resultTip.set(newValue);
|
||||
}
|
||||
updateTotal() {
|
||||
let sum = 0;
|
||||
this.shopBasket.forEach((i) => { sum += i; });
|
||||
this.totalPurchase = (sum < 100) ? sum : 0.9 * sum;
|
||||
return this.totalPurchase;
|
||||
}
|
||||
onBasketUpdated(propName) {
|
||||
Context.animateTo({ duration: 1000 }, () => {
|
||||
this.updateTotal();
|
||||
});
|
||||
}
|
||||
updateTip() {
|
||||
let tempArray = this.defArray.slice(0, -1);
|
||||
let addItem = this.defArray[this.defArray.length - 1];
|
||||
this.resultTip = tempArray.includes(addItem) ?
|
||||
'add item invalid' :
|
||||
'congratulations! add item success';
|
||||
return this.resultTip;
|
||||
}
|
||||
onPutItem(propName) {
|
||||
this.updateTip();
|
||||
}
|
||||
render() {
|
||||
Column.create();
|
||||
Button.createWithLabel("add to basket");
|
||||
Button.onClick(() => {
|
||||
this.shopBasket.push(Math.round(100 * Math.random()));
|
||||
});
|
||||
Button.pop();
|
||||
Text.create('totalPurchase: ' + this.totalPurchase);
|
||||
Text.fontSize(20);
|
||||
Text.pop();
|
||||
Button.createWithLabel("put item");
|
||||
Button.onClick(() => {
|
||||
let alList = 'abcdefghijklmnopqrstuvwxyz';
|
||||
let ranItem = alList[Math.floor(Math.random() * 26)];
|
||||
this.defArray.push(ranItem);
|
||||
});
|
||||
Button.pop();
|
||||
Text.create('tips: ' + this.resultTip);
|
||||
Text.fontSize(20);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
}
|
||||
loadDocument(new CompA("1", undefined, {}));
|
||||
//# sourceMappingURL=@watch.js.map
|
@ -0,0 +1,111 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import { CustomDialogExample1 as CustomDialogExample } from '../../../test/import@CustomDialog';
|
||||
class CustomDialogUser extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__textValue = new ObservedPropertySimplePU('', this, "textValue");
|
||||
this.__inputValue = new ObservedPropertySimplePU('click me', this, "inputValue");
|
||||
this.dialogController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let jsDialog = new CustomDialogExample(this, {
|
||||
cancel: this.onCancel,
|
||||
confirm: this.onAccept,
|
||||
textValue: this.__textValue,
|
||||
inputValue: this.__inputValue
|
||||
}, undefined, -1, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/import@CustomDialog.ets", line: 9, col: 14 });
|
||||
jsDialog.setController(this.dialogController);
|
||||
ViewPU.create(jsDialog);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
cancel: this.onCancel,
|
||||
confirm: this.onAccept,
|
||||
textValue: this.__textValue,
|
||||
inputValue: this.__inputValue
|
||||
};
|
||||
};
|
||||
jsDialog.paramsGenerator_ = paramsLambda;
|
||||
},
|
||||
cancel: this.existApp,
|
||||
autoCancel: true,
|
||||
alignment: DialogAlignment.Default,
|
||||
offset: { dx: 0, dy: -20 },
|
||||
gridCount: 4,
|
||||
customStyle: false
|
||||
}, this);
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.textValue !== undefined) {
|
||||
this.textValue = params.textValue;
|
||||
}
|
||||
if (params.inputValue !== undefined) {
|
||||
this.inputValue = params.inputValue;
|
||||
}
|
||||
if (params.dialogController !== undefined) {
|
||||
this.dialogController = params.dialogController;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__textValue.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__inputValue.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__textValue.aboutToBeDeleted();
|
||||
this.__inputValue.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get textValue() {
|
||||
return this.__textValue.get();
|
||||
}
|
||||
set textValue(newValue) {
|
||||
this.__textValue.set(newValue);
|
||||
}
|
||||
get inputValue() {
|
||||
return this.__inputValue.get();
|
||||
}
|
||||
set inputValue(newValue) {
|
||||
this.__inputValue.set(newValue);
|
||||
}
|
||||
onCancel() {
|
||||
console.info('Callback when the first button is clicked');
|
||||
}
|
||||
onAccept() {
|
||||
console.info('Callback when the second button is clicked');
|
||||
}
|
||||
existApp() {
|
||||
console.info('Click the callback in the blank area');
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
Column.margin({ top: 5 });
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel(this.inputValue);
|
||||
Button.onClick(() => {
|
||||
this.dialogController.open();
|
||||
});
|
||||
Button.backgroundColor(0x317aff);
|
||||
}, Button);
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "CustomDialogUser";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new CustomDialogUser(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/import@CustomDialog", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/import@CustomDialog", integratedHsp: "false" });
|
||||
//# sourceMappingURL=import@CustomDialog.js.map
|
@ -0,0 +1,192 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import { ClassB as ClassA } from '../../../test/import@Observed';
|
||||
class ViewA extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.label = 'ViewA1';
|
||||
this.__a = new SynchedPropertyNesedObjectPU(params.a, this, "a");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.label !== undefined) {
|
||||
this.label = params.label;
|
||||
}
|
||||
this.__a.set(params.a);
|
||||
}
|
||||
updateStateVars(params) {
|
||||
this.__a.set(params.a);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__a.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__a.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get a() {
|
||||
return this.__a.get();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.margin({ top: 10 });
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel('ViewA' + JSON.stringify(this.label) + 'this.a.c=' + JSON.stringify(this.a.c));
|
||||
Button.onClick(() => {
|
||||
this.a.c += 1;
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ViewB extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arrA = new ObservedPropertyObjectPU([new ClassA(0), new ClassA(0)], this, "arrA");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arrA !== undefined) {
|
||||
this.arrA = params.arrA;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arrA.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arrA.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arrA() {
|
||||
return this.__arrA.get();
|
||||
}
|
||||
set arrA(newValue) {
|
||||
this.__arrA.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new ViewA(this, { label: JSON.stringify(item.id), a: item }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/import@Observed.ets", line: 25, col: 9 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
label: JSON.stringify(item.id),
|
||||
a: item
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
a: item
|
||||
});
|
||||
}
|
||||
}, { name: "ViewA" });
|
||||
}
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arrA, forEachItemGenFunction, (item) => item.id.toString(), false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new ViewA(this, { label: JSON.stringify(this.arrA[0]), a: this.arrA[0] }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/import@Observed.ets", line: 27, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
label: JSON.stringify(this.arrA[0]),
|
||||
a: this.arrA[0]
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
a: this.arrA[0]
|
||||
});
|
||||
}
|
||||
}, { name: "ViewA" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new ViewA(this, { label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1] }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/import@Observed.ets", line: 28, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
label: JSON.stringify(this.arrA[this.arrA.length - 1]),
|
||||
a: this.arrA[this.arrA.length - 1]
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
a: this.arrA[this.arrA.length - 1]
|
||||
});
|
||||
}
|
||||
}, { name: "ViewA" });
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel('ViewB: reset array');
|
||||
Button.margin({ top: 10 });
|
||||
Button.onClick(() => {
|
||||
this.arrA = [new ClassA(0), new ClassA(0)];
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel('ViewB: push');
|
||||
Button.margin({ top: 10 });
|
||||
Button.onClick(() => {
|
||||
this.arrA.push(new ClassA(0));
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel('ViewB: shift');
|
||||
Button.margin({ top: 10 });
|
||||
Button.onClick(() => {
|
||||
this.arrA.shift();
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ViewB";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ViewB(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/import@Observed", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/import@Observed", integratedHsp: "false" });
|
||||
//# sourceMappingURL=import@Observed.js.map
|
@ -0,0 +1,213 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import * as AllComponent from '../../../test/NamespaceComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__myState1 = new ObservedPropertyObjectPU(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimplePU(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimplePU(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimplePU('ImportTest', this, "myState4");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__myState1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState3.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState4.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllComponent.NamespaceComponent1(this, {
|
||||
NamespaceComponent1Link1: this.__myState1,
|
||||
NamespaceComponent1Link2: this.__myState2,
|
||||
NamespaceComponent1Link3: this.__myState3,
|
||||
NamespaceComponent1Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importAllEts.ets", line: 14, col: 9 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
NamespaceComponent1Link1: this.myState1,
|
||||
NamespaceComponent1Link2: this.myState2,
|
||||
NamespaceComponent1Link3: this.myState3,
|
||||
NamespaceComponent1Link4: this.myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "NamespaceComponent1" });
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllComponent.NamespaceComponent1(this, {
|
||||
NamespaceComponent1Link1: this.__myState1,
|
||||
NamespaceComponent1Link2: this.__myState2,
|
||||
NamespaceComponent1Link3: this.__myState3,
|
||||
NamespaceComponent1Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importAllEts.ets", line: 22, col: 9 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
NamespaceComponent1Link1: this.myState1,
|
||||
NamespaceComponent1Link2: this.myState2,
|
||||
NamespaceComponent1Link3: this.myState3,
|
||||
NamespaceComponent1Link4: this.myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "NamespaceComponent1" });
|
||||
}
|
||||
__Common__.pop();
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllComponent.default(this, {
|
||||
NamespaceComponent3Link1: this.__myState1,
|
||||
NamespaceComponent3Link2: this.__myState2,
|
||||
NamespaceComponent3Link3: this.__myState3,
|
||||
NamespaceComponent3Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importAllEts.ets", line: 31, col: 11 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
NamespaceComponent3Link1: this.myState1,
|
||||
NamespaceComponent3Link2: this.myState2,
|
||||
NamespaceComponent3Link3: this.myState3,
|
||||
NamespaceComponent3Link4: this.myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "default" });
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create();
|
||||
__Common__.height(200);
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllComponent.default(this, {
|
||||
NamespaceComponent3Link1: this.__myState1,
|
||||
NamespaceComponent3Link2: this.__myState2,
|
||||
NamespaceComponent3Link3: this.__myState3,
|
||||
NamespaceComponent3Link4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importAllEts.ets", line: 39, col: 11 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
NamespaceComponent3Link1: this.myState1,
|
||||
NamespaceComponent3Link2: this.myState2,
|
||||
NamespaceComponent3Link3: this.myState3,
|
||||
NamespaceComponent3Link4: this.myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "default" });
|
||||
}
|
||||
__Common__.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ImportTest";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ImportTest(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/importAllEts", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/importAllEts", integratedHsp: "false" });
|
||||
//# sourceMappingURL=importAllEts.js.map
|
@ -0,0 +1,285 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import LinkComponentDefault, { LinkComponent as LinkComponent1Ref, LinkComponent2 as LinkComponent2Ref, LinkComponent3 } from '../../../test/LinkComponent';
|
||||
import DefaultComponent from "../../../test/DefaultComponent";
|
||||
import AMDComponentDefault from '../../../test/AMDComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__myState1 = new ObservedPropertyObjectPU(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimplePU(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimplePU(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimplePU('ImportTest', this, "myState4");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__myState1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState3.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState4.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new LinkComponent2Ref(this, {
|
||||
LinkComponent2Link1: this.__myState1,
|
||||
LinkComponent2Link2: this.__myState2,
|
||||
LinkComponent2Link3: this.__myState3,
|
||||
LinkComponent2Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent2'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts.ets", line: 21, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
LinkComponent2Link1: this.myState1,
|
||||
LinkComponent2Link2: this.myState2,
|
||||
LinkComponent2Link3: this.myState3,
|
||||
LinkComponent2Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent2'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "LinkComponent2Ref" });
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('space');
|
||||
Text.fontSize(20);
|
||||
Text.fontColor(Color.Red);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new LinkComponent1Ref(this, {
|
||||
LinkComponent1Link1: this.__myState1,
|
||||
LinkComponent1Link2: this.__myState2,
|
||||
LinkComponent1Link3: this.__myState3,
|
||||
LinkComponent1Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts.ets", line: 34, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
LinkComponent1Link1: this.myState1,
|
||||
LinkComponent1Link2: this.myState2,
|
||||
LinkComponent1Link3: this.myState3,
|
||||
LinkComponent1Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "LinkComponent1Ref" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new DefaultComponent(this, {
|
||||
DefaultComponentLink1: this.__myState1,
|
||||
DefaultComponentLink2: this.__myState2,
|
||||
DefaultComponentLink3: this.__myState3,
|
||||
DefaultComponentLink4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts.ets", line: 44, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
DefaultComponentLink1: this.myState1,
|
||||
DefaultComponentLink2: this.myState2,
|
||||
DefaultComponentLink3: this.myState3,
|
||||
DefaultComponentLink4: this.myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "DefaultComponent" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new LinkComponentDefault(this, {
|
||||
LinkComponent3Link1: this.__myState1,
|
||||
LinkComponent3Link2: this.__myState2,
|
||||
LinkComponent3Link3: this.__myState3,
|
||||
LinkComponent3Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent3'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts.ets", line: 52, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
LinkComponent3Link1: this.myState1,
|
||||
LinkComponent3Link2: this.myState2,
|
||||
LinkComponent3Link3: this.myState3,
|
||||
LinkComponent3Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent3'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "LinkComponentDefault" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AMDComponentDefault(this, {
|
||||
AMDComponentLink1: this.__myState1,
|
||||
AMDComponentLink2: this.__myState2,
|
||||
AMDComponentLink3: this.__myState3,
|
||||
AMDComponentLink4: this.__myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts.ets", line: 62, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
AMDComponentLink1: this.myState1,
|
||||
AMDComponentLink2: this.myState2,
|
||||
AMDComponentLink3: this.myState3,
|
||||
AMDComponentLink4: this.myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "AMDComponentDefault" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new LinkComponent3(this, {
|
||||
LinkComponent3Link1: this.__myState1,
|
||||
LinkComponent3Link2: this.__myState2,
|
||||
LinkComponent3Link3: this.__myState3,
|
||||
LinkComponent3Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts.ets", line: 70, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
LinkComponent3Link1: this.myState1,
|
||||
LinkComponent3Link2: this.myState2,
|
||||
LinkComponent3Link3: this.myState3,
|
||||
LinkComponent3Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "LinkComponent3" });
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ImportTest";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ImportTest(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/importEts", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/importEts", integratedHsp: "false" });
|
||||
//# sourceMappingURL=importEts.js.map
|
@ -0,0 +1,153 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import { AllStarComponent } from '../../../test/ExportStarComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__myState1 = new ObservedPropertyObjectPU(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimplePU(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimplePU(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimplePU('ImportTest', this, "myState4");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__myState1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState3.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState4.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllStarComponent.ExportComponent(this, {
|
||||
ExportComponent1Link1: this.__myState1,
|
||||
ExportComponent1Link2: this.__myState2,
|
||||
ExportComponent1Link3: this.__myState3,
|
||||
ExportComponent1Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importExportEts.ets", line: 14, col: 9 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
ExportComponent1Link1: this.myState1,
|
||||
ExportComponent1Link2: this.myState2,
|
||||
ExportComponent1Link3: this.myState3,
|
||||
ExportComponent1Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "ExportComponent" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllStarComponent.default(this, {
|
||||
ExportComponent4Link1: this.__myState1,
|
||||
ExportComponent4Link2: this.__myState2,
|
||||
ExportComponent4Link3: this.__myState3,
|
||||
ExportComponent4Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importExportEts.ets", line: 24, col: 11 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
ExportComponent4Link1: this.myState1,
|
||||
ExportComponent4Link2: this.myState2,
|
||||
ExportComponent4Link3: this.myState3,
|
||||
ExportComponent4Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "default" });
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ImportTest";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ImportTest(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/importExportEts", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/importExportEts", integratedHsp: "false" });
|
||||
//# sourceMappingURL=importExportEts.js.map
|
@ -0,0 +1,210 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import { tExtend, tStyles, DivideTest, Base } from '../../../test/ImportNestAll';
|
||||
class ImportTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__testText1 = new ObservedPropertySimplePU('Hello', this, "testText1");
|
||||
this.__testText2 = new ObservedPropertySimplePU('World', this, "testText2");
|
||||
this.__testText3 = new ObservedPropertySimplePU('Test', this, "testText3");
|
||||
this.__testText4 = new ObservedPropertySimplePU('Component', this, "testText4");
|
||||
this.__testState1 = new ObservedPropertySimplePU('Base', this, "testState1");
|
||||
this.__testState2 = new ObservedPropertySimplePU(0, this, "testState2");
|
||||
this.__testState3 = new ObservedPropertyObjectPU({ name: 'Base' }, this, "testState3");
|
||||
this.__testState4 = new ObservedPropertySimplePU(3, this, "testState4");
|
||||
this.__testState5 = new ObservedPropertySimplePU(10, this, "testState5");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.testText1 !== undefined) {
|
||||
this.testText1 = params.testText1;
|
||||
}
|
||||
if (params.testText2 !== undefined) {
|
||||
this.testText2 = params.testText2;
|
||||
}
|
||||
if (params.testText3 !== undefined) {
|
||||
this.testText3 = params.testText3;
|
||||
}
|
||||
if (params.testText4 !== undefined) {
|
||||
this.testText4 = params.testText4;
|
||||
}
|
||||
if (params.testState1 !== undefined) {
|
||||
this.testState1 = params.testState1;
|
||||
}
|
||||
if (params.testState2 !== undefined) {
|
||||
this.testState2 = params.testState2;
|
||||
}
|
||||
if (params.testState3 !== undefined) {
|
||||
this.testState3 = params.testState3;
|
||||
}
|
||||
if (params.testState4 !== undefined) {
|
||||
this.testState4 = params.testState4;
|
||||
}
|
||||
if (params.testState5 !== undefined) {
|
||||
this.testState5 = params.testState5;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__testText1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testText2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testText3.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testText4.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testState1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testState2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testState3.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testState4.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__testState5.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__testText1.aboutToBeDeleted();
|
||||
this.__testText2.aboutToBeDeleted();
|
||||
this.__testText3.aboutToBeDeleted();
|
||||
this.__testText4.aboutToBeDeleted();
|
||||
this.__testState1.aboutToBeDeleted();
|
||||
this.__testState2.aboutToBeDeleted();
|
||||
this.__testState3.aboutToBeDeleted();
|
||||
this.__testState4.aboutToBeDeleted();
|
||||
this.__testState5.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get testText1() {
|
||||
return this.__testText1.get();
|
||||
}
|
||||
set testText1(newValue) {
|
||||
this.__testText1.set(newValue);
|
||||
}
|
||||
get testText2() {
|
||||
return this.__testText2.get();
|
||||
}
|
||||
set testText2(newValue) {
|
||||
this.__testText2.set(newValue);
|
||||
}
|
||||
get testText3() {
|
||||
return this.__testText3.get();
|
||||
}
|
||||
set testText3(newValue) {
|
||||
this.__testText3.set(newValue);
|
||||
}
|
||||
get testText4() {
|
||||
return this.__testText4.get();
|
||||
}
|
||||
set testText4(newValue) {
|
||||
this.__testText4.set(newValue);
|
||||
}
|
||||
get testState1() {
|
||||
return this.__testState1.get();
|
||||
}
|
||||
set testState1(newValue) {
|
||||
this.__testState1.set(newValue);
|
||||
}
|
||||
get testState2() {
|
||||
return this.__testState2.get();
|
||||
}
|
||||
set testState2(newValue) {
|
||||
this.__testState2.set(newValue);
|
||||
}
|
||||
get testState3() {
|
||||
return this.__testState3.get();
|
||||
}
|
||||
set testState3(newValue) {
|
||||
this.__testState3.set(newValue);
|
||||
}
|
||||
get testState4() {
|
||||
return this.__testState4.get();
|
||||
}
|
||||
set testState4(newValue) {
|
||||
this.__testState4.set(newValue);
|
||||
}
|
||||
get testState5() {
|
||||
return this.__testState5.get();
|
||||
}
|
||||
set testState5(newValue) {
|
||||
this.__testState5.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.testText1);
|
||||
Text.fontSize(50);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
tExtend.bind(this)(20);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.testText2);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
tStyles.bind(this)();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel(this.testText3);
|
||||
}, Button);
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.testText4);
|
||||
Text.fontSize(50);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Base(this, {
|
||||
testStr: this.__testState1,
|
||||
testNum: this.__testState2,
|
||||
testObj: this.__testState3
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importExportNest.ets", line: 28, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
testStr: this.testState1,
|
||||
testNum: this.testState2,
|
||||
testObj: this.testState3
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Base" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new DivideTest(this, {
|
||||
testNum1: this.__testState4,
|
||||
testNum2: this.__testState5
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importExportNest.ets", line: 33, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
testNum1: this.testState4,
|
||||
testNum2: this.testState5
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "DivideTest" });
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ImportTest";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ImportTest(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/importExportNest", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/importExportNest", integratedHsp: "false" });
|
||||
//# sourceMappingURL=importExportNest.js.map
|
@ -0,0 +1,153 @@
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
import { AllStarComponent } from '../../../test/ExportStarComponent';
|
||||
import TsModule from '../../../test/TsModule';
|
||||
class ImportTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__myState1 = new ObservedPropertyObjectPU(new TsModule(1).method(), this, "myState1");
|
||||
this.__myState2 = new ObservedPropertySimplePU(0, this, "myState2");
|
||||
this.__myState3 = new ObservedPropertySimplePU(false, this, "myState3");
|
||||
this.__myState4 = new ObservedPropertySimplePU('ImportTest', this, "myState4");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.myState1 !== undefined) {
|
||||
this.myState1 = params.myState1;
|
||||
}
|
||||
if (params.myState2 !== undefined) {
|
||||
this.myState2 = params.myState2;
|
||||
}
|
||||
if (params.myState3 !== undefined) {
|
||||
this.myState3 = params.myState3;
|
||||
}
|
||||
if (params.myState4 !== undefined) {
|
||||
this.myState4 = params.myState4;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__myState1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState3.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__myState4.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__myState1.aboutToBeDeleted();
|
||||
this.__myState2.aboutToBeDeleted();
|
||||
this.__myState3.aboutToBeDeleted();
|
||||
this.__myState4.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get myState1() {
|
||||
return this.__myState1.get();
|
||||
}
|
||||
set myState1(newValue) {
|
||||
this.__myState1.set(newValue);
|
||||
}
|
||||
get myState2() {
|
||||
return this.__myState2.get();
|
||||
}
|
||||
set myState2(newValue) {
|
||||
this.__myState2.set(newValue);
|
||||
}
|
||||
get myState3() {
|
||||
return this.__myState3.get();
|
||||
}
|
||||
set myState3(newValue) {
|
||||
this.__myState3.set(newValue);
|
||||
}
|
||||
get myState4() {
|
||||
return this.__myState4.get();
|
||||
}
|
||||
set myState4(newValue) {
|
||||
this.__myState4.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllStarComponent.ExportComponent(this, {
|
||||
ExportComponent1Link1: this.__myState1,
|
||||
ExportComponent1Link2: this.__myState2,
|
||||
ExportComponent1Link3: this.__myState3,
|
||||
ExportComponent1Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importTs.ets", line: 14, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
ExportComponent1Link1: this.myState1,
|
||||
ExportComponent1Link2: this.myState2,
|
||||
ExportComponent1Link3: this.myState3,
|
||||
ExportComponent1Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "ExportComponent" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new AllStarComponent.default(this, {
|
||||
ExportComponent4Link1: this.__myState1,
|
||||
ExportComponent4Link2: this.__myState2,
|
||||
ExportComponent4Link3: this.__myState3,
|
||||
ExportComponent4Link4: this.__myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/import/importTs.ets", line: 24, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
ExportComponent4Link1: this.myState1,
|
||||
ExportComponent4Link2: this.myState2,
|
||||
ExportComponent4Link3: this.myState3,
|
||||
ExportComponent4Link4: this.myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "default" });
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ImportTest";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ImportTest(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/import/importTs", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/import/importTs", integratedHsp: "false" });
|
||||
//# sourceMappingURL=importTs.js.map
|
@ -0,0 +1,151 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
const value5 = [true, false];
|
||||
let value6 = { item1: true };
|
||||
let isCountDown = false;
|
||||
class HomeComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.value1 = "hello world 1";
|
||||
this.value2 = "hello world 2";
|
||||
this.value3 = "hello world 3";
|
||||
this.value4 = false;
|
||||
this.count = 1000;
|
||||
this.myTimeController = new TextTimerController();
|
||||
this.__format = new ObservedPropertySimplePU("hh:mm:ss:ms", this, "format");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.value1 !== undefined) {
|
||||
this.value1 = params.value1;
|
||||
}
|
||||
if (params.value2 !== undefined) {
|
||||
this.value2 = params.value2;
|
||||
}
|
||||
if (params.value3 !== undefined) {
|
||||
this.value3 = params.value3;
|
||||
}
|
||||
if (params.value4 !== undefined) {
|
||||
this.value4 = params.value4;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
if (params.myTimeController !== undefined) {
|
||||
this.myTimeController = params.myTimeController;
|
||||
}
|
||||
if (params.format !== undefined) {
|
||||
this.format = params.format;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__format.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__format.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get format() {
|
||||
return this.__format.get();
|
||||
}
|
||||
set format(newValue) {
|
||||
this.__format.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.height(500);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.value1);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Radio.create({ value: "Radio", group: "1" });
|
||||
Radio.checked(this.value4, newValue => { this.value4 = newValue; });
|
||||
}, Radio);
|
||||
Row.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.width(20);
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithChild();
|
||||
Button.bindPopup({ value: this.value4, changeEvent: newValue => { this.value4 = newValue; } }, { message: "This is $$ for regular" });
|
||||
Button.width(100);
|
||||
Button.height(20);
|
||||
}, Button);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.value1);
|
||||
Text.bindPopup({ value: value5[0], changeEvent: newValue => { value5[0] = newValue; } }, { message: "This is $$ for Array" });
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.value2);
|
||||
Text.fontSize(100);
|
||||
Text.bindPopup({ value: value6.item1, changeEvent: newValue => { value6.item1 = newValue; } }, { message: "This is $$ for Obj" });
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.value3);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Radio.create({ value: "Radio", group: "1" });
|
||||
Radio.checked(value5[0], newValue => { value5[0] = newValue; });
|
||||
}, Radio);
|
||||
Row.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TextTimer.create({ controller: this.myTimeController, isCountDown: { value: isCountDown, changeEvent: newValue => { isCountDown = newValue; } }, count: { value: this.count, changeEvent: newValue => { this.count = newValue; } } });
|
||||
TextTimer.format(this.format, newValue => { this.format = newValue; });
|
||||
}, TextTimer);
|
||||
TextTimer.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel("start");
|
||||
Button.onClick(() => {
|
||||
this.myTimeController.start();
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel("pause");
|
||||
Button.onClick(() => {
|
||||
this.myTimeController.pause();
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel("reset");
|
||||
Button.onClick(() => {
|
||||
this.myTimeController.reset();
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
Row.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "HomeComponent";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new HomeComponent(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_component", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_component", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_component.js.map
|
@ -0,0 +1,150 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class TabsExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__fontColor = new ObservedPropertySimplePU('#182431', this, "fontColor");
|
||||
this.__selectedFontColor = new ObservedPropertySimplePU('#007DFF', this, "selectedFontColor");
|
||||
this.__currentIndex = new ObservedPropertySimplePU(0, this, "currentIndex");
|
||||
this.controller = new TabsController();
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.fontColor !== undefined) {
|
||||
this.fontColor = params.fontColor;
|
||||
}
|
||||
if (params.selectedFontColor !== undefined) {
|
||||
this.selectedFontColor = params.selectedFontColor;
|
||||
}
|
||||
if (params.currentIndex !== undefined) {
|
||||
this.currentIndex = params.currentIndex;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__fontColor.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__selectedFontColor.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__currentIndex.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__fontColor.aboutToBeDeleted();
|
||||
this.__selectedFontColor.aboutToBeDeleted();
|
||||
this.__currentIndex.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get fontColor() {
|
||||
return this.__fontColor.get();
|
||||
}
|
||||
set fontColor(newValue) {
|
||||
this.__fontColor.set(newValue);
|
||||
}
|
||||
get selectedFontColor() {
|
||||
return this.__selectedFontColor.get();
|
||||
}
|
||||
set selectedFontColor(newValue) {
|
||||
this.__selectedFontColor.set(newValue);
|
||||
}
|
||||
get currentIndex() {
|
||||
return this.__currentIndex.get();
|
||||
}
|
||||
set currentIndex(newValue) {
|
||||
this.__currentIndex.set(newValue);
|
||||
}
|
||||
tabBuilder(index, name, parent = null) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(name);
|
||||
Text.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor);
|
||||
Text.fontSize(16);
|
||||
Text.fontWeight(this.currentIndex === index ? 500 : 400);
|
||||
Text.lineHeight(22);
|
||||
Text.margin({ top: 17, bottom: 7 });
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Divider.create();
|
||||
Divider.strokeWidth(2);
|
||||
Divider.color('#007DFF');
|
||||
Divider.opacity(this.currentIndex === index ? 1 : 0);
|
||||
}, Divider);
|
||||
Column.pop();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Tabs.create({ barPosition: BarPosition.Start, index: { value: this.currentIndex, changeEvent: newValue => { this.currentIndex = newValue; } }, controller: this.controller });
|
||||
Tabs.vertical(false);
|
||||
Tabs.width(150);
|
||||
Tabs.height(100);
|
||||
Tabs.backgroundColor(Color.Pink);
|
||||
Tabs.width(150);
|
||||
Tabs.height(100);
|
||||
Tabs.backgroundColor(Color.Pink);
|
||||
Tabs.barMode(BarMode.Fixed);
|
||||
Tabs.barWidth(360);
|
||||
Tabs.barHeight(56);
|
||||
Tabs.animationDuration(400);
|
||||
Tabs.onChange((index) => {
|
||||
this.currentIndex = index;
|
||||
});
|
||||
Tabs.width(360);
|
||||
Tabs.height(296);
|
||||
Tabs.margin({ top: 52 });
|
||||
Tabs.backgroundColor('#F1F3F5');
|
||||
}, Tabs);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TabContent.create(() => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.backgroundColor('#00CB87');
|
||||
Column.width(150);
|
||||
Column.height(100);
|
||||
Column.backgroundColor(Color.Pink);
|
||||
Column.width(150);
|
||||
Column.height(100);
|
||||
Column.backgroundColor(Color.Pink);
|
||||
}, Column);
|
||||
Column.pop();
|
||||
});
|
||||
TabContent.tabBar({ builder: () => {
|
||||
this.tabBuilder.call(this, 0, 'green');
|
||||
} });
|
||||
TabContent.width(150);
|
||||
TabContent.height(100);
|
||||
TabContent.backgroundColor(Color.Pink);
|
||||
TabContent.width(150);
|
||||
TabContent.height(100);
|
||||
TabContent.backgroundColor(Color.Pink);
|
||||
}, TabContent);
|
||||
TabContent.pop();
|
||||
Tabs.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "TabsExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new TabsExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck1", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck1", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck1.js.map
|
@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class TextInputExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__text = new ObservedPropertySimplePU('', this, "text");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.text !== undefined) {
|
||||
this.text = params.text;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__text.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__text.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get text() {
|
||||
return this.__text.get();
|
||||
}
|
||||
set text(newValue) {
|
||||
this.__text.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create({ space: 20 });
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.Center);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.text);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TextInput.create({ text: { value: this.text, changeEvent: newValue => { this.text = newValue; } } });
|
||||
TextInput.placeholderColor(Color.Grey);
|
||||
TextInput.placeholderFont({ size: 14, weight: 400 });
|
||||
TextInput.width(150);
|
||||
TextInput.height(100);
|
||||
TextInput.backgroundColor(Color.Pink);
|
||||
TextInput.width(150);
|
||||
TextInput.height(100);
|
||||
TextInput.backgroundColor(Color.Pink);
|
||||
TextInput.caretColor(Color.Blue);
|
||||
TextInput.width(300);
|
||||
}, TextInput);
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "TextInputExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new TextInputExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck2", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck2", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck2.js.map
|
@ -0,0 +1,85 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__applyToAll = new ObservedPropertySimplePU(false, this, "applyToAll");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.applyToAll !== undefined) {
|
||||
this.applyToAll = params.applyToAll;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__applyToAll.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__applyToAll.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get applyToAll() {
|
||||
return this.__applyToAll.get();
|
||||
}
|
||||
set applyToAll(newValue) {
|
||||
this.__applyToAll.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (1) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Checkbox.create();
|
||||
Checkbox.select(this.applyToAll, newValue => { this.applyToAll = newValue; });
|
||||
Checkbox.shape(CheckBoxShape.ROUNDED_SQUARE);
|
||||
Checkbox.selectedColor('red');
|
||||
Checkbox.unselectedColor('red');
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.mark({
|
||||
strokeColor: 'red'
|
||||
});
|
||||
Checkbox.width(30);
|
||||
Checkbox.height(30);
|
||||
}, Checkbox);
|
||||
Checkbox.pop();
|
||||
Row.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck3", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck3", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck3.js.map
|
@ -0,0 +1,85 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__applyToAll = new ObservedPropertySimplePU(false, this, "applyToAll");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.applyToAll !== undefined) {
|
||||
this.applyToAll = params.applyToAll;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__applyToAll.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__applyToAll.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get applyToAll() {
|
||||
return this.__applyToAll.get();
|
||||
}
|
||||
set applyToAll(newValue) {
|
||||
this.__applyToAll.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (1) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Checkbox.create();
|
||||
Checkbox.select(this.applyToAll, newValue => { this.applyToAll = newValue; });
|
||||
Checkbox.shape(CheckBoxShape.ROUNDED_SQUARE);
|
||||
Checkbox.selectedColor('red');
|
||||
Checkbox.unselectedColor('red');
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.mark({
|
||||
strokeColor: 'red'
|
||||
});
|
||||
Checkbox.width(30);
|
||||
Checkbox.height(30);
|
||||
}, Checkbox);
|
||||
Checkbox.pop();
|
||||
Row.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck4", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck4", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck4.js.map
|
@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class TextInputExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__text = new ObservedPropertySimplePU('', this, "text");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.text !== undefined) {
|
||||
this.text = params.text;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__text.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__text.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get text() {
|
||||
return this.__text.get();
|
||||
}
|
||||
set text(newValue) {
|
||||
this.__text.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create({ space: 20 });
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.justifyContent(FlexAlign.Center);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.text);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TextInput.create({ text: { value: this.text, changeEvent: newValue => { this.text = newValue; } } });
|
||||
TextInput.placeholderColor(Color.Grey);
|
||||
TextInput.placeholderFont({ size: 14, weight: 400 });
|
||||
TextInput.width(150);
|
||||
TextInput.height(100);
|
||||
TextInput.backgroundColor(Color.Pink);
|
||||
TextInput.width(150);
|
||||
TextInput.height(100);
|
||||
TextInput.backgroundColor(Color.Pink);
|
||||
TextInput.caretColor(Color.Blue);
|
||||
TextInput.width(300);
|
||||
}, TextInput);
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "TextInputExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new TextInputExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck5", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck5", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck5.js.map
|
@ -0,0 +1,150 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class TabsExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__fontColor = new ObservedPropertySimplePU('#182431', this, "fontColor");
|
||||
this.__selectedFontColor = new ObservedPropertySimplePU('#007DFF', this, "selectedFontColor");
|
||||
this.__currentIndex = new ObservedPropertySimplePU(0, this, "currentIndex");
|
||||
this.controller = new TabsController();
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.fontColor !== undefined) {
|
||||
this.fontColor = params.fontColor;
|
||||
}
|
||||
if (params.selectedFontColor !== undefined) {
|
||||
this.selectedFontColor = params.selectedFontColor;
|
||||
}
|
||||
if (params.currentIndex !== undefined) {
|
||||
this.currentIndex = params.currentIndex;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__fontColor.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__selectedFontColor.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__currentIndex.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__fontColor.aboutToBeDeleted();
|
||||
this.__selectedFontColor.aboutToBeDeleted();
|
||||
this.__currentIndex.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get fontColor() {
|
||||
return this.__fontColor.get();
|
||||
}
|
||||
set fontColor(newValue) {
|
||||
this.__fontColor.set(newValue);
|
||||
}
|
||||
get selectedFontColor() {
|
||||
return this.__selectedFontColor.get();
|
||||
}
|
||||
set selectedFontColor(newValue) {
|
||||
this.__selectedFontColor.set(newValue);
|
||||
}
|
||||
get currentIndex() {
|
||||
return this.__currentIndex.get();
|
||||
}
|
||||
set currentIndex(newValue) {
|
||||
this.__currentIndex.set(newValue);
|
||||
}
|
||||
tabBuilder(index, name, parent = null) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(name);
|
||||
Text.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor);
|
||||
Text.fontSize(16);
|
||||
Text.fontWeight(this.currentIndex === index ? 500 : 400);
|
||||
Text.lineHeight(22);
|
||||
Text.margin({ top: 17, bottom: 7 });
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Divider.create();
|
||||
Divider.strokeWidth(2);
|
||||
Divider.color('#007DFF');
|
||||
Divider.opacity(this.currentIndex === index ? 1 : 0);
|
||||
}, Divider);
|
||||
Column.pop();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Tabs.create({ barPosition: BarPosition.Start, index: { value: this.currentIndex, changeEvent: newValue => { this.currentIndex = newValue; } }, controller: this.controller });
|
||||
Tabs.vertical(false);
|
||||
Tabs.width(150);
|
||||
Tabs.height(100);
|
||||
Tabs.backgroundColor(Color.Pink);
|
||||
Tabs.width(150);
|
||||
Tabs.height(100);
|
||||
Tabs.backgroundColor(Color.Pink);
|
||||
Tabs.barMode(BarMode.Fixed);
|
||||
Tabs.barWidth(360);
|
||||
Tabs.barHeight(56);
|
||||
Tabs.animationDuration(400);
|
||||
Tabs.onChange((index) => {
|
||||
this.currentIndex = index;
|
||||
});
|
||||
Tabs.width(360);
|
||||
Tabs.height(296);
|
||||
Tabs.margin({ top: 52 });
|
||||
Tabs.backgroundColor('#F1F3F5');
|
||||
}, Tabs);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TabContent.create(() => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
Column.backgroundColor('#00CB87');
|
||||
Column.width(150);
|
||||
Column.height(100);
|
||||
Column.backgroundColor(Color.Pink);
|
||||
Column.width(150);
|
||||
Column.height(100);
|
||||
Column.backgroundColor(Color.Pink);
|
||||
}, Column);
|
||||
Column.pop();
|
||||
});
|
||||
TabContent.tabBar({ builder: () => {
|
||||
this.tabBuilder.call(this, 0, 'green');
|
||||
} });
|
||||
TabContent.width(150);
|
||||
TabContent.height(100);
|
||||
TabContent.backgroundColor(Color.Pink);
|
||||
TabContent.width(150);
|
||||
TabContent.height(100);
|
||||
TabContent.backgroundColor(Color.Pink);
|
||||
}, TabContent);
|
||||
TabContent.pop();
|
||||
Tabs.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "TabsExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new TabsExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck6", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck6", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck6.js.map
|
@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
function aa() {
|
||||
return 'red';
|
||||
}
|
||||
function dd() {
|
||||
return {
|
||||
ee: 30
|
||||
};
|
||||
}
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__applyToAll = new ObservedPropertySimplePU(false, this, "applyToAll");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.applyToAll !== undefined) {
|
||||
this.applyToAll = params.applyToAll;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__applyToAll.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__applyToAll.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get applyToAll() {
|
||||
return this.__applyToAll.get();
|
||||
}
|
||||
set applyToAll(newValue) {
|
||||
this.__applyToAll.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (1) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Checkbox.create();
|
||||
Checkbox.select(this.applyToAll, newValue => { this.applyToAll = newValue; });
|
||||
Checkbox.shape(CheckBoxShape.ROUNDED_SQUARE);
|
||||
Checkbox.selectedColor(xx());
|
||||
Checkbox.unselectedColor(bb().cc);
|
||||
Checkbox.mark({
|
||||
strokeColor: aa()
|
||||
});
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.mark({
|
||||
strokeColor: 'red'
|
||||
});
|
||||
Checkbox.width(dd().ee);
|
||||
Checkbox.height(30);
|
||||
}, Checkbox);
|
||||
Checkbox.pop();
|
||||
Row.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
function xx() {
|
||||
return 'red';
|
||||
}
|
||||
function bb() {
|
||||
return {
|
||||
cc: 'red'
|
||||
};
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck7", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck7", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck7.js.map
|
@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
function aa() {
|
||||
return 'red';
|
||||
}
|
||||
function dd() {
|
||||
return {
|
||||
ee: 30
|
||||
};
|
||||
}
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__applyToAll = new ObservedPropertySimplePU(false, this, "applyToAll");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.applyToAll !== undefined) {
|
||||
this.applyToAll = params.applyToAll;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__applyToAll.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__applyToAll.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get applyToAll() {
|
||||
return this.__applyToAll.get();
|
||||
}
|
||||
set applyToAll(newValue) {
|
||||
this.__applyToAll.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (1) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Checkbox.create();
|
||||
Checkbox.select(this.applyToAll, newValue => { this.applyToAll = newValue; });
|
||||
Checkbox.shape(CheckBoxShape.ROUNDED_SQUARE);
|
||||
Checkbox.selectedColor(xx());
|
||||
Checkbox.unselectedColor(bb().cc);
|
||||
Checkbox.mark({
|
||||
strokeColor: aa()
|
||||
});
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.width(150);
|
||||
Checkbox.height(100);
|
||||
Checkbox.backgroundColor(Color.Pink);
|
||||
Checkbox.mark({
|
||||
strokeColor: 'red'
|
||||
});
|
||||
Checkbox.width(dd().ee);
|
||||
Checkbox.height(30);
|
||||
}, Checkbox);
|
||||
Checkbox.pop();
|
||||
Row.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
function xx() {
|
||||
return 'red';
|
||||
}
|
||||
function bb() {
|
||||
return {
|
||||
cc: 'red'
|
||||
};
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck8", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck8", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck8.js.map
|
@ -0,0 +1,96 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class SheetSizeExample1 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__detents = new ObservedPropertyObjectPU([SheetSize.MEDIUM, SheetSize.LARGE, SheetSize.FIT_CONTENT], this, "detents");
|
||||
this.__isShow = new ObservedPropertySimplePU(false, this, "isShow");
|
||||
this.__dismiss = new ObservedPropertySimplePU("Init", this, "dismiss");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.detents !== undefined) {
|
||||
this.detents = params.detents;
|
||||
}
|
||||
if (params.isShow !== undefined) {
|
||||
this.isShow = params.isShow;
|
||||
}
|
||||
if (params.dismiss !== undefined) {
|
||||
this.dismiss = params.dismiss;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__detents.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShow.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__dismiss.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__detents.aboutToBeDeleted();
|
||||
this.__isShow.aboutToBeDeleted();
|
||||
this.__dismiss.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get detents() {
|
||||
return this.__detents.get();
|
||||
}
|
||||
set detents(newValue) {
|
||||
this.__detents.set(newValue);
|
||||
}
|
||||
get isShow() {
|
||||
return this.__isShow.get();
|
||||
}
|
||||
set isShow(newValue) {
|
||||
this.__isShow.set(newValue);
|
||||
}
|
||||
get dismiss() {
|
||||
return this.__dismiss.get();
|
||||
}
|
||||
set dismiss(newValue) {
|
||||
this.__dismiss.set(newValue);
|
||||
}
|
||||
myBuilder(parent = null) {
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.justifyContent(FlexAlign.Start);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel("transition modal 1");
|
||||
Button.bindSheet({ value: this.isShow, changeEvent: newValue => { this.isShow = newValue; } }, { builder: () => {
|
||||
this.myBuilder.call(this);
|
||||
} }, {
|
||||
detents: this.detents,
|
||||
backgroundColor: Color.Gray,
|
||||
blurStyle: BlurStyle.Thick,
|
||||
showClose: true,
|
||||
title: { title: "title", subtitle: "subtitle" },
|
||||
preferType: SheetType.CENTER,
|
||||
shouldDismiss: ((sheetDismiss) => {
|
||||
console.log("bind sheet shouldDismiss");
|
||||
sheetDismiss.dismiss();
|
||||
this.dismiss = "dismiss succ";
|
||||
})
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "SheetSizeExample1";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new SheetSizeExample1(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck9", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_componentCheck9", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_componentCheck9.js.map
|
@ -0,0 +1,114 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__message = new ObservedPropertySimplePU('Hello', this, "message");
|
||||
this.__num = new ObservedPropertySimplePU(0, this, "num");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.message !== undefined) {
|
||||
this.message = params.message;
|
||||
}
|
||||
if (params.num !== undefined) {
|
||||
this.num = params.num;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__message.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__num.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__message.aboutToBeDeleted();
|
||||
this.__num.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get message() {
|
||||
return this.__message.get();
|
||||
}
|
||||
set message(newValue) {
|
||||
this.__message.set(newValue);
|
||||
}
|
||||
get num() {
|
||||
return this.__num.get();
|
||||
}
|
||||
set num(newValue) {
|
||||
this.__num.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.message);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.num === 0) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Refresh.create({ refreshing: { value: this.message, changeEvent: newValue => { this.message = newValue; } } });
|
||||
}, Refresh);
|
||||
Refresh.pop();
|
||||
});
|
||||
}
|
||||
else if (this.num === 1) {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Refresh.create({ refreshing: { value: this.message, changeEvent: newValue => { this.message = newValue; } } });
|
||||
}, Refresh);
|
||||
Refresh.pop();
|
||||
});
|
||||
}
|
||||
else if (this.num === 2) {
|
||||
this.ifElseBranchUpdateFunction(2, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Refresh.create({ refreshing: { value: this.message, changeEvent: newValue => { this.message = newValue; } } });
|
||||
}, Refresh);
|
||||
Refresh.pop();
|
||||
});
|
||||
}
|
||||
else if (this.num === 3) {
|
||||
this.ifElseBranchUpdateFunction(3, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Refresh.create({ refreshing: { value: this.message, changeEvent: newValue => { this.message = newValue; } } });
|
||||
}, Refresh);
|
||||
Refresh.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(4, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Refresh.create({ refreshing: { value: this.message, changeEvent: newValue => { this.message = newValue; } } });
|
||||
}, Refresh);
|
||||
Refresh.pop();
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
Row.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/$$_component/$$_if_elseIf_else", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/$$_component/$$_if_elseIf_else", integratedHsp: "false" });
|
||||
//# sourceMappingURL=$$_if_elseIf_else.js.map
|
@ -0,0 +1,184 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
let options = { message: 'Hi' };
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__message1 = new ObservedPropertySimplePU('hello', this, "message1");
|
||||
this.message2 = 'Hi';
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.message1 !== undefined) {
|
||||
this.message1 = params.message1;
|
||||
}
|
||||
if (params.message2 !== undefined) {
|
||||
this.message2 = params.message2;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__message1.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__message1.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get message1() {
|
||||
return this.__message1.get();
|
||||
}
|
||||
set message1(newValue) {
|
||||
this.__message1.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
}, Row);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Child(this, { options, message1: this.__message1, message2: this.message2 }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/component_object.ets", line: 12, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
options,
|
||||
message1: this.message1,
|
||||
message2: this.message2
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {
|
||||
message2: this.message2
|
||||
});
|
||||
}
|
||||
}, { name: "Child" });
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Child2(this, options, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/component_object.ets", line: 13, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return options;
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Child2" });
|
||||
}
|
||||
Row.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
class Child extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.options = undefined;
|
||||
this.__message1 = new SynchedPropertySimpleTwoWayPU(params.message1, this, "message1");
|
||||
this.__message2 = new SynchedPropertySimpleOneWayPU(params.message2, this, "message2");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.options !== undefined) {
|
||||
this.options = params.options;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
this.__message2.reset(params.message2);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__message1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__message2.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__message1.aboutToBeDeleted();
|
||||
this.__message2.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get message1() {
|
||||
return this.__message1.get();
|
||||
}
|
||||
set message1(newValue) {
|
||||
this.__message1.set(newValue);
|
||||
}
|
||||
get message2() {
|
||||
return this.__message2.get();
|
||||
}
|
||||
set message2(newValue) {
|
||||
this.__message2.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.message1);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class Child2 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.message = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.message !== undefined) {
|
||||
this.message = params.message;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.message);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/custom_component/component_object", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/component_object", integratedHsp: "false" });
|
||||
//# sourceMappingURL=component_object.js.map
|
@ -0,0 +1,193 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class MyComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Banner(this, {}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component.ets", line: 6, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Banner" });
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Banner(this, {}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component.ets", line: 7, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Banner" });
|
||||
}
|
||||
__Common__.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
__Common__.height(200);
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Banner(this, {}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component.ets", line: 9, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Banner" });
|
||||
}
|
||||
__Common__.pop();
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Banner(this, { value: "Hello" }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component.ets", line: 12, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
value: "Hello"
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Banner" });
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Banner(this, { value: "Hello" }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component.ets", line: 13, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
value: "Hello"
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Banner" });
|
||||
}
|
||||
__Common__.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create();
|
||||
__Common__.width(100);
|
||||
__Common__.height(200);
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Banner(this, { value: "Hello" }, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component.ets", line: 15, col: 7 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
value: "Hello"
|
||||
};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Banner" });
|
||||
}
|
||||
__Common__.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "MyComponent";
|
||||
}
|
||||
}
|
||||
class Banner extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.value = "Hello";
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.value !== undefined) {
|
||||
this.value = params.value;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.value);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new MyComponent(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/custom_component/custom_component", integratedHsp: "false" });
|
||||
//# sourceMappingURL=custom_component.js.map
|
@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class childTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
updateRecycleElmtId(oldElmtId, newElmtId) {
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create("hello");
|
||||
Gesture.create(GesturePriority.Low);
|
||||
GestureGroup.create(GestureMode.Parallel);
|
||||
TapGesture.create({ count: 2 });
|
||||
TapGesture.onAction(() => {
|
||||
});
|
||||
TapGesture.pop();
|
||||
GestureGroup.pop();
|
||||
Gesture.pop();
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "childTest";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new childTest(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/GestureModeParallel", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/GestureModeParallel", integratedHsp: "false" });
|
||||
//# sourceMappingURL=GestureModeParallel.js.map
|
@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class LongPressGestureExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__count = new ObservedPropertySimplePU(0, this, "count");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__count.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__count.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get count() {
|
||||
return this.__count.get();
|
||||
}
|
||||
set count(newValue) {
|
||||
this.__count.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(200);
|
||||
Flex.width(300);
|
||||
Flex.padding(60);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(30);
|
||||
Gesture.create(GesturePriority.Low);
|
||||
LongPressGesture.create({ repeat: true });
|
||||
LongPressGesture.onAction((event) => {
|
||||
if (event.repeat) {
|
||||
this.count++;
|
||||
}
|
||||
});
|
||||
LongPressGesture.onActionEnd(() => {
|
||||
this.count = 0;
|
||||
});
|
||||
LongPressGesture.pop();
|
||||
Gesture.pop();
|
||||
}, Flex);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('LongPress onAction:' + this.count);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "LongPressGestureExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new LongPressGestureExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/longPressGesture", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/longPressGesture", integratedHsp: "false" });
|
||||
//# sourceMappingURL=longPressGesture.js.map
|
@ -0,0 +1,90 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class PanGestureExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__offsetX = new ObservedPropertySimplePU(0, this, "offsetX");
|
||||
this.__offsetY = new ObservedPropertySimplePU(0, this, "offsetY");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.offsetX !== undefined) {
|
||||
this.offsetX = params.offsetX;
|
||||
}
|
||||
if (params.offsetY !== undefined) {
|
||||
this.offsetY = params.offsetY;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__offsetX.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__offsetY.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__offsetX.aboutToBeDeleted();
|
||||
this.__offsetY.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get offsetX() {
|
||||
return this.__offsetX.get();
|
||||
}
|
||||
set offsetX(newValue) {
|
||||
this.__offsetX.set(newValue);
|
||||
}
|
||||
get offsetY() {
|
||||
return this.__offsetY.get();
|
||||
}
|
||||
set offsetY(newValue) {
|
||||
this.__offsetY.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
Flex.padding(20);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(80);
|
||||
Flex.translate({ x: this.offsetX, y: this.offsetY, z: 5 });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
PanGesture.create({});
|
||||
PanGesture.onActionStart((event) => {
|
||||
console.info('Pan start');
|
||||
});
|
||||
PanGesture.onActionUpdate((event) => {
|
||||
this.offsetX = event.offsetX;
|
||||
this.offsetY = event.offsetY;
|
||||
});
|
||||
PanGesture.onActionEnd(() => {
|
||||
console.info('Pan end');
|
||||
});
|
||||
PanGesture.pop();
|
||||
Gesture.pop();
|
||||
}, Flex);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('PanGesture offset X: ' + this.offsetX);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('PanGesture offset Y: ' + this.offsetY);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "PanGestureExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new PanGestureExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/panGestrue", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/panGestrue", integratedHsp: "false" });
|
||||
//# sourceMappingURL=panGestrue.js.map
|
@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class PinchGestureExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__scale2 = new ObservedPropertySimplePU(1, this, "scale2");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.scale2 !== undefined) {
|
||||
this.scale2 = params.scale2;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__scale2.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__scale2.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get scale2() {
|
||||
return this.__scale2.get();
|
||||
}
|
||||
set scale2(newValue) {
|
||||
this.__scale2.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
Flex.padding(20);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(80);
|
||||
Flex.scale({ x: this.scale2, y: this.scale2, z: this.scale2 });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
PinchGesture.create();
|
||||
PinchGesture.onActionStart((event) => {
|
||||
console.info('Pinch start');
|
||||
});
|
||||
PinchGesture.onActionUpdate((event) => {
|
||||
this.scale2 = event.scale;
|
||||
});
|
||||
PinchGesture.onActionEnd(() => {
|
||||
console.info('Pinch end');
|
||||
});
|
||||
PinchGesture.pop();
|
||||
Gesture.pop();
|
||||
}, Flex);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('PinchGesture scale:' + this.scale2);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "PinchGestureExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new PinchGestureExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/pinchGesture", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/pinchGesture", integratedHsp: "false" });
|
||||
//# sourceMappingURL=pinchGesture.js.map
|
@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class RotationGestureExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__angle = new ObservedPropertySimplePU(0, this, "angle");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.angle !== undefined) {
|
||||
this.angle = params.angle;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__angle.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__angle.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get angle() {
|
||||
return this.__angle.get();
|
||||
}
|
||||
set angle(newValue) {
|
||||
this.__angle.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
Flex.padding(20);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(80);
|
||||
Flex.rotate({ x: 1, y: 2, z: 3, angle: this.angle });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
RotationGesture.create();
|
||||
RotationGesture.onActionStart((event) => {
|
||||
console.log('Rotation start');
|
||||
});
|
||||
RotationGesture.onActionUpdate((event) => {
|
||||
this.angle = event.angle;
|
||||
});
|
||||
RotationGesture.onActionEnd(() => {
|
||||
console.log('Rotation end');
|
||||
});
|
||||
RotationGesture.pop();
|
||||
Gesture.pop();
|
||||
}, Flex);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('RotationGesture angle:' + this.angle);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "RotationGestureExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new RotationGestureExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/rotationGesture", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/rotationGesture", integratedHsp: "false" });
|
||||
//# sourceMappingURL=rotationGesture.js.map
|
@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class SwipeGestureExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__rotateAngle = new ObservedPropertySimplePU(0, this, "rotateAngle");
|
||||
this.__speed = new ObservedPropertySimplePU(1, this, "speed");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.rotateAngle !== undefined) {
|
||||
this.rotateAngle = params.rotateAngle;
|
||||
}
|
||||
if (params.speed !== undefined) {
|
||||
this.speed = params.speed;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__rotateAngle.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__speed.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__rotateAngle.aboutToBeDeleted();
|
||||
this.__speed.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get rotateAngle() {
|
||||
return this.__rotateAngle.get();
|
||||
}
|
||||
set rotateAngle(newValue) {
|
||||
this.__rotateAngle.set(newValue);
|
||||
}
|
||||
get speed() {
|
||||
return this.__speed.get();
|
||||
}
|
||||
set speed(newValue) {
|
||||
this.__speed.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.border({ width: 2 });
|
||||
Column.width(260);
|
||||
Column.height(260);
|
||||
Column.rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle });
|
||||
Gesture.create(GesturePriority.Low);
|
||||
SwipeGesture.create({ fingers: 1, direction: SwipeDirection.Vertical });
|
||||
SwipeGesture.onAction((event) => {
|
||||
this.speed = event.speed;
|
||||
this.rotateAngle = event.angle;
|
||||
});
|
||||
SwipeGesture.pop();
|
||||
Gesture.pop();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create("SwipGesture speed : " + this.speed);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create("SwipGesture angle : " + this.rotateAngle);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "SwipeGestureExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new SwipeGestureExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/swipeGesture", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/swipeGesture", integratedHsp: "false" });
|
||||
//# sourceMappingURL=swipeGesture.js.map
|
@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class TapGestureExample extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__value = new ObservedPropertySimplePU('', this, "value");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.value !== undefined) {
|
||||
this.value = params.value;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__value.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__value.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get value() {
|
||||
return this.__value.get();
|
||||
}
|
||||
set value(newValue) {
|
||||
this.__value.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Flex.create({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween });
|
||||
Flex.height(200);
|
||||
Flex.width(300);
|
||||
Flex.padding(60);
|
||||
Flex.border({ width: 1 });
|
||||
Flex.margin(30);
|
||||
Gesture.create(GesturePriority.Low);
|
||||
TapGesture.create({ count: 2 });
|
||||
TapGesture.onAction(() => {
|
||||
this.value = 'TapGesture onAction';
|
||||
});
|
||||
TapGesture.pop();
|
||||
Gesture.pop();
|
||||
}, Flex);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('Click twice');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(this.value);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Flex.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "TapGestureExample";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new TapGestureExample(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/gesture_component/tapGesture", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/gesture_component/tapGesture", integratedHsp: "false" });
|
||||
//# sourceMappingURL=tapGesture.js.map
|
@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class MyComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU([10, 20, 30], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create({ space: 5 });
|
||||
Column.width("100%");
|
||||
Column.height("100%");
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel('Reverse Array');
|
||||
Button.onClick(() => {
|
||||
this.arr.reverse();
|
||||
});
|
||||
}, Button);
|
||||
Button.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('item');
|
||||
Text.fontSize(18);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Divider.create();
|
||||
Divider.strokeWidth(2);
|
||||
}, Divider);
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, (item) => item.toString(), false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "MyComponent";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new MyComponent(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/foreach/forEachSecondFunction", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/foreach/forEachSecondFunction", integratedHsp: "false" });
|
||||
//# sourceMappingURL=forEachSecondFunction.js.map
|
@ -0,0 +1,95 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
let mKeyGenerator2 = (item, index) => 'item' + index;
|
||||
class foreachThreeParam extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU([10, 20, 30], this, "arr");
|
||||
this.mKeyGenerator = undefined;
|
||||
this.mKeyGenerator1 = (item, index) => 'item' + index;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
if (params.mKeyGenerator !== undefined) {
|
||||
this.mKeyGenerator = params.mKeyGenerator;
|
||||
}
|
||||
if (params.mKeyGenerator1 !== undefined) {
|
||||
this.mKeyGenerator1 = params.mKeyGenerator1;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, this.mKeyGenerator, false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, this.mKeyGenerator1, false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, mKeyGenerator2, false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "foreachThreeParam";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new foreachThreeParam(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/foreach/forEachThreeParam", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/foreach/forEachThreeParam", integratedHsp: "false" });
|
||||
//# sourceMappingURL=forEachThreeParam.js.map
|
@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__WIDTH_AND_HEIGHT = new ObservedPropertyObjectPU([
|
||||
{ w: 10, h: 10 },
|
||||
{ w: 20, h: 20 },
|
||||
{ w: 30, h: 30 },
|
||||
{ w: 40, h: 40 },
|
||||
{ w: 50, h: 50 }
|
||||
], this, "WIDTH_AND_HEIGHT");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.WIDTH_AND_HEIGHT !== undefined) {
|
||||
this.WIDTH_AND_HEIGHT = params.WIDTH_AND_HEIGHT;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__WIDTH_AND_HEIGHT.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__WIDTH_AND_HEIGHT.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get WIDTH_AND_HEIGHT() {
|
||||
return this.__WIDTH_AND_HEIGHT.get();
|
||||
}
|
||||
set WIDTH_AND_HEIGHT(newValue) {
|
||||
this.__WIDTH_AND_HEIGHT.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.height('100%');
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.width('100%');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const { w, h } = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Button.createWithLabel();
|
||||
Button.width(w);
|
||||
Button.height(h);
|
||||
}, Button);
|
||||
Button.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.WIDTH_AND_HEIGHT, forEachItemGenFunction, item => item.toString(), false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
Column.pop();
|
||||
Row.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Index";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/foreach/forEachTwo", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/foreach/forEachTwo", integratedHsp: "false" });
|
||||
//# sourceMappingURL=forEachTwo.js.map
|
@ -0,0 +1,387 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class ParentView extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ParentView";
|
||||
}
|
||||
}
|
||||
class ParentView1 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = (_item, index) => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, undefined, true, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ParentView2 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = (_item, index) => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, item => item.toString(), true, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ParentView3 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = (_item, index) => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, (item, index) => item.toString(), true, true);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ParentView4 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, (item, index) => item.toString(), false, true);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ParentView5 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, item => item.toString(), false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ParentView6 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU(['1', '2', '3'], this, "arr");
|
||||
this.count = 0;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
ForEach.create();
|
||||
ForEach.onMove((from, to) => {
|
||||
this.count += 1;
|
||||
});
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, item => item.toString(), false, false);
|
||||
}, ForEach);
|
||||
ForEach.pop();
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ParentView(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/foreach/foreach", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/foreach/foreach", integratedHsp: "false" });
|
||||
//# sourceMappingURL=foreach.js.map
|
@ -0,0 +1,358 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class MyComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.pass = true;
|
||||
this.count = 10;
|
||||
this.controller = new TabsController();
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.pass !== undefined) {
|
||||
this.pass = params.pass;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.count < 0) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
if (!If.canRetake('id1')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('count is negative');
|
||||
Text.fontSize(32);
|
||||
Text.id('id1');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (this.count % 2 === 0) {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
if (!If.canRetake('id2')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Divider.create();
|
||||
Divider.id('id2');
|
||||
}, Divider);
|
||||
}
|
||||
if (!If.canRetake('id3')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('even');
|
||||
Text.fontSize(32);
|
||||
Text.id('id3');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(2, () => {
|
||||
if (!If.canRetake('id4')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Divider.create();
|
||||
Divider.id('id4');
|
||||
}, Divider);
|
||||
}
|
||||
if (!If.canRetake('id10')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.id('id10');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('odd');
|
||||
Text.fontSize(32);
|
||||
Text.id('id5');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
if (!If.canRetake('id6')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('fail');
|
||||
Text.id('id6');
|
||||
Text.fontSize(32);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
if (!If.canRetake('id7')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('odd2');
|
||||
Text.fontSize(32);
|
||||
Text.id('id7');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create({ space: 3 });
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
if (!If.canRetake('id8')) {
|
||||
{
|
||||
const itemCreation = (elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
itemCreation2(elmtId, isInitialRender);
|
||||
if (!isInitialRender) {
|
||||
ListItem.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
};
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(deepRenderFunction, true);
|
||||
ListItem.id('id8');
|
||||
};
|
||||
const deepRenderFunction = (elmtId, isInitialRender) => {
|
||||
itemCreation(elmtId, isInitialRender);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.margin({ left: 10, right: 10 });
|
||||
Row.id('id11');
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create();
|
||||
Text.fontSize(20);
|
||||
Text.margin({ left: 10 });
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
ListItem.pop();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
List.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Tabs.create({ barPosition: BarPosition.Start, controller: this.controller });
|
||||
}, Tabs);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
if (!If.canRetake('id9')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TabContent.create(() => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('111');
|
||||
Text.width('100%');
|
||||
Text.height('20');
|
||||
Text.backgroundColor(Color.Pink);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
TabContent.tabBar('pink');
|
||||
TabContent.id('id9');
|
||||
}, TabContent);
|
||||
TabContent.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Tabs.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.count === 10) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('111');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
if (!If.canRetake('id12')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
XComponent.create({ id: 'special', type: '' }, "com.example.application/application");
|
||||
XComponent.id('id12');
|
||||
}, XComponent);
|
||||
}
|
||||
if (!If.canRetake('id13')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.id('id13');
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('11');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('222');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.pass) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
if (!If.canRetake('id14')) {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
__Common__.create(true);
|
||||
__Common__.id('id14');
|
||||
}, __Common__);
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new Child(this, {}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/if/id_if.ets", line: 77, col: 11 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "Child" });
|
||||
}
|
||||
__Common__.pop();
|
||||
}
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('111');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "MyComponent";
|
||||
}
|
||||
}
|
||||
class Child extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('Child');
|
||||
Text.fontSize(50);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new MyComponent(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/if/id_if", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/if/id_if", integratedHsp: "false" });
|
||||
//# sourceMappingURL=id_if.js.map
|
@ -0,0 +1,126 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class IFView extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__toggle1 = new ObservedPropertySimplePU(false, this, "toggle1");
|
||||
this.__toggle2 = new ObservedPropertySimplePU(false, this, "toggle2");
|
||||
this.__toggle3 = new ObservedPropertySimplePU(false, this, "toggle3");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.toggle1 !== undefined) {
|
||||
this.toggle1 = params.toggle1;
|
||||
}
|
||||
if (params.toggle2 !== undefined) {
|
||||
this.toggle2 = params.toggle2;
|
||||
}
|
||||
if (params.toggle3 !== undefined) {
|
||||
this.toggle3 = params.toggle3;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__toggle1.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__toggle2.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__toggle3.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__toggle1.aboutToBeDeleted();
|
||||
this.__toggle2.aboutToBeDeleted();
|
||||
this.__toggle3.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get toggle1() {
|
||||
return this.__toggle1.get();
|
||||
}
|
||||
set toggle1(newValue) {
|
||||
this.__toggle1.set(newValue);
|
||||
}
|
||||
get toggle2() {
|
||||
return this.__toggle2.get();
|
||||
}
|
||||
set toggle2(newValue) {
|
||||
this.__toggle2.set(newValue);
|
||||
}
|
||||
get toggle3() {
|
||||
return this.__toggle3.get();
|
||||
}
|
||||
set toggle3(newValue) {
|
||||
this.__toggle3.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.toggle1) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('toggle1');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
}
|
||||
else if (this.toggle2) {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('toggle2');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
}
|
||||
else if (this.toggle3) {
|
||||
this.ifElseBranchUpdateFunction(2, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('toggle3');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(3, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('toggle no thing');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
If.create();
|
||||
if (this.toggle1) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('toggle1 Single');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
});
|
||||
}
|
||||
}, If);
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "IFView";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new IFView(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/if/if", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/if/if", integratedHsp: "false" });
|
||||
//# sourceMappingURL=if.js.map
|
@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class ParentView extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Grid.create();
|
||||
}, Grid);
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
GridItem.create(() => { }, false, 'true');
|
||||
GridItem.width(200);
|
||||
GridItem.height(100);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, GridItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('xx');
|
||||
Text.width(100);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
GridItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
Grid.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ParentView";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ParentView(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/item/GridItem", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/item/GridItem", integratedHsp: "false" });
|
||||
//# sourceMappingURL=GridItem.js.map
|
@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class ParentView extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
{
|
||||
const itemCreation = (elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
itemCreation2(elmtId, isInitialRender);
|
||||
if (!isInitialRender) {
|
||||
ListItem.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
};
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(deepRenderFunction, true, 'true');
|
||||
ListItem.width(200);
|
||||
ListItem.height(100);
|
||||
};
|
||||
const deepRenderFunction = (elmtId, isInitialRender) => {
|
||||
itemCreation(elmtId, isInitialRender);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('xx');
|
||||
Text.width(100);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
ListItem.pop();
|
||||
}
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "ParentView";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new ParentView(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/item/ListItem", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/item/ListItem", integratedHsp: "false" });
|
||||
//# sourceMappingURL=ListItem.js.map
|
@ -0,0 +1,220 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class BasicDataSource {
|
||||
constructor() {
|
||||
this.listeners = [];
|
||||
this.originDataArray = [];
|
||||
}
|
||||
totalCount() {
|
||||
return 0;
|
||||
}
|
||||
getData(index) {
|
||||
return this.originDataArray[index];
|
||||
}
|
||||
registerDataChangeListener(listener) {
|
||||
if (this.listeners.indexOf(listener) < 0) {
|
||||
console.info('add listener');
|
||||
this.listeners.push(listener);
|
||||
}
|
||||
}
|
||||
unregisterDataChangeListener(listener) {
|
||||
const pos = this.listeners.indexOf(listener);
|
||||
if (pos >= 0) {
|
||||
console.info('remove listener');
|
||||
this.listeners.splice(pos, 1);
|
||||
}
|
||||
}
|
||||
notifyDataReload() {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataReloaded();
|
||||
});
|
||||
}
|
||||
notifyDataAdd(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataAdd(index);
|
||||
});
|
||||
}
|
||||
notifyDataChange(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataChange(index);
|
||||
});
|
||||
}
|
||||
notifyDataDelete(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataDelete(index);
|
||||
});
|
||||
}
|
||||
notifyDataMove(from, to) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataMove(from, to);
|
||||
});
|
||||
}
|
||||
}
|
||||
class MyDataSource extends BasicDataSource {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.dataArray = [];
|
||||
}
|
||||
totalCount() {
|
||||
return this.dataArray.length;
|
||||
}
|
||||
getData(index) {
|
||||
return this.dataArray[index];
|
||||
}
|
||||
addData(index, data) {
|
||||
this.dataArray.splice(index, 0, data);
|
||||
this.notifyDataAdd(index);
|
||||
}
|
||||
pushData(data) {
|
||||
this.dataArray.push(data);
|
||||
this.notifyDataAdd(this.dataArray.length - 1);
|
||||
}
|
||||
}
|
||||
let mKeyGenerator2 = (item, index) => 'item' + index;
|
||||
class lazyforEachThreeParam extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.data = new MyDataSource();
|
||||
this.mKeyGenerator = undefined;
|
||||
this.mKeyGenerator1 = (item, index) => 'item' + index;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.data !== undefined) {
|
||||
this.data = params.data;
|
||||
}
|
||||
if (params.mKeyGenerator !== undefined) {
|
||||
this.mKeyGenerator = params.mKeyGenerator;
|
||||
}
|
||||
if (params.mKeyGenerator1 !== undefined) {
|
||||
this.mKeyGenerator1 = params.mKeyGenerator1;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
aboutToAppear() {
|
||||
for (let i = 0; i <= 20; i++) {
|
||||
this.data.pushData('11');
|
||||
}
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create({ space: 3 });
|
||||
List.cachedCount(5);
|
||||
}, List);
|
||||
{
|
||||
const __lazyForEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.margin({ left: 10, right: 10 });
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
Text.fontSize(50);
|
||||
Text.onAppear(() => {
|
||||
console.info("appear:" + item);
|
||||
});
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
};
|
||||
const __lazyForEachItemIdFunc = this.mKeyGenerator;
|
||||
LazyForEach.create("1", this, this.data, __lazyForEachItemGenFunction, __lazyForEachItemIdFunc);
|
||||
LazyForEach.pop();
|
||||
}
|
||||
{
|
||||
const __lazyForEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.margin({ left: 10, right: 10 });
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
Text.fontSize(50);
|
||||
Text.onAppear(() => {
|
||||
console.info("appear:" + item);
|
||||
});
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
};
|
||||
const __lazyForEachItemIdFunc = this.mKeyGenerator1;
|
||||
LazyForEach.create("1", this, this.data, __lazyForEachItemGenFunction, __lazyForEachItemIdFunc);
|
||||
LazyForEach.pop();
|
||||
}
|
||||
{
|
||||
const __lazyForEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Row.create();
|
||||
Row.margin({ left: 10, right: 10 });
|
||||
}, Row);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(item);
|
||||
Text.fontSize(50);
|
||||
Text.onAppear(() => {
|
||||
console.info("appear:" + item);
|
||||
});
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
};
|
||||
const __lazyForEachItemIdFunc = mKeyGenerator2;
|
||||
LazyForEach.create("1", this, this.data, __lazyForEachItemGenFunction, __lazyForEachItemIdFunc);
|
||||
LazyForEach.pop();
|
||||
}
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "lazyforEachThreeParam";
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new lazyforEachThreeParam(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/lazyforeach/lazyforEachThreeParam", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/lazyforeach/lazyforEachThreeParam", integratedHsp: "false" });
|
||||
//# sourceMappingURL=lazyforEachThreeParam.js.map
|
@ -0,0 +1,195 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class BasicDataSource {
|
||||
constructor() {
|
||||
this.listeners = [];
|
||||
}
|
||||
totalCount() {
|
||||
return 0;
|
||||
}
|
||||
getData(index) {
|
||||
return undefined;
|
||||
}
|
||||
registerDataChangeListener(listener) {
|
||||
if (this.listeners.indexOf(listener) < 0) {
|
||||
console.info('add listener');
|
||||
this.listeners.push(listener);
|
||||
}
|
||||
}
|
||||
unregisterDataChangeListener(listener) {
|
||||
const pos = this.listeners.indexOf(listener);
|
||||
if (pos >= 0) {
|
||||
console.info('remove listener');
|
||||
this.listeners.splice(pos, 1);
|
||||
}
|
||||
}
|
||||
notifyDataReload() {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataReloaded();
|
||||
});
|
||||
}
|
||||
notifyDataAdd(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataAdd(index);
|
||||
});
|
||||
}
|
||||
notifyDataChange(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataChange(index);
|
||||
});
|
||||
}
|
||||
notifyDataDelete(index) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataDelete(index);
|
||||
});
|
||||
}
|
||||
notifyDataMove(from, to) {
|
||||
this.listeners.forEach(listener => {
|
||||
listener.onDataMove(from, to);
|
||||
});
|
||||
}
|
||||
}
|
||||
class MyDataSource extends BasicDataSource {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.dataArray = ['/path/image0', '/path/image1', '/path/image2', '/path/image3'];
|
||||
}
|
||||
totalCount() {
|
||||
return this.dataArray.length;
|
||||
}
|
||||
getData(index) {
|
||||
return this.dataArray[index];
|
||||
}
|
||||
addData(index, data) {
|
||||
this.dataArray.splice(index, 0, data);
|
||||
this.notifyDataAdd(index);
|
||||
}
|
||||
pushData(data) {
|
||||
this.dataArray.push(data);
|
||||
this.notifyDataAdd(this.dataArray.length - 1);
|
||||
}
|
||||
}
|
||||
class Test extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.data = new MyDataSource();
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.data !== undefined) {
|
||||
this.data = params.data;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Grid.create();
|
||||
}, Grid);
|
||||
{
|
||||
const __lazyForEachItemGenFunction = _item => {
|
||||
const row = _item;
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
GridItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, GridItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(row);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
GridItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
};
|
||||
const __lazyForEachItemIdFunc = row => row;
|
||||
LazyForEach.create("1", this, this.data, __lazyForEachItemGenFunction, __lazyForEachItemIdFunc);
|
||||
LazyForEach.pop();
|
||||
}
|
||||
Grid.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "Test";
|
||||
}
|
||||
}
|
||||
class ChildTest extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.data = new MyDataSource();
|
||||
this.count = 0;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.data !== undefined) {
|
||||
this.data = params.data;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Grid.create();
|
||||
}, Grid);
|
||||
{
|
||||
const __lazyForEachItemGenFunction = _item => {
|
||||
const row = _item;
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
GridItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, GridItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(row);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
GridItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
};
|
||||
const __lazyForEachItemIdFunc = row => row;
|
||||
LazyForEach.create("1", this, this.data, __lazyForEachItemGenFunction, __lazyForEachItemIdFunc);
|
||||
LazyForEach.onMove((from, to) => {
|
||||
this.count += 1;
|
||||
});
|
||||
LazyForEach.pop();
|
||||
}
|
||||
Grid.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new Test(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/lazyforeach/lazyforeach", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/lazyforeach/lazyforeach", integratedHsp: "false" });
|
||||
//# sourceMappingURL=lazyforeach.js.map
|
@ -0,0 +1,199 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class ClassA {
|
||||
constructor(message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
class HomeComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU([0, 1, 2, 3, 4], this, "arr");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.height(500);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Repeat(this.arr, this).each((obj) => {
|
||||
{
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
if (isInitialRender) {
|
||||
let componentCall = new ChildComponent(this, {}, undefined, elmtId, () => { }, { page: "test/transform_ut/application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/repeat/repeat.ets", line: 17, col: 11 });
|
||||
ViewPU.create(componentCall);
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
componentCall.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
}, { name: "ChildComponent" });
|
||||
}
|
||||
})
|
||||
.key((item, index) => {
|
||||
return JSON.stringify(item) + JSON.stringify(index);
|
||||
}).render(isInitialRender);
|
||||
}, Repeat);
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "HomeComponent";
|
||||
}
|
||||
}
|
||||
class ChildComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU([new ClassA('0'), new ClassA('1'), new ClassA('2')], this, "arr");
|
||||
this.count = 0;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.height(500);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Repeat(this.arr, this).onMove((from, to) => {
|
||||
this.count += 1;
|
||||
})
|
||||
.each((obj) => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(obj.item.message);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
}).render(isInitialRender);
|
||||
}, Repeat);
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
class ChildComponent2 extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU([new ClassA('0'), new ClassA('1'), new ClassA('2')], this, "arr");
|
||||
this.count = 0;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
List.height(500);
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Repeat(this.arr, this).each((obj) => {
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(obj.item.message);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
}).render(isInitialRender);
|
||||
}, Repeat);
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
registerNamedRoute(() => new HomeComponent(undefined, {}), "", { bundleName: "com.example.application", moduleName: "application", pagePath: "pages/utForPartialUpdate/inner_component_transform/render_component/repeat/repeat", pageFullPath: "application/entry/src/main/ets/pages/utForPartialUpdate/inner_component_transform/render_component/repeat/repeat", integratedHsp: "false" });
|
||||
//# sourceMappingURL=repeat.js.map
|
@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
let VehicleData = class VehicleData {
|
||||
constructor(name, price) {
|
||||
this.name = name;
|
||||
this.price = price;
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
Trace
|
||||
], VehicleData.prototype, "name", void 0);
|
||||
__decorate([
|
||||
Trace
|
||||
], VehicleData.prototype, "price", void 0);
|
||||
VehicleData = __decorate([
|
||||
ObservedV2
|
||||
], VehicleData);
|
||||
let VehicleDB = class VehicleDB {
|
||||
constructor() {
|
||||
this.vehicleItems = [];
|
||||
}
|
||||
};
|
||||
VehicleDB = __decorate([
|
||||
ObservedV2
|
||||
], VehicleDB);
|
||||
class entryCompSucc extends ViewV2 {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) {
|
||||
super(parent, elmtId, extraInfo);
|
||||
this.vehicleItems = new VehicleDB().vehicleItems;
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Repeat(this.vehicleItems, this).template('default', (ri) => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('11111111111');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
}, { cachedCount: 5 })
|
||||
.each((ri) => {
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
ListItem.border({ width: 1 });
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create("Wrong");
|
||||
}, Text);
|
||||
Text.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
})
|
||||
.key((item, index) => 'index').render(isInitialRender);
|
||||
}, Repeat);
|
||||
List.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
static getEntryName() {
|
||||
return "entryCompSucc";
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
Local
|
||||
], entryCompSucc.prototype, "vehicleItems", void 0);
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new entryCompSucc(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class ClassA {
|
||||
constructor(message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
class ChildComponent extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__arr = new ObservedPropertyObjectPU([new ClassA('0'), new ClassA('1'), new ClassA('2')], this, "arr");
|
||||
this.count = 0;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.arr !== undefined) {
|
||||
this.arr = params.arr;
|
||||
}
|
||||
if (params.count !== undefined) {
|
||||
this.count = params.count;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__arr.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__arr.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
get arr() {
|
||||
return this.__arr.get();
|
||||
}
|
||||
set arr(newValue) {
|
||||
this.__arr.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
List.create();
|
||||
List.height(500);
|
||||
}, List);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Repeat(this.arr, this).each((obj) => {
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(obj.item.message);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
})
|
||||
.key((item) => {
|
||||
return JSON.stringify(item);
|
||||
})
|
||||
.virtualScroll({ totalCount: this.arr.length })
|
||||
.templateId((item, index) => {
|
||||
return index.toString();
|
||||
})
|
||||
.template('1', (obj) => {
|
||||
{
|
||||
const itemCreation2 = (elmtId, isInitialRender) => {
|
||||
ListItem.create(() => { }, false);
|
||||
};
|
||||
const observedDeepRender = () => {
|
||||
this.observeComponentCreation2(itemCreation2, ListItem);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create(obj.item.message);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
ListItem.pop();
|
||||
};
|
||||
observedDeepRender();
|
||||
}
|
||||
}).render(isInitialRender);
|
||||
}, Repeat);
|
||||
List.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new ChildComponent(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
exports.source = `
|
||||
@Entry
|
||||
@Component
|
||||
struct TabSimple {
|
||||
private controller: TabsController = new TabsController();
|
||||
build() {
|
||||
Column() {
|
||||
Tabs({ barPosition: BarPosition.Start, index: 1, controller: this.controller}) {
|
||||
TabContent() {
|
||||
Flex() {
|
||||
Column() {
|
||||
Text('text1')
|
||||
.height(100)
|
||||
.width(200)
|
||||
Text('xxx')
|
||||
.height(100)
|
||||
.width(200)
|
||||
}
|
||||
.height(100)
|
||||
.width(200)
|
||||
}
|
||||
.height(100)
|
||||
.width(200)
|
||||
}
|
||||
.tabBar("TabBar")
|
||||
.height(100)
|
||||
.width(200)
|
||||
TabContent() {
|
||||
Text('text2')
|
||||
}
|
||||
.tabBar("TabBar 2")
|
||||
.height(100)
|
||||
.width(200)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
exports.expectResult =
|
||||
`"use strict";
|
||||
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
||||
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
||||
}
|
||||
class TabSimple extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
||||
super(parent, __localStorage, elmtId, extraInfo);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.controller = new TabsController();
|
||||
this.setInitiallyProvidedValue(params);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
setInitiallyProvidedValue(params) {
|
||||
if (params.controller !== undefined) {
|
||||
this.controller = params.controller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Tabs.create({ barPosition: BarPosition.Start, index: 1, controller: this.controller });
|
||||
}, Tabs);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TabContent.create(() => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Flex.create();
|
||||
Flex.height(100);
|
||||
Flex.width(200);
|
||||
}, Flex);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Column.create();
|
||||
Column.height(100);
|
||||
Column.width(200);
|
||||
}, Column);
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('text1');
|
||||
Text.height(100);
|
||||
Text.width(200);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('xxx');
|
||||
Text.height(100);
|
||||
Text.width(200);
|
||||
}, Text);
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
Flex.pop();
|
||||
});
|
||||
TabContent.tabBar("TabBar");
|
||||
TabContent.height(100);
|
||||
TabContent.width(200);
|
||||
}, TabContent);
|
||||
TabContent.pop();
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
TabContent.create(() => {
|
||||
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
||||
Text.create('text2');
|
||||
}, Text);
|
||||
Text.pop();
|
||||
});
|
||||
TabContent.tabBar("TabBar 2");
|
||||
TabContent.height(100);
|
||||
TabContent.width(200);
|
||||
}, TabContent);
|
||||
TabContent.pop();
|
||||
Tabs.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new TabSimple(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
`
|
@ -0,0 +1,43 @@
|
||||
import { CustomDialogExample1 as CustomDialogExample } from '../../../test/import@CustomDialog'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct CustomDialogUser {
|
||||
@State textValue: string = ''
|
||||
@State inputValue: string = 'click me'
|
||||
dialogController: CustomDialogController = new CustomDialogController({
|
||||
builder: CustomDialogExample({
|
||||
cancel: this.onCancel,
|
||||
confirm: this.onAccept,
|
||||
textValue: $textValue,
|
||||
inputValue: $inputValue
|
||||
}),
|
||||
cancel: this.existApp,
|
||||
autoCancel: true,
|
||||
alignment: DialogAlignment.Default,
|
||||
offset: { dx: 0, dy: -20 },
|
||||
gridCount: 4,
|
||||
customStyle: false
|
||||
})
|
||||
|
||||
onCancel() {
|
||||
console.info('Callback when the first button is clicked')
|
||||
}
|
||||
|
||||
onAccept() {
|
||||
console.info('Callback when the second button is clicked')
|
||||
}
|
||||
|
||||
existApp() {
|
||||
console.info('Click the callback in the blank area')
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Button(this.inputValue)
|
||||
.onClick(() => {
|
||||
this.dialogController.open()
|
||||
}).backgroundColor(0x317aff)
|
||||
}.width('100%').margin({ top: 5 })
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
import { ClassB as ClassA } from '../../../test/import@Observed'
|
||||
@Component
|
||||
struct ViewA {
|
||||
label: string = 'ViewA1'
|
||||
@ObjectLink a: ClassA
|
||||
|
||||
build() {
|
||||
Row() {
|
||||
Button('ViewA'+ JSON.stringify(this.label) + 'this.a.c='+JSON.stringify(this.a.c))
|
||||
.onClick(() => {
|
||||
this.a.c += 1
|
||||
})
|
||||
}.margin({ top: 10 })
|
||||
}
|
||||
}
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct ViewB {
|
||||
@State arrA: ClassA[] = [new ClassA(0), new ClassA(0)]
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
ForEach(this.arrA, (item) => {
|
||||
ViewA({ label: JSON.stringify(item.id), a: item })
|
||||
}, (item) => item.id.toString())
|
||||
ViewA({ label: JSON.stringify(this.arrA[0]), a: this.arrA[0] })
|
||||
ViewA({ label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1] })
|
||||
|
||||
Button('ViewB: reset array')
|
||||
.margin({ top: 10 })
|
||||
.onClick(() => {
|
||||
this.arrA = [new ClassA(0), new ClassA(0)]
|
||||
})
|
||||
Button('ViewB: push')
|
||||
.margin({ top: 10 })
|
||||
.onClick(() => {
|
||||
this.arrA.push(new ClassA(0))
|
||||
})
|
||||
Button('ViewB: shift')
|
||||
.margin({ top: 10 })
|
||||
.onClick(() => {
|
||||
this.arrA.shift()
|
||||
})
|
||||
}.width('100%')
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
import * as AllComponent from '../../../test/NamespaceComponent'
|
||||
import TsModule from '../../../test/TsModule'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct ImportTest {
|
||||
@State myState1: any = new TsModule(1).method()
|
||||
@State myState2: number = 0
|
||||
@State myState3: boolean = false
|
||||
@State myState4: string = 'ImportTest'
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
AllComponent.NamespaceComponent1({
|
||||
NamespaceComponent1Link1: $myState1,
|
||||
NamespaceComponent1Link2: $myState2,
|
||||
NamespaceComponent1Link3: $myState3,
|
||||
NamespaceComponent1Link4: $myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
})
|
||||
AllComponent.NamespaceComponent1({
|
||||
NamespaceComponent1Link1: $myState1,
|
||||
NamespaceComponent1Link2: $myState2,
|
||||
NamespaceComponent1Link3: $myState3,
|
||||
NamespaceComponent1Link4: $myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
})
|
||||
.width(100)
|
||||
AllComponent.default({
|
||||
NamespaceComponent3Link1: $myState1,
|
||||
NamespaceComponent3Link2: $myState2,
|
||||
NamespaceComponent3Link3: $myState3,
|
||||
NamespaceComponent3Link4: $myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
})
|
||||
AllComponent.default({
|
||||
NamespaceComponent3Link1: $myState1,
|
||||
NamespaceComponent3Link2: $myState2,
|
||||
NamespaceComponent3Link3: $myState3,
|
||||
NamespaceComponent3Link4: $myState4,
|
||||
myVar: 100,
|
||||
myVar2: 80
|
||||
})
|
||||
.height(200)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
import
|
||||
LinkComponentDefault, {
|
||||
LinkComponent as LinkComponent1Ref,
|
||||
LinkComponent2 as LinkComponent2Ref,
|
||||
LinkComponent3
|
||||
} from '../../../test/LinkComponent'
|
||||
import DefaultComponent from "../../../test/DefaultComponent"
|
||||
import AMDComponentDefault from '../../../test/AMDComponent'
|
||||
import TsModule from '../../../test/TsModule'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct ImportTest {
|
||||
@State myState1: any = new TsModule(1).method()
|
||||
@State myState2: number = 0
|
||||
@State myState3: boolean = false
|
||||
@State myState4: string = 'ImportTest'
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
LinkComponent2Ref({
|
||||
LinkComponent2Link1: $myState1,
|
||||
LinkComponent2Link2: $myState2,
|
||||
LinkComponent2Link3: $myState3,
|
||||
LinkComponent2Link4: $myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent2'
|
||||
})
|
||||
Text('space')
|
||||
.fontSize(20)
|
||||
.fontColor(Color.Red)
|
||||
LinkComponent1Ref({
|
||||
LinkComponent1Link1: $myState1,
|
||||
LinkComponent1Link2: $myState2,
|
||||
LinkComponent1Link3: $myState3,
|
||||
LinkComponent1Link4: $myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
})
|
||||
DefaultComponent({
|
||||
DefaultComponentLink1: $myState1,
|
||||
DefaultComponentLink2: $myState2,
|
||||
DefaultComponentLink3: $myState3,
|
||||
DefaultComponentLink4: $myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
})
|
||||
LinkComponentDefault({
|
||||
LinkComponent3Link1: $myState1,
|
||||
LinkComponent3Link2: $myState2,
|
||||
LinkComponent3Link3: $myState3,
|
||||
LinkComponent3Link4: $myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent3'
|
||||
})
|
||||
AMDComponentDefault({
|
||||
AMDComponentLink1: $myState1,
|
||||
AMDComponentLink2: $myState2,
|
||||
AMDComponentLink3: $myState3,
|
||||
AMDComponentLink4: $myState4,
|
||||
myVar: 100,
|
||||
myVar2: 100
|
||||
})
|
||||
LinkComponent3({
|
||||
LinkComponent3Link1: $myState1,
|
||||
LinkComponent3Link2: $myState2,
|
||||
LinkComponent3Link3: $myState3,
|
||||
LinkComponent3Link4: $myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'LinkComponent1'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
import { AllStarComponent } from '../../../test/ExportStarComponent'
|
||||
import TsModule from '../../../test/TsModule'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct ImportTest {
|
||||
@State myState1: any = new TsModule(1).method()
|
||||
@State myState2: number = 0
|
||||
@State myState3: boolean = false
|
||||
@State myState4: string = 'ImportTest'
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
AllStarComponent.ExportComponent({
|
||||
ExportComponent1Link1: $myState1,
|
||||
ExportComponent1Link2: $myState2,
|
||||
ExportComponent1Link3: $myState3,
|
||||
ExportComponent1Link4: $myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent1'
|
||||
})
|
||||
AllStarComponent.default({
|
||||
ExportComponent4Link1: $myState1,
|
||||
ExportComponent4Link2: $myState2,
|
||||
ExportComponent4Link3: $myState3,
|
||||
ExportComponent4Link4: $myState4,
|
||||
indexState1: { count: 1 },
|
||||
indexState2: 1,
|
||||
indexState3: true,
|
||||
indexState4: 'ExportComponent4'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
import { tExtend, tStyles, DivideTest, Base } from '../../../test/ImportNestAll';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct ImportTest {
|
||||
@State testText1: string = 'Hello'
|
||||
@State testText2: string = 'World'
|
||||
@State testText3: string = 'Test'
|
||||
@State testText4: string = 'Component'
|
||||
|
||||
@State testState1: string = 'Base'
|
||||
@State testState2: number = 0
|
||||
@State testState3: object = { name: 'Base' }
|
||||
@State testState4: number = 3
|
||||
@State testState5: number = 10
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Text(this.testText1)
|
||||
.fontSize(50)
|
||||
tExtend(20)
|
||||
Text(this.testText2)
|
||||
tStyles()
|
||||
Button(this.testText3)
|
||||
Text(this.testText4)
|
||||
.fontSize(50)
|
||||
|
||||
Base({
|
||||
testStr: $testState1,
|
||||
testNum: $testState2,
|
||||
testObj: $testState3
|
||||
})
|
||||
DivideTest({
|
||||
testNum1: $testState4,
|
||||
testNum2: $testState5
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
import router from "@system.router";
|
||||
import app from "@system.router";
|
||||
import fetch from "@system.fetch";
|
||||
|
||||
import http from '@ohos.net.http';
|
||||
|
||||
import hello from 'libhello.so';
|
||||
|
||||
class A{
|
||||
pushPage() {
|
||||
router.push({
|
||||
uri: 'pages/routerpage2/routerpage2',
|
||||
params: {
|
||||
data1: 'message',
|
||||
data2: {
|
||||
data3: [123, 456, 789]
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class Info {
|
||||
getInfo() {
|
||||
let info = app.getInfo()
|
||||
console.log(JSON.stringify(info))
|
||||
}
|
||||
}
|
||||
|
||||
const json = {
|
||||
data: {
|
||||
responseData: 'NA',
|
||||
url: "test_url",
|
||||
},
|
||||
fetch: function () {
|
||||
var that = this;
|
||||
fetch.fetch({
|
||||
url: that.url,
|
||||
success: function(response) {
|
||||
console.info("fetch success");
|
||||
that.responseData = JSON.stringify(response);
|
||||
},
|
||||
fail: function() {
|
||||
console.info("fetch fail");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let httpRequest = http.createHttp();
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user