From 0a46e9607f4b86e4521b28ad54a746642fb2f515 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Fri, 24 Jan 2025 18:09:14 +0300 Subject: [PATCH 1/7] Propagate struct call builder to the topmost component Signed-off-by: Alexander Gorshenev --- arkoala/ets-plugin/src/StructTransformer.ts | 65 ++++++++++++++++++++- arkoala/ets-plugin/src/utils.ts | 13 ++++- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index c115d0069..faa5396e5 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -25,6 +25,7 @@ import { adaptorEtsParameterName, backingField, backingFieldName, + buildBuilderArgument, CallTable, collect, consumeVariableName, @@ -48,6 +49,7 @@ import { isState, isStructCall, LocalStoragePropertyName, + mangle, mangleIfBuild, NameTable, prependDoubleLineMemoComment, @@ -319,6 +321,64 @@ export class StructTransformer extends AbstractVisitor { return statements } + propagateStructBuilder(node: ts.Block | undefined): ts.Block | undefined { + if (!node) return undefined + if (!node.statements || node.statements.length == 0) return node + if (node.statements.length > 1) { + // TODO: May be issue a diagnostings? + return node + } + const singleStatement = node.statements[0] + if (!singleStatement || !ts.isExpressionStatement(singleStatement)) return node + if (!ts.isCallExpression(singleStatement.expression)) return node + + const callExpression = singleStatement.expression + if (!callExpression.arguments?.[0]) return node + const firstArgument = callExpression.arguments[0] + + let newFirstArgument + if (isUndefined(firstArgument)) { + newFirstArgument = id(buildBuilderArgument()) + } else { + + ts.factory.createArrowFunction( + undefined, + undefined, + [ts.factory.createParameterDeclaration(undefined, undefined, id(mangle("outer_instance")), undefined, undefined, undefined)], + undefined, + ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), + ts.factory.createBlock( + [ + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + + ) + ) + ] + ) + ) + } + + return ts.factory.updateBlock( + node, + [ + ts.factory.updateExpressionStatement( + singleStatement, + ts.factory.updateCallExpression( + callExpression, + callExpression.expression, + callExpression.typeArguments, + [ + id(buildBuilderArgument()), + ...callExpression.arguments.slice(1) + ] + ) + ) + ] + ) + + } + translateBuilder(node: ts.StructDeclaration, propertyTranslators: PropertyTranslator[], member: ts.ClassElement, isMainBuild: boolean): ts.MethodDeclaration { if (!ts.isMethodDeclaration(member)) { throw new Error("Expected member declaration, got: " + ts.SyntaxKind[member.kind]) @@ -329,7 +389,7 @@ export class StructTransformer extends AbstractVisitor { const stateParameters = isMainBuild ? [ prependDoubleLineMemoComment( parameter( - "builder", + buildBuilderArgument(), orUndefined( ts.factory.createFunctionTypeNode( undefined, @@ -360,6 +420,7 @@ export class StructTransformer extends AbstractVisitor { ) ] : [] + const newBody = isMainBuild ? this.propagateStructBuilder(member.body) : member.body const newMethod = ts.factory.updateMethodDeclaration( member, dropBuilder(member.modifiers), @@ -372,7 +433,7 @@ export class StructTransformer extends AbstractVisitor { ...member.parameters ], member.type, - member.body + newBody ) return prependMemoComment(newMethod) } diff --git a/arkoala/ets-plugin/src/utils.ts b/arkoala/ets-plugin/src/utils.ts index 80cddeed8..8f520474c 100644 --- a/arkoala/ets-plugin/src/utils.ts +++ b/arkoala/ets-plugin/src/utils.ts @@ -135,7 +135,7 @@ export function mangleIfBuild(name: ts.PropertyName): ts.PropertyName { if (!ts.isIdentifier(name)) return name const stringName = ts.idText(name) if (stringName === "build") { - return id("_build") + return id(mangle("build")) } else { return name } @@ -189,7 +189,7 @@ export function parameterName(original: string): string { } export function backingField(originalName: string): string { - return `__backing_${originalName}` + return mangle(`backing_${originalName}`) } export function backingFieldName(originalName: ts.Identifier | ts.PrivateIdentifier): ts.Identifier { @@ -560,3 +560,12 @@ export function assertUnreachable(...args: never): never { export function throwError(message: string): never { throw new Error(message) } + +// Produce a name outside of user space +export function mangle(value: string): string { + return `__${value}` +} + +export function buildBuilderArgument(): string { + return mangle("builder") +} \ No newline at end of file -- Gitee From 92b3832102e683018c94cb4ec1d41463b5363ad0 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Mon, 27 Jan 2025 20:16:06 +0300 Subject: [PATCH 2/7] More Signed-off-by: Alexander Gorshenev --- arkoala-arkts/arkui/src/ArkStructBase.ts | 14 +++---- arkoala-arkts/user/src/ets/page1.ets | 14 ++++++- arkoala/ets-plugin/mocharc.arkoala.ets.json | 5 ++- arkoala/ets-plugin/mocharc.arkoala.spec.json | 5 ++- arkoala/ets-plugin/mocharc.arkts.ets.json | 5 ++- arkoala/ets-plugin/mocharc.arkts.spec.json | 5 ++- arkoala/ets-plugin/mocharc.koala.ets.json | 5 ++- arkoala/ets-plugin/mocharc.koala.spec.json | 5 ++- arkoala/ets-plugin/src/StructTransformer.ts | 43 ++++++++++++-------- arkoala/ets-plugin/src/StyleTransformer.ts | 13 ++++-- arkoala/ets-plugin/src/utils.ts | 17 ++++---- 11 files changed, 88 insertions(+), 43 deletions(-) diff --git a/arkoala-arkts/arkui/src/ArkStructBase.ts b/arkoala-arkts/arkui/src/ArkStructBase.ts index 72dd3be5f..5c40d5e86 100644 --- a/arkoala-arkts/arkui/src/ArkStructBase.ts +++ b/arkoala-arkts/arkui/src/ArkStructBase.ts @@ -1,6 +1,7 @@ import { remember } from "@koalaui/runtime" import { ArkCustomComponentImpl } from "./ArkCustomComponent"; import { ArkComponentRoot } from "./ArkComponentRoot"; +import { ArkCommonMethodComponent } from "./generated"; /** base class for user's structs */ export abstract class ArkStructBase extends ArkCustomComponentImpl { @@ -11,12 +12,12 @@ export abstract class ArkStructBase extends ArkCustomComponentImpl /** @memo */ static _instantiate, T_Options>( /** @memo */ - attributes: undefined | ((instance: T) => void), + attributes: undefined | ((instance: ArkCommonMethodComponent) => void), factory: () => T, /** @memo */ arg1?: () => void, arg2?: T_Options - ): T { + ): void { console.log("_instantiate()") const receiver = remember(() => { const instance = factory(); @@ -24,7 +25,6 @@ export abstract class ArkStructBase extends ArkCustomComponentImpl return instance; }); receiver._buildWrapper(attributes, arg1, arg2); - return receiver; } protected __initializeStruct( @@ -38,7 +38,7 @@ export abstract class ArkStructBase extends ArkCustomComponentImpl /** @memo */ _buildWrapper( /** @memo */ - attributes: undefined | ((instance: T) => void), + attributes: undefined | ((instance: ArkCommonMethodComponent) => void), /** @memo */ content?: () => void, initializers?: T_Options @@ -47,14 +47,14 @@ export abstract class ArkStructBase extends ArkCustomComponentImpl ArkComponentRoot(this, () => { this.__updateStruct(initializers) - this._build(attributes, content, initializers) + this.__build(attributes, content, initializers) }) } /** @memo */ - abstract _build( + abstract __build( /** @memo */ - attributes: undefined | ((instance: T) => void), + attributes: undefined | ((instance: ArkCommonMethodComponent) => void), /** @memo */ content?: () => void, initializers?: T_Options diff --git a/arkoala-arkts/user/src/ets/page1.ets b/arkoala-arkts/user/src/ets/page1.ets index 67e7cf8eb..66d1dab29 100644 --- a/arkoala-arkts/user/src/ets/page1.ets +++ b/arkoala-arkts/user/src/ets/page1.ets @@ -49,6 +49,17 @@ struct TestProvide { } } +@Component +struct TestStructBuilder { + build() { + Column() { + Button("struct builder test") + } + .backgroundColor(Color.Yellow) + .width('50%') + } +} + @Component struct Page1 { @State color1: string = '#ff0000' @@ -75,6 +86,7 @@ struct Page1 { Text("Set Button onClick! #" + this.state) .width(200).height(100) TestProvide() + TestStructBuilder().width('100%') } .width('100%').height('100%') .backgroundColor(Color.Gray) @@ -87,4 +99,4 @@ struct Page1 { this.color1 = this.color2 this.color2 = tmp } -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/mocharc.arkoala.ets.json b/arkoala/ets-plugin/mocharc.arkoala.ets.json index bd294465d..83b6d0ebe 100644 --- a/arkoala/ets-plugin/mocharc.arkoala.ets.json +++ b/arkoala/ets-plugin/mocharc.arkoala.ets.json @@ -7,5 +7,8 @@ "exclude": "./test/specification/**/*", "require": [ "../../incremental/test-utils/scripts/register" + ], + "reporterOptions": [ + "maxDiffSize=0" ] -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/mocharc.arkoala.spec.json b/arkoala/ets-plugin/mocharc.arkoala.spec.json index 534b2fa53..3d44f4375 100644 --- a/arkoala/ets-plugin/mocharc.arkoala.spec.json +++ b/arkoala/ets-plugin/mocharc.arkoala.spec.json @@ -7,5 +7,8 @@ "exclude": "./test/specification/**/*", "require": [ "../../incremental/test-utils/scripts/register" + ], + "reporterOptions": [ + "maxDiffSize=0" ] -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/mocharc.arkts.ets.json b/arkoala/ets-plugin/mocharc.arkts.ets.json index 94b161e2d..379d6f305 100644 --- a/arkoala/ets-plugin/mocharc.arkts.ets.json +++ b/arkoala/ets-plugin/mocharc.arkts.ets.json @@ -7,5 +7,8 @@ "exclude": "./test/specification/**/*", "require": [ "../../incremental/test-utils/scripts/register" + ], + "reporterOptions": [ + "maxDiffSize=0" ] -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/mocharc.arkts.spec.json b/arkoala/ets-plugin/mocharc.arkts.spec.json index 91d51a347..cc0a73558 100644 --- a/arkoala/ets-plugin/mocharc.arkts.spec.json +++ b/arkoala/ets-plugin/mocharc.arkts.spec.json @@ -7,5 +7,8 @@ "exclude": "./test/specification/**/*", "require": [ "../../incremental/test-utils/scripts/register" + ], + "reporterOptions": [ + "maxDiffSize=0" ] -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/mocharc.koala.ets.json b/arkoala/ets-plugin/mocharc.koala.ets.json index 4c84ac8a6..837b9c035 100644 --- a/arkoala/ets-plugin/mocharc.koala.ets.json +++ b/arkoala/ets-plugin/mocharc.koala.ets.json @@ -7,5 +7,8 @@ "exclude": "./test/specification/**/*", "require": [ "../../incremental/test-utils/scripts/register" + ], + "reporterOptions": [ + "maxDiffSize=0" ] -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/mocharc.koala.spec.json b/arkoala/ets-plugin/mocharc.koala.spec.json index 67bedc94b..26ab5f3ac 100644 --- a/arkoala/ets-plugin/mocharc.koala.spec.json +++ b/arkoala/ets-plugin/mocharc.koala.spec.json @@ -7,5 +7,8 @@ "exclude": "./test/specification/**/*", "require": [ "../../incremental/test-utils/scripts/register" + ], + "reporterOptions": [ + "maxDiffSize=0" ] -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index faa5396e5..eff6bf0fb 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -22,12 +22,12 @@ import { adaptorClassName, adaptorComponentName, adaptorEtsName, - adaptorEtsParameterName, backingField, backingFieldName, buildBuilderArgument, CallTable, collect, + commonMethodComponentType, consumeVariableName, contextLocalStateOf, customDialogImplName, @@ -56,6 +56,7 @@ import { prependMemoComment, provideVariableName, RewriteNames, + styleInstanceId, throwError, voidLambdaType, WatchDecorator @@ -87,7 +88,7 @@ import { StructOptions } from "./StructOptions" function parameterNameIdentifier(name: ts.LeftHandSideExpression): ts.Identifier { if (ts.isIdentifier(name)) { - const newName = adaptorEtsParameterName(name) + const newName = styleInstanceId() return newName } else { throw new Error("expected ETS name to be an Identifier, got: " + ts.SyntaxKind[name.kind]) @@ -332,29 +333,38 @@ export class StructTransformer extends AbstractVisitor { if (!singleStatement || !ts.isExpressionStatement(singleStatement)) return node if (!ts.isCallExpression(singleStatement.expression)) return node + // TODO: check this is a builtin component call!! + const callExpression = singleStatement.expression if (!callExpression.arguments?.[0]) return node const firstArgument = callExpression.arguments[0] + if (!ts.isArrowFunction(firstArgument)) return node + const firstArgumentBody = firstArgument.body + let newFirstArgument if (isUndefined(firstArgument)) { newFirstArgument = id(buildBuilderArgument()) } else { - - ts.factory.createArrowFunction( + newFirstArgument = ts.factory.createArrowFunction( undefined, undefined, - [ts.factory.createParameterDeclaration(undefined, undefined, id(mangle("outer_instance")), undefined, undefined, undefined)], + [ts.factory.createParameterDeclaration(undefined, undefined, styleInstanceId(), undefined, undefined, undefined)], undefined, ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), ts.factory.createBlock( [ + ts.isBlock(firstArgumentBody) ? firstArgumentBody : ts.factory.createExpressionStatement(firstArgumentBody), ts.factory.createExpressionStatement( - ts.factory.createCallExpression( - + ts.factory.createCallChain( + id(buildBuilderArgument()), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + undefined, + [styleInstanceId()] ) ) - ] + ], + true // multiline ) ) } @@ -369,7 +379,7 @@ export class StructTransformer extends AbstractVisitor { callExpression.expression, callExpression.typeArguments, [ - id(buildBuilderArgument()), + newFirstArgument, ...callExpression.arguments.slice(1) ] ) @@ -384,8 +394,6 @@ export class StructTransformer extends AbstractVisitor { throw new Error("Expected member declaration, got: " + ts.SyntaxKind[member.kind]) } - const className = adaptorClassName(node.name!) - const stateParameters = isMainBuild ? [ prependDoubleLineMemoComment( parameter( @@ -395,8 +403,8 @@ export class StructTransformer extends AbstractVisitor { undefined, [ parameter( - id("instance"), - ts.factory.createTypeReferenceNode(className), + styleInstanceId(), + commonMethodComponentType(this.importer), ) ], Void() @@ -571,7 +579,7 @@ export class StructTransformer extends AbstractVisitor { ) ) - const callInstantiate = ts.factory.createReturnStatement( + const callInstantiate = ts.factory.createExpressionStatement( ts.factory.createCallExpression( ts.factory.createPropertyAccessExpression( className, @@ -607,9 +615,9 @@ export class StructTransformer extends AbstractVisitor { [ts.factory.createParameterDeclaration( undefined, undefined, - ts.factory.createIdentifier("instance"), + styleInstanceId(), undefined, - ts.factory.createTypeReferenceNode(className), + commonMethodComponentType(this.importer), undefined )], ts.factory.createKeywordTypeNode(ts.SyntaxKind.VoidKeyword) @@ -627,7 +635,8 @@ export class StructTransformer extends AbstractVisitor { this.structOptions.createTypeReference(node), ) ], - ts.factory.createTypeReferenceNode(className), + //ts.factory.createTypeReferenceNode(className), + Void(), ts.factory.createBlock( [ ...additionalStatements, diff --git a/arkoala/ets-plugin/src/StyleTransformer.ts b/arkoala/ets-plugin/src/StyleTransformer.ts index 52e25b300..169a8b0c6 100644 --- a/arkoala/ets-plugin/src/StyleTransformer.ts +++ b/arkoala/ets-plugin/src/StyleTransformer.ts @@ -25,7 +25,7 @@ import { isUndefined, undefinedValue } from './ApiUtils' -import { CallTable, extendsLikeFunctionName, isBuilderLambdaCall, isBuiltinComponentName, RewriteNames } from './utils' +import { CallTable, extendsLikeFunctionName, isBuilderLambdaCall, isBuiltinComponentName, isStructCall, RewriteNames, styleInstanceId } from './utils' enum ExtensionStyleRewrite { Regular, @@ -114,7 +114,7 @@ export class StyleTransformer extends AbstractVisitor { const newDot = ts.factory.updatePropertyAccessExpression( dot, - firstEtsArgOrUndefined ?? id("instance"), + firstEtsArgOrUndefined ?? styleInstanceId(), styleApplicatorOrOriginalPropertyName ) @@ -214,7 +214,9 @@ export class StyleTransformer extends AbstractVisitor { if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) && ts.isCallExpression(node.expression.expression) && - isBuilderLambdaCall(this.callTable, node.expression.expression)) { + (isBuilderLambdaCall(this.callTable, node.expression.expression) || + isStructCall(this.callTable, node.expression.expression)) + ) { const dot = node.expression const call = node.expression.expression return this.transformEtsComponent(node, dot, call, call.expression as ts.Identifier, call.arguments, false) @@ -247,7 +249,10 @@ export class EtsFirstArgTransformer extends AbstractVisitor { casted.body ) } - if (ts.isCallExpression(node) && isBuilderLambdaCall(this.callTable, node)) { + if (ts.isCallExpression(node) && + (isBuilderLambdaCall(this.callTable, node) || + isStructCall(this.callTable, node)) + ) { return ts.factory.updateCallExpression( node, node.expression, diff --git a/arkoala/ets-plugin/src/utils.ts b/arkoala/ets-plugin/src/utils.ts index 8f520474c..9d05e72c2 100644 --- a/arkoala/ets-plugin/src/utils.ts +++ b/arkoala/ets-plugin/src/utils.ts @@ -42,6 +42,7 @@ export const StylesDecorator = "Styles" export const ExtendDecorator = "Extend" export const AnimatableExtendDecorator = "AnimatableExtend" export const ArkCommonMethodInterface = "ArkCommonMethodInterface" +export const ArkCommonMethodComponent = "ArkCommonMethodComponent" export const T_TypeParameter = "T" export const CommonInstance = "CommonInstance" export const Instance = "Instance" @@ -184,10 +185,6 @@ export function etsAttributeName(original: string): string { return attribute.startsWith("Lazy") ? attribute.substring(4) : attribute } -export function parameterName(original: string): string { - return "instance" -} - export function backingField(originalName: string): string { return mangle(`backing_${originalName}`) } @@ -200,10 +197,6 @@ export function adaptorEtsName(name: ts.Identifier): ts.Identifier { return id(adaptorName(ts.idText(name))) } -export function adaptorEtsParameterName(name: ts.Identifier): ts.Identifier { - return id(parameterName(ts.idText(name))) -} - export function adaptorEtsAttributeName(name: ts.Identifier): ts.Identifier { return id(etsAttributeName(ts.idText(name))) } @@ -568,4 +561,12 @@ export function mangle(value: string): string { export function buildBuilderArgument(): string { return mangle("builder") +} + +export function styleInstanceId(): ts.Identifier { + return id(mangle("instance")) +} + +export function commonMethodComponentType(importer: Importer): ts.TypeReferenceNode { + return ts.factory.createTypeReferenceNode(importer.withAdaptorImport(ArkCommonMethodComponent)) } \ No newline at end of file -- Gitee From 40277ba5dc7077134d9f0d3a8effb03eb228755a Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Tue, 28 Jan 2025 12:31:20 +0300 Subject: [PATCH 3/7] more Signed-off-by: Alexander Gorshenev --- arkoala/ets-plugin/src/StructTransformer.ts | 28 ++++++++++----------- arkoala/ets-plugin/src/utils.ts | 4 +++ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index eff6bf0fb..7d7957182 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -27,6 +27,7 @@ import { buildBuilderArgument, CallTable, collect, + commonMethodComponentId, commonMethodComponentType, consumeVariableName, contextLocalStateOf, @@ -1004,24 +1005,23 @@ export class StructTransformer extends AbstractVisitor { ) } - transformStructCall(node: ts.CallExpression): ts.CallExpression { - if (node.arguments.length > 1) { - throwError(`Struct call expected to have no more than one argument: ${ - ts.idText(asIdentifier(node.expression)) - }`) - } + addCastTpInitializer(node: ts.CallExpression, originalInitializer: ts.Expression): ts.Expression|undefined { + if (!originalInitializer) return undefined + if (isUndefined(originalInitializer)) return originalInitializer - const initializer = node.arguments.length === 1 - ? ts.factory.createAsExpression( - node.arguments[0], - this.structOptions.createTypeReference( - asIdentifier(node.expression) - ) + return ts.factory.createAsExpression( + originalInitializer, + this.structOptions.createTypeReference( + asIdentifier(node.expression) ) - : undefined + ) + } + + transformStructCall(node: ts.CallExpression): ts.CallExpression { + let initializer = this.addCastTpInitializer(node, node.arguments[1]) const newArguments = [ - undefinedValue(), + this.createInstanceLambda(node, commonMethodComponentId(this.importer)), undefinedValue(), initializer ].filter(isDefined) diff --git a/arkoala/ets-plugin/src/utils.ts b/arkoala/ets-plugin/src/utils.ts index 9d05e72c2..a890c35f7 100644 --- a/arkoala/ets-plugin/src/utils.ts +++ b/arkoala/ets-plugin/src/utils.ts @@ -567,6 +567,10 @@ export function styleInstanceId(): ts.Identifier { return id(mangle("instance")) } +export function commonMethodComponentId(importer: Importer): ts.Identifier { + return id(importer.withAdaptorImport(ArkCommonMethodComponent)) +} + export function commonMethodComponentType(importer: Importer): ts.TypeReferenceNode { return ts.factory.createTypeReferenceNode(importer.withAdaptorImport(ArkCommonMethodComponent)) } \ No newline at end of file -- Gitee From c91f51db9a6839f48158bacde56b6163c142af93 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Tue, 28 Jan 2025 13:59:17 +0300 Subject: [PATCH 4/7] more Signed-off-by: Alexander Gorshenev --- arkoala/ets-plugin/src/StructTransformer.ts | 8 ++++---- arkoala/ets-plugin/src/utils.ts | 2 +- arkoala/ets-plugin/test/ets/Rewrite.ets | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index 7d7957182..0c9d48767 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -340,13 +340,11 @@ export class StructTransformer extends AbstractVisitor { if (!callExpression.arguments?.[0]) return node const firstArgument = callExpression.arguments[0] - if (!ts.isArrowFunction(firstArgument)) return node - const firstArgumentBody = firstArgument.body - let newFirstArgument if (isUndefined(firstArgument)) { newFirstArgument = id(buildBuilderArgument()) - } else { + } else if (ts.isArrowFunction(firstArgument)) { + const firstArgumentBody = firstArgument.body newFirstArgument = ts.factory.createArrowFunction( undefined, undefined, @@ -368,6 +366,8 @@ export class StructTransformer extends AbstractVisitor { true // multiline ) ) + } else { + return node } return ts.factory.updateBlock( diff --git a/arkoala/ets-plugin/src/utils.ts b/arkoala/ets-plugin/src/utils.ts index a890c35f7..8204aab49 100644 --- a/arkoala/ets-plugin/src/utils.ts +++ b/arkoala/ets-plugin/src/utils.ts @@ -573,4 +573,4 @@ export function commonMethodComponentId(importer: Importer): ts.Identifier { export function commonMethodComponentType(importer: Importer): ts.TypeReferenceNode { return ts.factory.createTypeReferenceNode(importer.withAdaptorImport(ArkCommonMethodComponent)) -} \ No newline at end of file +} diff --git a/arkoala/ets-plugin/test/ets/Rewrite.ets b/arkoala/ets-plugin/test/ets/Rewrite.ets index 052274111..bff0c025a 100644 --- a/arkoala/ets-plugin/test/ets/Rewrite.ets +++ b/arkoala/ets-plugin/test/ets/Rewrite.ets @@ -297,3 +297,18 @@ struct Child { counter: number build() {} } + +@Component +struct BuilderPropagationExample { + build() { + ChildWithBuilder().width(100) + } +} + +@Component +struct ChildWithBuilder { + build() { + Column() {} + } +} + -- Gitee From 23e0d071e7353ef9ad1fb92cd169e91f21ecfe7a Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Tue, 28 Jan 2025 13:02:31 -0500 Subject: [PATCH 5/7] Caninized tests --- .../test/golden/arkoala/ets/PropertyDeps.ts | 974 +++++++++--------- .../test/golden/arkoala/ets/Rewrite.ts | 377 ++++--- .../test/golden/arkoala/ets/Rewrite2.ts | 14 +- .../test/golden/arkoala/ets/Rewrite3.ts | 12 +- .../ets/builder-lambda/builder-lambda.ts | 4 +- .../ets/ets-component-call/ets-call.ts | 2 +- .../user-function-declaration.ts | 22 +- .../test/golden/arkoala/ets/trailing-block.ts | 24 +- .../test/golden/arkoala/spec/@builder.ts | 106 +- .../test/golden/arkoala/spec/@builderParam.ts | 66 +- .../arkoala/spec/@builderWithComponent.ts | 26 +- .../arkoala/spec/@builderWithForEach.ts | 34 +- .../arkoala/spec/@builderWithLinkData.ts | 26 +- .../golden/arkoala/spec/@consume_@provide.ts | 54 +- .../test/golden/arkoala/spec/@customDialog.ts | 56 +- .../test/golden/arkoala/spec/@link.ts | 26 +- .../test/golden/arkoala/spec/@objectLink.ts | 26 +- .../arkoala/spec/@observed_@objectLink.ts | 26 +- .../test/golden/arkoala/spec/@preview.ts | 31 +- .../test/golden/arkoala/spec/@prop.ts | 24 +- .../golden/arkoala/spec/@propComplexType.ts | 26 +- .../test/golden/arkoala/spec/@state.ts | 14 +- .../test/golden/arkoala/spec/@storageLink.ts | 22 +- .../test/golden/arkoala/spec/@storageProp.ts | 22 +- .../test/golden/arkoala/spec/@styles.ts | 26 +- .../test/golden/arkoala/spec/@stylesExport.ts | 26 +- .../test/golden/arkoala/spec/@watch.ts | 30 +- .../test/golden/arkoala/spec/GridItem.ts | 22 +- .../test/golden/arkoala/spec/ListItem.ts | 22 +- .../arkoala/spec/XComponentContainer.ts | 14 +- .../golden/arkoala/spec/animatableExtend.ts | 22 +- .../test/golden/arkoala/spec/animateTo.ts | 39 +- .../test/golden/arkoala/spec/appStorage.ts | 22 +- .../test/golden/arkoala/spec/button.ts | 34 +- .../golden/arkoala/spec/component_object.ts | 38 +- .../golden/arkoala/spec/custom_component.ts | 50 +- .../golden/arkoala/spec/decoratorKeyCheck.ts | 14 +- .../arkoala/spec/forEachSecondFunction.ts | 31 +- .../test/golden/arkoala/spec/forEachTwo.ts | 27 +- .../test/golden/arkoala/spec/foreach.ts | 74 +- .../arkoala/spec/handleCustomBuilder.ts | 42 +- .../test/golden/arkoala/spec/id_if.ts | 95 +- .../ets-plugin/test/golden/arkoala/spec/if.ts | 14 +- .../arkoala/spec/import@CustomDialog.ts | 23 +- .../golden/arkoala/spec/import@Observed.ts | 52 +- .../test/golden/arkoala/spec/importAllEts.ts | 14 +- .../test/golden/arkoala/spec/importEts.ts | 18 +- .../golden/arkoala/spec/importExportEts.ts | 14 +- .../golden/arkoala/spec/importExportNest.ts | 22 +- .../test/golden/arkoala/spec/importTs.ts | 14 +- .../test/golden/arkoala/spec/lazyforeach.ts | 14 +- .../test/golden/arkoala/spec/localStorage.ts | 23 +- .../arkoala/spec/localStorageForBoth.ts | 23 +- .../arkoala/spec/localStorageForRoute.ts | 19 +- .../arkoala/spec/localStorageForStorage.ts | 23 +- .../golden/arkoala/spec/longPressGesture.ts | 37 +- .../golden/arkoala/spec/pageTransition.ts | 35 +- .../test/golden/arkoala/spec/panGestrue.ts | 43 +- .../test/golden/arkoala/spec/pinchGesture.ts | 41 +- .../test/golden/arkoala/spec/recycle.ts | 139 +-- .../arkoala/spec/recycle_extend_styles.ts | 50 +- .../arkoala/spec/recycle_function_array.ts | 38 +- .../golden/arkoala/spec/recycle_gesture.ts | 41 +- .../golden/arkoala/spec/recycle_reuseId.ts | 59 +- .../golden/arkoala/spec/rotationGesture.ts | 41 +- .../test/golden/arkoala/spec/swipeGesture.ts | 33 +- .../test/golden/arkoala/spec/tab.ts | 38 +- .../test/golden/arkoala/spec/tapGesture.ts | 27 +- .../arkoala/spec/test/pages/AMDComponent.ts | 42 +- .../arkoala/spec/test/pages/BaseComponent.ts | 34 +- .../spec/test/pages/DefaultComponent.ts | 42 +- .../spec/test/pages/DivideComponent.ts | 26 +- .../spec/test/pages/ExportComponent.ts | 50 +- .../arkoala/spec/test/pages/LinkComponent.ts | 50 +- .../spec/test/pages/NamespaceComponent.ts | 122 +-- .../arkoala/spec/test/pages/TestComponent.ts | 34 +- .../spec/test/pages/import@CustomDialog.ts | 36 +- .../test/golden/arkts/ets/PropertyDeps.ts | 974 +++++++++--------- .../test/golden/arkts/ets/Rewrite.ts | 377 ++++--- .../test/golden/arkts/ets/Rewrite2.ts | 14 +- .../test/golden/arkts/ets/Rewrite3.ts | 12 +- .../ets/builder-lambda/builder-lambda.ts | 4 +- .../arkts/ets/ets-component-call/ets-call.ts | 2 +- .../user-function-declaration.ts | 22 +- .../test/golden/arkts/ets/trailing-block.ts | 24 +- .../test/golden/arkts/spec/@builder.ts | 106 +- .../test/golden/arkts/spec/@builderParam.ts | 66 +- .../arkts/spec/@builderWithComponent.ts | 26 +- .../golden/arkts/spec/@builderWithForEach.ts | 34 +- .../golden/arkts/spec/@builderWithLinkData.ts | 26 +- .../golden/arkts/spec/@consume_@provide.ts | 54 +- .../test/golden/arkts/spec/@customDialog.ts | 56 +- .../test/golden/arkts/spec/@link.ts | 26 +- .../test/golden/arkts/spec/@objectLink.ts | 26 +- .../arkts/spec/@observed_@objectLink.ts | 26 +- .../test/golden/arkts/spec/@preview.ts | 31 +- .../test/golden/arkts/spec/@prop.ts | 24 +- .../golden/arkts/spec/@propComplexType.ts | 26 +- .../test/golden/arkts/spec/@state.ts | 14 +- .../test/golden/arkts/spec/@storageLink.ts | 22 +- .../test/golden/arkts/spec/@storageProp.ts | 22 +- .../test/golden/arkts/spec/@styles.ts | 26 +- .../test/golden/arkts/spec/@stylesExport.ts | 26 +- .../test/golden/arkts/spec/@watch.ts | 30 +- .../test/golden/arkts/spec/GridItem.ts | 22 +- .../test/golden/arkts/spec/ListItem.ts | 22 +- .../golden/arkts/spec/XComponentContainer.ts | 14 +- .../golden/arkts/spec/animatableExtend.ts | 22 +- .../test/golden/arkts/spec/animateTo.ts | 39 +- .../test/golden/arkts/spec/appStorage.ts | 22 +- .../test/golden/arkts/spec/button.ts | 34 +- .../golden/arkts/spec/component_object.ts | 38 +- .../golden/arkts/spec/custom_component.ts | 50 +- .../golden/arkts/spec/decoratorKeyCheck.ts | 14 +- .../arkts/spec/forEachSecondFunction.ts | 31 +- .../test/golden/arkts/spec/forEachTwo.ts | 27 +- .../test/golden/arkts/spec/foreach.ts | 74 +- .../golden/arkts/spec/handleCustomBuilder.ts | 42 +- .../test/golden/arkts/spec/id_if.ts | 95 +- .../ets-plugin/test/golden/arkts/spec/if.ts | 14 +- .../golden/arkts/spec/import@CustomDialog.ts | 23 +- .../test/golden/arkts/spec/import@Observed.ts | 52 +- .../test/golden/arkts/spec/importAllEts.ts | 14 +- .../test/golden/arkts/spec/importEts.ts | 18 +- .../test/golden/arkts/spec/importExportEts.ts | 14 +- .../golden/arkts/spec/importExportNest.ts | 22 +- .../test/golden/arkts/spec/importTs.ts | 14 +- .../test/golden/arkts/spec/lazyforeach.ts | 14 +- .../test/golden/arkts/spec/localStorage.ts | 23 +- .../golden/arkts/spec/localStorageForBoth.ts | 23 +- .../golden/arkts/spec/localStorageForRoute.ts | 19 +- .../arkts/spec/localStorageForStorage.ts | 23 +- .../golden/arkts/spec/longPressGesture.ts | 37 +- .../test/golden/arkts/spec/pageTransition.ts | 35 +- .../test/golden/arkts/spec/panGestrue.ts | 43 +- .../test/golden/arkts/spec/pinchGesture.ts | 41 +- .../test/golden/arkts/spec/recycle.ts | 139 +-- .../arkts/spec/recycle_extend_styles.ts | 50 +- .../arkts/spec/recycle_function_array.ts | 38 +- .../test/golden/arkts/spec/recycle_gesture.ts | 41 +- .../test/golden/arkts/spec/recycle_reuseId.ts | 59 +- .../test/golden/arkts/spec/rotationGesture.ts | 41 +- .../test/golden/arkts/spec/swipeGesture.ts | 33 +- .../ets-plugin/test/golden/arkts/spec/tab.ts | 38 +- .../test/golden/arkts/spec/tapGesture.ts | 27 +- .../arkts/spec/test/pages/AMDComponent.ts | 42 +- .../arkts/spec/test/pages/BaseComponent.ts | 34 +- .../arkts/spec/test/pages/DefaultComponent.ts | 42 +- .../arkts/spec/test/pages/DivideComponent.ts | 26 +- .../arkts/spec/test/pages/ExportComponent.ts | 50 +- .../arkts/spec/test/pages/LinkComponent.ts | 50 +- .../spec/test/pages/NamespaceComponent.ts | 122 +-- .../arkts/spec/test/pages/TestComponent.ts | 34 +- .../spec/test/pages/import@CustomDialog.ts | 36 +- .../test/golden/koala/ets/PropertyDeps.ts | 974 +++++++++--------- .../test/golden/koala/ets/Rewrite.ts | 377 ++++--- .../test/golden/koala/ets/Rewrite2.ts | 14 +- .../test/golden/koala/ets/Rewrite3.ts | 12 +- .../ets/builder-lambda/builder-lambda.ts | 4 +- .../koala/ets/ets-component-call/ets-call.ts | 2 +- .../user-function-declaration.ts | 22 +- .../test/golden/koala/ets/trailing-block.ts | 24 +- .../test/golden/koala/spec/@builder.ts | 106 +- .../test/golden/koala/spec/@builderParam.ts | 66 +- .../koala/spec/@builderWithComponent.ts | 26 +- .../golden/koala/spec/@builderWithForEach.ts | 34 +- .../golden/koala/spec/@builderWithLinkData.ts | 26 +- .../golden/koala/spec/@consume_@provide.ts | 54 +- .../test/golden/koala/spec/@customDialog.ts | 56 +- .../test/golden/koala/spec/@link.ts | 26 +- .../test/golden/koala/spec/@objectLink.ts | 26 +- .../koala/spec/@observed_@objectLink.ts | 26 +- .../test/golden/koala/spec/@preview.ts | 31 +- .../test/golden/koala/spec/@prop.ts | 24 +- .../golden/koala/spec/@propComplexType.ts | 26 +- .../test/golden/koala/spec/@state.ts | 14 +- .../test/golden/koala/spec/@storageLink.ts | 22 +- .../test/golden/koala/spec/@storageProp.ts | 22 +- .../test/golden/koala/spec/@styles.ts | 26 +- .../test/golden/koala/spec/@stylesExport.ts | 26 +- .../test/golden/koala/spec/@watch.ts | 30 +- .../test/golden/koala/spec/GridItem.ts | 22 +- .../test/golden/koala/spec/ListItem.ts | 22 +- .../golden/koala/spec/XComponentContainer.ts | 14 +- .../golden/koala/spec/animatableExtend.ts | 22 +- .../test/golden/koala/spec/animateTo.ts | 39 +- .../test/golden/koala/spec/appStorage.ts | 22 +- .../test/golden/koala/spec/button.ts | 34 +- .../golden/koala/spec/component_object.ts | 38 +- .../golden/koala/spec/custom_component.ts | 50 +- .../golden/koala/spec/decoratorKeyCheck.ts | 14 +- .../koala/spec/forEachSecondFunction.ts | 31 +- .../test/golden/koala/spec/forEachTwo.ts | 27 +- .../test/golden/koala/spec/foreach.ts | 74 +- .../golden/koala/spec/handleCustomBuilder.ts | 42 +- .../test/golden/koala/spec/id_if.ts | 95 +- .../ets-plugin/test/golden/koala/spec/if.ts | 14 +- .../golden/koala/spec/import@CustomDialog.ts | 23 +- .../test/golden/koala/spec/import@Observed.ts | 52 +- .../test/golden/koala/spec/importAllEts.ts | 14 +- .../test/golden/koala/spec/importEts.ts | 18 +- .../test/golden/koala/spec/importExportEts.ts | 14 +- .../golden/koala/spec/importExportNest.ts | 22 +- .../test/golden/koala/spec/importTs.ts | 14 +- .../test/golden/koala/spec/lazyforeach.ts | 14 +- .../test/golden/koala/spec/localStorage.ts | 23 +- .../golden/koala/spec/localStorageForBoth.ts | 23 +- .../golden/koala/spec/localStorageForRoute.ts | 19 +- .../koala/spec/localStorageForStorage.ts | 23 +- .../golden/koala/spec/longPressGesture.ts | 37 +- .../test/golden/koala/spec/pageTransition.ts | 35 +- .../test/golden/koala/spec/panGestrue.ts | 43 +- .../test/golden/koala/spec/pinchGesture.ts | 41 +- .../test/golden/koala/spec/recycle.ts | 139 +-- .../koala/spec/recycle_extend_styles.ts | 50 +- .../koala/spec/recycle_function_array.ts | 38 +- .../test/golden/koala/spec/recycle_gesture.ts | 41 +- .../test/golden/koala/spec/recycle_reuseId.ts | 59 +- .../test/golden/koala/spec/rotationGesture.ts | 41 +- .../test/golden/koala/spec/swipeGesture.ts | 33 +- .../ets-plugin/test/golden/koala/spec/tab.ts | 38 +- .../test/golden/koala/spec/tapGesture.ts | 27 +- .../koala/spec/test/pages/AMDComponent.ts | 42 +- .../koala/spec/test/pages/BaseComponent.ts | 34 +- .../koala/spec/test/pages/DefaultComponent.ts | 42 +- .../koala/spec/test/pages/DivideComponent.ts | 26 +- .../koala/spec/test/pages/ExportComponent.ts | 50 +- .../koala/spec/test/pages/LinkComponent.ts | 50 +- .../spec/test/pages/NamespaceComponent.ts | 122 +-- .../koala/spec/test/pages/TestComponent.ts | 34 +- .../spec/test/pages/import@CustomDialog.ts | 36 +- 231 files changed, 6183 insertions(+), 5736 deletions(-) diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/PropertyDeps.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/PropertyDeps.ts index 17aba7ad8..3740031b3 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/PropertyDeps.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/PropertyDeps.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, contextLocalStateOf, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, AppStorageLinkState, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, contextLocalStateOf, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; class ArkStateToStateComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -22,12 +22,12 @@ class ArkStateToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToPropComponent extends ArkStructBase { @@ -57,12 +57,12 @@ class ArkStateToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToProvideComponent extends ArkStructBase { @@ -88,12 +88,12 @@ class ArkStateToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToStorageLinkComponent extends ArkStructBase { @@ -119,12 +119,12 @@ class ArkStateToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToLocalStorageLinkComponent extends ArkStructBase { @@ -150,12 +150,12 @@ class ArkStateToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToStoragePropComponent extends ArkStructBase { @@ -185,12 +185,12 @@ class ArkStateToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStateToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToLocalStoragePropComponent extends ArkStructBase { @@ -220,12 +220,12 @@ class ArkStateToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStateToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToBuilderParamComponent extends ArkStructBase { @@ -257,12 +257,12 @@ class ArkStateToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToPlainComponent extends ArkStructBase { @@ -288,12 +288,12 @@ class ArkStateToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStateComponent extends ArkStructBase { @@ -323,12 +323,12 @@ class ArkPropToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToPropComponent extends ArkStructBase { @@ -359,12 +359,12 @@ class ArkPropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToProvideComponent extends ArkStructBase { @@ -394,12 +394,12 @@ class ArkPropToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStorageLinkComponent extends ArkStructBase { @@ -429,12 +429,12 @@ class ArkPropToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToLocalStorageLinkComponent extends ArkStructBase { @@ -464,12 +464,12 @@ class ArkPropToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStoragePropComponent extends ArkStructBase { @@ -500,12 +500,12 @@ class ArkPropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToLocalStoragePropComponent extends ArkStructBase { @@ -536,12 +536,12 @@ class ArkPropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToBuilderParamComponent extends ArkStructBase { @@ -577,12 +577,12 @@ class ArkPropToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToPlainComponent extends ArkStructBase { @@ -612,12 +612,12 @@ class ArkPropToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStateComponent extends ArkStructBase { @@ -643,12 +643,12 @@ class ArkProvideToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToPropComponent extends ArkStructBase { @@ -678,12 +678,12 @@ class ArkProvideToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToProvideComponent extends ArkStructBase { @@ -709,12 +709,12 @@ class ArkProvideToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStorageLinkComponent extends ArkStructBase { @@ -740,12 +740,12 @@ class ArkProvideToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToLocalStorageLinkComponent extends ArkStructBase { @@ -771,12 +771,12 @@ class ArkProvideToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStoragePropComponent extends ArkStructBase { @@ -806,12 +806,12 @@ class ArkProvideToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkProvideToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToLocalStoragePropComponent extends ArkStructBase { @@ -841,12 +841,12 @@ class ArkProvideToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkProvideToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToBuilderParamComponent extends ArkStructBase { @@ -878,12 +878,12 @@ class ArkProvideToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToPlainComponent extends ArkStructBase { @@ -909,12 +909,12 @@ class ArkProvideToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStateComponent extends ArkStructBase { @@ -940,12 +940,12 @@ class ArkStorageLinkToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToPropComponent extends ArkStructBase { @@ -975,12 +975,12 @@ class ArkStorageLinkToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToProvideComponent extends ArkStructBase { @@ -1006,12 +1006,12 @@ class ArkStorageLinkToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStorageLinkComponent extends ArkStructBase { @@ -1037,12 +1037,12 @@ class ArkStorageLinkToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToLocalStorageLinkComponent extends ArkStructBase { @@ -1068,12 +1068,12 @@ class ArkStorageLinkToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStoragePropComponent extends ArkStructBase { @@ -1103,12 +1103,12 @@ class ArkStorageLinkToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStorageLinkToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToLocalStoragePropComponent extends ArkStructBase { @@ -1138,12 +1138,12 @@ class ArkStorageLinkToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStorageLinkToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToBuilderParamComponent extends ArkStructBase { @@ -1175,12 +1175,12 @@ class ArkStorageLinkToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToPlainComponent extends ArkStructBase { @@ -1206,12 +1206,12 @@ class ArkStorageLinkToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStateComponent extends ArkStructBase { @@ -1237,12 +1237,12 @@ class ArkLocalStorageLinkToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToPropComponent extends ArkStructBase { @@ -1272,12 +1272,12 @@ class ArkLocalStorageLinkToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToProvideComponent extends ArkStructBase { @@ -1303,12 +1303,12 @@ class ArkLocalStorageLinkToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStorageLinkComponent extends ArkStructBase { @@ -1334,12 +1334,12 @@ class ArkLocalStorageLinkToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToLocalStorageLinkComponent extends ArkStructBase { @@ -1365,12 +1365,12 @@ class ArkLocalStorageLinkToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStoragePropComponent extends ArkStructBase { @@ -1400,12 +1400,12 @@ class ArkLocalStorageLinkToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageLinkToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToLocalStoragePropComponent extends ArkStructBase { @@ -1435,12 +1435,12 @@ class ArkLocalStorageLinkToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageLinkToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToBuilderParamComponent extends ArkStructBase { @@ -1472,12 +1472,12 @@ class ArkLocalStorageLinkToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToPlainComponent extends ArkStructBase { @@ -1503,12 +1503,12 @@ class ArkLocalStorageLinkToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStateComponent extends ArkStructBase { @@ -1538,12 +1538,12 @@ class ArkStoragePropToStateComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStateComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToPropComponent extends ArkStructBase { @@ -1574,12 +1574,12 @@ class ArkStoragePropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToProvideComponent extends ArkStructBase { @@ -1609,12 +1609,12 @@ class ArkStoragePropToProvideComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToProvideComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStorageLinkComponent extends ArkStructBase { @@ -1644,12 +1644,12 @@ class ArkStoragePropToStorageLinkComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToLocalStorageLinkComponent extends ArkStructBase { @@ -1679,12 +1679,12 @@ class ArkStoragePropToLocalStorageLinkComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToLocalStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStoragePropComponent extends ArkStructBase { @@ -1715,12 +1715,12 @@ class ArkStoragePropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToLocalStoragePropComponent extends ArkStructBase { @@ -1751,12 +1751,12 @@ class ArkStoragePropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToBuilderParamComponent extends ArkStructBase { @@ -1792,12 +1792,12 @@ class ArkStoragePropToBuilderParamComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToBuilderParamComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToPlainComponent extends ArkStructBase { @@ -1827,12 +1827,12 @@ class ArkStoragePropToPlainComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToPlainComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStateComponent extends ArkStructBase { @@ -1862,12 +1862,12 @@ class ArkLocalStoragePropToStateComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStateComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToPropComponent extends ArkStructBase { @@ -1898,12 +1898,12 @@ class ArkLocalStoragePropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToProvideComponent extends ArkStructBase { @@ -1933,12 +1933,12 @@ class ArkLocalStoragePropToProvideComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToProvideComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStorageLinkComponent extends ArkStructBase { @@ -1968,12 +1968,12 @@ class ArkLocalStoragePropToStorageLinkComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToLocalStorageLinkComponent extends ArkStructBase { @@ -2003,12 +2003,12 @@ class ArkLocalStoragePropToLocalStorageLinkComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToLocalStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStoragePropComponent extends ArkStructBase { @@ -2039,12 +2039,12 @@ class ArkLocalStoragePropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToLocalStoragePropComponent extends ArkStructBase { @@ -2075,12 +2075,12 @@ class ArkLocalStoragePropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToBuilderParamComponent extends ArkStructBase { @@ -2116,12 +2116,12 @@ class ArkLocalStoragePropToBuilderParamComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToBuilderParamComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToPlainComponent extends ArkStructBase { @@ -2151,12 +2151,12 @@ class ArkLocalStoragePropToPlainComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToPlainComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStateComponent extends ArkStructBase { @@ -2188,12 +2188,12 @@ class ArkBuilderParamToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToPropComponent extends ArkStructBase { @@ -2229,12 +2229,12 @@ class ArkBuilderParamToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToProvideComponent extends ArkStructBase { @@ -2266,12 +2266,12 @@ class ArkBuilderParamToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStorageLinkComponent extends ArkStructBase { @@ -2303,12 +2303,12 @@ class ArkBuilderParamToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToLocalStorageLinkComponent extends ArkStructBase { @@ -2340,12 +2340,12 @@ class ArkBuilderParamToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStoragePropComponent extends ArkStructBase { @@ -2381,12 +2381,12 @@ class ArkBuilderParamToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuilderParamToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToLocalStoragePropComponent extends ArkStructBase { @@ -2422,12 +2422,12 @@ class ArkBuilderParamToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuilderParamToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToBuilderParamComponent extends ArkStructBase { @@ -2463,12 +2463,12 @@ class ArkBuilderParamToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToPlainComponent extends ArkStructBase { @@ -2500,12 +2500,12 @@ class ArkBuilderParamToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStateComponent extends ArkStructBase { @@ -2531,12 +2531,12 @@ class ArkPlainToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToPropComponent extends ArkStructBase { @@ -2566,12 +2566,12 @@ class ArkPlainToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToProvideComponent extends ArkStructBase { @@ -2597,12 +2597,12 @@ class ArkPlainToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStorageLinkComponent extends ArkStructBase { @@ -2628,12 +2628,12 @@ class ArkPlainToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToLocalStorageLinkComponent extends ArkStructBase { @@ -2659,12 +2659,12 @@ class ArkPlainToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStoragePropComponent extends ArkStructBase { @@ -2694,12 +2694,12 @@ class ArkPlainToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPlainToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToLocalStoragePropComponent extends ArkStructBase { @@ -2729,12 +2729,12 @@ class ArkPlainToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPlainToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToBuilderParamComponent extends ArkStructBase { @@ -2766,12 +2766,12 @@ class ArkPlainToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToPlainComponent extends ArkStructBase { @@ -2797,1021 +2797,1021 @@ class ArkPlainToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } /** @memo */ export function StateToState(/**/ /** @memo */ -style?: (instance: ArkStateToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStateOptions): ArkStateToStateComponent { +content?: () => void, initializers?: StateToStateOptions): void { const updatedInitializers: StateToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStateComponent._instantiate(style, () => new ArkStateToStateComponent, content, updatedInitializers); + ArkStateToStateComponent._instantiate(style, () => new ArkStateToStateComponent, content, updatedInitializers); } /** @memo */ export function StateToProp(/**/ /** @memo */ -style?: (instance: ArkStateToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToPropOptions): ArkStateToPropComponent { +content?: () => void, initializers?: StateToPropOptions): void { const updatedInitializers: StateToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStateToPropComponent._instantiate(style, () => new ArkStateToPropComponent, content, updatedInitializers); + ArkStateToPropComponent._instantiate(style, () => new ArkStateToPropComponent, content, updatedInitializers); } /** @memo */ export function StateToProvide(/**/ /** @memo */ -style?: (instance: ArkStateToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToProvideOptions): ArkStateToProvideComponent { +content?: () => void, initializers?: StateToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StateToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStateToProvideComponent._instantiate(style, () => new ArkStateToProvideComponent, content, updatedInitializers); + ArkStateToProvideComponent._instantiate(style, () => new ArkStateToProvideComponent, content, updatedInitializers); } /** @memo */ export function StateToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStateToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStorageLinkOptions): ArkStateToStorageLinkComponent { +content?: () => void, initializers?: StateToStorageLinkOptions): void { const updatedInitializers: StateToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStorageLinkComponent._instantiate(style, () => new ArkStateToStorageLinkComponent, content, updatedInitializers); + ArkStateToStorageLinkComponent._instantiate(style, () => new ArkStateToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StateToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStateToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToLocalStorageLinkOptions): ArkStateToLocalStorageLinkComponent { +content?: () => void, initializers?: StateToLocalStorageLinkOptions): void { const updatedInitializers: StateToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToLocalStorageLinkComponent._instantiate(style, () => new ArkStateToLocalStorageLinkComponent, content, updatedInitializers); + ArkStateToLocalStorageLinkComponent._instantiate(style, () => new ArkStateToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StateToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStateToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStoragePropOptions): ArkStateToStoragePropComponent { +content?: () => void, initializers?: StateToStoragePropOptions): void { const updatedInitializers: StateToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStoragePropComponent._instantiate(style, () => new ArkStateToStoragePropComponent, content, updatedInitializers); + ArkStateToStoragePropComponent._instantiate(style, () => new ArkStateToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StateToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStateToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToLocalStoragePropOptions): ArkStateToLocalStoragePropComponent { +content?: () => void, initializers?: StateToLocalStoragePropOptions): void { const updatedInitializers: StateToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToLocalStoragePropComponent._instantiate(style, () => new ArkStateToLocalStoragePropComponent, content, updatedInitializers); + ArkStateToLocalStoragePropComponent._instantiate(style, () => new ArkStateToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StateToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStateToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToBuilderParamOptions): ArkStateToBuilderParamComponent { +content?: () => void, initializers?: StateToBuilderParamOptions): void { const updatedInitializers: StateToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStateToBuilderParamComponent._instantiate(style, () => new ArkStateToBuilderParamComponent, content, updatedInitializers); + ArkStateToBuilderParamComponent._instantiate(style, () => new ArkStateToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StateToPlain(/**/ /** @memo */ -style?: (instance: ArkStateToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToPlainOptions): ArkStateToPlainComponent { +content?: () => void, initializers?: StateToPlainOptions): void { const updatedInitializers: StateToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStateToPlainComponent._instantiate(style, () => new ArkStateToPlainComponent, content, updatedInitializers); + ArkStateToPlainComponent._instantiate(style, () => new ArkStateToPlainComponent, content, updatedInitializers); } /** @memo */ export function PropToState(/**/ /** @memo */ -style?: (instance: ArkPropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStateOptions): ArkPropToStateComponent { +content?: () => void, initializers?: PropToStateOptions): void { const updatedInitializers: PropToStateOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStateComponent._instantiate(style, () => new ArkPropToStateComponent, content, updatedInitializers); + ArkPropToStateComponent._instantiate(style, () => new ArkPropToStateComponent, content, updatedInitializers); } /** @memo */ export function PropToProp(/**/ /** @memo */ -style?: (instance: ArkPropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToPropOptions): ArkPropToPropComponent { +content?: () => void, initializers?: PropToPropOptions): void { const updatedInitializers: PropToPropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkPropToPropComponent._instantiate(style, () => new ArkPropToPropComponent, content, updatedInitializers); + ArkPropToPropComponent._instantiate(style, () => new ArkPropToPropComponent, content, updatedInitializers); } /** @memo */ export function PropToProvide(/**/ /** @memo */ -style?: (instance: ArkPropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToProvideOptions): ArkPropToProvideComponent { +content?: () => void, initializers?: PropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: PropToProvideOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkPropToProvideComponent._instantiate(style, () => new ArkPropToProvideComponent, content, updatedInitializers); + ArkPropToProvideComponent._instantiate(style, () => new ArkPropToProvideComponent, content, updatedInitializers); } /** @memo */ export function PropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkPropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStorageLinkOptions): ArkPropToStorageLinkComponent { +content?: () => void, initializers?: PropToStorageLinkOptions): void { const updatedInitializers: PropToStorageLinkOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStorageLinkComponent._instantiate(style, () => new ArkPropToStorageLinkComponent, content, updatedInitializers); + ArkPropToStorageLinkComponent._instantiate(style, () => new ArkPropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkPropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToLocalStorageLinkOptions): ArkPropToLocalStorageLinkComponent { +content?: () => void, initializers?: PropToLocalStorageLinkOptions): void { const updatedInitializers: PropToLocalStorageLinkOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToLocalStorageLinkComponent._instantiate(style, () => new ArkPropToLocalStorageLinkComponent, content, updatedInitializers); + ArkPropToLocalStorageLinkComponent._instantiate(style, () => new ArkPropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkPropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStoragePropOptions): ArkPropToStoragePropComponent { +content?: () => void, initializers?: PropToStoragePropOptions): void { const updatedInitializers: PropToStoragePropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStoragePropComponent._instantiate(style, () => new ArkPropToStoragePropComponent, content, updatedInitializers); + ArkPropToStoragePropComponent._instantiate(style, () => new ArkPropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkPropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToLocalStoragePropOptions): ArkPropToLocalStoragePropComponent { +content?: () => void, initializers?: PropToLocalStoragePropOptions): void { const updatedInitializers: PropToLocalStoragePropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToLocalStoragePropComponent._instantiate(style, () => new ArkPropToLocalStoragePropComponent, content, updatedInitializers); + ArkPropToLocalStoragePropComponent._instantiate(style, () => new ArkPropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkPropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToBuilderParamOptions): ArkPropToBuilderParamComponent { +content?: () => void, initializers?: PropToBuilderParamOptions): void { const updatedInitializers: PropToBuilderParamOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkPropToBuilderParamComponent._instantiate(style, () => new ArkPropToBuilderParamComponent, content, updatedInitializers); + ArkPropToBuilderParamComponent._instantiate(style, () => new ArkPropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function PropToPlain(/**/ /** @memo */ -style?: (instance: ArkPropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToPlainOptions): ArkPropToPlainComponent { +content?: () => void, initializers?: PropToPlainOptions): void { const updatedInitializers: PropToPlainOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkPropToPlainComponent._instantiate(style, () => new ArkPropToPlainComponent, content, updatedInitializers); + ArkPropToPlainComponent._instantiate(style, () => new ArkPropToPlainComponent, content, updatedInitializers); } /** @memo */ export function ProvideToState(/**/ /** @memo */ -style?: (instance: ArkProvideToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStateOptions): ArkProvideToStateComponent { +content?: () => void, initializers?: ProvideToStateOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStateOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStateComponent._instantiate(style, () => new ArkProvideToStateComponent, content, updatedInitializers); + ArkProvideToStateComponent._instantiate(style, () => new ArkProvideToStateComponent, content, updatedInitializers); } /** @memo */ export function ProvideToProp(/**/ /** @memo */ -style?: (instance: ArkProvideToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToPropOptions): ArkProvideToPropComponent { +content?: () => void, initializers?: ProvideToPropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToPropOptions = { __backing_state: __provide_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkProvideToPropComponent._instantiate(style, () => new ArkProvideToPropComponent, content, updatedInitializers); + ArkProvideToPropComponent._instantiate(style, () => new ArkProvideToPropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToProvide(/**/ /** @memo */ -style?: (instance: ArkProvideToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToProvideOptions): ArkProvideToProvideComponent { +content?: () => void, initializers?: ProvideToProvideOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: ProvideToProvideOptions = { __backing_state: __provide_state, __backing_test: __provide_test }; - return ArkProvideToProvideComponent._instantiate(style, () => new ArkProvideToProvideComponent, content, updatedInitializers); + ArkProvideToProvideComponent._instantiate(style, () => new ArkProvideToProvideComponent, content, updatedInitializers); } /** @memo */ export function ProvideToStorageLink(/**/ /** @memo */ -style?: (instance: ArkProvideToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStorageLinkOptions): ArkProvideToStorageLinkComponent { +content?: () => void, initializers?: ProvideToStorageLinkOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStorageLinkOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStorageLinkComponent._instantiate(style, () => new ArkProvideToStorageLinkComponent, content, updatedInitializers); + ArkProvideToStorageLinkComponent._instantiate(style, () => new ArkProvideToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function ProvideToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkProvideToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToLocalStorageLinkOptions): ArkProvideToLocalStorageLinkComponent { +content?: () => void, initializers?: ProvideToLocalStorageLinkOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToLocalStorageLinkOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToLocalStorageLinkComponent._instantiate(style, () => new ArkProvideToLocalStorageLinkComponent, content, updatedInitializers); + ArkProvideToLocalStorageLinkComponent._instantiate(style, () => new ArkProvideToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function ProvideToStorageProp(/**/ /** @memo */ -style?: (instance: ArkProvideToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStoragePropOptions): ArkProvideToStoragePropComponent { +content?: () => void, initializers?: ProvideToStoragePropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStoragePropOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStoragePropComponent._instantiate(style, () => new ArkProvideToStoragePropComponent, content, updatedInitializers); + ArkProvideToStoragePropComponent._instantiate(style, () => new ArkProvideToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkProvideToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToLocalStoragePropOptions): ArkProvideToLocalStoragePropComponent { +content?: () => void, initializers?: ProvideToLocalStoragePropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToLocalStoragePropOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToLocalStoragePropComponent._instantiate(style, () => new ArkProvideToLocalStoragePropComponent, content, updatedInitializers); + ArkProvideToLocalStoragePropComponent._instantiate(style, () => new ArkProvideToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkProvideToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToBuilderParamOptions): ArkProvideToBuilderParamComponent { +content?: () => void, initializers?: ProvideToBuilderParamOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToBuilderParamOptions = { __backing_state: __provide_state, test: initializers?.test }; - return ArkProvideToBuilderParamComponent._instantiate(style, () => new ArkProvideToBuilderParamComponent, content, updatedInitializers); + ArkProvideToBuilderParamComponent._instantiate(style, () => new ArkProvideToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function ProvideToPlain(/**/ /** @memo */ -style?: (instance: ArkProvideToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToPlainOptions): ArkProvideToPlainComponent { +content?: () => void, initializers?: ProvideToPlainOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToPlainOptions = { __backing_state: __provide_state, test: initializers?.test }; - return ArkProvideToPlainComponent._instantiate(style, () => new ArkProvideToPlainComponent, content, updatedInitializers); + ArkProvideToPlainComponent._instantiate(style, () => new ArkProvideToPlainComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToState(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStateOptions): ArkStorageLinkToStateComponent { +content?: () => void, initializers?: StorageLinkToStateOptions): void { const updatedInitializers: StorageLinkToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStateComponent._instantiate(style, () => new ArkStorageLinkToStateComponent, content, updatedInitializers); + ArkStorageLinkToStateComponent._instantiate(style, () => new ArkStorageLinkToStateComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToPropOptions): ArkStorageLinkToPropComponent { +content?: () => void, initializers?: StorageLinkToPropOptions): void { const updatedInitializers: StorageLinkToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToPropComponent._instantiate(style, () => new ArkStorageLinkToPropComponent, content, updatedInitializers); + ArkStorageLinkToPropComponent._instantiate(style, () => new ArkStorageLinkToPropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToProvide(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToProvideOptions): ArkStorageLinkToProvideComponent { +content?: () => void, initializers?: StorageLinkToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StorageLinkToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStorageLinkToProvideComponent._instantiate(style, () => new ArkStorageLinkToProvideComponent, content, updatedInitializers); + ArkStorageLinkToProvideComponent._instantiate(style, () => new ArkStorageLinkToProvideComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStorageLinkOptions): ArkStorageLinkToStorageLinkComponent { +content?: () => void, initializers?: StorageLinkToStorageLinkOptions): void { const updatedInitializers: StorageLinkToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToStorageLinkComponent, content, updatedInitializers); + ArkStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions): ArkStorageLinkToLocalStorageLinkComponent { +content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions): void { const updatedInitializers: StorageLinkToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); + ArkStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStoragePropOptions): ArkStorageLinkToStoragePropComponent { +content?: () => void, initializers?: StorageLinkToStoragePropOptions): void { const updatedInitializers: StorageLinkToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStoragePropComponent._instantiate(style, () => new ArkStorageLinkToStoragePropComponent, content, updatedInitializers); + ArkStorageLinkToStoragePropComponent._instantiate(style, () => new ArkStorageLinkToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions): ArkStorageLinkToLocalStoragePropComponent { +content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions): void { const updatedInitializers: StorageLinkToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkStorageLinkToLocalStoragePropComponent, content, updatedInitializers); + ArkStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkStorageLinkToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToBuilderParamOptions): ArkStorageLinkToBuilderParamComponent { +content?: () => void, initializers?: StorageLinkToBuilderParamOptions): void { const updatedInitializers: StorageLinkToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkStorageLinkToBuilderParamComponent, content, updatedInitializers); + ArkStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkStorageLinkToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToPlain(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToPlainOptions): ArkStorageLinkToPlainComponent { +content?: () => void, initializers?: StorageLinkToPlainOptions): void { const updatedInitializers: StorageLinkToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStorageLinkToPlainComponent._instantiate(style, () => new ArkStorageLinkToPlainComponent, content, updatedInitializers); + ArkStorageLinkToPlainComponent._instantiate(style, () => new ArkStorageLinkToPlainComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToState(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStateOptions): ArkLocalStorageLinkToStateComponent { +content?: () => void, initializers?: LocalStorageLinkToStateOptions): void { const updatedInitializers: LocalStorageLinkToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStateComponent._instantiate(style, () => new ArkLocalStorageLinkToStateComponent, content, updatedInitializers); + ArkLocalStorageLinkToStateComponent._instantiate(style, () => new ArkLocalStorageLinkToStateComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToPropOptions): ArkLocalStorageLinkToPropComponent { +content?: () => void, initializers?: LocalStorageLinkToPropOptions): void { const updatedInitializers: LocalStorageLinkToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToPropComponent._instantiate(style, () => new ArkLocalStorageLinkToPropComponent, content, updatedInitializers); + ArkLocalStorageLinkToPropComponent._instantiate(style, () => new ArkLocalStorageLinkToPropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToProvide(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToProvideOptions): ArkLocalStorageLinkToProvideComponent { +content?: () => void, initializers?: LocalStorageLinkToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: LocalStorageLinkToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkLocalStorageLinkToProvideComponent._instantiate(style, () => new ArkLocalStorageLinkToProvideComponent, content, updatedInitializers); + ArkLocalStorageLinkToProvideComponent._instantiate(style, () => new ArkLocalStorageLinkToProvideComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions): ArkLocalStorageLinkToStorageLinkComponent { +content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions): void { const updatedInitializers: LocalStorageLinkToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToStorageLinkComponent, content, updatedInitializers); + ArkLocalStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions): ArkLocalStorageLinkToLocalStorageLinkComponent { +content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions): void { const updatedInitializers: LocalStorageLinkToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); + ArkLocalStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions): ArkLocalStorageLinkToStoragePropComponent { +content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions): void { const updatedInitializers: LocalStorageLinkToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToStoragePropComponent, content, updatedInitializers); + ArkLocalStorageLinkToStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions): ArkLocalStorageLinkToLocalStoragePropComponent { +content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions): void { const updatedInitializers: LocalStorageLinkToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStoragePropComponent, content, updatedInitializers); + ArkLocalStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions): ArkLocalStorageLinkToBuilderParamComponent { +content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions): void { const updatedInitializers: LocalStorageLinkToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkLocalStorageLinkToBuilderParamComponent, content, updatedInitializers); + ArkLocalStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkLocalStorageLinkToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToPlain(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToPlainOptions): ArkLocalStorageLinkToPlainComponent { +content?: () => void, initializers?: LocalStorageLinkToPlainOptions): void { const updatedInitializers: LocalStorageLinkToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStorageLinkToPlainComponent._instantiate(style, () => new ArkLocalStorageLinkToPlainComponent, content, updatedInitializers); + ArkLocalStorageLinkToPlainComponent._instantiate(style, () => new ArkLocalStorageLinkToPlainComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToState(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStateOptions): ArkStoragePropToStateComponent { +content?: () => void, initializers?: StoragePropToStateOptions): void { const updatedInitializers: StoragePropToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStateComponent._instantiate(style, () => new ArkStoragePropToStateComponent, content, updatedInitializers); + ArkStoragePropToStateComponent._instantiate(style, () => new ArkStoragePropToStateComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToPropOptions): ArkStoragePropToPropComponent { +content?: () => void, initializers?: StoragePropToPropOptions): void { const updatedInitializers: StoragePropToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToPropComponent._instantiate(style, () => new ArkStoragePropToPropComponent, content, updatedInitializers); + ArkStoragePropToPropComponent._instantiate(style, () => new ArkStoragePropToPropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToProvide(/**/ /** @memo */ -style?: (instance: ArkStoragePropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToProvideOptions): ArkStoragePropToProvideComponent { +content?: () => void, initializers?: StoragePropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StoragePropToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStoragePropToProvideComponent._instantiate(style, () => new ArkStoragePropToProvideComponent, content, updatedInitializers); + ArkStoragePropToProvideComponent._instantiate(style, () => new ArkStoragePropToProvideComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStorageLinkOptions): ArkStoragePropToStorageLinkComponent { +content?: () => void, initializers?: StoragePropToStorageLinkOptions): void { const updatedInitializers: StoragePropToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStorageLinkComponent._instantiate(style, () => new ArkStoragePropToStorageLinkComponent, content, updatedInitializers); + ArkStoragePropToStorageLinkComponent._instantiate(style, () => new ArkStoragePropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStoragePropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions): ArkStoragePropToLocalStorageLinkComponent { +content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions): void { const updatedInitializers: StoragePropToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkStoragePropToLocalStorageLinkComponent, content, updatedInitializers); + ArkStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkStoragePropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStoragePropOptions): ArkStoragePropToStoragePropComponent { +content?: () => void, initializers?: StoragePropToStoragePropOptions): void { const updatedInitializers: StoragePropToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStoragePropComponent._instantiate(style, () => new ArkStoragePropToStoragePropComponent, content, updatedInitializers); + ArkStoragePropToStoragePropComponent._instantiate(style, () => new ArkStoragePropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToLocalStoragePropOptions): ArkStoragePropToLocalStoragePropComponent { +content?: () => void, initializers?: StoragePropToLocalStoragePropOptions): void { const updatedInitializers: StoragePropToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkStoragePropToLocalStoragePropComponent, content, updatedInitializers); + ArkStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkStoragePropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStoragePropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToBuilderParamOptions): ArkStoragePropToBuilderParamComponent { +content?: () => void, initializers?: StoragePropToBuilderParamOptions): void { const updatedInitializers: StoragePropToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStoragePropToBuilderParamComponent._instantiate(style, () => new ArkStoragePropToBuilderParamComponent, content, updatedInitializers); + ArkStoragePropToBuilderParamComponent._instantiate(style, () => new ArkStoragePropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToPlain(/**/ /** @memo */ -style?: (instance: ArkStoragePropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToPlainOptions): ArkStoragePropToPlainComponent { +content?: () => void, initializers?: StoragePropToPlainOptions): void { const updatedInitializers: StoragePropToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStoragePropToPlainComponent._instantiate(style, () => new ArkStoragePropToPlainComponent, content, updatedInitializers); + ArkStoragePropToPlainComponent._instantiate(style, () => new ArkStoragePropToPlainComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToState(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStateOptions): ArkLocalStoragePropToStateComponent { +content?: () => void, initializers?: LocalStoragePropToStateOptions): void { const updatedInitializers: LocalStoragePropToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStateComponent._instantiate(style, () => new ArkLocalStoragePropToStateComponent, content, updatedInitializers); + ArkLocalStoragePropToStateComponent._instantiate(style, () => new ArkLocalStoragePropToStateComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToPropOptions): ArkLocalStoragePropToPropComponent { +content?: () => void, initializers?: LocalStoragePropToPropOptions): void { const updatedInitializers: LocalStoragePropToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToPropComponent._instantiate(style, () => new ArkLocalStoragePropToPropComponent, content, updatedInitializers); + ArkLocalStoragePropToPropComponent._instantiate(style, () => new ArkLocalStoragePropToPropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToProvide(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToProvideOptions): ArkLocalStoragePropToProvideComponent { +content?: () => void, initializers?: LocalStoragePropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: LocalStoragePropToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkLocalStoragePropToProvideComponent._instantiate(style, () => new ArkLocalStoragePropToProvideComponent, content, updatedInitializers); + ArkLocalStoragePropToProvideComponent._instantiate(style, () => new ArkLocalStoragePropToProvideComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions): ArkLocalStoragePropToStorageLinkComponent { +content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions): void { const updatedInitializers: LocalStoragePropToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToStorageLinkComponent, content, updatedInitializers); + ArkLocalStoragePropToStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions): ArkLocalStoragePropToLocalStorageLinkComponent { +content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions): void { const updatedInitializers: LocalStoragePropToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStorageLinkComponent, content, updatedInitializers); + ArkLocalStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStoragePropOptions): ArkLocalStoragePropToStoragePropComponent { +content?: () => void, initializers?: LocalStoragePropToStoragePropOptions): void { const updatedInitializers: LocalStoragePropToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToStoragePropComponent, content, updatedInitializers); + ArkLocalStoragePropToStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions): ArkLocalStoragePropToLocalStoragePropComponent { +content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions): void { const updatedInitializers: LocalStoragePropToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStoragePropComponent, content, updatedInitializers); + ArkLocalStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions): ArkLocalStoragePropToBuilderParamComponent { +content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions): void { const updatedInitializers: LocalStoragePropToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStoragePropToBuilderParamComponent._instantiate(style, () => new ArkLocalStoragePropToBuilderParamComponent, content, updatedInitializers); + ArkLocalStoragePropToBuilderParamComponent._instantiate(style, () => new ArkLocalStoragePropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToPlain(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToPlainOptions): ArkLocalStoragePropToPlainComponent { +content?: () => void, initializers?: LocalStoragePropToPlainOptions): void { const updatedInitializers: LocalStoragePropToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStoragePropToPlainComponent._instantiate(style, () => new ArkLocalStoragePropToPlainComponent, content, updatedInitializers); + ArkLocalStoragePropToPlainComponent._instantiate(style, () => new ArkLocalStoragePropToPlainComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToState(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStateOptions): ArkBuilderParamToStateComponent { +content?: () => void, initializers?: BuilderParamToStateOptions): void { const updatedInitializers: BuilderParamToStateOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStateComponent._instantiate(style, () => new ArkBuilderParamToStateComponent, content, updatedInitializers); + ArkBuilderParamToStateComponent._instantiate(style, () => new ArkBuilderParamToStateComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToPropOptions): ArkBuilderParamToPropComponent { +content?: () => void, initializers?: BuilderParamToPropOptions): void { const updatedInitializers: BuilderParamToPropOptions = { state: initializers?.state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToPropComponent._instantiate(style, () => new ArkBuilderParamToPropComponent, content, updatedInitializers); + ArkBuilderParamToPropComponent._instantiate(style, () => new ArkBuilderParamToPropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToProvide(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToProvideOptions): ArkBuilderParamToProvideComponent { +content?: () => void, initializers?: BuilderParamToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: BuilderParamToProvideOptions = { state: initializers?.state, __backing_test: __provide_test }; - return ArkBuilderParamToProvideComponent._instantiate(style, () => new ArkBuilderParamToProvideComponent, content, updatedInitializers); + ArkBuilderParamToProvideComponent._instantiate(style, () => new ArkBuilderParamToProvideComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToStorageLink(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStorageLinkOptions): ArkBuilderParamToStorageLinkComponent { +content?: () => void, initializers?: BuilderParamToStorageLinkOptions): void { const updatedInitializers: BuilderParamToStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToStorageLinkComponent, content, updatedInitializers); + ArkBuilderParamToStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions): ArkBuilderParamToLocalStorageLinkComponent { +content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions): void { const updatedInitializers: BuilderParamToLocalStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToLocalStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToLocalStorageLinkComponent, content, updatedInitializers); + ArkBuilderParamToLocalStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToStorageProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStoragePropOptions): ArkBuilderParamToStoragePropComponent { +content?: () => void, initializers?: BuilderParamToStoragePropOptions): void { const updatedInitializers: BuilderParamToStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStoragePropComponent._instantiate(style, () => new ArkBuilderParamToStoragePropComponent, content, updatedInitializers); + ArkBuilderParamToStoragePropComponent._instantiate(style, () => new ArkBuilderParamToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions): ArkBuilderParamToLocalStoragePropComponent { +content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions): void { const updatedInitializers: BuilderParamToLocalStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToLocalStoragePropComponent._instantiate(style, () => new ArkBuilderParamToLocalStoragePropComponent, content, updatedInitializers); + ArkBuilderParamToLocalStoragePropComponent._instantiate(style, () => new ArkBuilderParamToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToBuilderParamOptions): ArkBuilderParamToBuilderParamComponent { +content?: () => void, initializers?: BuilderParamToBuilderParamOptions): void { const updatedInitializers: BuilderParamToBuilderParamOptions = { state: initializers?.state, test: initializers?.test }; - return ArkBuilderParamToBuilderParamComponent._instantiate(style, () => new ArkBuilderParamToBuilderParamComponent, content, updatedInitializers); + ArkBuilderParamToBuilderParamComponent._instantiate(style, () => new ArkBuilderParamToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToPlain(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToPlainOptions): ArkBuilderParamToPlainComponent { +content?: () => void, initializers?: BuilderParamToPlainOptions): void { const updatedInitializers: BuilderParamToPlainOptions = { state: initializers?.state, test: initializers?.test }; - return ArkBuilderParamToPlainComponent._instantiate(style, () => new ArkBuilderParamToPlainComponent, content, updatedInitializers); + ArkBuilderParamToPlainComponent._instantiate(style, () => new ArkBuilderParamToPlainComponent, content, updatedInitializers); } /** @memo */ export function PlainToState(/**/ /** @memo */ -style?: (instance: ArkPlainToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStateOptions): ArkPlainToStateComponent { +content?: () => void, initializers?: PlainToStateOptions): void { const updatedInitializers: PlainToStateOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStateComponent._instantiate(style, () => new ArkPlainToStateComponent, content, updatedInitializers); + ArkPlainToStateComponent._instantiate(style, () => new ArkPlainToStateComponent, content, updatedInitializers); } /** @memo */ export function PlainToProp(/**/ /** @memo */ -style?: (instance: ArkPlainToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToPropOptions): ArkPlainToPropComponent { +content?: () => void, initializers?: PlainToPropOptions): void { const updatedInitializers: PlainToPropOptions = { state: initializers?.state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkPlainToPropComponent._instantiate(style, () => new ArkPlainToPropComponent, content, updatedInitializers); + ArkPlainToPropComponent._instantiate(style, () => new ArkPlainToPropComponent, content, updatedInitializers); } /** @memo */ export function PlainToProvide(/**/ /** @memo */ -style?: (instance: ArkPlainToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToProvideOptions): ArkPlainToProvideComponent { +content?: () => void, initializers?: PlainToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: PlainToProvideOptions = { state: initializers?.state, __backing_test: __provide_test }; - return ArkPlainToProvideComponent._instantiate(style, () => new ArkPlainToProvideComponent, content, updatedInitializers); + ArkPlainToProvideComponent._instantiate(style, () => new ArkPlainToProvideComponent, content, updatedInitializers); } /** @memo */ export function PlainToStorageLink(/**/ /** @memo */ -style?: (instance: ArkPlainToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStorageLinkOptions): ArkPlainToStorageLinkComponent { +content?: () => void, initializers?: PlainToStorageLinkOptions): void { const updatedInitializers: PlainToStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStorageLinkComponent._instantiate(style, () => new ArkPlainToStorageLinkComponent, content, updatedInitializers); + ArkPlainToStorageLinkComponent._instantiate(style, () => new ArkPlainToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PlainToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkPlainToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToLocalStorageLinkOptions): ArkPlainToLocalStorageLinkComponent { +content?: () => void, initializers?: PlainToLocalStorageLinkOptions): void { const updatedInitializers: PlainToLocalStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToLocalStorageLinkComponent._instantiate(style, () => new ArkPlainToLocalStorageLinkComponent, content, updatedInitializers); + ArkPlainToLocalStorageLinkComponent._instantiate(style, () => new ArkPlainToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PlainToStorageProp(/**/ /** @memo */ -style?: (instance: ArkPlainToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStoragePropOptions): ArkPlainToStoragePropComponent { +content?: () => void, initializers?: PlainToStoragePropOptions): void { const updatedInitializers: PlainToStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStoragePropComponent._instantiate(style, () => new ArkPlainToStoragePropComponent, content, updatedInitializers); + ArkPlainToStoragePropComponent._instantiate(style, () => new ArkPlainToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PlainToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkPlainToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToLocalStoragePropOptions): ArkPlainToLocalStoragePropComponent { +content?: () => void, initializers?: PlainToLocalStoragePropOptions): void { const updatedInitializers: PlainToLocalStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToLocalStoragePropComponent._instantiate(style, () => new ArkPlainToLocalStoragePropComponent, content, updatedInitializers); + ArkPlainToLocalStoragePropComponent._instantiate(style, () => new ArkPlainToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PlainToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkPlainToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToBuilderParamOptions): ArkPlainToBuilderParamComponent { +content?: () => void, initializers?: PlainToBuilderParamOptions): void { const updatedInitializers: PlainToBuilderParamOptions = { state: initializers?.state, test: initializers?.test }; - return ArkPlainToBuilderParamComponent._instantiate(style, () => new ArkPlainToBuilderParamComponent, content, updatedInitializers); + ArkPlainToBuilderParamComponent._instantiate(style, () => new ArkPlainToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function PlainToPlain(/**/ /** @memo */ -style?: (instance: ArkPlainToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToPlainOptions): ArkPlainToPlainComponent { +content?: () => void, initializers?: PlainToPlainOptions): void { const updatedInitializers: PlainToPlainOptions = { state: initializers?.state, test: initializers?.test }; - return ArkPlainToPlainComponent._instantiate(style, () => new ArkPlainToPlainComponent, content, updatedInitializers); + ArkPlainToPlainComponent._instantiate(style, () => new ArkPlainToPlainComponent, content, updatedInitializers); } export interface StateToStateOptions { __backing_state?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite.ts index 9b00408c9..8b6b73809 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, OnChange, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, bindCustomDialog, contextLocal, contextLocalStateOf, objectLinkState, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, OnChange, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, bindCustomDialog, contextLocal, contextLocalStateOf, objectLinkState, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; export class ArkEntryExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,9 +7,9 @@ export class ArkEntryExampleComponent extends ArkStructBase void, initializers?: EntryExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkEntryExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: EntryExampleOptions) { } } @@ -20,9 +20,9 @@ class ArkComponentExampleComponent extends ArkStructBase void, initializers?: ComponentExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkComponentExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ComponentExampleOptions) { } } @@ -33,14 +33,17 @@ class ArkBuildExampleComponent extends ArkStructBase void, initializers?: BuildExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuildExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuildExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.fontColor(Color.Red) - .width(100); + ArkText(__instance => { + { + __instance.fontColor(Color.Red) + .width(100); + } + __builder?.(__instance); }, undefined, "message"); } } @@ -59,12 +62,12 @@ class ArkStateExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkLinkExampleComponent extends ArkStructBase { @@ -82,12 +85,12 @@ class ArkLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkPropExampleComponent extends ArkStructBase { @@ -109,12 +112,12 @@ class ArkPropExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkPropInitializedExampleComponent extends ArkStructBase { @@ -136,12 +139,12 @@ class ArkPropInitializedExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropInitializedExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkProvideExampleComponent extends ArkStructBase { @@ -159,12 +162,12 @@ class ArkProvideExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkConsumeExampleComponent extends ArkStructBase { @@ -182,12 +185,12 @@ class ArkConsumeExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ConsumeExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkBuilderExampleComponent extends ArkStructBase { @@ -201,9 +204,9 @@ class ArkBuilderExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderExampleOptions) { this.foo(); @@ -220,9 +223,9 @@ class ArkGlobalBuilderExampleComponent extends ArkStructBase void, initializers?: GlobalBuilderExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkGlobalBuilderExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: GlobalBuilderExampleOptions) { bar(); @@ -251,9 +254,9 @@ class ArkBuilderParamExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamExampleOptions) { this.foo(); @@ -272,13 +275,16 @@ class ArkStylesExampleComponent extends ArkStructBase void, initializers?: StylesExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStylesExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyStyle(looks); + ArkText(__instance => { + { + __instance.width(17).__applyStyle(looks); + } + __builder?.(__instance); }, undefined); } } @@ -295,13 +301,16 @@ class ArkStylesMethodExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesMethodExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyStyle(this.nice.bind(this)); + ArkText(__instance => { + { + __instance.width(17).__applyStyle(this.nice.bind(this)); + } + __builder?.(__instance); }, undefined); } } @@ -318,13 +327,16 @@ class ArkExtendExampleComponent extends ArkStructBase void, initializers?: ExtendExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkExtendExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExtendExampleOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(17).__applyStyle(clown__Column); + ArkColumn(__instance => { + { + __instance.width(17).__applyStyle(clown__Column); + } + __builder?.(__instance); }, undefined); } } @@ -339,13 +351,16 @@ class ArkAnimatableExtendExampleComponent extends ArkStructBase void, initializers?: AnimatableExtendExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkAnimatableExtendExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AnimatableExtendExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused"); + ArkText(__instance => { + { + __instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused"); + } + __builder?.(__instance); }, undefined); } } @@ -371,9 +386,9 @@ class ArkWatchExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: WatchExampleOptions) { } @@ -393,9 +408,9 @@ class ArkStorageLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkExampleOptions) { } @@ -419,9 +434,9 @@ class ArkStoragePropExampleComponent extends ArkStructBase("storage", "Start").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropExampleOptions) { } @@ -443,9 +458,9 @@ class ArkCustomDialogExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogExampleOptions) { } @@ -478,9 +493,9 @@ export class ArkCustomDialogControllerExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogControllerExampleOptions) { } @@ -512,15 +527,18 @@ class ArkObjectLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ObjectLinkExampleOptions) { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { - this.a.c += 1; - }); + ArkButton(__instance => { + { + __instance.onClick(() => { + this.a.c += 1; + }); + } + __builder?.(__instance); }, undefined); } } @@ -539,12 +557,12 @@ class ArkObjectLinkExampleParentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ObjectLinkExampleParentOptions) { - ObjectLinkExample(undefined, undefined); + ObjectLinkExample(__builder, undefined); } } class ArkPlainPropertyExampleComponent extends ArkStructBase { @@ -577,12 +595,12 @@ class ArkCallExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CallExampleOptions) { - Child(undefined, undefined, { __backing_counter: this.__backing_state } as ChildOptions); + Child(__builder, undefined, { __backing_counter: this.__backing_state } as ChildOptions); } } class ArkChildComponent extends ArkStructBase { @@ -600,213 +618,248 @@ class ArkChildComponent extends ArkStructBase { this.__backing_counter!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { } } +class ArkBuilderPropagationExampleComponent extends ArkStructBase { + private _entry_local_storage_ = new LocalStorage(); + __initializeStruct(/**/ + /** @memo */ + content?: () => void, initializers?: BuilderPropagationExampleOptions): void { + } + /** @memo */ + __build(/**/ + /** @memo */ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ + /** @memo */ + content?: () => void, initializers?: BuilderPropagationExampleOptions) { + ChildWithBuilder(__instance => { + { + __instance.width(100); + } + __builder?.(__instance); + }, undefined); + } +} +class ArkChildWithBuilderComponent extends ArkStructBase { + private _entry_local_storage_ = new LocalStorage(); + __initializeStruct(/**/ + /** @memo */ + content?: () => void, initializers?: ChildWithBuilderOptions): void { + } + /** @memo */ + __build(/**/ + /** @memo */ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ + /** @memo */ + content?: () => void, initializers?: ChildWithBuilderOptions) { + ArkColumn(__builder, undefined); + } +} /** @memo */ export function EntryExample(/**/ /** @memo */ -style?: (instance: ArkEntryExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: EntryExampleOptions): ArkEntryExampleComponent { +content?: () => void, initializers?: EntryExampleOptions): void { const updatedInitializers: EntryExampleOptions = {}; - return ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, updatedInitializers); + ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, updatedInitializers); } /** @memo */ export function ComponentExample(/**/ /** @memo */ -style?: (instance: ArkComponentExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ComponentExampleOptions): ArkComponentExampleComponent { +content?: () => void, initializers?: ComponentExampleOptions): void { const updatedInitializers: ComponentExampleOptions = {}; - return ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, updatedInitializers); + ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, updatedInitializers); } /** @memo */ export function BuildExample(/**/ /** @memo */ -style?: (instance: ArkBuildExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuildExampleOptions): ArkBuildExampleComponent { +content?: () => void, initializers?: BuildExampleOptions): void { const updatedInitializers: BuildExampleOptions = {}; - return ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, updatedInitializers); + ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, updatedInitializers); } /** @memo */ export function StateExample(/**/ /** @memo */ -style?: (instance: ArkStateExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateExampleOptions): ArkStateExampleComponent { +content?: () => void, initializers?: StateExampleOptions): void { const updatedInitializers: StateExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, updatedInitializers); + ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, updatedInitializers); } /** @memo */ export function LinkExample(/**/ /** @memo */ -style?: (instance: ArkLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkExampleOptions): ArkLinkExampleComponent { +content?: () => void, initializers?: LinkExampleOptions): void { const updatedInitializers: LinkExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, updatedInitializers); + ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function PropExample(/**/ /** @memo */ -style?: (instance: ArkPropExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropExampleOptions): ArkPropExampleComponent { +content?: () => void, initializers?: PropExampleOptions): void { const updatedInitializers: PropExampleOptions = { x: initializers?.x, __backing_x: initializers?.__backing_x }; - return ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, updatedInitializers); + ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, updatedInitializers); } /** @memo */ export function PropInitializedExample(/**/ /** @memo */ -style?: (instance: ArkPropInitializedExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropInitializedExampleOptions): ArkPropInitializedExampleComponent { +content?: () => void, initializers?: PropInitializedExampleOptions): void { const updatedInitializers: PropInitializedExampleOptions = { x: initializers?.x, __backing_x: initializers?.__backing_x }; - return ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, updatedInitializers); + ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, updatedInitializers); } /** @memo */ export function ProvideExample(/**/ /** @memo */ -style?: (instance: ArkProvideExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideExampleOptions): ArkProvideExampleComponent { +content?: () => void, initializers?: ProvideExampleOptions): void { const __provide_name = contextLocalStateOf("name", () => "text"); const updatedInitializers: ProvideExampleOptions = { __backing_x: __provide_name }; - return ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, updatedInitializers); + ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, updatedInitializers); } /** @memo */ export function ConsumeExample(/**/ /** @memo */ -style?: (instance: ArkConsumeExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ConsumeExampleOptions): ArkConsumeExampleComponent { +content?: () => void, initializers?: ConsumeExampleOptions): void { const __consume_name = contextLocal("name") as MutableState; const updatedInitializers: ConsumeExampleOptions = { __backing_x: __consume_name }; - return ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, updatedInitializers); + ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, updatedInitializers); } /** @memo */ export function BuilderExample(/**/ /** @memo */ -style?: (instance: ArkBuilderExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderExampleOptions): ArkBuilderExampleComponent { +content?: () => void, initializers?: BuilderExampleOptions): void { const updatedInitializers: BuilderExampleOptions = {}; - return ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, updatedInitializers); + ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, updatedInitializers); } /** @memo */ export function GlobalBuilderExample(/**/ /** @memo */ -style?: (instance: ArkGlobalBuilderExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: GlobalBuilderExampleOptions): ArkGlobalBuilderExampleComponent { +content?: () => void, initializers?: GlobalBuilderExampleOptions): void { const updatedInitializers: GlobalBuilderExampleOptions = {}; - return ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, updatedInitializers); + ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamExample(/**/ /** @memo */ -style?: (instance: ArkBuilderParamExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamExampleOptions): ArkBuilderParamExampleComponent { +content?: () => void, initializers?: BuilderParamExampleOptions): void { const updatedInitializers: BuilderParamExampleOptions = { foo: initializers?.foo }; - return ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, updatedInitializers); + ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, updatedInitializers); } /** @memo */ export function StylesExample(/**/ /** @memo */ -style?: (instance: ArkStylesExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesExampleOptions): ArkStylesExampleComponent { +content?: () => void, initializers?: StylesExampleOptions): void { const updatedInitializers: StylesExampleOptions = {}; - return ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, updatedInitializers); + ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, updatedInitializers); } /** @memo */ export function StylesMethodExample(/**/ /** @memo */ -style?: (instance: ArkStylesMethodExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesMethodExampleOptions): ArkStylesMethodExampleComponent { +content?: () => void, initializers?: StylesMethodExampleOptions): void { const updatedInitializers: StylesMethodExampleOptions = {}; - return ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, updatedInitializers); + ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, updatedInitializers); } /** @memo */ export function ExtendExample(/**/ /** @memo */ -style?: (instance: ArkExtendExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExtendExampleOptions): ArkExtendExampleComponent { +content?: () => void, initializers?: ExtendExampleOptions): void { const updatedInitializers: ExtendExampleOptions = {}; - return ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, updatedInitializers); + ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, updatedInitializers); } /** @memo */ export function AnimatableExtendExample(/**/ /** @memo */ -style?: (instance: ArkAnimatableExtendExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AnimatableExtendExampleOptions): ArkAnimatableExtendExampleComponent { +content?: () => void, initializers?: AnimatableExtendExampleOptions): void { const updatedInitializers: AnimatableExtendExampleOptions = {}; - return ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, updatedInitializers); + ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, updatedInitializers); } /** @memo */ export function WatchExample(/**/ /** @memo */ -style?: (instance: ArkWatchExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: WatchExampleOptions): ArkWatchExampleComponent { +content?: () => void, initializers?: WatchExampleOptions): void { const updatedInitializers: WatchExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, updatedInitializers); + ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkExample(/**/ /** @memo */ -style?: (instance: ArkStorageLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkExampleOptions): ArkStorageLinkExampleComponent { +content?: () => void, initializers?: StorageLinkExampleOptions): void { const updatedInitializers: StorageLinkExampleOptions = { __backing_link: initializers?.__backing_link }; - return ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, updatedInitializers); + ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function StoragePropExample(/**/ /** @memo */ -style?: (instance: ArkStoragePropExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropExampleOptions): ArkStoragePropExampleComponent { +content?: () => void, initializers?: StoragePropExampleOptions): void { const updatedInitializers: StoragePropExampleOptions = { __backing_prop: initializers?.__backing_prop }; - return ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, updatedInitializers); + ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, updatedInitializers); } /** @memo */ -export function CustomDialogExampleImpl(initializers?: CustomDialogExampleOptions): ArkCustomDialogExampleComponent { +export function CustomDialogExampleImpl(initializers?: CustomDialogExampleOptions): void { const updatedInitializers: CustomDialogExampleOptions = { controller: initializers?.controller }; - return ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, updatedInitializers); + ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, updatedInitializers); } export function CustomDialogExample(initializer: Partial = {}) { return { build: bindCustomDialog(CustomDialogExampleImpl, initializer), buildOptions: initializer }; @@ -814,69 +867,87 @@ export function CustomDialogExample(initializer: Partial void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogControllerExampleOptions): ArkCustomDialogControllerExampleComponent { +content?: () => void, initializers?: CustomDialogControllerExampleOptions): void { const updatedInitializers: CustomDialogControllerExampleOptions = { dialogController: initializers?.dialogController }; - return ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, updatedInitializers); + ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, updatedInitializers); } /** @memo */ export function ObjectLinkExample(/**/ /** @memo */ -style?: (instance: ArkObjectLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ObjectLinkExampleOptions): ArkObjectLinkExampleComponent { +content?: () => void, initializers?: ObjectLinkExampleOptions): void { const updatedInitializers: ObjectLinkExampleOptions = { a: initializers?.a, __backing_a: initializers?.__backing_a }; - return ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, updatedInitializers); + ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function ObjectLinkExampleParent(/**/ /** @memo */ -style?: (instance: ArkObjectLinkExampleParentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ObjectLinkExampleParentOptions): ArkObjectLinkExampleParentComponent { +content?: () => void, initializers?: ObjectLinkExampleParentOptions): void { const updatedInitializers: ObjectLinkExampleParentOptions = { __backing_a: initializers?.__backing_a }; - return ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, updatedInitializers); + ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, updatedInitializers); } /** @memo */ export function PlainPropertyExample(/**/ /** @memo */ -style?: (instance: ArkPlainPropertyExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainPropertyExampleOptions): ArkPlainPropertyExampleComponent { +content?: () => void, initializers?: PlainPropertyExampleOptions): void { const updatedInitializers: PlainPropertyExampleOptions = { field: initializers?.field }; - return ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, updatedInitializers); + ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, updatedInitializers); } /** @memo */ export function CallExample(/**/ /** @memo */ -style?: (instance: ArkCallExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CallExampleOptions): ArkCallExampleComponent { +content?: () => void, initializers?: CallExampleOptions): void { const updatedInitializers: CallExampleOptions = { __backing_state: initializers?.__backing_state }; - return ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, updatedInitializers); + ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); +} +/** @memo */ +export function BuilderPropagationExample(/**/ +/** @memo */ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ +/** @memo */ +content?: () => void, initializers?: BuilderPropagationExampleOptions): void { + const updatedInitializers: BuilderPropagationExampleOptions = {}; + ArkBuilderPropagationExampleComponent._instantiate(style, () => new ArkBuilderPropagationExampleComponent, content, updatedInitializers); +} +/** @memo */ +export function ChildWithBuilder(/**/ +/** @memo */ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ +/** @memo */ +content?: () => void, initializers?: ChildWithBuilderOptions): void { + const updatedInitializers: ChildWithBuilderOptions = {}; + ArkChildWithBuilderComponent._instantiate(style, () => new ArkChildWithBuilderComponent, content, updatedInitializers); } export interface EntryExampleOptions { } @@ -962,3 +1033,7 @@ export interface ChildOptions { __backing_counter?: MutableState; counter?: number; } +export interface BuilderPropagationExampleOptions { +} +export interface ChildWithBuilderOptions { +} diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite2.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite2.ts index 6c7b7164b..855bd3aa4 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite2.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite2.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. @@ -30,24 +30,24 @@ class ArkLocalStorageLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkExampleOptions) { - ArkText(undefined, undefined, "LocalStorage entry = " + storage.get("storage")); + ArkText(__builder, undefined, "LocalStorage entry = " + storage.get("storage")); } } /** @memo */ export function LocalStorageLinkExample(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkExampleOptions): ArkLocalStorageLinkExampleComponent { +content?: () => void, initializers?: LocalStorageLinkExampleOptions): void { const updatedInitializers: LocalStorageLinkExampleOptions = { __backing_link: initializers?.__backing_link }; - return ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, updatedInitializers); + ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, updatedInitializers); } export interface LocalStorageLinkExampleOptions { __backing_link?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite3.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite3.ts index 35f95da96..be3830d50 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite3.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/Rewrite3.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. @@ -34,9 +34,9 @@ class ArkLocalStoragePropExampleComponent extends ArkStructBase(this._entry_local_storage_, "storage", "Start").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropExampleOptions) { } @@ -44,13 +44,13 @@ class ArkLocalStoragePropExampleComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropExampleOptions): ArkLocalStoragePropExampleComponent { +content?: () => void, initializers?: LocalStoragePropExampleOptions): void { const updatedInitializers: LocalStoragePropExampleOptions = { __backing_prop: initializers?.__backing_prop }; - return ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, updatedInitializers); + ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, updatedInitializers); } export interface LocalStoragePropExampleOptions { __backing_prop?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/builder-lambda/builder-lambda.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/builder-lambda/builder-lambda.ts index 26f1c13e3..930f8d965 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/builder-lambda/builder-lambda.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/builder-lambda/builder-lambda.ts @@ -16,7 +16,7 @@ declare function Foo(arg1: string): FooAttribute; function _Foo(builder: (instance) => FooAttribute, arg1: string): void { builder(new FooAttribute()); } -_Foo(instance => { - instance.bar() +_Foo(__instance => { + __instance.bar() .qux(); }, "label"); diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/ets-call.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/ets-call.ts index 14210bd5f..266abf2d4 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/ets-call.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/ets-call.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkColumn, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkColumn, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/user-function-declaration.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/user-function-declaration.ts index b184d58d2..afe7e3402 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/user-function-declaration.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/ets-component-call/user-function-declaration.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,9 +34,9 @@ export class ArkStructComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StructOptions) { } } @@ -71,9 +71,9 @@ export class ArkStructWithContentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StructWithContentOptions) { this.content(); @@ -82,25 +82,25 @@ export class ArkStructWithContentComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StructOptions): ArkStructComponent { +content?: () => void, initializers?: StructOptions): void { const updatedInitializers: StructOptions = { param: initializers?.param }; - return ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, updatedInitializers); + ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, updatedInitializers); } /** @memo */ export function StructWithContent(/**/ /** @memo */ -style?: (instance: ArkStructWithContentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StructWithContentOptions): ArkStructWithContentComponent { +content?: () => void, initializers?: StructWithContentOptions): void { const updatedInitializers: StructWithContentOptions = { param: initializers?.param, content: initializers?.content }; - return ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, updatedInitializers); + ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, updatedInitializers); } export interface StructOptions { param?: number; diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/trailing-block.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/trailing-block.ts index 41e5444db..bee38fcbf 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/ets/trailing-block.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/ets/trailing-block.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; class ArkParentStructComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -6,12 +6,12 @@ class ArkParentStructComponent extends ArkStructBase void, initializers?: ParentStructOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentStructComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentStructOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ChildStruct(undefined, () => { ArkText(undefined, undefined, "xxx"); }); @@ -41,9 +41,9 @@ class ArkChildStructComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildStructOptions) { this.content(); @@ -52,22 +52,22 @@ class ArkChildStructComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentStructOptions): ArkParentStructComponent { +content?: () => void, initializers?: ParentStructOptions): void { const updatedInitializers: ParentStructOptions = {}; - return ArkParentStructComponent._instantiate(style, () => new ArkParentStructComponent, content, updatedInitializers); + ArkParentStructComponent._instantiate(style, () => new ArkParentStructComponent, content, updatedInitializers); } /** @memo */ export function ChildStruct(/**/ /** @memo */ -style?: (instance: ArkChildStructComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildStructOptions): ArkChildStructComponent { +content?: () => void, initializers?: ChildStructOptions): void { const updatedInitializers: ChildStructOptions = { content: initializers?.content }; - return ArkChildStructComponent._instantiate(style, () => new ArkChildStructComponent, content, updatedInitializers); + ArkChildStructComponent._instantiate(style, () => new ArkChildStructComponent, content, updatedInitializers); } export interface ParentStructOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@builder.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@builder.ts index a17bed388..d13bb1641 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@builder.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@builder.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkDivider, ArkDividerComponent, ArkFlex, ArkFlexComponent, ArkList, ArkListComponent, ArkListItem, ArkListItemComponent, ArkNavigation, ArkNavigationComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkFlex, ArkFlexComponent, ArkList, ArkListComponent, ArkListItem, ArkListItemComponent, ArkNavigation, ArkNavigationComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function noParam() { @@ -45,57 +45,57 @@ class ArkMyComponentComponent extends ArkStructBase { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, "文本"); } /** @memo */ NavigationTitlePara(label: string) { ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(80) + ArkText((__instance: ArkTextComponent) => { + __instance.width(80) .bindMenu(this.textBuilder); }, undefined, label); }); } /** @memo */ MenuBuilder() { - ArkFlex((instance: ArkFlexComponent) => { - instance.width(100); + ArkFlex((__instance: ArkFlexComponent) => { + __instance.width(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'Test menu item 1'); - ArkDivider((instance: ArkDividerComponent) => { - instance.height(10); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.height(10); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'Test menu item 2'); }, { direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkMyComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkColumn(__builder, () => { + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindMenu(/* */ /** @memo */ (): void => this.NavigationTitlePara("111")); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkText((__instance: ArkTextComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); }); }, undefined, "Drag Me"); specificParam('test1', 'test2'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindPopup(false, { builder: this.MenuBuilder, onStateChange: (e) => { @@ -107,17 +107,17 @@ class ArkMyComponentComponent extends ArkStructBase { ArkText(undefined, undefined, 'Test Text'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindContextMenu(this.MenuBuilder, ResponseType.RightClick); }, () => { ArkText(undefined, undefined, 'rightclick for menu'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10); + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10); }, () => { - ArkNavigation((instance: ArkNavigationComponent) => { - instance.title(noParam) + ArkNavigation((__instance: ArkNavigationComponent) => { + __instance.title(noParam) .menus(this.textBuilder) .toolBar({ items: [ { value: 'app', text: 'Grid', action: () => { @@ -132,18 +132,18 @@ class ArkMyComponentComponent extends ArkStructBase { - ArkList((instance: ArkListComponent) => { - instance.listDirection(Axis.Vertical) + ArkList((__instance: ArkListComponent) => { + __instance.listDirection(Axis.Vertical) .height(300) .margin({ top: 10, left: 18 }) .width('100%'); }, () => { ForEach(this.arr, (item) => { - ArkListItem((instance: ArkListItemComponent) => { - instance.editable(true); + ArkListItem((__instance: ArkListItemComponent) => { + __instance.editable(true); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('90%') + ArkText((__instance: ArkTextComponent) => { + __instance.width('90%') .height(80) .backgroundColor('#3366CC') .borderRadius(15) @@ -153,37 +153,37 @@ class ArkMyComponentComponent extends ArkStructBase item); }, { space: 5, initialIndex: 0 }); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.hideBar = !this.hideBar; }) .margin({ left: 135, top: 60 }); }, undefined, this.hideBar ? "tool bar" : "hide bar"); }); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10); + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10); }, () => { ArkTabs(undefined, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('pink'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('pink'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Pink); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Pink); }, undefined, '111'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('yellow'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('yellow'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Yellow); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Yellow); }, undefined, '222'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('blue'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('blue'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Blue); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Blue); }, undefined, '333'); }); }, { barPosition: BarPosition.Start, controller: this.controller }); @@ -195,15 +195,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { arr: initializers?.arr, controller: initializers?.controller, __backing_hideBar: initializers?.__backing_hideBar }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { arr?: number[]; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderParam.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderParam.ts index 5404a845b..513cbccb4 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderParam.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderParam.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { CustomContainerExport, CustomContainerExportOptions } from './test/pages/TestComponent'; class ArkCustomContainerComponent extends ArkStructBase { @@ -54,12 +54,12 @@ class ArkCustomContainerComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.header); this.content(); this.callContent(); @@ -98,12 +98,12 @@ class ArkCustomContainer2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainer2Options) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.header); this.content(); }); @@ -112,11 +112,11 @@ class ArkCustomContainer2Component extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label1); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label2); }); } @@ -137,32 +137,32 @@ class ArkCustomContainerUserComponent extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, "content"); }); } /** @memo */ callSpecificParam(label1: string, label2: string) { ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label1); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label2); }); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCustomContainerUserComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerUserOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CustomContainerExport(undefined, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.onClick(() => { + ArkColumn((__instance: ArkColumnComponent) => { + __instance.onClick(() => { this.text = "changeHeader"; }); }, () => { @@ -183,8 +183,8 @@ class ArkCustomContainerUserComponent extends ArkStructBase { CustomContainer2(undefined, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.onClick(() => { + ArkColumn((__instance: ArkColumnComponent) => { + __instance.onClick(() => { this.text = "changeHeader"; }); }, () => { @@ -201,39 +201,39 @@ export {}; /** @memo */ export function CustomContainer(/**/ /** @memo */ -style?: (instance: ArkCustomContainerComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerOptions): ArkCustomContainerComponent { +content?: () => void, initializers?: CustomContainerOptions): void { const updatedInitializers: CustomContainerOptions = { header: initializers?.header, content: initializers?.content, callContent: initializers?.callContent, footer: initializers?.footer }; - return ArkCustomContainerComponent._instantiate(style, () => new ArkCustomContainerComponent, content, updatedInitializers); + ArkCustomContainerComponent._instantiate(style, () => new ArkCustomContainerComponent, content, updatedInitializers); } /** @memo */ export function CustomContainer2(/**/ /** @memo */ -style?: (instance: ArkCustomContainer2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainer2Options): ArkCustomContainer2Component { +content?: () => void, initializers?: CustomContainer2Options): void { const updatedInitializers: CustomContainer2Options = { header: initializers?.header, content: initializers?.content }; - return ArkCustomContainer2Component._instantiate(style, () => new ArkCustomContainer2Component, content, updatedInitializers); + ArkCustomContainer2Component._instantiate(style, () => new ArkCustomContainer2Component, content, updatedInitializers); } /** @memo */ export function CustomContainerUser(/**/ /** @memo */ -style?: (instance: ArkCustomContainerUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerUserOptions): ArkCustomContainerUserComponent { +content?: () => void, initializers?: CustomContainerUserOptions): void { const updatedInitializers: CustomContainerUserOptions = { __backing_text: initializers?.__backing_text }; - return ArkCustomContainerUserComponent._instantiate(style, () => new ArkCustomContainerUserComponent, content, updatedInitializers); + ArkCustomContainerUserComponent._instantiate(style, () => new ArkCustomContainerUserComponent, content, updatedInitializers); } export interface CustomContainerOptions { header?: string; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithComponent.ts index 70c79ea97..561e2ee3c 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function myBuilder() { @@ -15,12 +15,12 @@ class ArkIndexComponent extends ArkStructBase { child(undefined, undefined); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { myBuilder(); this.Builder1(); child(undefined, undefined); @@ -34,32 +34,32 @@ class ArkchildComponent extends ArkStructBase { content?: () => void, initializers?: childOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkText(undefined, undefined, 'Hello'); + ArkText(__builder, undefined, 'Hello'); } } export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = {}; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = {}; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface IndexOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithForEach.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithForEach.ts index 2bb93bf2e..a7d656dfa 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithForEach.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithForEach.ts @@ -1,9 +1,11 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function ComB(param: string[]) { ForEach(param, item => { - ComA(undefined, undefined).backgroundColor('red'); + ComA((__instance: ArkCommonMethodComponent) => { + __instance.backgroundColor('red'); + }, undefined); }); } class ArkIndexComponent extends ArkStructBase { @@ -21,12 +23,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_arr!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ComB(this.arr); }); } @@ -38,14 +40,14 @@ class ArkComAComponent extends ArkStructBase { content?: () => void, initializers?: ComAOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkComAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ComAOptions) { - ArkRow(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkRow(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '自定义组件'); }); } @@ -54,22 +56,22 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function ComA(/**/ /** @memo */ -style?: (instance: ArkComAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ComAOptions): ArkComAComponent { +content?: () => void, initializers?: ComAOptions): void { const updatedInitializers: ComAOptions = {}; - return ArkComAComponent._instantiate(style, () => new ArkComAComponent, content, updatedInitializers); + ArkComAComponent._instantiate(style, () => new ArkComAComponent, content, updatedInitializers); } export interface IndexOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithLinkData.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithLinkData.ts index 5e6eafd27..2f9b5d1dd 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithLinkData.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@builderWithLinkData.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkTitleCompComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,12 +15,12 @@ class ArkTitleCompComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TitleCompOptions) { - ArkText(undefined, undefined, this.title); + ArkText(__builder, undefined, this.title); } } class ArkTestPageComponent extends ArkStructBase { @@ -42,12 +42,12 @@ class ArkTestPageComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestPageOptions) { - ArkFlex(undefined, () => { + ArkFlex(__builder, () => { this.TitleCompView(); }); } @@ -56,24 +56,24 @@ export {}; /** @memo */ export function TitleComp(/**/ /** @memo */ -style?: (instance: ArkTitleCompComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TitleCompOptions): ArkTitleCompComponent { +content?: () => void, initializers?: TitleCompOptions): void { const updatedInitializers: TitleCompOptions = { __backing_title: initializers?.__backing_title }; - return ArkTitleCompComponent._instantiate(style, () => new ArkTitleCompComponent, content, updatedInitializers); + ArkTitleCompComponent._instantiate(style, () => new ArkTitleCompComponent, content, updatedInitializers); } /** @memo */ export function TestPage(/**/ /** @memo */ -style?: (instance: ArkTestPageComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestPageOptions): ArkTestPageComponent { +content?: () => void, initializers?: TestPageOptions): void { const updatedInitializers: TestPageOptions = { __backing_value: initializers?.__backing_value }; - return ArkTestPageComponent._instantiate(style, () => new ArkTestPageComponent, content, updatedInitializers); + ArkTestPageComponent._instantiate(style, () => new ArkTestPageComponent, content, updatedInitializers); } export interface TitleCompOptions { __backing_title?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@consume_@provide.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@consume_@provide.ts index de73e5dfa..df4a92058 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@consume_@provide.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@consume_@provide.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, contextLocal, contextLocalStateOf, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, contextLocal, contextLocalStateOf, observableProxy } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkCompAComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,20 +15,20 @@ class ArkCompAComponent extends ArkStructBase { this.__backing_reviewVotes!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompAOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CompB(undefined, undefined); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.reviewVotes += 1; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '' + this.reviewVotes); }); }); @@ -41,12 +41,12 @@ class ArkCompBComponent extends ArkStructBase { content?: () => void, initializers?: CompBOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompBOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CompC(undefined, undefined); }); } @@ -66,19 +66,19 @@ class ArkCompCComponent extends ArkStructBase { this.__backing_reviewVotes!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompCComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompCOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.reviewVotes += 1; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '' + this.reviewVotes); }); }); @@ -88,35 +88,35 @@ export {}; /** @memo */ export function CompA(/**/ /** @memo */ -style?: (instance: ArkCompAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompAOptions): ArkCompAComponent { +content?: () => void, initializers?: CompAOptions): void { const __provide_reviewVote = contextLocalStateOf("reviewVote", () => 0); const updatedInitializers: CompAOptions = { __backing_reviewVotes: __provide_reviewVote }; - return ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); + ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); } /** @memo */ export function CompB(/**/ /** @memo */ -style?: (instance: ArkCompBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompBOptions): ArkCompBComponent { +content?: () => void, initializers?: CompBOptions): void { const updatedInitializers: CompBOptions = {}; - return ArkCompBComponent._instantiate(style, () => new ArkCompBComponent, content, updatedInitializers); + ArkCompBComponent._instantiate(style, () => new ArkCompBComponent, content, updatedInitializers); } /** @memo */ export function CompC(/**/ /** @memo */ -style?: (instance: ArkCompCComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompCOptions): ArkCompCComponent { +content?: () => void, initializers?: CompCOptions): void { const __consume_reviewVote = contextLocal("reviewVote") as MutableState; const updatedInitializers: CompCOptions = { __backing_reviewVotes: __consume_reviewVote }; - return ArkCompCComponent._instantiate(style, () => new ArkCompCComponent, content, updatedInitializers); + ArkCompCComponent._instantiate(style, () => new ArkCompCComponent, content, updatedInitializers); } export interface CompAOptions { __backing_reviewVotes?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@customDialog.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@customDialog.ts index e8958b42e..d4826f0be 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@customDialog.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@customDialog.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, bindCustomDialog, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, bindCustomDialog, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkDialogExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -65,35 +65,35 @@ class ArkDialogExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DialogExampleOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.count++; }); }, undefined, 'current count is: ' + this.count); }); ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.isPlaying = !this.isPlaying; }); }, undefined, this.isPlaying ? 'play' : 'pause'); }); ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.action1(); }); }, undefined, "Option A"); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.action2(47, "Option B is great choice"); }); @@ -149,26 +149,26 @@ class ArkCustomDialogUserComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogUserOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'current countInitValue is: ' + this.countInitValue); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'current playingInitValue is: ' + this.playingInitValue); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.countInitValue--; this.dialogController.open(); }); }, undefined, "Click to open Dialog -1"); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.countInitValue++; this.dialogController.close(); }); @@ -178,7 +178,7 @@ class ArkCustomDialogUserComponent extends ArkStructBase new ArkDialogExampleComponent, undefined, updatedInitializers); + ArkDialogExampleComponent._instantiate(undefined, () => new ArkDialogExampleComponent, undefined, updatedInitializers); } export function DialogExample(initializer: Partial = {}) { return { build: bindCustomDialog(DialogExampleImpl, initializer), buildOptions: initializer }; @@ -196,15 +196,15 @@ export function DialogExample(initializer: Partial = /** @memo */ export function CustomDialogUser(/**/ /** @memo */ -style?: (instance: ArkCustomDialogUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogUserOptions): ArkCustomDialogUserComponent { +content?: () => void, initializers?: CustomDialogUserOptions): void { const updatedInitializers: CustomDialogUserOptions = { __backing_countInitValue: initializers?.__backing_countInitValue, __backing_playingInitValue: initializers?.__backing_playingInitValue, dialogController: initializers?.dialogController }; - return ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); + ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); } export interface DialogExampleOptions { __backing_count?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@link.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@link.ts index bc1c4f46e..0c8fc356e 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@link.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@link.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkLinkComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,12 +15,12 @@ class ArkLinkComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponentOptions) { - ArkText(undefined, undefined, this.counter); + ArkText(__builder, undefined, this.counter); } } class ArkParentComponentComponent extends ArkStructBase { @@ -38,12 +38,12 @@ class ArkParentComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { LinkComponent(undefined, undefined, { __backing_counter: this.__backing_value } as LinkComponentOptions); }); } @@ -52,24 +52,24 @@ export {}; /** @memo */ export function LinkComponent(/**/ /** @memo */ -style?: (instance: ArkLinkComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponentOptions): ArkLinkComponentComponent { +content?: () => void, initializers?: LinkComponentOptions): void { const updatedInitializers: LinkComponentOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkLinkComponentComponent._instantiate(style, () => new ArkLinkComponentComponent, content, updatedInitializers); + ArkLinkComponentComponent._instantiate(style, () => new ArkLinkComponentComponent, content, updatedInitializers); } /** @memo */ export function ParentComponent(/**/ /** @memo */ -style?: (instance: ArkParentComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentComponentOptions): ArkParentComponentComponent { +content?: () => void, initializers?: ParentComponentOptions): void { const updatedInitializers: ParentComponentOptions = { __backing_value: initializers?.__backing_value }; - return ArkParentComponentComponent._instantiate(style, () => new ArkParentComponentComponent, content, updatedInitializers); + ArkParentComponentComponent._instantiate(style, () => new ArkParentComponentComponent, content, updatedInitializers); } export interface LinkComponentOptions { __backing_counter?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@objectLink.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@objectLink.ts index aba6a282e..f5001d274 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@objectLink.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@objectLink.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, objectLinkState, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, objectLinkState, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; var nextID: number = 0; @Observed @@ -29,12 +29,12 @@ class ArkCustomTextComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomTextOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, this.model.text); }); } @@ -62,12 +62,12 @@ class ArkParentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ForEach(this.models, (item) => { CustomText(undefined, undefined, { model: item } as CustomTextOptions); }, (item) => item.text); @@ -78,26 +78,26 @@ export {}; /** @memo */ export function CustomText(/**/ /** @memo */ -style?: (instance: ArkCustomTextComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomTextOptions): ArkCustomTextComponent { +content?: () => void, initializers?: CustomTextOptions): void { const updatedInitializers: CustomTextOptions = { model: initializers?.model, __backing_model: initializers?.__backing_model }; - return ArkCustomTextComponent._instantiate(style, () => new ArkCustomTextComponent, content, updatedInitializers); + ArkCustomTextComponent._instantiate(style, () => new ArkCustomTextComponent, content, updatedInitializers); } /** @memo */ export function Parent(/**/ /** @memo */ -style?: (instance: ArkParentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentOptions): ArkParentComponent { +content?: () => void, initializers?: ParentOptions): void { const updatedInitializers: ParentOptions = { nextId: initializers?.nextId, __backing_models: initializers?.__backing_models }; - return ArkParentComponent._instantiate(style, () => new ArkParentComponent, content, updatedInitializers); + ArkParentComponent._instantiate(style, () => new ArkParentComponent, content, updatedInitializers); } export interface CustomTextOptions { __backing_model?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@observed_@objectLink.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@observed_@objectLink.ts index 0e0cacaf9..f212751bc 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@observed_@objectLink.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@observed_@objectLink.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, objectLinkState, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, objectLinkState, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let NextID: number = 0; @Observed @@ -36,12 +36,12 @@ class ArkViewAComponent extends ArkStructBase { this.__backing_varA?.update(initializers?.varA); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewAOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, 'ViewA-' + this.varA.id); }); } @@ -61,12 +61,12 @@ class ArkViewBComponent extends ArkStructBase { this.__backing_varB!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewBOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkRow(undefined, () => { ViewA(undefined, undefined, { varA: this.varB.a } as ViewAOptions); ArkText(undefined, undefined, 'ViewB'); @@ -78,25 +78,25 @@ export {}; /** @memo */ export function ViewA(/**/ /** @memo */ -style?: (instance: ArkViewAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewAOptions): ArkViewAComponent { +content?: () => void, initializers?: ViewAOptions): void { const updatedInitializers: ViewAOptions = { varA: initializers?.varA, __backing_varA: initializers?.__backing_varA }; - return ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); + ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); } /** @memo */ export function ViewB(/**/ /** @memo */ -style?: (instance: ArkViewBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewBOptions): ArkViewBComponent { +content?: () => void, initializers?: ViewBOptions): void { const updatedInitializers: ViewBOptions = { __backing_varB: initializers?.__backing_varB }; - return ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); + ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); } export interface ViewAOptions { __backing_varA?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@preview.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@preview.ts index ca092138f..aa01d3866 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@preview.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@preview.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkHomePreviewComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,13 +15,16 @@ class ArkHomePreviewComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomePreviewComponentOptions) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText(__instance => { + { + __instance.fontSize(50); + } + __builder?.(__instance); }, undefined, this.value); } } @@ -32,12 +35,12 @@ class ArkHomePreviewComponent_PreviewComponent extends ArkStructBase void, initializers?: HomePreviewComponent_PreviewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkHomePreviewComponent_PreviewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomePreviewComponent_PreviewOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { HomePreviewComponent(undefined, undefined); }); } @@ -46,22 +49,22 @@ export {}; /** @memo */ export function HomePreviewComponent(/**/ /** @memo */ -style?: (instance: ArkHomePreviewComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomePreviewComponentOptions): ArkHomePreviewComponentComponent { +content?: () => void, initializers?: HomePreviewComponentOptions): void { const updatedInitializers: HomePreviewComponentOptions = { value: initializers?.value }; - return ArkHomePreviewComponentComponent._instantiate(style, () => new ArkHomePreviewComponentComponent, content, updatedInitializers); + ArkHomePreviewComponentComponent._instantiate(style, () => new ArkHomePreviewComponentComponent, content, updatedInitializers); } /** @memo */ export function HomePreviewComponent_Preview(/**/ /** @memo */ -style?: (instance: ArkHomePreviewComponent_PreviewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomePreviewComponent_PreviewOptions): ArkHomePreviewComponent_PreviewComponent { +content?: () => void, initializers?: HomePreviewComponent_PreviewOptions): void { const updatedInitializers: HomePreviewComponent_PreviewOptions = {}; - return ArkHomePreviewComponent_PreviewComponent._instantiate(style, () => new ArkHomePreviewComponent_PreviewComponent, content, updatedInitializers); + ArkHomePreviewComponent_PreviewComponent._instantiate(style, () => new ArkHomePreviewComponent_PreviewComponent, content, updatedInitializers); } export interface HomePreviewComponentOptions { value?: string; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@prop.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@prop.ts index 0ad86f07e..d297c662b 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@prop.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@prop.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkCustomXComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -19,9 +19,9 @@ class ArkCustomXComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomXOptions) { } @@ -41,12 +41,12 @@ class ArkCustomYComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomYOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { CustomX(undefined, undefined, { fruit: this.parentFruit } as CustomXOptions); CustomX(undefined, undefined, {} as CustomXOptions); }); @@ -56,25 +56,25 @@ export {}; /** @memo */ export function CustomX(/**/ /** @memo */ -style?: (instance: ArkCustomXComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomXOptions): ArkCustomXComponent { +content?: () => void, initializers?: CustomXOptions): void { const updatedInitializers: CustomXOptions = { fruit: initializers?.fruit, __backing_fruit: initializers?.__backing_fruit }; - return ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); + ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); } /** @memo */ export function CustomY(/**/ /** @memo */ -style?: (instance: ArkCustomYComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomYOptions): ArkCustomYComponent { +content?: () => void, initializers?: CustomYOptions): void { const updatedInitializers: CustomYOptions = { __backing_parentFruit: initializers?.__backing_parentFruit }; - return ArkCustomYComponent._instantiate(style, () => new ArkCustomYComponent, content, updatedInitializers); + ArkCustomYComponent._instantiate(style, () => new ArkCustomYComponent, content, updatedInitializers); } export interface CustomXOptions { __backing_fruit?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@propComplexType.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@propComplexType.ts index 5c94beae9..a92427953 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@propComplexType.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@propComplexType.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; var nextID: number = 0; @Observed @@ -31,12 +31,12 @@ class ArkCustomXComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomXOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, JSON.stringify(this.fruit.c)); }); } @@ -56,12 +56,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_arrA!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { CustomX(undefined, undefined, { fruit: this.arrA[0] } as CustomXOptions); CustomX(undefined, undefined, {} as CustomXOptions); }); @@ -71,25 +71,25 @@ export {}; /** @memo */ export function CustomX(/**/ /** @memo */ -style?: (instance: ArkCustomXComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomXOptions): ArkCustomXComponent { +content?: () => void, initializers?: CustomXOptions): void { const updatedInitializers: CustomXOptions = { fruit: initializers?.fruit, __backing_fruit: initializers?.__backing_fruit }; - return ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); + ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); } /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_arrA: initializers?.__backing_arrA }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface CustomXOptions { __backing_fruit?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@state.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@state.ts index e2a4ea355..ac6ae60c0 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@state.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@state.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkStatePageComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,12 +15,12 @@ class ArkStatePageComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StatePageOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, "counter:" + this.counter); }); } @@ -29,13 +29,13 @@ export {}; /** @memo */ export function StatePage(/**/ /** @memo */ -style?: (instance: ArkStatePageComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StatePageOptions): ArkStatePageComponent { +content?: () => void, initializers?: StatePageOptions): void { const updatedInitializers: StatePageOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkStatePageComponent._instantiate(style, () => new ArkStatePageComponent, content, updatedInitializers); + ArkStatePageComponent._instantiate(style, () => new ArkStatePageComponent, content, updatedInitializers); } export interface StatePageOptions { __backing_counter?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@storageLink.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@storageLink.ts index da7b42656..e831d70c6 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@storageLink.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@storageLink.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let varA = AppStorage.Link('varA'); let envLang = AppStorage.Prop('languageCode'); @@ -40,19 +40,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -69,15 +69,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@storageProp.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@storageProp.ts index d2ca15cff..7fc548269 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@storageProp.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@storageProp.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let varA = AppStorage.Link('varA'); let envLang = AppStorage.Prop('languageCode'); @@ -40,19 +40,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -69,15 +69,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@styles.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@styles.ts index 03725cdca..315341422 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@styles.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@styles.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function globalFancy>(CommonInstance: T): T { @@ -23,24 +23,24 @@ class ArkFancyUseComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: FancyUseOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(100) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .width(100) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }) @@ -61,13 +61,13 @@ export {}; /** @memo */ export function FancyUse(/**/ /** @memo */ -style?: (instance: ArkFancyUseComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: FancyUseOptions): ArkFancyUseComponent { +content?: () => void, initializers?: FancyUseOptions): void { const updatedInitializers: FancyUseOptions = { __backing_enable: initializers?.__backing_enable }; - return ArkFancyUseComponent._instantiate(style, () => new ArkFancyUseComponent, content, updatedInitializers); + ArkFancyUseComponent._instantiate(style, () => new ArkFancyUseComponent, content, updatedInitializers); } export interface FancyUseOptions { __backing_enable?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@stylesExport.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@stylesExport.ts index 187d20b75..460474718 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@stylesExport.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@stylesExport.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function globalFancy>(CommonInstance: T): T { @@ -23,24 +23,24 @@ export class ArkFancyUseExpComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: FancyUseExpOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(100) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .width(100) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }) @@ -61,13 +61,13 @@ export {}; /** @memo */ export function FancyUseExp(/**/ /** @memo */ -style?: (instance: ArkFancyUseExpComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: FancyUseExpOptions): ArkFancyUseExpComponent { +content?: () => void, initializers?: FancyUseExpOptions): void { const updatedInitializers: FancyUseExpOptions = { __backing_enable: initializers?.__backing_enable }; - return ArkFancyUseExpComponent._instantiate(style, () => new ArkFancyUseExpComponent, content, updatedInitializers); + ArkFancyUseExpComponent._instantiate(style, () => new ArkFancyUseExpComponent, content, updatedInitializers); } export interface FancyUseExpOptions { __backing_enable?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/@watch.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/@watch.ts index ba832306a..637895cc1 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/@watch.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/@watch.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, OnChange, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, OnChange, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkCompAComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -66,29 +66,29 @@ class ArkCompAComponent extends ArkStructBase { this.updateTip(); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompAOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.shopBasket.push(Math.round(100 * Math.random())); }); }, undefined, "add to basket"); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'totalPurchase: ' + this.totalPurchase); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { let alList = 'abcdefghijklmnopqrstuvwxyz'; let ranItem = alList[Math.floor(Math.random() * 26)]; this.defArray.push(ranItem); }); }, undefined, "put item"); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'tips: ' + this.resultTip); }); } @@ -97,16 +97,16 @@ export {}; /** @memo */ export function CompA(/**/ /** @memo */ -style?: (instance: ArkCompAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompAOptions): ArkCompAComponent { +content?: () => void, initializers?: CompAOptions): void { const updatedInitializers: CompAOptions = { __backing_shopBasket: initializers?.__backing_shopBasket, __backing_totalPurchase: initializers?.__backing_totalPurchase, __backing_defArray: initializers?.__backing_defArray, __backing_resultTip: initializers?.__backing_resultTip }; - return ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); + ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); } export interface CompAOptions { __backing_shopBasket?: MutableState>; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/GridItem.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/GridItem.ts index e99722b37..5769b31f1 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/GridItem.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/GridItem.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkGrid, ArkGridItem, ArkGridItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkGrid, ArkGridItem, ArkGridItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkParentViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,17 +7,17 @@ class ArkParentViewComponent extends ArkStructBase void, initializers?: ParentViewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentViewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkGrid(undefined, () => { - ArkGridItem((instance: ArkGridItemComponent) => { - instance.width(200).height(100); + ArkGrid(__builder, () => { + ArkGridItem((__instance: ArkGridItemComponent) => { + __instance.width(200).height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(100); + ArkText((__instance: ArkTextComponent) => { + __instance.width(100); }, undefined, 'xx'); }); }); @@ -27,11 +27,11 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = {}; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } export interface ParentViewOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/ListItem.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/ListItem.ts index 8d5334054..8f5374c80 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/ListItem.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/ListItem.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkParentViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,17 +7,17 @@ class ArkParentViewComponent extends ArkStructBase void, initializers?: ParentViewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentViewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkList(undefined, () => { - ArkListItem((instance: ArkListItemComponent) => { - instance.width(200).height(100); + ArkList(__builder, () => { + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(200).height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(100); + ArkText((__instance: ArkTextComponent) => { + __instance.width(100); }, undefined, 'xx'); }, 'true'); }); @@ -27,11 +27,11 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = {}; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } export interface ParentViewOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/XComponentContainer.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/XComponentContainer.ts index 21d1a4b18..14fbb92cb 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/XComponentContainer.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/XComponentContainer.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkXComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkXComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkHomeComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,12 +7,12 @@ class ArkHomeComponentComponent extends ArkStructBase void, initializers?: HomeComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkHomeComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkXComponent(undefined, undefined, { id: '1', type: 'component' }); ArkXComponent(undefined, undefined, { id: '2', type: 1 }); ArkXComponent(undefined, undefined, { id: '3', type: XComponentType.COMPONENT }); @@ -23,11 +23,11 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = {}; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } export interface HomeComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/animatableExtend.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/animatableExtend.ts index 995feef0d..3da1c6dde 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/animatableExtend.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/animatableExtend.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkPolyline, ArkPolylineComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkPolyline, ArkPolylineComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function animatablePoints__Polyline(PolylineInstance: T, points: number): T { @@ -24,20 +24,20 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { - ArkPolyline((instance: ArkPolylineComponent) => { - instance.__applyAnimatableExtend(animatablePoints__Polyline, this.points) + ArkColumn(__builder, () => { + ArkPolyline((__instance: ArkPolylineComponent) => { + __instance.__applyAnimatableExtend(animatablePoints__Polyline, this.points) .strokeWidth(3) .height(100) .width(100); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.__applyAnimatableExtend(attributeExtend__Text); + ArkText((__instance: ArkTextComponent) => { + __instance.__applyAnimatableExtend(attributeExtend__Text); }, undefined, "hello"); }); } @@ -46,13 +46,13 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { points: initializers?.points }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } export interface HomeComponentOptions { points?: number; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/animateTo.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/animateTo.ts index 6d9d2e077..8d8b77046 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/animateTo.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/animateTo.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkTransitionExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -79,16 +79,19 @@ class ArkTransitionExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TransitionExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(400).width("100%").padding({ top: 100 }); + ArkFlex(__instance => { + { + __instance.height(400).width("100%").padding({ top: 100 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { animateTo({ duration: 1000 }, () => { this.btn1 = !this.btn1; if (this.btn1) { @@ -101,14 +104,14 @@ class ArkTransitionExampleComponent extends ArkStructBase { - instance.width("80%").height(30) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width("80%").height(30) .transition({ type: TransitionType.Insert, scale: { x: 0, y: 1.0 } }) .transition({ type: TransitionType.Delete, scale: { x: 1.0, y: 0.0 } }); }, undefined); } - ArkButton((instance: ArkButtonComponent) => { - instance.width(this.btnW).height(this.btnH) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width(this.btnW).height(this.btnH) .onClick(() => { this.btnW += 50; }) @@ -120,12 +123,12 @@ class ArkTransitionExampleComponent extends ArkStructBase { - instance.width("100%") + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width("100%") .height("100%"); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.opacity(this.opacity1) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.opacity(this.opacity1) .backgroundColor(this.color) .animation({ duration: 1000 }) .width(this.width1) @@ -149,9 +152,9 @@ export {}; /** @memo */ export function TransitionExample(/**/ /** @memo */ -style?: (instance: ArkTransitionExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TransitionExampleOptions): ArkTransitionExampleComponent { +content?: () => void, initializers?: TransitionExampleOptions): void { const updatedInitializers: TransitionExampleOptions = { __backing_btnW: initializers?.__backing_btnW, __backing_btnH: initializers?.__backing_btnH, @@ -163,7 +166,7 @@ content?: () => void, initializers?: TransitionExampleOptions): ArkTransitionExa __backing_opacity1: initializers?.__backing_opacity1, __backing_borderRaius1: initializers?.__backing_borderRaius1 }; - return ArkTransitionExampleComponent._instantiate(style, () => new ArkTransitionExampleComponent, content, updatedInitializers); + ArkTransitionExampleComponent._instantiate(style, () => new ArkTransitionExampleComponent, content, updatedInitializers); } export interface TransitionExampleOptions { __backing_btnW?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/appStorage.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/appStorage.ts index 8a5b0f899..9a74805dc 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/appStorage.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/appStorage.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let varA = AppStorage.Link('varA'); let envLang = AppStorage.Prop('languageCode'); @@ -40,19 +40,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -69,15 +69,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/button.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/button.ts index 7372aab9c..244638f08 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/button.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/button.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkButtonExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,29 +7,29 @@ class ArkButtonExampleComponent extends ArkStructBase void, initializers?: ButtonExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkButtonExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ButtonExampleOptions) { - ArkFlex(undefined, () => { + ArkFlex(__builder, () => { ArkFlex(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.borderRadius(8).backgroundColor(0x317aff).width(90); + ArkButton((__instance: ArkButtonComponent) => { + __instance.borderRadius(8).backgroundColor(0x317aff).width(90); }, undefined, 'Ok', { type: ButtonType.Normal, stateEffect: true }); - ArkButton((instance: ArkButtonComponent) => { - instance.borderRadius(8).backgroundColor(0x317aff).width(90); + ArkButton((__instance: ArkButtonComponent) => { + __instance.borderRadius(8).backgroundColor(0x317aff).width(90); }, () => { - ArkRow((instance: ArkRowComponent) => { - instance.alignItems(VerticalAlign.Center); + ArkRow((__instance: ArkRowComponent) => { + __instance.alignItems(VerticalAlign.Center); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(12).fontColor(0xffffff).margin({ left: 5, right: 12 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(12).fontColor(0xffffff).margin({ left: 5, right: 12 }); }, undefined, 'loading'); }); }, { type: ButtonType.Normal, stateEffect: true }); - ArkButton((instance: ArkButtonComponent) => { - instance.opacity(0.5) + ArkButton((__instance: ArkButtonComponent) => { + __instance.opacity(0.5) .borderRadius(8).backgroundColor(0x317aff).width(90); }, undefined, 'Disable', { type: ButtonType.Normal, stateEffect: false }); }, { alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -40,11 +40,11 @@ export {}; /** @memo */ export function ButtonExample(/**/ /** @memo */ -style?: (instance: ArkButtonExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ButtonExampleOptions): ArkButtonExampleComponent { +content?: () => void, initializers?: ButtonExampleOptions): void { const updatedInitializers: ButtonExampleOptions = {}; - return ArkButtonExampleComponent._instantiate(style, () => new ArkButtonExampleComponent, content, updatedInitializers); + ArkButtonExampleComponent._instantiate(style, () => new ArkButtonExampleComponent, content, updatedInitializers); } export interface ButtonExampleOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/component_object.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/component_object.ts index 3d34f7518..2a5495e08 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/component_object.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/component_object.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; interface optionsType { message: string; @@ -27,12 +27,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_message2 = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { Child(undefined, undefined, { options, message1: this.message1, message2: this.message2 } as ChildOptions); Child2(undefined, undefined, options as Child2Options); }); @@ -75,12 +75,12 @@ class ArkChildComponent extends ArkStructBase { this.__backing_message2?.update(initializers?.message2); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.message1); }); } @@ -102,12 +102,12 @@ class ArkChild2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: Child2Options) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.message); }); } @@ -116,39 +116,39 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_message1: initializers?.__backing_message1, message2: initializers?.message2 }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = { options: initializers?.options, __backing_message1: initializers?.__backing_message1, message2: initializers?.message2, __backing_message2: initializers?.__backing_message2 }; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); } /** @memo */ export function Child2(/**/ /** @memo */ -style?: (instance: ArkChild2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: Child2Options): ArkChild2Component { +content?: () => void, initializers?: Child2Options): void { const updatedInitializers: Child2Options = { message: initializers?.message }; - return ArkChild2Component._instantiate(style, () => new ArkChild2Component, content, updatedInitializers); + ArkChild2Component._instantiate(style, () => new ArkChild2Component, content, updatedInitializers); } export interface IndexOptions { __backing_message1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/custom_component.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/custom_component.ts index 2c669ae5b..6032e72ab 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/custom_component.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/custom_component.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,24 +7,28 @@ class ArkMyComponentComponent extends ArkStructBase void, initializers?: MyComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkMyComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { Banner(undefined, undefined); - Banner(undefined, undefined) - .width(100); - Banner(undefined, undefined) - .width(100) - .height(200); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100); + }, undefined); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100) + .height(200); + }, undefined); Banner(undefined, undefined, { value: "Hello" } as BannerOptions); - Banner(undefined, undefined, { value: "Hello" } as BannerOptions) - .width(100); - Banner(undefined, undefined, { value: "Hello" } as BannerOptions) - .width(100) - .height(200); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100); + }, undefined, { value: "Hello" } as BannerOptions); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100) + .height(200); + }, undefined, { value: "Hello" } as BannerOptions); }); } } @@ -43,12 +47,12 @@ class ArkBannerComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BannerOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.value); }); } @@ -57,22 +61,22 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = {}; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } /** @memo */ export function Banner(/**/ /** @memo */ -style?: (instance: ArkBannerComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BannerOptions): ArkBannerComponent { +content?: () => void, initializers?: BannerOptions): void { const updatedInitializers: BannerOptions = { value: initializers?.value }; - return ArkBannerComponent._instantiate(style, () => new ArkBannerComponent, content, updatedInitializers); + ArkBannerComponent._instantiate(style, () => new ArkBannerComponent, content, updatedInitializers); } export interface MyComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/decoratorKeyCheck.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/decoratorKeyCheck.ts index 942589096..b347d26f0 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/decoratorKeyCheck.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/decoratorKeyCheck.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, contextLocal, contextLocalStateOf, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, AppStorageLinkState, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, contextLocal, contextLocalStateOf, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { stringVariable, stringObj, stringFunction } from './test/pages/decoratorKeyCheck'; let para: Record = { 'PropA': 47 }; @@ -197,21 +197,21 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_StorageProp3?.update(AppStorageLinkState('StorageProp3', 'StorageProp3').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, undefined); + ArkRow(__builder, undefined); } } export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const __provide_stringVariable = contextLocalStateOf("stringVariable", () => 'Provide'); const __provide_Provide32 = contextLocalStateOf("Provide32", () => 'Provide3'); const __provide_Provide4 = contextLocalStateOf("Provide4", () => 'Provide4'); @@ -242,7 +242,7 @@ content?: () => void, initializers?: IndexOptions): ArkIndexComponent { __backing_Consume3: __consume_Consume3, __backing_Consume4: __consume_Consume4 }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { __backing_LocalStorageLink?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/forEachSecondFunction.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/forEachSecondFunction.ts index 57fdb02cb..6f9e5649b 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/forEachSecondFunction.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/forEachSecondFunction.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkDivider, ArkDividerComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,25 +15,28 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width("100%").height("100%"); + ArkColumn(__instance => { + { + __instance.width("100%").height("100%"); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.arr.reverse(); }); }, undefined, 'Reverse Array'); ForEach(this.arr, ((item: number) => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(18); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(18); }, undefined, 'item'); - ArkDivider((instance: ArkDividerComponent) => { - instance.strokeWidth(2); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.strokeWidth(2); }, undefined); }), (item: number) => item.toString()); }, { space: 5 }); @@ -43,13 +46,13 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/forEachTwo.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/forEachTwo.ts index 7e030e5dd..37828818a 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/forEachTwo.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/forEachTwo.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkIndexComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -33,20 +33,23 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_WIDTH_AND_HEIGHT!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow((instance: ArkRowComponent) => { - instance.height('100%'); + ArkRow(__instance => { + { + __instance.height('100%'); + } + __builder?.(__instance); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width('100%'); }, () => { ForEach(this.WIDTH_AND_HEIGHT, ({ w, h }) => { - ArkButton((instance: ArkButtonComponent) => { - instance.width(w) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width(w) .height(h); }, undefined); }, item => item.toString()); @@ -58,13 +61,13 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_WIDTH_AND_HEIGHT: initializers?.__backing_WIDTH_AND_HEIGHT }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { __backing_WIDTH_AND_HEIGHT?: MutableState { private _entry_local_storage_ = new LocalStorage(); @@ -15,12 +15,12 @@ class ArkParentViewComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }); @@ -42,12 +42,12 @@ class ArkParentView1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView1Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }); @@ -69,12 +69,12 @@ class ArkParentView2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView2Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }, item => item.toString()); @@ -96,12 +96,12 @@ class ArkParentView3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView3Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }, (item, index) => item.toString()); @@ -123,12 +123,12 @@ class ArkParentView4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView4Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }, (item, index) => item.toString()); @@ -150,12 +150,12 @@ class ArkParentView5Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView5Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }, item => item.toString()); @@ -166,68 +166,68 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } /** @memo */ export function ParentView1(/**/ /** @memo */ -style?: (instance: ArkParentView1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView1Options): ArkParentView1Component { +content?: () => void, initializers?: ParentView1Options): void { const updatedInitializers: ParentView1Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView1Component._instantiate(style, () => new ArkParentView1Component, content, updatedInitializers); + ArkParentView1Component._instantiate(style, () => new ArkParentView1Component, content, updatedInitializers); } /** @memo */ export function ParentView2(/**/ /** @memo */ -style?: (instance: ArkParentView2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView2Options): ArkParentView2Component { +content?: () => void, initializers?: ParentView2Options): void { const updatedInitializers: ParentView2Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView2Component._instantiate(style, () => new ArkParentView2Component, content, updatedInitializers); + ArkParentView2Component._instantiate(style, () => new ArkParentView2Component, content, updatedInitializers); } /** @memo */ export function ParentView3(/**/ /** @memo */ -style?: (instance: ArkParentView3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView3Options): ArkParentView3Component { +content?: () => void, initializers?: ParentView3Options): void { const updatedInitializers: ParentView3Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView3Component._instantiate(style, () => new ArkParentView3Component, content, updatedInitializers); + ArkParentView3Component._instantiate(style, () => new ArkParentView3Component, content, updatedInitializers); } /** @memo */ export function ParentView4(/**/ /** @memo */ -style?: (instance: ArkParentView4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView4Options): ArkParentView4Component { +content?: () => void, initializers?: ParentView4Options): void { const updatedInitializers: ParentView4Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView4Component._instantiate(style, () => new ArkParentView4Component, content, updatedInitializers); + ArkParentView4Component._instantiate(style, () => new ArkParentView4Component, content, updatedInitializers); } /** @memo */ export function ParentView5(/**/ /** @memo */ -style?: (instance: ArkParentView5Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView5Options): ArkParentView5Component { +content?: () => void, initializers?: ParentView5Options): void { const updatedInitializers: ParentView5Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView5Component._instantiate(style, () => new ArkParentView5Component, content, updatedInitializers); + ArkParentView5Component._instantiate(style, () => new ArkParentView5Component, content, updatedInitializers); } export interface ParentViewOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/handleCustomBuilder.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/handleCustomBuilder.ts index ad8a76a56..f33c972db 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/handleCustomBuilder.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/handleCustomBuilder.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; /** @memo */ function global() { @@ -20,40 +20,40 @@ class ArkIndexComponent extends ArkStructBase { } /** @memo */ inner(param: string) { - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: /* */ /** @memo */ (): void => global() }); }, undefined, 'Inner Builder Text'); - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: this.judge ? global : undefined }); }, undefined, 'Inner Builder Text2'); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkColumn(undefined, () => { - ArkRow((instance: ArkRowComponent) => { - instance.bindMenu(/* */ + ArkColumn(__builder, () => { + ArkRow((__instance: ArkRowComponent) => { + __instance.bindMenu(/* */ /** @memo */ (): void => this.inner("111")); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.bindMenu(this.judge ? /* */ + ArkRow((__instance: ArkRowComponent) => { + __instance.bindMenu(this.judge ? /* */ /** @memo */ (): void => this.inner("111") : global); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkRow((__instance: ArkRowComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); return this.judge ? /* */ /** @memo */ @@ -62,8 +62,8 @@ class ArkIndexComponent extends ArkStructBase { (): void => global(); }); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkRow((__instance: ArkRowComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); return { builder: this.judge ? /* */ @@ -72,8 +72,8 @@ class ArkIndexComponent extends ArkStructBase { }; }); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: undefined }); @@ -85,13 +85,13 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { judge: initializers?.judge }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { judge?: boolean; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/id_if.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/id_if.ts index ef66da903..6b1d0318b 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/id_if.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/id_if.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkDivider, ArkDividerComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ArkXComponent, ArkXComponentComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ArkXComponent, ArkXComponentComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -31,62 +31,62 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { if (this.pass) { if (this.count < 0) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id1'); }, undefined, 'count is negative'); } else if (this.count % 2 === 0) { - ArkDivider((instance: ArkDividerComponent) => { - instance.id('id2'); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.id('id2'); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id3'); }, undefined, 'even'); } else { - ArkDivider((instance: ArkDividerComponent) => { - instance.id('id4'); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.id('id4'); }, undefined); - ArkColumn((instance: ArkColumnComponent) => { - instance.id('id10'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.id('id10'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id5'); }, undefined, 'odd'); }); } } else { - ArkText((instance: ArkTextComponent) => { - instance.id('id6') + ArkText((__instance: ArkTextComponent) => { + __instance.id('id6') .fontSize(32); }, undefined, 'fail'); } if (this.pass) - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32).id('id7'); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32).id('id7'); }, undefined, 'odd2'); ArkList(undefined, () => { if (this.pass) { - ArkListItem((instance: ArkListItemComponent) => { - instance.id('id8'); + ArkListItem((__instance: ArkListItemComponent) => { + __instance.id('id8'); }, () => { - ArkRow((instance: ArkRowComponent) => { - instance.margin({ left: 10, right: 10 }).id('id11'); + ArkRow((__instance: ArkRowComponent) => { + __instance.margin({ left: 10, right: 10 }).id('id11'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20).margin({ left: 10 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20).margin({ left: 10 }); }, undefined); }); }); @@ -94,12 +94,12 @@ class ArkMyComponentComponent extends ArkStructBase { if (this.pass) { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('pink') + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('pink') .id('id9'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Pink); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Pink); }, undefined, '111'); }); } @@ -109,11 +109,11 @@ class ArkMyComponentComponent extends ArkStructBase { ArkText(undefined, undefined, '111'); }); - ArkXComponent((instance: ArkXComponentComponent) => { - instance.id('id12'); + ArkXComponent((__instance: ArkXComponentComponent) => { + __instance.id('id12'); }, undefined, { id: 'special', type: '' }); - ArkColumn((instance: ArkColumnComponent) => { - instance.id('id13'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.id('id13'); }, () => { ArkText(undefined, undefined, '11'); }); @@ -123,8 +123,9 @@ class ArkMyComponentComponent extends ArkStructBase { + __instance.id('id14'); + }, undefined); ArkText(undefined, undefined, '111'); } }); @@ -137,14 +138,14 @@ class ArkChildComponent extends ArkStructBase { content?: () => void, initializers?: ChildOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, 'Child'); }); } @@ -153,24 +154,24 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { pass: initializers?.pass, count: initializers?.count, controller: initializers?.controller }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = {}; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); } export interface MyComponentOptions { pass?: boolean; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/if.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/if.ts index 7ce3db6e4..0876d2b18 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/if.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/if.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkIFViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -31,12 +31,12 @@ class ArkIFViewComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IFViewOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { if (this.toggle1) { ArkText(undefined, undefined, 'toggle1'); } @@ -59,15 +59,15 @@ export {}; /** @memo */ export function IFView(/**/ /** @memo */ -style?: (instance: ArkIFViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IFViewOptions): ArkIFViewComponent { +content?: () => void, initializers?: IFViewOptions): void { const updatedInitializers: IFViewOptions = { __backing_toggle1: initializers?.__backing_toggle1, __backing_toggle2: initializers?.__backing_toggle2, __backing_toggle3: initializers?.__backing_toggle3 }; - return ArkIFViewComponent._instantiate(style, () => new ArkIFViewComponent, content, updatedInitializers); + ArkIFViewComponent._instantiate(style, () => new ArkIFViewComponent, content, updatedInitializers); } export interface IFViewOptions { __backing_toggle1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/import@CustomDialog.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/import@CustomDialog.ts index cfc8f3625..f87c5bb95 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/import@CustomDialog.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/import@CustomDialog.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { CustomDialogExample1 as CustomDialogExample, CustomDialogExampleOptions } from './test/pages/import@CustomDialog'; class ArkCustomDialogUserComponent extends ArkStructBase { @@ -54,16 +54,19 @@ class ArkCustomDialogUserComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogUserOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%').margin({ top: 5 }); + ArkColumn(__instance => { + { + __instance.width('100%').margin({ top: 5 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.dialogController.open(); }).backgroundColor(0x317aff); }, undefined, this.inputValue); @@ -74,15 +77,15 @@ export {}; /** @memo */ export function CustomDialogUser(/**/ /** @memo */ -style?: (instance: ArkCustomDialogUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogUserOptions): ArkCustomDialogUserComponent { +content?: () => void, initializers?: CustomDialogUserOptions): void { const updatedInitializers: CustomDialogUserOptions = { __backing_textValue: initializers?.__backing_textValue, __backing_inputValue: initializers?.__backing_inputValue, dialogController: initializers?.dialogController }; - return ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); + ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); } export interface CustomDialogUserOptions { __backing_textValue?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/import@Observed.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/import@Observed.ts index e29a76e4b..6bdaa9c32 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/import@Observed.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/import@Observed.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, objectLinkState, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, objectLinkState, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { ClassB as ClassA } from './test/pages/import@Observed'; class ArkViewAComponent extends ArkStructBase { @@ -28,16 +28,19 @@ class ArkViewAComponent extends ArkStructBase { this.__backing_a?.update(initializers?.a); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewAOptions) { - ArkRow((instance: ArkRowComponent) => { - instance.margin({ top: 10 }); + ArkRow(__instance => { + { + __instance.margin({ top: 10 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.a.c += 1; }); }, undefined, 'ViewA' + JSON.stringify(this.label) + 'this.a.c=' + JSON.stringify(this.a.c)); @@ -59,33 +62,36 @@ class ArkViewBComponent extends ArkStructBase { this.__backing_arrA!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewBOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%'); + ArkColumn(__instance => { + { + __instance.width('100%'); + } + __builder?.(__instance); }, () => { ForEach(this.arrA, (item) => { ViewA(undefined, undefined, { label: JSON.stringify(item.id), a: item } as ViewAOptions); }, (item) => item.id.toString()); ViewA(undefined, undefined, { label: JSON.stringify(this.arrA[0]), a: this.arrA[0] } as ViewAOptions); ViewA(undefined, undefined, { label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1] } as ViewAOptions); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA = [new ClassA(0), new ClassA(0)]; }); }, undefined, 'ViewB: reset array'); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA.push(new ClassA(0)); }); }, undefined, 'ViewB: push'); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA.shift(); }); @@ -97,26 +103,26 @@ export {}; /** @memo */ export function ViewA(/**/ /** @memo */ -style?: (instance: ArkViewAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewAOptions): ArkViewAComponent { +content?: () => void, initializers?: ViewAOptions): void { const updatedInitializers: ViewAOptions = { label: initializers?.label, a: initializers?.a, __backing_a: initializers?.__backing_a }; - return ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); + ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); } /** @memo */ export function ViewB(/**/ /** @memo */ -style?: (instance: ArkViewBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewBOptions): ArkViewBComponent { +content?: () => void, initializers?: ViewBOptions): void { const updatedInitializers: ViewBOptions = { __backing_arrA: initializers?.__backing_arrA }; - return ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); + ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); } export interface ViewAOptions { label?: string; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/importAllEts.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/importAllEts.ts index b158bf54d..6d7848a61 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/importAllEts.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/importAllEts.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import * as AllComponent from './test/pages/NamespaceComponent'; import TsModule from './test/pages/TsModule'; @@ -41,12 +41,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllComponent.NamespaceComponent1({ __backing_NamespaceComponent1Link1: this.__backing_myState1, __backing_NamespaceComponent1Link2: this.__backing_myState2, @@ -88,16 +88,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/importEts.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/importEts.ts index de75f3a4f..16c162295 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/importEts.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/importEts.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import LinkComponentDefault, { LinkComponent as LinkComponent1Ref, LinkComponent2 as LinkComponent2Ref, LinkComponent3, LinkComponent3Options } from './test/pages/LinkComponent'; import DefaultComponent from "./test/pages/DefaultComponent"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { LinkComponent2Ref({ __backing_LinkComponent2Link1: this.__backing_myState1, __backing_LinkComponent2Link2: this.__backing_myState2, @@ -59,8 +59,8 @@ class ArkImportTestComponent extends ArkStructBase { - instance.fontSize(20) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20) .fontColor(Color.Red); }, undefined, 'space'); LinkComponent1Ref({ @@ -116,16 +116,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/importExportEts.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/importExportEts.ts index c8cca8998..933c06ec0 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/importExportEts.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/importExportEts.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { AllStarComponent } from './test/pages/ExportStarComponent'; import TsModule from './test/pages/TsModule'; @@ -41,12 +41,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllStarComponent.ExportComponent({ __backing_ExportComponent1Link1: this.__backing_myState1, __backing_ExportComponent1Link2: this.__backing_myState2, @@ -74,16 +74,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/importExportNest.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/importExportNest.ts index 3dd27356d..a9f493540 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/importExportNest.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/importExportNest.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { tExtend, tStyles, DivideTest, Base, DivideTestOptions } from './test/pages/ImportNestAll'; class ArkImportTestComponent extends ArkStructBase { @@ -80,21 +80,21 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.testText1); tExtend(20); ArkText(undefined, undefined, this.testText2); tStyles(); ArkButton(undefined, undefined, this.testText3); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.testText4); Base({ __backing_testStr: this.__backing_testState1, @@ -112,9 +112,9 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_testText1: initializers?.__backing_testText1, __backing_testText2: initializers?.__backing_testText2, @@ -126,7 +126,7 @@ content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent __backing_testState4: initializers?.__backing_testState4, __backing_testState5: initializers?.__backing_testState5 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_testText1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/importTs.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/importTs.ts index d8c5c4cf3..a50b1a598 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/importTs.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/importTs.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; import { AllStarComponent } from './test/pages/ExportStarComponent'; import TsModule from './test/pages/TsModule'; @@ -41,12 +41,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllStarComponent.ExportComponent({ __backing_ExportComponent1Link1: this.__backing_myState1, __backing_ExportComponent1Link2: this.__backing_myState2, @@ -74,16 +74,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/lazyforeach.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/lazyforeach.ts index a4c6a850f..a28e7cd13 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/lazyforeach.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/lazyforeach.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkGrid, ArkGridItem, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkGrid, ArkGridItem, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class BasicDataSource implements IDataSource { private listeners: DataChangeListener[] = []; @@ -79,12 +79,12 @@ class ArkTestComponent extends ArkStructBase { this.__backing_data = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkTestComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestOptions) { - ArkGrid(undefined, () => { + ArkGrid(__builder, () => { LazyForEach(this.data, (row) => { ArkGridItem(undefined, () => { ArkText(undefined, undefined, row); @@ -97,13 +97,13 @@ export {}; /** @memo */ export function Test(/**/ /** @memo */ -style?: (instance: ArkTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestOptions): ArkTestComponent { +content?: () => void, initializers?: TestOptions): void { const updatedInitializers: TestOptions = { data: initializers?.data }; - return ArkTestComponent._instantiate(style, () => new ArkTestComponent, content, updatedInitializers); + ArkTestComponent._instantiate(style, () => new ArkTestComponent, content, updatedInitializers); } export interface TestOptions { data?: MyDataSource; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorage.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorage.ts index d8051e03b..4ccfe5456 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorage.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorage.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let storage = LocalStorage.GetShared(); class ClassA { @@ -36,16 +36,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -57,14 +60,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForBoth.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForBoth.ts index 47717ddef..abe11bf8c 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForBoth.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForBoth.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let storage = LocalStorage.GetShared(); let route = 'pages/Index'; @@ -40,16 +40,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -61,14 +64,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForRoute.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForRoute.ts index b64de7c21..9a01cdd81 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForRoute.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForRoute.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let route = 'pages/Index'; class ArkLocalStorageComponentComponent extends ArkStructBase { @@ -10,13 +10,16 @@ class ArkLocalStorageComponentComponent extends ArkStructBase void, initializers?: LocalStorageComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, undefined); } } @@ -24,11 +27,11 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = {}; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForStorage.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForStorage.ts index 4e7fddbb9..e905d4042 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForStorage.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/localStorageForStorage.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, StorageLinkState, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let storage = LocalStorage.GetShared(); class ClassA { @@ -38,16 +38,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -59,14 +62,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/longPressGesture.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/longPressGesture.ts index 02a538360..cc6916921 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/longPressGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/longPressGesture.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkLongPressGestureExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,22 +15,25 @@ class ArkLongPressGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LongPressGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) - .gesture(LongPressGesture({ repeat: true }) - .onAction((event: GestureEvent) => { - if (event.repeat) { - this.count++; - } - }) - .onActionEnd(() => { - this.count = 0; - })); + ArkFlex(__instance => { + { + __instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) + .gesture(LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event.repeat) { + this.count++; + } + }) + .onActionEnd(() => { + this.count = 0; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'LongPress onAction:' + this.count); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -40,13 +43,13 @@ export {}; /** @memo */ export function LongPressGestureExample(/**/ /** @memo */ -style?: (instance: ArkLongPressGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LongPressGestureExampleOptions): ArkLongPressGestureExampleComponent { +content?: () => void, initializers?: LongPressGestureExampleOptions): void { const updatedInitializers: LongPressGestureExampleOptions = { __backing_count: initializers?.__backing_count }; - return ArkLongPressGestureExampleComponent._instantiate(style, () => new ArkLongPressGestureExampleComponent, content, updatedInitializers); + ArkLongPressGestureExampleComponent._instantiate(style, () => new ArkLongPressGestureExampleComponent, content, updatedInitializers); } export interface LongPressGestureExampleOptions { __backing_count?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/pageTransition.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/pageTransition.ts index 43688fa33..9305184fa 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/pageTransition.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/pageTransition.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkNavigator, ArkNavigatorComponent, ArkPageTransitionEnter, ArkPageTransitionEnterComponent, ArkPageTransitionExit, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkNavigator, ArkNavigatorComponent, ArkPageTransitionEnter, ArkPageTransitionEnterComponent, ArkPageTransitionExit, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkPageTransitionExample1Component extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -31,35 +31,38 @@ class ArkPageTransitionExample1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PageTransitionExample1Options) { - ArkColumn((instance: ArkColumnComponent) => { - instance.scale({ x: this.scale2 }).opacity(this.opacity2); + ArkColumn(__instance => { + { + __instance.scale({ x: this.scale2 }).opacity(this.opacity2); + } + __builder?.(__instance); }, () => { - ArkNavigator((instance: ArkNavigatorComponent) => { - instance.onClick(() => { + ArkNavigator((__instance: ArkNavigatorComponent) => { + __instance.onClick(() => { this.active = true; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width("100%").height("100%"); + ArkText((__instance: ArkTextComponent) => { + __instance.width("100%").height("100%"); }, undefined, 'page transition'); }, { target: 'pages/page1', type: NavigationType.Push }); }); } /** @memo */ pageTransition() { - ArkPageTransitionEnter((instance: ArkPageTransitionEnterComponent) => { - instance.onEnter((type: RouteType, progress: number) => { + ArkPageTransitionEnter((__instance: ArkPageTransitionEnterComponent) => { + __instance.onEnter((type: RouteType, progress: number) => { this.scale2 = 1; this.opacity2 = progress; }); }, undefined, { duration: 1200, curve: Curve.Linear }); - ArkPageTransitionExit((instance: ArkPageTransitionExitComponent) => { - instance.onExit((type: RouteType, progress: number) => { + ArkPageTransitionExit((__instance: ArkPageTransitionExitComponent) => { + __instance.onExit((type: RouteType, progress: number) => { this.scale2 = 1 - progress; this.opacity2 = 1; }); @@ -70,15 +73,15 @@ export {}; /** @memo */ export function PageTransitionExample1(/**/ /** @memo */ -style?: (instance: ArkPageTransitionExample1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PageTransitionExample1Options): ArkPageTransitionExample1Component { +content?: () => void, initializers?: PageTransitionExample1Options): void { const updatedInitializers: PageTransitionExample1Options = { __backing_scale2: initializers?.__backing_scale2, __backing_opacity2: initializers?.__backing_opacity2, __backing_active: initializers?.__backing_active }; - return ArkPageTransitionExample1Component._instantiate(style, () => new ArkPageTransitionExample1Component, content, updatedInitializers); + ArkPageTransitionExample1Component._instantiate(style, () => new ArkPageTransitionExample1Component, content, updatedInitializers); } export interface PageTransitionExample1Options { __backing_scale2?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/panGestrue.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/panGestrue.ts index eda442a61..538149ceb 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/panGestrue.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/panGestrue.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkPanGestureExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -23,25 +23,28 @@ class ArkPanGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PanGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) - .gesture(PanGesture({}) - .onActionStart((event: GestureEvent) => { - console.info('Pan start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.offsetX = event.offsetX; - this.offsetY = event.offsetY; - }) - .onActionEnd(() => { - console.info('Pan end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) + .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) + .gesture(PanGesture({}) + .onActionStart((event: GestureEvent) => { + console.info('Pan start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX; + this.offsetY = event.offsetY; + }) + .onActionEnd(() => { + console.info('Pan end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'PanGesture offset X: ' + this.offsetX); ArkText(undefined, undefined, 'PanGesture offset Y: ' + this.offsetY); @@ -52,14 +55,14 @@ export {}; /** @memo */ export function PanGestureExample(/**/ /** @memo */ -style?: (instance: ArkPanGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PanGestureExampleOptions): ArkPanGestureExampleComponent { +content?: () => void, initializers?: PanGestureExampleOptions): void { const updatedInitializers: PanGestureExampleOptions = { __backing_offsetX: initializers?.__backing_offsetX, __backing_offsetY: initializers?.__backing_offsetY }; - return ArkPanGestureExampleComponent._instantiate(style, () => new ArkPanGestureExampleComponent, content, updatedInitializers); + ArkPanGestureExampleComponent._instantiate(style, () => new ArkPanGestureExampleComponent, content, updatedInitializers); } export interface PanGestureExampleOptions { __backing_offsetX?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/pinchGesture.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/pinchGesture.ts index f63c38d18..ed20a7c6c 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/pinchGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/pinchGesture.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkPinchGestureExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,24 +15,27 @@ class ArkPinchGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PinchGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .scale({ x: this.scale2, y: this.scale2, z: this.scale2 }) - .gesture(PinchGesture() - .onActionStart((event: GestureEvent) => { - console.info('Pinch start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.scale2 = event.scale; - }) - .onActionEnd(() => { - console.info('Pinch end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) + .scale({ x: this.scale2, y: this.scale2, z: this.scale2 }) + .gesture(PinchGesture() + .onActionStart((event: GestureEvent) => { + console.info('Pinch start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.scale2 = event.scale; + }) + .onActionEnd(() => { + console.info('Pinch end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'PinchGesture scale:' + this.scale2); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -42,13 +45,13 @@ export {}; /** @memo */ export function PinchGestureExample(/**/ /** @memo */ -style?: (instance: ArkPinchGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PinchGestureExampleOptions): ArkPinchGestureExampleComponent { +content?: () => void, initializers?: PinchGestureExampleOptions): void { const updatedInitializers: PinchGestureExampleOptions = { __backing_scale2: initializers?.__backing_scale2 }; - return ArkPinchGestureExampleComponent._instantiate(style, () => new ArkPinchGestureExampleComponent, content, updatedInitializers); + ArkPinchGestureExampleComponent._instantiate(style, () => new ArkPinchGestureExampleComponent, content, updatedInitializers); } export interface PinchGestureExampleOptions { __backing_scale2?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle.ts index 5f7b4bb82..76f748078 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkTabsComponent, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkTabsComponent, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkHomeComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -23,20 +23,24 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(this.state_value) - .height(100); + ArkColumn(__instance => { + { + __instance.width(this.state_value) + .height(100); + } + __builder?.(__instance); }, () => { - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value); - ArkText((instance: ArkTextComponent) => { - instance.width(this.state_value) + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.state_value) .height(100); }, undefined, "aa"); }); @@ -109,79 +113,80 @@ class ArkchildComponent extends ArkStructBase { this.__backing_propvalue?.update(initializers?.propvalue); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, () => { - AnimationTest(undefined, undefined) - .border({ width: 3, color: Color.Red }) - .height(this.heightValue); - ArkText((instance: ArkTextComponent) => { - instance.width(this.propvalue) + ArkColumn(__builder, () => { + AnimationTest((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .height(this.heightValue); + }, undefined); + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.propvalue) .fontSize(this.reguar_value) .height(100) .fontColor(Color.Red) .border({ width: this.propvalue, color: Color.Red, radius: 100 }); }, undefined, "hello"); - ArkButton((instance: ArkButtonComponent) => { - instance.border({ width: this.reguar_value, color: Color.Red, radius: 100 }); + ArkButton((__instance: ArkButtonComponent) => { + __instance.border({ width: this.reguar_value, color: Color.Red, radius: 100 }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(this.state_value) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(this.state_value) .width(100); }, undefined, "hhhhhhhhhhhhh"); }); - ArkListItem((instance: ArkListItemComponent) => { - instance.width(this.width_value) + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'ListItem'); }, 'true'); - ArkListItem((instance: ArkListItemComponent) => { - instance.width(this.width_value) + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'true'); - ArkTabs((instance: ArkTabsComponent) => { - instance.width(this.width_value) + ArkTabs((__instance: ArkTabsComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar") .width(this.width_value) .height(100); }, () => { - ArkFlex((instance: ArkFlexComponent) => { - instance.width(this.width_value) + ArkFlex((__instance: ArkFlexComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(this.width_value) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'text1'); }); }); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar 2") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar 2") .width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'text2'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.width(this.width_value) + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.width(this.width_value) .height(100); }, undefined); }, { barPosition: BarPosition.Start, index: 1, controller: this.controller }); @@ -203,14 +208,14 @@ class ArkNormalComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NormalComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, "hello"); }); @@ -231,14 +236,14 @@ class ArkAnimationTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AnimationTestOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(this.width_value) .animation({ duration: 300 }); }, undefined, "hello"); @@ -249,21 +254,21 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_state_value: initializers?.__backing_state_value, __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { propvalue: initializers?.propvalue, __backing_propvalue: initializers?.__backing_propvalue, @@ -274,29 +279,29 @@ content?: () => void, initializers?: childOptions): ArkchildComponent { controller: initializers?.controller, __backing_heightValue: initializers?.__backing_heightValue }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } /** @memo */ export function NormalComponent(/**/ /** @memo */ -style?: (instance: ArkNormalComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NormalComponentOptions): ArkNormalComponentComponent { +content?: () => void, initializers?: NormalComponentOptions): void { const updatedInitializers: NormalComponentOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkNormalComponentComponent._instantiate(style, () => new ArkNormalComponentComponent, content, updatedInitializers); + ArkNormalComponentComponent._instantiate(style, () => new ArkNormalComponentComponent, content, updatedInitializers); } /** @memo */ export function AnimationTest(/**/ /** @memo */ -style?: (instance: ArkAnimationTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AnimationTestOptions): ArkAnimationTestComponent { +content?: () => void, initializers?: AnimationTestOptions): void { const updatedInitializers: AnimationTestOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkAnimationTestComponent._instantiate(style, () => new ArkAnimationTestComponent, content, updatedInitializers); + ArkAnimationTestComponent._instantiate(style, () => new ArkAnimationTestComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_state_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_extend_styles.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_extend_styles.ts index 3bbb754e1..1433c653e 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_extend_styles.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_extend_styles.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; /** @memo */ function fancybut__Button(ButtonInstance: T, color: string | Color): T { return ButtonInstance.backgroundColor(color) @@ -20,17 +20,17 @@ class ArkExtendComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExtendComponentOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.__applyStyle(fancybut__Button, Color.Green); + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.__applyStyle(fancybut__Button, Color.Green); }, undefined, "Fancy Button"); - ArkButton((instance: ArkButtonComponent) => { - instance.__applyStyle(fancybut__Button, Color.Green).height(100).width(this.width_value); + ArkButton((__instance: ArkButtonComponent) => { + __instance.__applyStyle(fancybut__Button, Color.Green).height(100).width(this.width_value); }, undefined, "Fancy Button"); }); } @@ -75,24 +75,24 @@ class ArkStylesComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(this.width_value) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .fontSize(this.size_value) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }).__applyStyle(this.componentFancy.bind(this)) @@ -106,8 +106,8 @@ class ArkStylesComponentComponent extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .fontSize(this.size_value) .height(100); }, undefined, "Fancy"); @@ -119,26 +119,26 @@ export {}; /** @memo */ export function ExtendComponent(/**/ /** @memo */ -style?: (instance: ArkExtendComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExtendComponentOptions): ArkExtendComponentComponent { +content?: () => void, initializers?: ExtendComponentOptions): void { const updatedInitializers: ExtendComponentOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkExtendComponentComponent._instantiate(style, () => new ArkExtendComponentComponent, content, updatedInitializers); + ArkExtendComponentComponent._instantiate(style, () => new ArkExtendComponentComponent, content, updatedInitializers); } /** @memo */ export function StylesComponent(/**/ /** @memo */ -style?: (instance: ArkStylesComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesComponentOptions): ArkStylesComponentComponent { +content?: () => void, initializers?: StylesComponentOptions): void { const updatedInitializers: StylesComponentOptions = { enable: initializers?.enable, __backing_width_value: initializers?.__backing_width_value, __backing_size_value: initializers?.__backing_size_value }; - return ArkStylesComponentComponent._instantiate(style, () => new ArkStylesComponentComponent, content, updatedInitializers); + ArkStylesComponentComponent._instantiate(style, () => new ArkStylesComponentComponent, content, updatedInitializers); } export interface ExtendComponentOptions { __backing_width_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_function_array.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_function_array.ts index 9f31413c3..10a1e0bfe 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_function_array.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_function_array.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkCircle, ArkCircleComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCircle, ArkCircleComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkHomeComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,12 +15,12 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { child(undefined, undefined); }); } @@ -48,24 +48,24 @@ class ArkchildComponent extends ArkStructBase { this.__backing_reguar_value = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, () => { - ArkCircle((instance: ArkCircleComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkCircle((__instance: ArkCircleComponent) => { + __instance.onClick(() => { console.log("hello"); }) .strokeDashArray(["hello", this.reguar_value]) .height(100); }, undefined); - ArkCircle((instance: ArkCircleComponent) => { - instance.strokeDashArray([this.state_value]); + ArkCircle((__instance: ArkCircleComponent) => { + __instance.strokeDashArray([this.state_value]); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { console.log("hello"); }); }, undefined, "hello"); @@ -76,25 +76,25 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { __backing_state_value: initializers?.__backing_state_value, reguar_value: initializers?.reguar_value }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_gesture.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_gesture.ts index 0fb855312..3f1dc0f11 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_gesture.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_gesture.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; class ArkGestureTestComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -22,25 +22,28 @@ class ArkGestureTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: GestureTestOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(this.width_value).padding(60).border({ width: 1 }).margin(30) - .gesture(LongPressGesture({ repeat: true }) - .onAction((event: GestureEvent) => { - if (event.repeat) { - this.count++; - } - }) - .onActionEnd(() => { - this.count = 0; - })); + ArkFlex(__instance => { + { + __instance.height(100).width(this.width_value).padding(60).border({ width: 1 }).margin(30) + .gesture(LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event.repeat) { + this.count++; + } + }) + .onActionEnd(() => { + this.count = 0; + })); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(this.width_value); }, undefined, 'LongPress onAction:' + this.count); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -50,14 +53,14 @@ export {}; /** @memo */ export function GestureTest(/**/ /** @memo */ -style?: (instance: ArkGestureTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: GestureTestOptions): ArkGestureTestComponent { +content?: () => void, initializers?: GestureTestOptions): void { const updatedInitializers: GestureTestOptions = { __backing_count: initializers?.__backing_count, __backing_width_value: initializers?.__backing_width_value }; - return ArkGestureTestComponent._instantiate(style, () => new ArkGestureTestComponent, content, updatedInitializers); + ArkGestureTestComponent._instantiate(style, () => new ArkGestureTestComponent, content, updatedInitializers); } export interface GestureTestOptions { __backing_count?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_reuseId.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_reuseId.ts index ddb767569..f0f83a8b8 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_reuseId.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/recycle_reuseId.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, propState, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; let a: string = "aaaaaaaaaa"; class ArkHomeComponentComponent extends ArkStructBase { @@ -24,26 +24,31 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value) - .reuseId("reuse_key"); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .reuseId(this.state_value); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .reuseId("reuse_key11111111111"); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .reuseId(a); + ArkColumn(__builder, () => { + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value) + .reuseId("reuse_key"); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .reuseId(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.reuseId("reuse_key11111111111"); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.reuseId(a); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); }); } } @@ -74,39 +79,39 @@ class ArkchildComponent extends ArkStructBase { this.__backing_propvalue?.update(initializers?.propvalue); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, undefined); + ArkColumn(__builder, undefined); } } export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_state_value: initializers?.__backing_state_value, __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { propvalue: initializers?.propvalue, __backing_propvalue: initializers?.__backing_propvalue, __backing_linkvalue: initializers?.__backing_linkvalue }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_state_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/rotationGesture.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/rotationGesture.ts index 8bcdfcde2..a75bec4ea 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/rotationGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/rotationGesture.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkRotationGestureExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,24 +15,27 @@ class ArkRotationGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: RotationGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }) - .margin(80).rotate({ x: 1, y: 2, z: 3, angle: this.angle }) - .gesture(RotationGesture() - .onActionStart((event: GestureEvent) => { - console.log('Rotation start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.angle = event.angle; - }) - .onActionEnd(() => { - console.log('Rotation end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }) + .margin(80).rotate({ x: 1, y: 2, z: 3, angle: this.angle }) + .gesture(RotationGesture() + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.angle = event.angle; + }) + .onActionEnd(() => { + console.log('Rotation end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'RotationGesture angle:' + this.angle); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -42,13 +45,13 @@ export {}; /** @memo */ export function RotationGestureExample(/**/ /** @memo */ -style?: (instance: ArkRotationGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: RotationGestureExampleOptions): ArkRotationGestureExampleComponent { +content?: () => void, initializers?: RotationGestureExampleOptions): void { const updatedInitializers: RotationGestureExampleOptions = { __backing_angle: initializers?.__backing_angle }; - return ArkRotationGestureExampleComponent._instantiate(style, () => new ArkRotationGestureExampleComponent, content, updatedInitializers); + ArkRotationGestureExampleComponent._instantiate(style, () => new ArkRotationGestureExampleComponent, content, updatedInitializers); } export interface RotationGestureExampleOptions { __backing_angle?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/swipeGesture.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/swipeGesture.ts index 518546e0b..e2f173a80 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/swipeGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/swipeGesture.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkSwipeGestureExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -23,20 +23,23 @@ class ArkSwipeGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: SwipeGestureExampleOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.border({ width: 2 }) - .width(260).height(260) - .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) - .gesture(SwipeGesture({ fingers: 1, direction: SwipeDirection.Vertical }) - .onAction((event: GestureEvent) => { - this.speed = event.speed; - this.rotateAngle = event.angle; - })); + ArkColumn(__instance => { + { + __instance.border({ width: 2 }) + .width(260).height(260) + .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) + .gesture(SwipeGesture({ fingers: 1, direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + this.speed = event.speed; + this.rotateAngle = event.angle; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, "SwipGesture speed : " + this.speed); ArkText(undefined, undefined, "SwipGesture angle : " + this.rotateAngle); @@ -47,14 +50,14 @@ export {}; /** @memo */ export function SwipeGestureExample(/**/ /** @memo */ -style?: (instance: ArkSwipeGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: SwipeGestureExampleOptions): ArkSwipeGestureExampleComponent { +content?: () => void, initializers?: SwipeGestureExampleOptions): void { const updatedInitializers: SwipeGestureExampleOptions = { __backing_rotateAngle: initializers?.__backing_rotateAngle, __backing_speed: initializers?.__backing_speed }; - return ArkSwipeGestureExampleComponent._instantiate(style, () => new ArkSwipeGestureExampleComponent, content, updatedInitializers); + ArkSwipeGestureExampleComponent._instantiate(style, () => new ArkSwipeGestureExampleComponent, content, updatedInitializers); } export interface SwipeGestureExampleOptions { __backing_rotateAngle?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/tab.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/tab.ts index 415f7e3c4..b16111831 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/tab.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/tab.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkTabSimpleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,39 +15,39 @@ class ArkTabSimpleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TabSimpleOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkTabs(undefined, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar") .height(100) .width(200); }, () => { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100) + ArkFlex((__instance: ArkFlexComponent) => { + __instance.height(100) .width(200); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(100) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.height(100) .width(200); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(200); }, undefined, 'text1'); - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(200); }, undefined, 'xxx'); }); }); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar 2") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar 2") .height(100) .width(200); }, () => { @@ -61,13 +61,13 @@ export {}; /** @memo */ export function TabSimple(/**/ /** @memo */ -style?: (instance: ArkTabSimpleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TabSimpleOptions): ArkTabSimpleComponent { +content?: () => void, initializers?: TabSimpleOptions): void { const updatedInitializers: TabSimpleOptions = { controller: initializers?.controller }; - return ArkTabSimpleComponent._instantiate(style, () => new ArkTabSimpleComponent, content, updatedInitializers); + ArkTabSimpleComponent._instantiate(style, () => new ArkTabSimpleComponent, content, updatedInitializers); } export interface TabSimpleOptions { controller?: TabsController; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/tapGesture.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/tapGesture.ts index b4e91db51..b837c5660 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/tapGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/tapGesture.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; import { registerArkuiEntry } from "@koalaui/arkoala-arkui/ohos.router"; class ArkTapGestureExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,17 +15,20 @@ class ArkTapGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TapGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) - .gesture(TapGesture({ count: 2 }) - .onAction(() => { - this.value = 'TapGesture onAction'; - })); + ArkFlex(__instance => { + { + __instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) + .gesture(TapGesture({ count: 2 }) + .onAction(() => { + this.value = 'TapGesture onAction'; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'Click twice'); ArkText(undefined, undefined, this.value); @@ -36,13 +39,13 @@ export {}; /** @memo */ export function TapGestureExample(/**/ /** @memo */ -style?: (instance: ArkTapGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TapGestureExampleOptions): ArkTapGestureExampleComponent { +content?: () => void, initializers?: TapGestureExampleOptions): void { const updatedInitializers: TapGestureExampleOptions = { __backing_value: initializers?.__backing_value }; - return ArkTapGestureExampleComponent._instantiate(style, () => new ArkTapGestureExampleComponent, content, updatedInitializers); + ArkTapGestureExampleComponent._instantiate(style, () => new ArkTapGestureExampleComponent, content, updatedInitializers); } export interface TapGestureExampleOptions { __backing_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/AMDComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/AMDComponent.ts index 66e5059b2..ae0f9a326 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/AMDComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/AMDComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; class ArkAMDComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -56,32 +56,32 @@ class ArkAMDComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AMDComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink1: ' + JSON.stringify(this.AMDComponentLink1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink2: ' + JSON.stringify(this.AMDComponentLink2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink3: ' + JSON.stringify(this.AMDComponentLink3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink4: ' + JSON.stringify(this.AMDComponentLink4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -91,9 +91,9 @@ export {}; /** @memo */ export function AMDComponent(/**/ /** @memo */ -style?: (instance: ArkAMDComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AMDComponentOptions): ArkAMDComponentComponent { +content?: () => void, initializers?: AMDComponentOptions): void { const updatedInitializers: AMDComponentOptions = { __backing_AMDComponentLink1: initializers?.__backing_AMDComponentLink1, __backing_AMDComponentLink2: initializers?.__backing_AMDComponentLink2, @@ -102,7 +102,7 @@ content?: () => void, initializers?: AMDComponentOptions): ArkAMDComponentCompon myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkAMDComponentComponent._instantiate(style, () => new ArkAMDComponentComponent, content, updatedInitializers); + ArkAMDComponentComponent._instantiate(style, () => new ArkAMDComponentComponent, content, updatedInitializers); } export interface AMDComponentOptions { __backing_AMDComponentLink1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/BaseComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/BaseComponent.ts index eaf7f3a34..3a0bb053b 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/BaseComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/BaseComponent.ts @@ -1,8 +1,8 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; /** @memo */ function textExtend(fontsize: number) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(fontsize); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(fontsize); }, undefined, 'Builder'); } class ArkBaseComponentComponent extends ArkStructBase { @@ -36,23 +36,23 @@ class ArkBaseComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BaseComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'BaseComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testStr: ' + JSON.stringify(this.testStr)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testNum: ' + JSON.stringify(this.testNum)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testObj: ' + JSON.stringify(this.testObj)); }); } @@ -62,15 +62,15 @@ export {}; /** @memo */ export function BaseComponent(/**/ /** @memo */ -style?: (instance: ArkBaseComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BaseComponentOptions): ArkBaseComponentComponent { +content?: () => void, initializers?: BaseComponentOptions): void { const updatedInitializers: BaseComponentOptions = { __backing_testStr: initializers?.__backing_testStr, __backing_testNum: initializers?.__backing_testNum, __backing_testObj: initializers?.__backing_testObj }; - return ArkBaseComponentComponent._instantiate(style, () => new ArkBaseComponentComponent, content, updatedInitializers); + ArkBaseComponentComponent._instantiate(style, () => new ArkBaseComponentComponent, content, updatedInitializers); } export interface BaseComponentOptions { __backing_testStr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DefaultComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DefaultComponent.ts index a6103cf2c..9db492408 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DefaultComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DefaultComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; class ArkDefaultComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -56,32 +56,32 @@ class ArkDefaultComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DefaultComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink1: ' + JSON.stringify(this.DefaultComponentLink1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink2: ' + JSON.stringify(this.DefaultComponentLink2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink3: ' + JSON.stringify(this.DefaultComponentLink3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink4: ' + JSON.stringify(this.DefaultComponentLink4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -91,9 +91,9 @@ export {}; /** @memo */ export function DefaultComponent(/**/ /** @memo */ -style?: (instance: ArkDefaultComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: DefaultComponentOptions): ArkDefaultComponentComponent { +content?: () => void, initializers?: DefaultComponentOptions): void { const updatedInitializers: DefaultComponentOptions = { __backing_DefaultComponentLink1: initializers?.__backing_DefaultComponentLink1, __backing_DefaultComponentLink2: initializers?.__backing_DefaultComponentLink2, @@ -102,7 +102,7 @@ content?: () => void, initializers?: DefaultComponentOptions): ArkDefaultCompone myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkDefaultComponentComponent._instantiate(style, () => new ArkDefaultComponentComponent, content, updatedInitializers); + ArkDefaultComponentComponent._instantiate(style, () => new ArkDefaultComponentComponent, content, updatedInitializers); } export interface DefaultComponentOptions { __backing_DefaultComponentLink1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DivideComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DivideComponent.ts index b4b056a53..80b504078 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DivideComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/DivideComponent.ts @@ -1,8 +1,8 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; /** @memo */ function textStyles() { - ArkText((instance: ArkTextComponent) => { - instance.backgroundColor(Color.Red); + ArkText((__instance: ArkTextComponent) => { + __instance.backgroundColor(Color.Red); }, undefined, 'Builder'); } class ArkDivideComponentComponent extends ArkStructBase { @@ -28,17 +28,17 @@ class ArkDivideComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DivideComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DivideComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DivideResult: ' + JSON.stringify(this.testNum1 / this.testNum2)); }); } @@ -48,14 +48,14 @@ export {}; /** @memo */ export function DivideComponent(/**/ /** @memo */ -style?: (instance: ArkDivideComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: DivideComponentOptions): ArkDivideComponentComponent { +content?: () => void, initializers?: DivideComponentOptions): void { const updatedInitializers: DivideComponentOptions = { __backing_testNum1: initializers?.__backing_testNum1, __backing_testNum2: initializers?.__backing_testNum2 }; - return ArkDivideComponentComponent._instantiate(style, () => new ArkDivideComponentComponent, content, updatedInitializers); + ArkDivideComponentComponent._instantiate(style, () => new ArkDivideComponentComponent, content, updatedInitializers); } export interface DivideComponentOptions { __backing_testNum1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/ExportComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/ExportComponent.ts index 39f299667..1d26891ee 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/ExportComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/ExportComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; /* * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -85,12 +85,12 @@ class ArkExportComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent1Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -173,12 +173,12 @@ class ArkExportComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent2Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -261,12 +261,12 @@ class ArkExportComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent3Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -349,12 +349,12 @@ export default class ArkExportComponent4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent4Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -371,9 +371,9 @@ export {}; /** @memo */ export function ExportComponent1(/**/ /** @memo */ -style?: (instance: ArkExportComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent1Options): ArkExportComponent1Component { +content?: () => void, initializers?: ExportComponent1Options): void { const updatedInitializers: ExportComponent1Options = { __backing_ExportComponent1Link1: initializers?.__backing_ExportComponent1Link1, __backing_ExportComponent1Link2: initializers?.__backing_ExportComponent1Link2, @@ -384,14 +384,14 @@ content?: () => void, initializers?: ExportComponent1Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent1Component._instantiate(style, () => new ArkExportComponent1Component, content, updatedInitializers); + ArkExportComponent1Component._instantiate(style, () => new ArkExportComponent1Component, content, updatedInitializers); } /** @memo */ export function ExportComponent2(/**/ /** @memo */ -style?: (instance: ArkExportComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent2Options): ArkExportComponent2Component { +content?: () => void, initializers?: ExportComponent2Options): void { const updatedInitializers: ExportComponent2Options = { __backing_ExportComponent2Link1: initializers?.__backing_ExportComponent2Link1, __backing_ExportComponent2Link2: initializers?.__backing_ExportComponent2Link2, @@ -402,14 +402,14 @@ content?: () => void, initializers?: ExportComponent2Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent2Component._instantiate(style, () => new ArkExportComponent2Component, content, updatedInitializers); + ArkExportComponent2Component._instantiate(style, () => new ArkExportComponent2Component, content, updatedInitializers); } /** @memo */ export function ExportComponent3(/**/ /** @memo */ -style?: (instance: ArkExportComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent3Options): ArkExportComponent3Component { +content?: () => void, initializers?: ExportComponent3Options): void { const updatedInitializers: ExportComponent3Options = { __backing_ExportComponent3Link1: initializers?.__backing_ExportComponent3Link1, __backing_ExportComponent3Link2: initializers?.__backing_ExportComponent3Link2, @@ -420,14 +420,14 @@ content?: () => void, initializers?: ExportComponent3Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent3Component._instantiate(style, () => new ArkExportComponent3Component, content, updatedInitializers); + ArkExportComponent3Component._instantiate(style, () => new ArkExportComponent3Component, content, updatedInitializers); } /** @memo */ export function ExportComponent4(/**/ /** @memo */ -style?: (instance: ArkExportComponent4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent4Options): ArkExportComponent4Component { +content?: () => void, initializers?: ExportComponent4Options): void { const updatedInitializers: ExportComponent4Options = { __backing_ExportComponent4Link1: initializers?.__backing_ExportComponent4Link1, __backing_ExportComponent4Link2: initializers?.__backing_ExportComponent4Link2, @@ -438,7 +438,7 @@ content?: () => void, initializers?: ExportComponent4Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent4Component._instantiate(style, () => new ArkExportComponent4Component, content, updatedInitializers); + ArkExportComponent4Component._instantiate(style, () => new ArkExportComponent4Component, content, updatedInitializers); } export interface ExportComponent1Options { __backing_ExportComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/LinkComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/LinkComponent.ts index 85f1322e4..95152e8c1 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/LinkComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/LinkComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy, stateOf } from "@koalaui/arkoala-arkui"; /* * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -85,12 +85,12 @@ class ArkLinkComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent1Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -173,12 +173,12 @@ class ArkLinkComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent2Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -261,12 +261,12 @@ class ArkLinkComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent3Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -349,12 +349,12 @@ class ArkLinkComponent4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent4Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -372,9 +372,9 @@ export {}; /** @memo */ export function LinkComponent1(/**/ /** @memo */ -style?: (instance: ArkLinkComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent1Options): ArkLinkComponent1Component { +content?: () => void, initializers?: LinkComponent1Options): void { const updatedInitializers: LinkComponent1Options = { __backing_LinkComponent1Link1: initializers?.__backing_LinkComponent1Link1, __backing_LinkComponent1Link2: initializers?.__backing_LinkComponent1Link2, @@ -385,14 +385,14 @@ content?: () => void, initializers?: LinkComponent1Options): ArkLinkComponent1Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent1Component._instantiate(style, () => new ArkLinkComponent1Component, content, updatedInitializers); + ArkLinkComponent1Component._instantiate(style, () => new ArkLinkComponent1Component, content, updatedInitializers); } /** @memo */ export function LinkComponent2(/**/ /** @memo */ -style?: (instance: ArkLinkComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent2Options): ArkLinkComponent2Component { +content?: () => void, initializers?: LinkComponent2Options): void { const updatedInitializers: LinkComponent2Options = { __backing_LinkComponent2Link1: initializers?.__backing_LinkComponent2Link1, __backing_LinkComponent2Link2: initializers?.__backing_LinkComponent2Link2, @@ -403,14 +403,14 @@ content?: () => void, initializers?: LinkComponent2Options): ArkLinkComponent2Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent2Component._instantiate(style, () => new ArkLinkComponent2Component, content, updatedInitializers); + ArkLinkComponent2Component._instantiate(style, () => new ArkLinkComponent2Component, content, updatedInitializers); } /** @memo */ export function LinkComponent3(/**/ /** @memo */ -style?: (instance: ArkLinkComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent3Options): ArkLinkComponent3Component { +content?: () => void, initializers?: LinkComponent3Options): void { const updatedInitializers: LinkComponent3Options = { __backing_LinkComponent3Link1: initializers?.__backing_LinkComponent3Link1, __backing_LinkComponent3Link2: initializers?.__backing_LinkComponent3Link2, @@ -421,14 +421,14 @@ content?: () => void, initializers?: LinkComponent3Options): ArkLinkComponent3Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent3Component._instantiate(style, () => new ArkLinkComponent3Component, content, updatedInitializers); + ArkLinkComponent3Component._instantiate(style, () => new ArkLinkComponent3Component, content, updatedInitializers); } /** @memo */ export function LinkComponent4(/**/ /** @memo */ -style?: (instance: ArkLinkComponent4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent4Options): ArkLinkComponent4Component { +content?: () => void, initializers?: LinkComponent4Options): void { const updatedInitializers: LinkComponent4Options = { __backing_LinkComponent3Link1: initializers?.__backing_LinkComponent3Link1, __backing_LinkComponent3Link2: initializers?.__backing_LinkComponent3Link2, @@ -439,7 +439,7 @@ content?: () => void, initializers?: LinkComponent4Options): ArkLinkComponent4Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent4Component._instantiate(style, () => new ArkLinkComponent4Component, content, updatedInitializers); + ArkLinkComponent4Component._instantiate(style, () => new ArkLinkComponent4Component, content, updatedInitializers); } export interface LinkComponent1Options { __backing_LinkComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/NamespaceComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/NamespaceComponent.ts index 114f8e7b5..48ed33138 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/NamespaceComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/NamespaceComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, observableProxy } from "@koalaui/arkoala-arkui"; class ArkNamespaceComponent1Component extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -56,32 +56,32 @@ class ArkNamespaceComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent1Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link1: ' + JSON.stringify(this.NamespaceComponent1Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link2: ' + JSON.stringify(this.NamespaceComponent1Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link3: ' + JSON.stringify(this.NamespaceComponent1Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link4: ' + JSON.stringify(this.NamespaceComponent1Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -143,32 +143,32 @@ class ArkNamespaceComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent2Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link1: ' + JSON.stringify(this.NamespaceComponent2Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link2: ' + JSON.stringify(this.NamespaceComponent2Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link3: ' + JSON.stringify(this.NamespaceComponent2Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link4: ' + JSON.stringify(this.NamespaceComponent2Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -230,32 +230,32 @@ class ArkNamespaceComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent3Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link1: ' + JSON.stringify(this.NamespaceComponent3Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link2: ' + JSON.stringify(this.NamespaceComponent3Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link3: ' + JSON.stringify(this.NamespaceComponent3Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link4: ' + JSON.stringify(this.NamespaceComponent3Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -266,9 +266,9 @@ export {}; /** @memo */ export function NamespaceComponent1(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent1Options): ArkNamespaceComponent1Component { +content?: () => void, initializers?: NamespaceComponent1Options): void { const updatedInitializers: NamespaceComponent1Options = { __backing_NamespaceComponent1Link1: initializers?.__backing_NamespaceComponent1Link1, __backing_NamespaceComponent1Link2: initializers?.__backing_NamespaceComponent1Link2, @@ -277,14 +277,14 @@ content?: () => void, initializers?: NamespaceComponent1Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent1Component._instantiate(style, () => new ArkNamespaceComponent1Component, content, updatedInitializers); + ArkNamespaceComponent1Component._instantiate(style, () => new ArkNamespaceComponent1Component, content, updatedInitializers); } /** @memo */ export function NamespaceComponent2(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent2Options): ArkNamespaceComponent2Component { +content?: () => void, initializers?: NamespaceComponent2Options): void { const updatedInitializers: NamespaceComponent2Options = { __backing_NamespaceComponent2Link1: initializers?.__backing_NamespaceComponent2Link1, __backing_NamespaceComponent2Link2: initializers?.__backing_NamespaceComponent2Link2, @@ -293,14 +293,14 @@ content?: () => void, initializers?: NamespaceComponent2Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent2Component._instantiate(style, () => new ArkNamespaceComponent2Component, content, updatedInitializers); + ArkNamespaceComponent2Component._instantiate(style, () => new ArkNamespaceComponent2Component, content, updatedInitializers); } /** @memo */ export function NamespaceComponent3(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent3Options): ArkNamespaceComponent3Component { +content?: () => void, initializers?: NamespaceComponent3Options): void { const updatedInitializers: NamespaceComponent3Options = { __backing_NamespaceComponent3Link1: initializers?.__backing_NamespaceComponent3Link1, __backing_NamespaceComponent3Link2: initializers?.__backing_NamespaceComponent3Link2, @@ -309,7 +309,7 @@ content?: () => void, initializers?: NamespaceComponent3Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent3Component._instantiate(style, () => new ArkNamespaceComponent3Component, content, updatedInitializers); + ArkNamespaceComponent3Component._instantiate(style, () => new ArkNamespaceComponent3Component, content, updatedInitializers); } export interface NamespaceComponent1Options { __backing_NamespaceComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/TestComponent.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/TestComponent.ts index 4937637a6..d1593b12d 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/TestComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/TestComponent.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo } from "@koalaui/arkoala-arkui"; export class ArkTestComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -14,14 +14,14 @@ export class ArkTestComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32); }, undefined, this.content); }); } @@ -57,14 +57,14 @@ export class ArkCustomContainerExportComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerExportOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.header); this.closer(); }); @@ -74,25 +74,25 @@ export {}; /** @memo */ export function TestComponent(/**/ /** @memo */ -style?: (instance: ArkTestComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestComponentOptions): ArkTestComponentComponent { +content?: () => void, initializers?: TestComponentOptions): void { const updatedInitializers: TestComponentOptions = { content: initializers?.content }; - return ArkTestComponentComponent._instantiate(style, () => new ArkTestComponentComponent, content, updatedInitializers); + ArkTestComponentComponent._instantiate(style, () => new ArkTestComponentComponent, content, updatedInitializers); } /** @memo */ export function CustomContainerExport(/**/ /** @memo */ -style?: (instance: ArkCustomContainerExportComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerExportOptions): ArkCustomContainerExportComponent { +content?: () => void, initializers?: CustomContainerExportOptions): void { const updatedInitializers: CustomContainerExportOptions = { header: initializers?.header, closer: initializers?.closer }; - return ArkCustomContainerExportComponent._instantiate(style, () => new ArkCustomContainerExportComponent, content, updatedInitializers); + ArkCustomContainerExportComponent._instantiate(style, () => new ArkCustomContainerExportComponent, content, updatedInitializers); } export interface TestComponentOptions { content?: string; diff --git a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/import@CustomDialog.ts b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/import@CustomDialog.ts index 771ff1f58..d4ff3f09d 100644 --- a/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/import@CustomDialog.ts +++ b/arkoala/ets-plugin/test/golden/arkoala/spec/test/pages/import@CustomDialog.ts @@ -1,4 +1,4 @@ -import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ArkTextInput, ArkTextInputComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, bindCustomDialog, observableProxy } from "@koalaui/arkoala-arkui"; +import { AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ArkTextInput, ArkTextInputComponent, ESObject, ForEach, GestureGroup, IDataSource, LazyForEach, LinearGradient, LocalStorage, LongPressGesture, MutableState, NavPathStack, PanGesture, PanGestureOptions, PinchGesture, RichEditorController, Scroller, SwiperController, TabsController, TapGesture, TextAreaController, TextClockController, TextInputController, TextTimerController, TransitionEffect, VideoController, WebController, animateTo, bindCustomDialog, observableProxy } from "@koalaui/arkoala-arkui"; export class ArkCustomDialogExample1Component extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -52,35 +52,35 @@ export class ArkCustomDialogExample1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogExample1Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20).margin({ top: 10, bottom: 10 }); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20).margin({ top: 10, bottom: 10 }); }, undefined, 'Change text'); - ArkTextInput((instance: ArkTextInputComponent) => { - instance.height(60).width('90%') + ArkTextInput((__instance: ArkTextInputComponent) => { + __instance.height(60).width('90%') .onChange((value: string) => { this.textValue = value; }); }, undefined, { placeholder: '', text: this.textValue }); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(16).margin({ bottom: 10 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(16).margin({ bottom: 10 }); }, undefined, 'Whether to change a text?'); - ArkFlex((instance: ArkFlexComponent) => { - instance.margin({ bottom: 10 }); + ArkFlex((__instance: ArkFlexComponent) => { + __instance.margin({ bottom: 10 }); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.cancel(); }).backgroundColor(0xffffff).fontColor(Color.Black); }, undefined, 'cancel'); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.inputValue = this.textValue; this.controller.close(); this.confirm(); @@ -92,7 +92,7 @@ export class ArkCustomDialogExample1Component extends ArkStructBase new ArkCustomDialogExample1Component, undefined, updatedInitializers); + ArkCustomDialogExample1Component._instantiate(undefined, () => new ArkCustomDialogExample1Component, undefined, updatedInitializers); } export function CustomDialogExample1(initializer: Partial = {}) { return { build: bindCustomDialog(CustomDialogExample1Impl, initializer), buildOptions: initializer }; diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/PropertyDeps.ts b/arkoala/ets-plugin/test/golden/arkts/ets/PropertyDeps.ts index d5a029200..1eb4f0f68 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/PropertyDeps.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/PropertyDeps.ts @@ -1,4 +1,4 @@ -import { AppStorageLinkState, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, StorageLinkState, SyncedProperty, contextLocalStateOf, propState, stateOf } from "@koalaui/arkts-arkui"; +import { AppStorageLinkState, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, StorageLinkState, SyncedProperty, contextLocalStateOf, propState, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,12 +25,12 @@ class ArkStateToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToPropComponent extends ArkStructBase { @@ -60,12 +60,12 @@ class ArkStateToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToProvideComponent extends ArkStructBase { @@ -91,12 +91,12 @@ class ArkStateToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToStorageLinkComponent extends ArkStructBase { @@ -122,12 +122,12 @@ class ArkStateToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToLocalStorageLinkComponent extends ArkStructBase { @@ -153,12 +153,12 @@ class ArkStateToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToStoragePropComponent extends ArkStructBase { @@ -188,12 +188,12 @@ class ArkStateToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStateToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToLocalStoragePropComponent extends ArkStructBase { @@ -223,12 +223,12 @@ class ArkStateToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStateToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToBuilderParamComponent extends ArkStructBase { @@ -260,12 +260,12 @@ class ArkStateToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToPlainComponent extends ArkStructBase { @@ -291,12 +291,12 @@ class ArkStateToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStateComponent extends ArkStructBase { @@ -326,12 +326,12 @@ class ArkPropToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToPropComponent extends ArkStructBase { @@ -362,12 +362,12 @@ class ArkPropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToProvideComponent extends ArkStructBase { @@ -397,12 +397,12 @@ class ArkPropToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStorageLinkComponent extends ArkStructBase { @@ -432,12 +432,12 @@ class ArkPropToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToLocalStorageLinkComponent extends ArkStructBase { @@ -467,12 +467,12 @@ class ArkPropToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStoragePropComponent extends ArkStructBase { @@ -503,12 +503,12 @@ class ArkPropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToLocalStoragePropComponent extends ArkStructBase { @@ -539,12 +539,12 @@ class ArkPropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToBuilderParamComponent extends ArkStructBase { @@ -580,12 +580,12 @@ class ArkPropToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToPlainComponent extends ArkStructBase { @@ -615,12 +615,12 @@ class ArkPropToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStateComponent extends ArkStructBase { @@ -646,12 +646,12 @@ class ArkProvideToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToPropComponent extends ArkStructBase { @@ -681,12 +681,12 @@ class ArkProvideToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToProvideComponent extends ArkStructBase { @@ -712,12 +712,12 @@ class ArkProvideToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStorageLinkComponent extends ArkStructBase { @@ -743,12 +743,12 @@ class ArkProvideToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToLocalStorageLinkComponent extends ArkStructBase { @@ -774,12 +774,12 @@ class ArkProvideToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStoragePropComponent extends ArkStructBase { @@ -809,12 +809,12 @@ class ArkProvideToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkProvideToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToLocalStoragePropComponent extends ArkStructBase { @@ -844,12 +844,12 @@ class ArkProvideToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkProvideToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToBuilderParamComponent extends ArkStructBase { @@ -881,12 +881,12 @@ class ArkProvideToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToPlainComponent extends ArkStructBase { @@ -912,12 +912,12 @@ class ArkProvideToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStateComponent extends ArkStructBase { @@ -943,12 +943,12 @@ class ArkStorageLinkToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToPropComponent extends ArkStructBase { @@ -978,12 +978,12 @@ class ArkStorageLinkToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToProvideComponent extends ArkStructBase { @@ -1009,12 +1009,12 @@ class ArkStorageLinkToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStorageLinkComponent extends ArkStructBase { @@ -1040,12 +1040,12 @@ class ArkStorageLinkToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToLocalStorageLinkComponent extends ArkStructBase { @@ -1071,12 +1071,12 @@ class ArkStorageLinkToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStoragePropComponent extends ArkStructBase { @@ -1106,12 +1106,12 @@ class ArkStorageLinkToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStorageLinkToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToLocalStoragePropComponent extends ArkStructBase { @@ -1141,12 +1141,12 @@ class ArkStorageLinkToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStorageLinkToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToBuilderParamComponent extends ArkStructBase { @@ -1178,12 +1178,12 @@ class ArkStorageLinkToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToPlainComponent extends ArkStructBase { @@ -1209,12 +1209,12 @@ class ArkStorageLinkToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStateComponent extends ArkStructBase { @@ -1240,12 +1240,12 @@ class ArkLocalStorageLinkToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToPropComponent extends ArkStructBase { @@ -1275,12 +1275,12 @@ class ArkLocalStorageLinkToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToProvideComponent extends ArkStructBase { @@ -1306,12 +1306,12 @@ class ArkLocalStorageLinkToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStorageLinkComponent extends ArkStructBase { @@ -1337,12 +1337,12 @@ class ArkLocalStorageLinkToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToLocalStorageLinkComponent extends ArkStructBase { @@ -1368,12 +1368,12 @@ class ArkLocalStorageLinkToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStoragePropComponent extends ArkStructBase { @@ -1403,12 +1403,12 @@ class ArkLocalStorageLinkToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageLinkToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToLocalStoragePropComponent extends ArkStructBase { @@ -1438,12 +1438,12 @@ class ArkLocalStorageLinkToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageLinkToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToBuilderParamComponent extends ArkStructBase { @@ -1475,12 +1475,12 @@ class ArkLocalStorageLinkToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToPlainComponent extends ArkStructBase { @@ -1506,12 +1506,12 @@ class ArkLocalStorageLinkToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStateComponent extends ArkStructBase { @@ -1541,12 +1541,12 @@ class ArkStoragePropToStateComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStateComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToPropComponent extends ArkStructBase { @@ -1577,12 +1577,12 @@ class ArkStoragePropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToProvideComponent extends ArkStructBase { @@ -1612,12 +1612,12 @@ class ArkStoragePropToProvideComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToProvideComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStorageLinkComponent extends ArkStructBase { @@ -1647,12 +1647,12 @@ class ArkStoragePropToStorageLinkComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToLocalStorageLinkComponent extends ArkStructBase { @@ -1682,12 +1682,12 @@ class ArkStoragePropToLocalStorageLinkComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToLocalStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStoragePropComponent extends ArkStructBase { @@ -1718,12 +1718,12 @@ class ArkStoragePropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToLocalStoragePropComponent extends ArkStructBase { @@ -1754,12 +1754,12 @@ class ArkStoragePropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToBuilderParamComponent extends ArkStructBase { @@ -1795,12 +1795,12 @@ class ArkStoragePropToBuilderParamComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToBuilderParamComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToPlainComponent extends ArkStructBase { @@ -1830,12 +1830,12 @@ class ArkStoragePropToPlainComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToPlainComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStateComponent extends ArkStructBase { @@ -1865,12 +1865,12 @@ class ArkLocalStoragePropToStateComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStateComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToPropComponent extends ArkStructBase { @@ -1901,12 +1901,12 @@ class ArkLocalStoragePropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToProvideComponent extends ArkStructBase { @@ -1936,12 +1936,12 @@ class ArkLocalStoragePropToProvideComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToProvideComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStorageLinkComponent extends ArkStructBase { @@ -1971,12 +1971,12 @@ class ArkLocalStoragePropToStorageLinkComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToLocalStorageLinkComponent extends ArkStructBase { @@ -2006,12 +2006,12 @@ class ArkLocalStoragePropToLocalStorageLinkComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToLocalStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStoragePropComponent extends ArkStructBase { @@ -2042,12 +2042,12 @@ class ArkLocalStoragePropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToLocalStoragePropComponent extends ArkStructBase { @@ -2078,12 +2078,12 @@ class ArkLocalStoragePropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToBuilderParamComponent extends ArkStructBase { @@ -2119,12 +2119,12 @@ class ArkLocalStoragePropToBuilderParamComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToBuilderParamComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToPlainComponent extends ArkStructBase { @@ -2154,12 +2154,12 @@ class ArkLocalStoragePropToPlainComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToPlainComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStateComponent extends ArkStructBase { @@ -2191,12 +2191,12 @@ class ArkBuilderParamToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToPropComponent extends ArkStructBase { @@ -2232,12 +2232,12 @@ class ArkBuilderParamToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToProvideComponent extends ArkStructBase { @@ -2269,12 +2269,12 @@ class ArkBuilderParamToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStorageLinkComponent extends ArkStructBase { @@ -2306,12 +2306,12 @@ class ArkBuilderParamToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToLocalStorageLinkComponent extends ArkStructBase { @@ -2343,12 +2343,12 @@ class ArkBuilderParamToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStoragePropComponent extends ArkStructBase { @@ -2384,12 +2384,12 @@ class ArkBuilderParamToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuilderParamToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToLocalStoragePropComponent extends ArkStructBase { @@ -2425,12 +2425,12 @@ class ArkBuilderParamToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuilderParamToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToBuilderParamComponent extends ArkStructBase { @@ -2466,12 +2466,12 @@ class ArkBuilderParamToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToPlainComponent extends ArkStructBase { @@ -2503,12 +2503,12 @@ class ArkBuilderParamToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStateComponent extends ArkStructBase { @@ -2534,12 +2534,12 @@ class ArkPlainToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToPropComponent extends ArkStructBase { @@ -2569,12 +2569,12 @@ class ArkPlainToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToProvideComponent extends ArkStructBase { @@ -2600,12 +2600,12 @@ class ArkPlainToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStorageLinkComponent extends ArkStructBase { @@ -2631,12 +2631,12 @@ class ArkPlainToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToLocalStorageLinkComponent extends ArkStructBase { @@ -2662,12 +2662,12 @@ class ArkPlainToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStoragePropComponent extends ArkStructBase { @@ -2697,12 +2697,12 @@ class ArkPlainToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPlainToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToLocalStoragePropComponent extends ArkStructBase { @@ -2732,12 +2732,12 @@ class ArkPlainToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPlainToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToBuilderParamComponent extends ArkStructBase { @@ -2769,12 +2769,12 @@ class ArkPlainToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToPlainComponent extends ArkStructBase { @@ -2800,1021 +2800,1021 @@ class ArkPlainToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } /** @memo */ export function StateToState(/**/ /** @memo */ -style?: (instance: ArkStateToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStateOptions): ArkStateToStateComponent { +content?: () => void, initializers?: StateToStateOptions): void { const updatedInitializers: StateToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStateComponent._instantiate(style, () => new ArkStateToStateComponent, content, updatedInitializers); + ArkStateToStateComponent._instantiate(style, () => new ArkStateToStateComponent, content, updatedInitializers); } /** @memo */ export function StateToProp(/**/ /** @memo */ -style?: (instance: ArkStateToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToPropOptions): ArkStateToPropComponent { +content?: () => void, initializers?: StateToPropOptions): void { const updatedInitializers: StateToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStateToPropComponent._instantiate(style, () => new ArkStateToPropComponent, content, updatedInitializers); + ArkStateToPropComponent._instantiate(style, () => new ArkStateToPropComponent, content, updatedInitializers); } /** @memo */ export function StateToProvide(/**/ /** @memo */ -style?: (instance: ArkStateToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToProvideOptions): ArkStateToProvideComponent { +content?: () => void, initializers?: StateToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StateToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStateToProvideComponent._instantiate(style, () => new ArkStateToProvideComponent, content, updatedInitializers); + ArkStateToProvideComponent._instantiate(style, () => new ArkStateToProvideComponent, content, updatedInitializers); } /** @memo */ export function StateToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStateToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStorageLinkOptions): ArkStateToStorageLinkComponent { +content?: () => void, initializers?: StateToStorageLinkOptions): void { const updatedInitializers: StateToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStorageLinkComponent._instantiate(style, () => new ArkStateToStorageLinkComponent, content, updatedInitializers); + ArkStateToStorageLinkComponent._instantiate(style, () => new ArkStateToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StateToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStateToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToLocalStorageLinkOptions): ArkStateToLocalStorageLinkComponent { +content?: () => void, initializers?: StateToLocalStorageLinkOptions): void { const updatedInitializers: StateToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToLocalStorageLinkComponent._instantiate(style, () => new ArkStateToLocalStorageLinkComponent, content, updatedInitializers); + ArkStateToLocalStorageLinkComponent._instantiate(style, () => new ArkStateToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StateToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStateToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStoragePropOptions): ArkStateToStoragePropComponent { +content?: () => void, initializers?: StateToStoragePropOptions): void { const updatedInitializers: StateToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStoragePropComponent._instantiate(style, () => new ArkStateToStoragePropComponent, content, updatedInitializers); + ArkStateToStoragePropComponent._instantiate(style, () => new ArkStateToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StateToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStateToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToLocalStoragePropOptions): ArkStateToLocalStoragePropComponent { +content?: () => void, initializers?: StateToLocalStoragePropOptions): void { const updatedInitializers: StateToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToLocalStoragePropComponent._instantiate(style, () => new ArkStateToLocalStoragePropComponent, content, updatedInitializers); + ArkStateToLocalStoragePropComponent._instantiate(style, () => new ArkStateToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StateToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStateToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToBuilderParamOptions): ArkStateToBuilderParamComponent { +content?: () => void, initializers?: StateToBuilderParamOptions): void { const updatedInitializers: StateToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStateToBuilderParamComponent._instantiate(style, () => new ArkStateToBuilderParamComponent, content, updatedInitializers); + ArkStateToBuilderParamComponent._instantiate(style, () => new ArkStateToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StateToPlain(/**/ /** @memo */ -style?: (instance: ArkStateToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToPlainOptions): ArkStateToPlainComponent { +content?: () => void, initializers?: StateToPlainOptions): void { const updatedInitializers: StateToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStateToPlainComponent._instantiate(style, () => new ArkStateToPlainComponent, content, updatedInitializers); + ArkStateToPlainComponent._instantiate(style, () => new ArkStateToPlainComponent, content, updatedInitializers); } /** @memo */ export function PropToState(/**/ /** @memo */ -style?: (instance: ArkPropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStateOptions): ArkPropToStateComponent { +content?: () => void, initializers?: PropToStateOptions): void { const updatedInitializers: PropToStateOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStateComponent._instantiate(style, () => new ArkPropToStateComponent, content, updatedInitializers); + ArkPropToStateComponent._instantiate(style, () => new ArkPropToStateComponent, content, updatedInitializers); } /** @memo */ export function PropToProp(/**/ /** @memo */ -style?: (instance: ArkPropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToPropOptions): ArkPropToPropComponent { +content?: () => void, initializers?: PropToPropOptions): void { const updatedInitializers: PropToPropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkPropToPropComponent._instantiate(style, () => new ArkPropToPropComponent, content, updatedInitializers); + ArkPropToPropComponent._instantiate(style, () => new ArkPropToPropComponent, content, updatedInitializers); } /** @memo */ export function PropToProvide(/**/ /** @memo */ -style?: (instance: ArkPropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToProvideOptions): ArkPropToProvideComponent { +content?: () => void, initializers?: PropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: PropToProvideOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkPropToProvideComponent._instantiate(style, () => new ArkPropToProvideComponent, content, updatedInitializers); + ArkPropToProvideComponent._instantiate(style, () => new ArkPropToProvideComponent, content, updatedInitializers); } /** @memo */ export function PropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkPropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStorageLinkOptions): ArkPropToStorageLinkComponent { +content?: () => void, initializers?: PropToStorageLinkOptions): void { const updatedInitializers: PropToStorageLinkOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStorageLinkComponent._instantiate(style, () => new ArkPropToStorageLinkComponent, content, updatedInitializers); + ArkPropToStorageLinkComponent._instantiate(style, () => new ArkPropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkPropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToLocalStorageLinkOptions): ArkPropToLocalStorageLinkComponent { +content?: () => void, initializers?: PropToLocalStorageLinkOptions): void { const updatedInitializers: PropToLocalStorageLinkOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToLocalStorageLinkComponent._instantiate(style, () => new ArkPropToLocalStorageLinkComponent, content, updatedInitializers); + ArkPropToLocalStorageLinkComponent._instantiate(style, () => new ArkPropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkPropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStoragePropOptions): ArkPropToStoragePropComponent { +content?: () => void, initializers?: PropToStoragePropOptions): void { const updatedInitializers: PropToStoragePropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStoragePropComponent._instantiate(style, () => new ArkPropToStoragePropComponent, content, updatedInitializers); + ArkPropToStoragePropComponent._instantiate(style, () => new ArkPropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkPropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToLocalStoragePropOptions): ArkPropToLocalStoragePropComponent { +content?: () => void, initializers?: PropToLocalStoragePropOptions): void { const updatedInitializers: PropToLocalStoragePropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToLocalStoragePropComponent._instantiate(style, () => new ArkPropToLocalStoragePropComponent, content, updatedInitializers); + ArkPropToLocalStoragePropComponent._instantiate(style, () => new ArkPropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkPropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToBuilderParamOptions): ArkPropToBuilderParamComponent { +content?: () => void, initializers?: PropToBuilderParamOptions): void { const updatedInitializers: PropToBuilderParamOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkPropToBuilderParamComponent._instantiate(style, () => new ArkPropToBuilderParamComponent, content, updatedInitializers); + ArkPropToBuilderParamComponent._instantiate(style, () => new ArkPropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function PropToPlain(/**/ /** @memo */ -style?: (instance: ArkPropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToPlainOptions): ArkPropToPlainComponent { +content?: () => void, initializers?: PropToPlainOptions): void { const updatedInitializers: PropToPlainOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkPropToPlainComponent._instantiate(style, () => new ArkPropToPlainComponent, content, updatedInitializers); + ArkPropToPlainComponent._instantiate(style, () => new ArkPropToPlainComponent, content, updatedInitializers); } /** @memo */ export function ProvideToState(/**/ /** @memo */ -style?: (instance: ArkProvideToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStateOptions): ArkProvideToStateComponent { +content?: () => void, initializers?: ProvideToStateOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStateOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStateComponent._instantiate(style, () => new ArkProvideToStateComponent, content, updatedInitializers); + ArkProvideToStateComponent._instantiate(style, () => new ArkProvideToStateComponent, content, updatedInitializers); } /** @memo */ export function ProvideToProp(/**/ /** @memo */ -style?: (instance: ArkProvideToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToPropOptions): ArkProvideToPropComponent { +content?: () => void, initializers?: ProvideToPropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToPropOptions = { __backing_state: __provide_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkProvideToPropComponent._instantiate(style, () => new ArkProvideToPropComponent, content, updatedInitializers); + ArkProvideToPropComponent._instantiate(style, () => new ArkProvideToPropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToProvide(/**/ /** @memo */ -style?: (instance: ArkProvideToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToProvideOptions): ArkProvideToProvideComponent { +content?: () => void, initializers?: ProvideToProvideOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: ProvideToProvideOptions = { __backing_state: __provide_state, __backing_test: __provide_test }; - return ArkProvideToProvideComponent._instantiate(style, () => new ArkProvideToProvideComponent, content, updatedInitializers); + ArkProvideToProvideComponent._instantiate(style, () => new ArkProvideToProvideComponent, content, updatedInitializers); } /** @memo */ export function ProvideToStorageLink(/**/ /** @memo */ -style?: (instance: ArkProvideToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStorageLinkOptions): ArkProvideToStorageLinkComponent { +content?: () => void, initializers?: ProvideToStorageLinkOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStorageLinkOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStorageLinkComponent._instantiate(style, () => new ArkProvideToStorageLinkComponent, content, updatedInitializers); + ArkProvideToStorageLinkComponent._instantiate(style, () => new ArkProvideToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function ProvideToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkProvideToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToLocalStorageLinkOptions): ArkProvideToLocalStorageLinkComponent { +content?: () => void, initializers?: ProvideToLocalStorageLinkOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToLocalStorageLinkOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToLocalStorageLinkComponent._instantiate(style, () => new ArkProvideToLocalStorageLinkComponent, content, updatedInitializers); + ArkProvideToLocalStorageLinkComponent._instantiate(style, () => new ArkProvideToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function ProvideToStorageProp(/**/ /** @memo */ -style?: (instance: ArkProvideToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStoragePropOptions): ArkProvideToStoragePropComponent { +content?: () => void, initializers?: ProvideToStoragePropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStoragePropOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStoragePropComponent._instantiate(style, () => new ArkProvideToStoragePropComponent, content, updatedInitializers); + ArkProvideToStoragePropComponent._instantiate(style, () => new ArkProvideToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkProvideToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToLocalStoragePropOptions): ArkProvideToLocalStoragePropComponent { +content?: () => void, initializers?: ProvideToLocalStoragePropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToLocalStoragePropOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToLocalStoragePropComponent._instantiate(style, () => new ArkProvideToLocalStoragePropComponent, content, updatedInitializers); + ArkProvideToLocalStoragePropComponent._instantiate(style, () => new ArkProvideToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkProvideToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToBuilderParamOptions): ArkProvideToBuilderParamComponent { +content?: () => void, initializers?: ProvideToBuilderParamOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToBuilderParamOptions = { __backing_state: __provide_state, test: initializers?.test }; - return ArkProvideToBuilderParamComponent._instantiate(style, () => new ArkProvideToBuilderParamComponent, content, updatedInitializers); + ArkProvideToBuilderParamComponent._instantiate(style, () => new ArkProvideToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function ProvideToPlain(/**/ /** @memo */ -style?: (instance: ArkProvideToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToPlainOptions): ArkProvideToPlainComponent { +content?: () => void, initializers?: ProvideToPlainOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToPlainOptions = { __backing_state: __provide_state, test: initializers?.test }; - return ArkProvideToPlainComponent._instantiate(style, () => new ArkProvideToPlainComponent, content, updatedInitializers); + ArkProvideToPlainComponent._instantiate(style, () => new ArkProvideToPlainComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToState(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStateOptions): ArkStorageLinkToStateComponent { +content?: () => void, initializers?: StorageLinkToStateOptions): void { const updatedInitializers: StorageLinkToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStateComponent._instantiate(style, () => new ArkStorageLinkToStateComponent, content, updatedInitializers); + ArkStorageLinkToStateComponent._instantiate(style, () => new ArkStorageLinkToStateComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToPropOptions): ArkStorageLinkToPropComponent { +content?: () => void, initializers?: StorageLinkToPropOptions): void { const updatedInitializers: StorageLinkToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToPropComponent._instantiate(style, () => new ArkStorageLinkToPropComponent, content, updatedInitializers); + ArkStorageLinkToPropComponent._instantiate(style, () => new ArkStorageLinkToPropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToProvide(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToProvideOptions): ArkStorageLinkToProvideComponent { +content?: () => void, initializers?: StorageLinkToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StorageLinkToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStorageLinkToProvideComponent._instantiate(style, () => new ArkStorageLinkToProvideComponent, content, updatedInitializers); + ArkStorageLinkToProvideComponent._instantiate(style, () => new ArkStorageLinkToProvideComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStorageLinkOptions): ArkStorageLinkToStorageLinkComponent { +content?: () => void, initializers?: StorageLinkToStorageLinkOptions): void { const updatedInitializers: StorageLinkToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToStorageLinkComponent, content, updatedInitializers); + ArkStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions): ArkStorageLinkToLocalStorageLinkComponent { +content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions): void { const updatedInitializers: StorageLinkToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); + ArkStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStoragePropOptions): ArkStorageLinkToStoragePropComponent { +content?: () => void, initializers?: StorageLinkToStoragePropOptions): void { const updatedInitializers: StorageLinkToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStoragePropComponent._instantiate(style, () => new ArkStorageLinkToStoragePropComponent, content, updatedInitializers); + ArkStorageLinkToStoragePropComponent._instantiate(style, () => new ArkStorageLinkToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions): ArkStorageLinkToLocalStoragePropComponent { +content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions): void { const updatedInitializers: StorageLinkToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkStorageLinkToLocalStoragePropComponent, content, updatedInitializers); + ArkStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkStorageLinkToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToBuilderParamOptions): ArkStorageLinkToBuilderParamComponent { +content?: () => void, initializers?: StorageLinkToBuilderParamOptions): void { const updatedInitializers: StorageLinkToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkStorageLinkToBuilderParamComponent, content, updatedInitializers); + ArkStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkStorageLinkToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToPlain(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToPlainOptions): ArkStorageLinkToPlainComponent { +content?: () => void, initializers?: StorageLinkToPlainOptions): void { const updatedInitializers: StorageLinkToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStorageLinkToPlainComponent._instantiate(style, () => new ArkStorageLinkToPlainComponent, content, updatedInitializers); + ArkStorageLinkToPlainComponent._instantiate(style, () => new ArkStorageLinkToPlainComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToState(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStateOptions): ArkLocalStorageLinkToStateComponent { +content?: () => void, initializers?: LocalStorageLinkToStateOptions): void { const updatedInitializers: LocalStorageLinkToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStateComponent._instantiate(style, () => new ArkLocalStorageLinkToStateComponent, content, updatedInitializers); + ArkLocalStorageLinkToStateComponent._instantiate(style, () => new ArkLocalStorageLinkToStateComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToPropOptions): ArkLocalStorageLinkToPropComponent { +content?: () => void, initializers?: LocalStorageLinkToPropOptions): void { const updatedInitializers: LocalStorageLinkToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToPropComponent._instantiate(style, () => new ArkLocalStorageLinkToPropComponent, content, updatedInitializers); + ArkLocalStorageLinkToPropComponent._instantiate(style, () => new ArkLocalStorageLinkToPropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToProvide(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToProvideOptions): ArkLocalStorageLinkToProvideComponent { +content?: () => void, initializers?: LocalStorageLinkToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: LocalStorageLinkToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkLocalStorageLinkToProvideComponent._instantiate(style, () => new ArkLocalStorageLinkToProvideComponent, content, updatedInitializers); + ArkLocalStorageLinkToProvideComponent._instantiate(style, () => new ArkLocalStorageLinkToProvideComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions): ArkLocalStorageLinkToStorageLinkComponent { +content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions): void { const updatedInitializers: LocalStorageLinkToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToStorageLinkComponent, content, updatedInitializers); + ArkLocalStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions): ArkLocalStorageLinkToLocalStorageLinkComponent { +content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions): void { const updatedInitializers: LocalStorageLinkToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); + ArkLocalStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions): ArkLocalStorageLinkToStoragePropComponent { +content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions): void { const updatedInitializers: LocalStorageLinkToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToStoragePropComponent, content, updatedInitializers); + ArkLocalStorageLinkToStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions): ArkLocalStorageLinkToLocalStoragePropComponent { +content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions): void { const updatedInitializers: LocalStorageLinkToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStoragePropComponent, content, updatedInitializers); + ArkLocalStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions): ArkLocalStorageLinkToBuilderParamComponent { +content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions): void { const updatedInitializers: LocalStorageLinkToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkLocalStorageLinkToBuilderParamComponent, content, updatedInitializers); + ArkLocalStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkLocalStorageLinkToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToPlain(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToPlainOptions): ArkLocalStorageLinkToPlainComponent { +content?: () => void, initializers?: LocalStorageLinkToPlainOptions): void { const updatedInitializers: LocalStorageLinkToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStorageLinkToPlainComponent._instantiate(style, () => new ArkLocalStorageLinkToPlainComponent, content, updatedInitializers); + ArkLocalStorageLinkToPlainComponent._instantiate(style, () => new ArkLocalStorageLinkToPlainComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToState(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStateOptions): ArkStoragePropToStateComponent { +content?: () => void, initializers?: StoragePropToStateOptions): void { const updatedInitializers: StoragePropToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStateComponent._instantiate(style, () => new ArkStoragePropToStateComponent, content, updatedInitializers); + ArkStoragePropToStateComponent._instantiate(style, () => new ArkStoragePropToStateComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToPropOptions): ArkStoragePropToPropComponent { +content?: () => void, initializers?: StoragePropToPropOptions): void { const updatedInitializers: StoragePropToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToPropComponent._instantiate(style, () => new ArkStoragePropToPropComponent, content, updatedInitializers); + ArkStoragePropToPropComponent._instantiate(style, () => new ArkStoragePropToPropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToProvide(/**/ /** @memo */ -style?: (instance: ArkStoragePropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToProvideOptions): ArkStoragePropToProvideComponent { +content?: () => void, initializers?: StoragePropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StoragePropToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStoragePropToProvideComponent._instantiate(style, () => new ArkStoragePropToProvideComponent, content, updatedInitializers); + ArkStoragePropToProvideComponent._instantiate(style, () => new ArkStoragePropToProvideComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStorageLinkOptions): ArkStoragePropToStorageLinkComponent { +content?: () => void, initializers?: StoragePropToStorageLinkOptions): void { const updatedInitializers: StoragePropToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStorageLinkComponent._instantiate(style, () => new ArkStoragePropToStorageLinkComponent, content, updatedInitializers); + ArkStoragePropToStorageLinkComponent._instantiate(style, () => new ArkStoragePropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStoragePropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions): ArkStoragePropToLocalStorageLinkComponent { +content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions): void { const updatedInitializers: StoragePropToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkStoragePropToLocalStorageLinkComponent, content, updatedInitializers); + ArkStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkStoragePropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStoragePropOptions): ArkStoragePropToStoragePropComponent { +content?: () => void, initializers?: StoragePropToStoragePropOptions): void { const updatedInitializers: StoragePropToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStoragePropComponent._instantiate(style, () => new ArkStoragePropToStoragePropComponent, content, updatedInitializers); + ArkStoragePropToStoragePropComponent._instantiate(style, () => new ArkStoragePropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToLocalStoragePropOptions): ArkStoragePropToLocalStoragePropComponent { +content?: () => void, initializers?: StoragePropToLocalStoragePropOptions): void { const updatedInitializers: StoragePropToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkStoragePropToLocalStoragePropComponent, content, updatedInitializers); + ArkStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkStoragePropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStoragePropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToBuilderParamOptions): ArkStoragePropToBuilderParamComponent { +content?: () => void, initializers?: StoragePropToBuilderParamOptions): void { const updatedInitializers: StoragePropToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStoragePropToBuilderParamComponent._instantiate(style, () => new ArkStoragePropToBuilderParamComponent, content, updatedInitializers); + ArkStoragePropToBuilderParamComponent._instantiate(style, () => new ArkStoragePropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToPlain(/**/ /** @memo */ -style?: (instance: ArkStoragePropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToPlainOptions): ArkStoragePropToPlainComponent { +content?: () => void, initializers?: StoragePropToPlainOptions): void { const updatedInitializers: StoragePropToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStoragePropToPlainComponent._instantiate(style, () => new ArkStoragePropToPlainComponent, content, updatedInitializers); + ArkStoragePropToPlainComponent._instantiate(style, () => new ArkStoragePropToPlainComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToState(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStateOptions): ArkLocalStoragePropToStateComponent { +content?: () => void, initializers?: LocalStoragePropToStateOptions): void { const updatedInitializers: LocalStoragePropToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStateComponent._instantiate(style, () => new ArkLocalStoragePropToStateComponent, content, updatedInitializers); + ArkLocalStoragePropToStateComponent._instantiate(style, () => new ArkLocalStoragePropToStateComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToPropOptions): ArkLocalStoragePropToPropComponent { +content?: () => void, initializers?: LocalStoragePropToPropOptions): void { const updatedInitializers: LocalStoragePropToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToPropComponent._instantiate(style, () => new ArkLocalStoragePropToPropComponent, content, updatedInitializers); + ArkLocalStoragePropToPropComponent._instantiate(style, () => new ArkLocalStoragePropToPropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToProvide(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToProvideOptions): ArkLocalStoragePropToProvideComponent { +content?: () => void, initializers?: LocalStoragePropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: LocalStoragePropToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkLocalStoragePropToProvideComponent._instantiate(style, () => new ArkLocalStoragePropToProvideComponent, content, updatedInitializers); + ArkLocalStoragePropToProvideComponent._instantiate(style, () => new ArkLocalStoragePropToProvideComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions): ArkLocalStoragePropToStorageLinkComponent { +content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions): void { const updatedInitializers: LocalStoragePropToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToStorageLinkComponent, content, updatedInitializers); + ArkLocalStoragePropToStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions): ArkLocalStoragePropToLocalStorageLinkComponent { +content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions): void { const updatedInitializers: LocalStoragePropToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStorageLinkComponent, content, updatedInitializers); + ArkLocalStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStoragePropOptions): ArkLocalStoragePropToStoragePropComponent { +content?: () => void, initializers?: LocalStoragePropToStoragePropOptions): void { const updatedInitializers: LocalStoragePropToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToStoragePropComponent, content, updatedInitializers); + ArkLocalStoragePropToStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions): ArkLocalStoragePropToLocalStoragePropComponent { +content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions): void { const updatedInitializers: LocalStoragePropToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStoragePropComponent, content, updatedInitializers); + ArkLocalStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions): ArkLocalStoragePropToBuilderParamComponent { +content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions): void { const updatedInitializers: LocalStoragePropToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStoragePropToBuilderParamComponent._instantiate(style, () => new ArkLocalStoragePropToBuilderParamComponent, content, updatedInitializers); + ArkLocalStoragePropToBuilderParamComponent._instantiate(style, () => new ArkLocalStoragePropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToPlain(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToPlainOptions): ArkLocalStoragePropToPlainComponent { +content?: () => void, initializers?: LocalStoragePropToPlainOptions): void { const updatedInitializers: LocalStoragePropToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStoragePropToPlainComponent._instantiate(style, () => new ArkLocalStoragePropToPlainComponent, content, updatedInitializers); + ArkLocalStoragePropToPlainComponent._instantiate(style, () => new ArkLocalStoragePropToPlainComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToState(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStateOptions): ArkBuilderParamToStateComponent { +content?: () => void, initializers?: BuilderParamToStateOptions): void { const updatedInitializers: BuilderParamToStateOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStateComponent._instantiate(style, () => new ArkBuilderParamToStateComponent, content, updatedInitializers); + ArkBuilderParamToStateComponent._instantiate(style, () => new ArkBuilderParamToStateComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToPropOptions): ArkBuilderParamToPropComponent { +content?: () => void, initializers?: BuilderParamToPropOptions): void { const updatedInitializers: BuilderParamToPropOptions = { state: initializers?.state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToPropComponent._instantiate(style, () => new ArkBuilderParamToPropComponent, content, updatedInitializers); + ArkBuilderParamToPropComponent._instantiate(style, () => new ArkBuilderParamToPropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToProvide(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToProvideOptions): ArkBuilderParamToProvideComponent { +content?: () => void, initializers?: BuilderParamToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: BuilderParamToProvideOptions = { state: initializers?.state, __backing_test: __provide_test }; - return ArkBuilderParamToProvideComponent._instantiate(style, () => new ArkBuilderParamToProvideComponent, content, updatedInitializers); + ArkBuilderParamToProvideComponent._instantiate(style, () => new ArkBuilderParamToProvideComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToStorageLink(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStorageLinkOptions): ArkBuilderParamToStorageLinkComponent { +content?: () => void, initializers?: BuilderParamToStorageLinkOptions): void { const updatedInitializers: BuilderParamToStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToStorageLinkComponent, content, updatedInitializers); + ArkBuilderParamToStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions): ArkBuilderParamToLocalStorageLinkComponent { +content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions): void { const updatedInitializers: BuilderParamToLocalStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToLocalStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToLocalStorageLinkComponent, content, updatedInitializers); + ArkBuilderParamToLocalStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToStorageProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStoragePropOptions): ArkBuilderParamToStoragePropComponent { +content?: () => void, initializers?: BuilderParamToStoragePropOptions): void { const updatedInitializers: BuilderParamToStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStoragePropComponent._instantiate(style, () => new ArkBuilderParamToStoragePropComponent, content, updatedInitializers); + ArkBuilderParamToStoragePropComponent._instantiate(style, () => new ArkBuilderParamToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions): ArkBuilderParamToLocalStoragePropComponent { +content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions): void { const updatedInitializers: BuilderParamToLocalStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToLocalStoragePropComponent._instantiate(style, () => new ArkBuilderParamToLocalStoragePropComponent, content, updatedInitializers); + ArkBuilderParamToLocalStoragePropComponent._instantiate(style, () => new ArkBuilderParamToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToBuilderParamOptions): ArkBuilderParamToBuilderParamComponent { +content?: () => void, initializers?: BuilderParamToBuilderParamOptions): void { const updatedInitializers: BuilderParamToBuilderParamOptions = { state: initializers?.state, test: initializers?.test }; - return ArkBuilderParamToBuilderParamComponent._instantiate(style, () => new ArkBuilderParamToBuilderParamComponent, content, updatedInitializers); + ArkBuilderParamToBuilderParamComponent._instantiate(style, () => new ArkBuilderParamToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToPlain(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToPlainOptions): ArkBuilderParamToPlainComponent { +content?: () => void, initializers?: BuilderParamToPlainOptions): void { const updatedInitializers: BuilderParamToPlainOptions = { state: initializers?.state, test: initializers?.test }; - return ArkBuilderParamToPlainComponent._instantiate(style, () => new ArkBuilderParamToPlainComponent, content, updatedInitializers); + ArkBuilderParamToPlainComponent._instantiate(style, () => new ArkBuilderParamToPlainComponent, content, updatedInitializers); } /** @memo */ export function PlainToState(/**/ /** @memo */ -style?: (instance: ArkPlainToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStateOptions): ArkPlainToStateComponent { +content?: () => void, initializers?: PlainToStateOptions): void { const updatedInitializers: PlainToStateOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStateComponent._instantiate(style, () => new ArkPlainToStateComponent, content, updatedInitializers); + ArkPlainToStateComponent._instantiate(style, () => new ArkPlainToStateComponent, content, updatedInitializers); } /** @memo */ export function PlainToProp(/**/ /** @memo */ -style?: (instance: ArkPlainToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToPropOptions): ArkPlainToPropComponent { +content?: () => void, initializers?: PlainToPropOptions): void { const updatedInitializers: PlainToPropOptions = { state: initializers?.state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkPlainToPropComponent._instantiate(style, () => new ArkPlainToPropComponent, content, updatedInitializers); + ArkPlainToPropComponent._instantiate(style, () => new ArkPlainToPropComponent, content, updatedInitializers); } /** @memo */ export function PlainToProvide(/**/ /** @memo */ -style?: (instance: ArkPlainToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToProvideOptions): ArkPlainToProvideComponent { +content?: () => void, initializers?: PlainToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: PlainToProvideOptions = { state: initializers?.state, __backing_test: __provide_test }; - return ArkPlainToProvideComponent._instantiate(style, () => new ArkPlainToProvideComponent, content, updatedInitializers); + ArkPlainToProvideComponent._instantiate(style, () => new ArkPlainToProvideComponent, content, updatedInitializers); } /** @memo */ export function PlainToStorageLink(/**/ /** @memo */ -style?: (instance: ArkPlainToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStorageLinkOptions): ArkPlainToStorageLinkComponent { +content?: () => void, initializers?: PlainToStorageLinkOptions): void { const updatedInitializers: PlainToStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStorageLinkComponent._instantiate(style, () => new ArkPlainToStorageLinkComponent, content, updatedInitializers); + ArkPlainToStorageLinkComponent._instantiate(style, () => new ArkPlainToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PlainToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkPlainToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToLocalStorageLinkOptions): ArkPlainToLocalStorageLinkComponent { +content?: () => void, initializers?: PlainToLocalStorageLinkOptions): void { const updatedInitializers: PlainToLocalStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToLocalStorageLinkComponent._instantiate(style, () => new ArkPlainToLocalStorageLinkComponent, content, updatedInitializers); + ArkPlainToLocalStorageLinkComponent._instantiate(style, () => new ArkPlainToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PlainToStorageProp(/**/ /** @memo */ -style?: (instance: ArkPlainToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStoragePropOptions): ArkPlainToStoragePropComponent { +content?: () => void, initializers?: PlainToStoragePropOptions): void { const updatedInitializers: PlainToStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStoragePropComponent._instantiate(style, () => new ArkPlainToStoragePropComponent, content, updatedInitializers); + ArkPlainToStoragePropComponent._instantiate(style, () => new ArkPlainToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PlainToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkPlainToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToLocalStoragePropOptions): ArkPlainToLocalStoragePropComponent { +content?: () => void, initializers?: PlainToLocalStoragePropOptions): void { const updatedInitializers: PlainToLocalStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToLocalStoragePropComponent._instantiate(style, () => new ArkPlainToLocalStoragePropComponent, content, updatedInitializers); + ArkPlainToLocalStoragePropComponent._instantiate(style, () => new ArkPlainToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PlainToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkPlainToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToBuilderParamOptions): ArkPlainToBuilderParamComponent { +content?: () => void, initializers?: PlainToBuilderParamOptions): void { const updatedInitializers: PlainToBuilderParamOptions = { state: initializers?.state, test: initializers?.test }; - return ArkPlainToBuilderParamComponent._instantiate(style, () => new ArkPlainToBuilderParamComponent, content, updatedInitializers); + ArkPlainToBuilderParamComponent._instantiate(style, () => new ArkPlainToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function PlainToPlain(/**/ /** @memo */ -style?: (instance: ArkPlainToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToPlainOptions): ArkPlainToPlainComponent { +content?: () => void, initializers?: PlainToPlainOptions): void { const updatedInitializers: PlainToPlainOptions = { state: initializers?.state, test: initializers?.test }; - return ArkPlainToPlainComponent._instantiate(style, () => new ArkPlainToPlainComponent, content, updatedInitializers); + ArkPlainToPlainComponent._instantiate(style, () => new ArkPlainToPlainComponent, content, updatedInitializers); } export interface StateToStateOptions { __backing_state?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite.ts b/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite.ts index 3ecdcf075..e2af6038c 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite.ts @@ -1,4 +1,4 @@ -import { AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, CustomDialogController, DialogAlignment, SyncedProperty, bindCustomDialog, contextLocalStateOf, objectLinkState, propState, stateOf } from "@koalaui/arkts-arkui"; +import { AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, CustomDialogController, DialogAlignment, SyncedProperty, bindCustomDialog, contextLocalStateOf, objectLinkState, propState, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState, OnChange, contextLocal } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -9,9 +9,9 @@ export class ArkEntryExampleComponent extends ArkStructBase void, initializers?: EntryExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkEntryExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: EntryExampleOptions) { } } @@ -22,9 +22,9 @@ class ArkComponentExampleComponent extends ArkStructBase void, initializers?: ComponentExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkComponentExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ComponentExampleOptions) { } } @@ -35,14 +35,17 @@ class ArkBuildExampleComponent extends ArkStructBase void, initializers?: BuildExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuildExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuildExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.fontColor(Color.Red) - .width(100); + ArkText(__instance => { + { + __instance.fontColor(Color.Red) + .width(100); + } + __builder?.(__instance); }, undefined, "message"); } } @@ -61,12 +64,12 @@ class ArkStateExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkLinkExampleComponent extends ArkStructBase { @@ -84,12 +87,12 @@ class ArkLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkPropExampleComponent extends ArkStructBase { @@ -111,12 +114,12 @@ class ArkPropExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkPropInitializedExampleComponent extends ArkStructBase { @@ -138,12 +141,12 @@ class ArkPropInitializedExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropInitializedExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkProvideExampleComponent extends ArkStructBase { @@ -161,12 +164,12 @@ class ArkProvideExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkConsumeExampleComponent extends ArkStructBase { @@ -184,12 +187,12 @@ class ArkConsumeExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ConsumeExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkBuilderExampleComponent extends ArkStructBase { @@ -203,9 +206,9 @@ class ArkBuilderExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderExampleOptions) { this.foo(); @@ -222,9 +225,9 @@ class ArkGlobalBuilderExampleComponent extends ArkStructBase void, initializers?: GlobalBuilderExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkGlobalBuilderExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: GlobalBuilderExampleOptions) { bar(); @@ -253,9 +256,9 @@ class ArkBuilderParamExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamExampleOptions) { this.foo(); @@ -274,13 +277,16 @@ class ArkStylesExampleComponent extends ArkStructBase void, initializers?: StylesExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStylesExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyStyle(looks); + ArkText(__instance => { + { + __instance.width(17).__applyStyle(looks); + } + __builder?.(__instance); }, undefined); } } @@ -297,13 +303,16 @@ class ArkStylesMethodExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesMethodExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyStyle(this.nice.bind(this)); + ArkText(__instance => { + { + __instance.width(17).__applyStyle(this.nice.bind(this)); + } + __builder?.(__instance); }, undefined); } } @@ -320,13 +329,16 @@ class ArkExtendExampleComponent extends ArkStructBase void, initializers?: ExtendExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkExtendExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExtendExampleOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(17).__applyStyle(clown__Column); + ArkColumn(__instance => { + { + __instance.width(17).__applyStyle(clown__Column); + } + __builder?.(__instance); }, undefined); } } @@ -341,13 +353,16 @@ class ArkAnimatableExtendExampleComponent extends ArkStructBase void, initializers?: AnimatableExtendExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkAnimatableExtendExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AnimatableExtendExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused"); + ArkText(__instance => { + { + __instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused"); + } + __builder?.(__instance); }, undefined); } } @@ -373,9 +388,9 @@ class ArkWatchExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: WatchExampleOptions) { } @@ -395,9 +410,9 @@ class ArkStorageLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkExampleOptions) { } @@ -421,9 +436,9 @@ class ArkStoragePropExampleComponent extends ArkStructBase("storage", "Start").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropExampleOptions) { } @@ -445,9 +460,9 @@ class ArkCustomDialogExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogExampleOptions) { } @@ -480,9 +495,9 @@ export class ArkCustomDialogControllerExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogControllerExampleOptions) { } @@ -514,15 +529,18 @@ class ArkObjectLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ObjectLinkExampleOptions) { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { - this.a.c += 1; - }); + ArkButton(__instance => { + { + __instance.onClick(() => { + this.a.c += 1; + }); + } + __builder?.(__instance); }, undefined); } } @@ -541,12 +559,12 @@ class ArkObjectLinkExampleParentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ObjectLinkExampleParentOptions) { - ObjectLinkExample(undefined, undefined); + ObjectLinkExample(__builder, undefined); } } class ArkPlainPropertyExampleComponent extends ArkStructBase { @@ -579,12 +597,12 @@ class ArkCallExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CallExampleOptions) { - Child(undefined, undefined, { __backing_counter: this.__backing_state } as ChildOptions); + Child(__builder, undefined, { __backing_counter: this.__backing_state } as ChildOptions); } } class ArkChildComponent extends ArkStructBase { @@ -602,213 +620,248 @@ class ArkChildComponent extends ArkStructBase { this.__backing_counter!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { } } +class ArkBuilderPropagationExampleComponent extends ArkStructBase { + private _entry_local_storage_ = new LocalStorage(); + __initializeStruct(/**/ + /** @memo */ + content?: () => void, initializers?: BuilderPropagationExampleOptions): void { + } + /** @memo */ + __build(/**/ + /** @memo */ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ + /** @memo */ + content?: () => void, initializers?: BuilderPropagationExampleOptions) { + ChildWithBuilder(__instance => { + { + __instance.width(100); + } + __builder?.(__instance); + }, undefined); + } +} +class ArkChildWithBuilderComponent extends ArkStructBase { + private _entry_local_storage_ = new LocalStorage(); + __initializeStruct(/**/ + /** @memo */ + content?: () => void, initializers?: ChildWithBuilderOptions): void { + } + /** @memo */ + __build(/**/ + /** @memo */ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ + /** @memo */ + content?: () => void, initializers?: ChildWithBuilderOptions) { + ArkColumn(__builder, undefined); + } +} /** @memo */ export function EntryExample(/**/ /** @memo */ -style?: (instance: ArkEntryExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: EntryExampleOptions): ArkEntryExampleComponent { +content?: () => void, initializers?: EntryExampleOptions): void { const updatedInitializers: EntryExampleOptions = {}; - return ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, updatedInitializers); + ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, updatedInitializers); } /** @memo */ export function ComponentExample(/**/ /** @memo */ -style?: (instance: ArkComponentExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ComponentExampleOptions): ArkComponentExampleComponent { +content?: () => void, initializers?: ComponentExampleOptions): void { const updatedInitializers: ComponentExampleOptions = {}; - return ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, updatedInitializers); + ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, updatedInitializers); } /** @memo */ export function BuildExample(/**/ /** @memo */ -style?: (instance: ArkBuildExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuildExampleOptions): ArkBuildExampleComponent { +content?: () => void, initializers?: BuildExampleOptions): void { const updatedInitializers: BuildExampleOptions = {}; - return ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, updatedInitializers); + ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, updatedInitializers); } /** @memo */ export function StateExample(/**/ /** @memo */ -style?: (instance: ArkStateExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateExampleOptions): ArkStateExampleComponent { +content?: () => void, initializers?: StateExampleOptions): void { const updatedInitializers: StateExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, updatedInitializers); + ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, updatedInitializers); } /** @memo */ export function LinkExample(/**/ /** @memo */ -style?: (instance: ArkLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkExampleOptions): ArkLinkExampleComponent { +content?: () => void, initializers?: LinkExampleOptions): void { const updatedInitializers: LinkExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, updatedInitializers); + ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function PropExample(/**/ /** @memo */ -style?: (instance: ArkPropExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropExampleOptions): ArkPropExampleComponent { +content?: () => void, initializers?: PropExampleOptions): void { const updatedInitializers: PropExampleOptions = { x: initializers?.x, __backing_x: initializers?.__backing_x }; - return ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, updatedInitializers); + ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, updatedInitializers); } /** @memo */ export function PropInitializedExample(/**/ /** @memo */ -style?: (instance: ArkPropInitializedExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropInitializedExampleOptions): ArkPropInitializedExampleComponent { +content?: () => void, initializers?: PropInitializedExampleOptions): void { const updatedInitializers: PropInitializedExampleOptions = { x: initializers?.x, __backing_x: initializers?.__backing_x }; - return ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, updatedInitializers); + ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, updatedInitializers); } /** @memo */ export function ProvideExample(/**/ /** @memo */ -style?: (instance: ArkProvideExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideExampleOptions): ArkProvideExampleComponent { +content?: () => void, initializers?: ProvideExampleOptions): void { const __provide_name = contextLocalStateOf("name", () => "text"); const updatedInitializers: ProvideExampleOptions = { __backing_x: __provide_name }; - return ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, updatedInitializers); + ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, updatedInitializers); } /** @memo */ export function ConsumeExample(/**/ /** @memo */ -style?: (instance: ArkConsumeExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ConsumeExampleOptions): ArkConsumeExampleComponent { +content?: () => void, initializers?: ConsumeExampleOptions): void { const __consume_name = contextLocal("name") as MutableState; const updatedInitializers: ConsumeExampleOptions = { __backing_x: __consume_name }; - return ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, updatedInitializers); + ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, updatedInitializers); } /** @memo */ export function BuilderExample(/**/ /** @memo */ -style?: (instance: ArkBuilderExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderExampleOptions): ArkBuilderExampleComponent { +content?: () => void, initializers?: BuilderExampleOptions): void { const updatedInitializers: BuilderExampleOptions = {}; - return ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, updatedInitializers); + ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, updatedInitializers); } /** @memo */ export function GlobalBuilderExample(/**/ /** @memo */ -style?: (instance: ArkGlobalBuilderExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: GlobalBuilderExampleOptions): ArkGlobalBuilderExampleComponent { +content?: () => void, initializers?: GlobalBuilderExampleOptions): void { const updatedInitializers: GlobalBuilderExampleOptions = {}; - return ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, updatedInitializers); + ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamExample(/**/ /** @memo */ -style?: (instance: ArkBuilderParamExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamExampleOptions): ArkBuilderParamExampleComponent { +content?: () => void, initializers?: BuilderParamExampleOptions): void { const updatedInitializers: BuilderParamExampleOptions = { foo: initializers?.foo }; - return ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, updatedInitializers); + ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, updatedInitializers); } /** @memo */ export function StylesExample(/**/ /** @memo */ -style?: (instance: ArkStylesExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesExampleOptions): ArkStylesExampleComponent { +content?: () => void, initializers?: StylesExampleOptions): void { const updatedInitializers: StylesExampleOptions = {}; - return ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, updatedInitializers); + ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, updatedInitializers); } /** @memo */ export function StylesMethodExample(/**/ /** @memo */ -style?: (instance: ArkStylesMethodExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesMethodExampleOptions): ArkStylesMethodExampleComponent { +content?: () => void, initializers?: StylesMethodExampleOptions): void { const updatedInitializers: StylesMethodExampleOptions = {}; - return ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, updatedInitializers); + ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, updatedInitializers); } /** @memo */ export function ExtendExample(/**/ /** @memo */ -style?: (instance: ArkExtendExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExtendExampleOptions): ArkExtendExampleComponent { +content?: () => void, initializers?: ExtendExampleOptions): void { const updatedInitializers: ExtendExampleOptions = {}; - return ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, updatedInitializers); + ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, updatedInitializers); } /** @memo */ export function AnimatableExtendExample(/**/ /** @memo */ -style?: (instance: ArkAnimatableExtendExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AnimatableExtendExampleOptions): ArkAnimatableExtendExampleComponent { +content?: () => void, initializers?: AnimatableExtendExampleOptions): void { const updatedInitializers: AnimatableExtendExampleOptions = {}; - return ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, updatedInitializers); + ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, updatedInitializers); } /** @memo */ export function WatchExample(/**/ /** @memo */ -style?: (instance: ArkWatchExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: WatchExampleOptions): ArkWatchExampleComponent { +content?: () => void, initializers?: WatchExampleOptions): void { const updatedInitializers: WatchExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, updatedInitializers); + ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkExample(/**/ /** @memo */ -style?: (instance: ArkStorageLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkExampleOptions): ArkStorageLinkExampleComponent { +content?: () => void, initializers?: StorageLinkExampleOptions): void { const updatedInitializers: StorageLinkExampleOptions = { __backing_link: initializers?.__backing_link }; - return ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, updatedInitializers); + ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function StoragePropExample(/**/ /** @memo */ -style?: (instance: ArkStoragePropExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropExampleOptions): ArkStoragePropExampleComponent { +content?: () => void, initializers?: StoragePropExampleOptions): void { const updatedInitializers: StoragePropExampleOptions = { __backing_prop: initializers?.__backing_prop }; - return ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, updatedInitializers); + ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, updatedInitializers); } /** @memo */ -export function CustomDialogExampleImpl(initializers?: CustomDialogExampleOptions): ArkCustomDialogExampleComponent { +export function CustomDialogExampleImpl(initializers?: CustomDialogExampleOptions): void { const updatedInitializers: CustomDialogExampleOptions = { controller: initializers?.controller }; - return ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, updatedInitializers); + ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, updatedInitializers); } export function CustomDialogExample(initializer: Partial = {}) { return { build: bindCustomDialog(CustomDialogExampleImpl, initializer), buildOptions: initializer }; @@ -816,69 +869,87 @@ export function CustomDialogExample(initializer: Partial void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogControllerExampleOptions): ArkCustomDialogControllerExampleComponent { +content?: () => void, initializers?: CustomDialogControllerExampleOptions): void { const updatedInitializers: CustomDialogControllerExampleOptions = { dialogController: initializers?.dialogController }; - return ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, updatedInitializers); + ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, updatedInitializers); } /** @memo */ export function ObjectLinkExample(/**/ /** @memo */ -style?: (instance: ArkObjectLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ObjectLinkExampleOptions): ArkObjectLinkExampleComponent { +content?: () => void, initializers?: ObjectLinkExampleOptions): void { const updatedInitializers: ObjectLinkExampleOptions = { a: initializers?.a, __backing_a: initializers?.__backing_a }; - return ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, updatedInitializers); + ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function ObjectLinkExampleParent(/**/ /** @memo */ -style?: (instance: ArkObjectLinkExampleParentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ObjectLinkExampleParentOptions): ArkObjectLinkExampleParentComponent { +content?: () => void, initializers?: ObjectLinkExampleParentOptions): void { const updatedInitializers: ObjectLinkExampleParentOptions = { __backing_a: initializers?.__backing_a }; - return ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, updatedInitializers); + ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, updatedInitializers); } /** @memo */ export function PlainPropertyExample(/**/ /** @memo */ -style?: (instance: ArkPlainPropertyExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainPropertyExampleOptions): ArkPlainPropertyExampleComponent { +content?: () => void, initializers?: PlainPropertyExampleOptions): void { const updatedInitializers: PlainPropertyExampleOptions = { field: initializers?.field }; - return ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, updatedInitializers); + ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, updatedInitializers); } /** @memo */ export function CallExample(/**/ /** @memo */ -style?: (instance: ArkCallExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CallExampleOptions): ArkCallExampleComponent { +content?: () => void, initializers?: CallExampleOptions): void { const updatedInitializers: CallExampleOptions = { __backing_state: initializers?.__backing_state }; - return ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, updatedInitializers); + ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); +} +/** @memo */ +export function BuilderPropagationExample(/**/ +/** @memo */ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ +/** @memo */ +content?: () => void, initializers?: BuilderPropagationExampleOptions): void { + const updatedInitializers: BuilderPropagationExampleOptions = {}; + ArkBuilderPropagationExampleComponent._instantiate(style, () => new ArkBuilderPropagationExampleComponent, content, updatedInitializers); +} +/** @memo */ +export function ChildWithBuilder(/**/ +/** @memo */ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ +/** @memo */ +content?: () => void, initializers?: ChildWithBuilderOptions): void { + const updatedInitializers: ChildWithBuilderOptions = {}; + ArkChildWithBuilderComponent._instantiate(style, () => new ArkChildWithBuilderComponent, content, updatedInitializers); } export interface EntryExampleOptions { } @@ -962,3 +1033,7 @@ export interface ChildOptions { __backing_counter?: MutableState; counter?: number; } +export interface BuilderPropagationExampleOptions { +} +export interface ChildWithBuilderOptions { +} diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite2.ts b/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite2.ts index 140e17f20..9ada71d5d 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite2.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite2.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, StorageLinkState } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, StorageLinkState } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -32,24 +32,24 @@ class ArkLocalStorageLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkExampleOptions) { - ArkText(undefined, undefined, "LocalStorage entry = " + storage.get("storage")); + ArkText(__builder, undefined, "LocalStorage entry = " + storage.get("storage")); } } /** @memo */ export function LocalStorageLinkExample(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkExampleOptions): ArkLocalStorageLinkExampleComponent { +content?: () => void, initializers?: LocalStorageLinkExampleOptions): void { const updatedInitializers: LocalStorageLinkExampleOptions = { __backing_link: initializers?.__backing_link }; - return ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, updatedInitializers); + ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, updatedInitializers); } export interface LocalStorageLinkExampleOptions { __backing_link?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite3.ts b/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite3.ts index 72670addd..cefb86579 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite3.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/Rewrite3.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { observableProxy } from "@koalaui/common"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. @@ -34,9 +34,9 @@ class ArkLocalStoragePropExampleComponent extends ArkStructBase(this._entry_local_storage_, "storage", "Start").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropExampleOptions) { } @@ -44,13 +44,13 @@ class ArkLocalStoragePropExampleComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropExampleOptions): ArkLocalStoragePropExampleComponent { +content?: () => void, initializers?: LocalStoragePropExampleOptions): void { const updatedInitializers: LocalStoragePropExampleOptions = { __backing_prop: initializers?.__backing_prop }; - return ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, updatedInitializers); + ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, updatedInitializers); } export interface LocalStoragePropExampleOptions { __backing_prop?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/builder-lambda/builder-lambda.ts b/arkoala/ets-plugin/test/golden/arkts/ets/builder-lambda/builder-lambda.ts index 9c2f1c1b5..b18de3e06 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/builder-lambda/builder-lambda.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/builder-lambda/builder-lambda.ts @@ -16,7 +16,7 @@ declare function Foo(arg1: string): FooAttribute; function _Foo(builder: (instance) => FooAttribute, arg1: string): void { builder(new FooAttribute()); } -_Foo(instance => { - instance.bar() +_Foo(__instance => { + __instance.bar() .qux(); }, "label"); diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/ets-call.ts b/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/ets-call.ts index 7e563d846..c95c6ecf2 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/ets-call.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/ets-call.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkColumn, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ColumnOptions, FlexOptions } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkColumn, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ColumnOptions, FlexOptions } from "@koalaui/arkts-arkui"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/user-function-declaration.ts b/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/user-function-declaration.ts index e0cd18658..4cc2bc3c0 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/user-function-declaration.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/ets-component-call/user-function-declaration.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. @@ -35,9 +35,9 @@ export class ArkStructComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StructOptions) { } } @@ -72,9 +72,9 @@ export class ArkStructWithContentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StructWithContentOptions) { this.content(); @@ -83,25 +83,25 @@ export class ArkStructWithContentComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StructOptions): ArkStructComponent { +content?: () => void, initializers?: StructOptions): void { const updatedInitializers: StructOptions = { param: initializers?.param }; - return ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, updatedInitializers); + ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, updatedInitializers); } /** @memo */ export function StructWithContent(/**/ /** @memo */ -style?: (instance: ArkStructWithContentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StructWithContentOptions): ArkStructWithContentComponent { +content?: () => void, initializers?: StructWithContentOptions): void { const updatedInitializers: StructWithContentOptions = { param: initializers?.param, content: initializers?.content }; - return ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, updatedInitializers); + ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, updatedInitializers); } export interface StructOptions { param?: number; diff --git a/arkoala/ets-plugin/test/golden/arkts/ets/trailing-block.ts b/arkoala/ets-plugin/test/golden/arkts/ets/trailing-block.ts index 43051d002..ce44a95a0 100644 --- a/arkoala/ets-plugin/test/golden/arkts/ets/trailing-block.ts +++ b/arkoala/ets-plugin/test/golden/arkts/ets/trailing-block.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkParentStructComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,12 +7,12 @@ class ArkParentStructComponent extends ArkStructBase void, initializers?: ParentStructOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentStructComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentStructOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ChildStruct(undefined, () => { ArkText(undefined, undefined, "xxx"); }); @@ -42,9 +42,9 @@ class ArkChildStructComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildStructOptions) { this.content(); @@ -53,22 +53,22 @@ class ArkChildStructComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentStructOptions): ArkParentStructComponent { +content?: () => void, initializers?: ParentStructOptions): void { const updatedInitializers: ParentStructOptions = {}; - return ArkParentStructComponent._instantiate(style, () => new ArkParentStructComponent, content, updatedInitializers); + ArkParentStructComponent._instantiate(style, () => new ArkParentStructComponent, content, updatedInitializers); } /** @memo */ export function ChildStruct(/**/ /** @memo */ -style?: (instance: ArkChildStructComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildStructOptions): ArkChildStructComponent { +content?: () => void, initializers?: ChildStructOptions): void { const updatedInitializers: ChildStructOptions = { content: initializers?.content }; - return ArkChildStructComponent._instantiate(style, () => new ArkChildStructComponent, content, updatedInitializers); + ArkChildStructComponent._instantiate(style, () => new ArkChildStructComponent, content, updatedInitializers); } export interface ParentStructOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@builder.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@builder.ts index f6952dacb..1ace13e91 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@builder.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@builder.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkDivider, ArkDividerComponent, ArkFlex, ArkFlexComponent, ArkList, ArkListComponent, ArkListItem, ArkListItemComponent, ArkNavigation, ArkNavigationComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, Axis, BarPosition, Color, DragEvent, FlexAlign, FlexDirection, FlexOptions, ForEach, ItemAlign, ListOptions, ResponseType, TabsController, TabsOptions, TextAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkFlex, ArkFlexComponent, ArkList, ArkListComponent, ArkListItem, ArkListItemComponent, ArkNavigation, ArkNavigationComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, Axis, BarPosition, Color, DragEvent, FlexAlign, FlexDirection, FlexOptions, ForEach, ItemAlign, ListOptions, ResponseType, TabsController, TabsOptions, TextAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -47,57 +47,57 @@ class ArkMyComponentComponent extends ArkStructBase { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, "文本"); } /** @memo */ NavigationTitlePara(label: string) { ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(80) + ArkText((__instance: ArkTextComponent) => { + __instance.width(80) .bindMenu(this.textBuilder); }, undefined, label); }); } /** @memo */ MenuBuilder() { - ArkFlex((instance: ArkFlexComponent) => { - instance.width(100); + ArkFlex((__instance: ArkFlexComponent) => { + __instance.width(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'Test menu item 1'); - ArkDivider((instance: ArkDividerComponent) => { - instance.height(10); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.height(10); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'Test menu item 2'); }, { direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center } as FlexOptions); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkMyComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkColumn(__builder, () => { + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindMenu(/* */ /** @memo */ (): void => this.NavigationTitlePara("111")); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkText((__instance: ArkTextComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); }); }, undefined, "Drag Me"); specificParam('test1', 'test2'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindPopup(false, { builder: this.MenuBuilder, onStateChange: (e) => { @@ -109,17 +109,17 @@ class ArkMyComponentComponent extends ArkStructBase { ArkText(undefined, undefined, 'Test Text'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindContextMenu(this.MenuBuilder, ResponseType.RightClick); }, () => { ArkText(undefined, undefined, 'rightclick for menu'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10); + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10); }, () => { - ArkNavigation((instance: ArkNavigationComponent) => { - instance.title(noParam) + ArkNavigation((__instance: ArkNavigationComponent) => { + __instance.title(noParam) .menus(this.textBuilder) .toolBar({ items: [ { value: 'app', text: 'Grid', action: () => { @@ -134,18 +134,18 @@ class ArkMyComponentComponent extends ArkStructBase { - ArkList((instance: ArkListComponent) => { - instance.listDirection(Axis.Vertical) + ArkList((__instance: ArkListComponent) => { + __instance.listDirection(Axis.Vertical) .height(300) .margin({ top: 10, left: 18 }) .width('100%'); }, () => { ForEach(this.arr, (item) => { - ArkListItem((instance: ArkListItemComponent) => { - instance.editable(true); + ArkListItem((__instance: ArkListItemComponent) => { + __instance.editable(true); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('90%') + ArkText((__instance: ArkTextComponent) => { + __instance.width('90%') .height(80) .backgroundColor('#3366CC') .borderRadius(15) @@ -155,37 +155,37 @@ class ArkMyComponentComponent extends ArkStructBase item); }, { space: 5, initialIndex: 0 } as ListOptions); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.hideBar = !this.hideBar; }) .margin({ left: 135, top: 60 }); }, undefined, this.hideBar ? "tool bar" : "hide bar"); }); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10); + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10); }, () => { ArkTabs(undefined, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('pink'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('pink'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Pink); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Pink); }, undefined, '111'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('yellow'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('yellow'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Yellow); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Yellow); }, undefined, '222'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('blue'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('blue'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Blue); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Blue); }, undefined, '333'); }); }, { barPosition: BarPosition.Start, controller: this.controller } as TabsOptions); @@ -197,15 +197,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { arr: initializers?.arr, controller: initializers?.controller, __backing_hideBar: initializers?.__backing_hideBar }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { arr?: number[]; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@builderParam.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@builderParam.ts index 4e6a475bb..039117e9a 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@builderParam.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@builderParam.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -56,12 +56,12 @@ class ArkCustomContainerComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.header); this.content(); this.callContent(); @@ -100,12 +100,12 @@ class ArkCustomContainer2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainer2Options) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.header); this.content(); }); @@ -114,11 +114,11 @@ class ArkCustomContainer2Component extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label1); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label2); }); } @@ -139,32 +139,32 @@ class ArkCustomContainerUserComponent extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, "content"); }); } /** @memo */ callSpecificParam(label1: string, label2: string) { ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label1); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label2); }); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCustomContainerUserComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerUserOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CustomContainerExport(undefined, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.onClick(() => { + ArkColumn((__instance: ArkColumnComponent) => { + __instance.onClick(() => { this.text = "changeHeader"; }); }, () => { @@ -185,8 +185,8 @@ class ArkCustomContainerUserComponent extends ArkStructBase { CustomContainer2(undefined, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.onClick(() => { + ArkColumn((__instance: ArkColumnComponent) => { + __instance.onClick(() => { this.text = "changeHeader"; }); }, () => { @@ -203,39 +203,39 @@ export {}; /** @memo */ export function CustomContainer(/**/ /** @memo */ -style?: (instance: ArkCustomContainerComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerOptions): ArkCustomContainerComponent { +content?: () => void, initializers?: CustomContainerOptions): void { const updatedInitializers: CustomContainerOptions = { header: initializers?.header, content: initializers?.content, callContent: initializers?.callContent, footer: initializers?.footer }; - return ArkCustomContainerComponent._instantiate(style, () => new ArkCustomContainerComponent, content, updatedInitializers); + ArkCustomContainerComponent._instantiate(style, () => new ArkCustomContainerComponent, content, updatedInitializers); } /** @memo */ export function CustomContainer2(/**/ /** @memo */ -style?: (instance: ArkCustomContainer2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainer2Options): ArkCustomContainer2Component { +content?: () => void, initializers?: CustomContainer2Options): void { const updatedInitializers: CustomContainer2Options = { header: initializers?.header, content: initializers?.content }; - return ArkCustomContainer2Component._instantiate(style, () => new ArkCustomContainer2Component, content, updatedInitializers); + ArkCustomContainer2Component._instantiate(style, () => new ArkCustomContainer2Component, content, updatedInitializers); } /** @memo */ export function CustomContainerUser(/**/ /** @memo */ -style?: (instance: ArkCustomContainerUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerUserOptions): ArkCustomContainerUserComponent { +content?: () => void, initializers?: CustomContainerUserOptions): void { const updatedInitializers: CustomContainerUserOptions = { __backing_text: initializers?.__backing_text }; - return ArkCustomContainerUserComponent._instantiate(style, () => new ArkCustomContainerUserComponent, content, updatedInitializers); + ArkCustomContainerUserComponent._instantiate(style, () => new ArkCustomContainerUserComponent, content, updatedInitializers); } export interface CustomContainerOptions { header?: string; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithComponent.ts index 9b661d6e4..8a716ecd1 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithComponent.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; /** @memo */ function myBuilder() { @@ -15,12 +15,12 @@ class ArkIndexComponent extends ArkStructBase { child(undefined, undefined); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { myBuilder(); this.Builder1(); child(undefined, undefined); @@ -34,32 +34,32 @@ class ArkchildComponent extends ArkStructBase { content?: () => void, initializers?: childOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkText(undefined, undefined, 'Hello'); + ArkText(__builder, undefined, 'Hello'); } } export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = {}; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = {}; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface IndexOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithForEach.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithForEach.ts index 1d30be1cf..c35fc4d69 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithForEach.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithForEach.ts @@ -1,11 +1,13 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ForEach, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, ForEach, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; /** @memo */ function ComB(param: string[]) { ForEach(param, item => { - ComA(undefined, undefined).backgroundColor('red'); + ComA((__instance: ArkCommonMethodComponent) => { + __instance.backgroundColor('red'); + }, undefined); }); } class ArkIndexComponent extends ArkStructBase { @@ -23,12 +25,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_arr!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ComB(this.arr); }); } @@ -40,14 +42,14 @@ class ArkComAComponent extends ArkStructBase { content?: () => void, initializers?: ComAOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkComAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ComAOptions) { - ArkRow(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkRow(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '自定义组件'); }); } @@ -56,22 +58,22 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function ComA(/**/ /** @memo */ -style?: (instance: ArkComAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ComAOptions): ArkComAComponent { +content?: () => void, initializers?: ComAOptions): void { const updatedInitializers: ComAOptions = {}; - return ArkComAComponent._instantiate(style, () => new ArkComAComponent, content, updatedInitializers); + ArkComAComponent._instantiate(style, () => new ArkComAComponent, content, updatedInitializers); } export interface IndexOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithLinkData.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithLinkData.ts index 7d45ceab5..09b8ac1ac 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithLinkData.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@builderWithLinkData.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,12 +17,12 @@ class ArkTitleCompComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TitleCompOptions) { - ArkText(undefined, undefined, this.title); + ArkText(__builder, undefined, this.title); } } class ArkTestPageComponent extends ArkStructBase { @@ -44,12 +44,12 @@ class ArkTestPageComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestPageOptions) { - ArkFlex(undefined, () => { + ArkFlex(__builder, () => { this.TitleCompView(); }); } @@ -58,24 +58,24 @@ export {}; /** @memo */ export function TitleComp(/**/ /** @memo */ -style?: (instance: ArkTitleCompComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TitleCompOptions): ArkTitleCompComponent { +content?: () => void, initializers?: TitleCompOptions): void { const updatedInitializers: TitleCompOptions = { __backing_title: initializers?.__backing_title }; - return ArkTitleCompComponent._instantiate(style, () => new ArkTitleCompComponent, content, updatedInitializers); + ArkTitleCompComponent._instantiate(style, () => new ArkTitleCompComponent, content, updatedInitializers); } /** @memo */ export function TestPage(/**/ /** @memo */ -style?: (instance: ArkTestPageComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestPageOptions): ArkTestPageComponent { +content?: () => void, initializers?: TestPageOptions): void { const updatedInitializers: TestPageOptions = { __backing_value: initializers?.__backing_value }; - return ArkTestPageComponent._instantiate(style, () => new ArkTestPageComponent, content, updatedInitializers); + ArkTestPageComponent._instantiate(style, () => new ArkTestPageComponent, content, updatedInitializers); } export interface TitleCompOptions { __backing_title?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@consume_@provide.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@consume_@provide.ts index d88e3a91b..6c4ada021 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@consume_@provide.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@consume_@provide.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, contextLocalStateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, contextLocalStateOf } from "@koalaui/arkts-arkui"; import { MutableState, contextLocal } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,20 +17,20 @@ class ArkCompAComponent extends ArkStructBase { this.__backing_reviewVotes!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompAOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CompB(undefined, undefined); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.reviewVotes += 1; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '' + this.reviewVotes); }); }); @@ -43,12 +43,12 @@ class ArkCompBComponent extends ArkStructBase { content?: () => void, initializers?: CompBOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompBOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CompC(undefined, undefined); }); } @@ -68,19 +68,19 @@ class ArkCompCComponent extends ArkStructBase { this.__backing_reviewVotes!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompCComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompCOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.reviewVotes += 1; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '' + this.reviewVotes); }); }); @@ -90,35 +90,35 @@ export {}; /** @memo */ export function CompA(/**/ /** @memo */ -style?: (instance: ArkCompAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompAOptions): ArkCompAComponent { +content?: () => void, initializers?: CompAOptions): void { const __provide_reviewVote = contextLocalStateOf("reviewVote", () => 0); const updatedInitializers: CompAOptions = { __backing_reviewVotes: __provide_reviewVote }; - return ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); + ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); } /** @memo */ export function CompB(/**/ /** @memo */ -style?: (instance: ArkCompBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompBOptions): ArkCompBComponent { +content?: () => void, initializers?: CompBOptions): void { const updatedInitializers: CompBOptions = {}; - return ArkCompBComponent._instantiate(style, () => new ArkCompBComponent, content, updatedInitializers); + ArkCompBComponent._instantiate(style, () => new ArkCompBComponent, content, updatedInitializers); } /** @memo */ export function CompC(/**/ /** @memo */ -style?: (instance: ArkCompCComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompCOptions): ArkCompCComponent { +content?: () => void, initializers?: CompCOptions): void { const __consume_reviewVote = contextLocal("reviewVote") as MutableState; const updatedInitializers: CompCOptions = { __backing_reviewVotes: __consume_reviewVote }; - return ArkCompCComponent._instantiate(style, () => new ArkCompCComponent, content, updatedInitializers); + ArkCompCComponent._instantiate(style, () => new ArkCompCComponent, content, updatedInitializers); } export interface CompAOptions { __backing_reviewVotes?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@customDialog.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@customDialog.ts index 0714dfe50..32f190e27 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@customDialog.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@customDialog.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CustomDialogController, SyncedProperty, bindCustomDialog, propState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CustomDialogController, SyncedProperty, bindCustomDialog, propState, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -67,35 +67,35 @@ class ArkDialogExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DialogExampleOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.count++; }); }, undefined, 'current count is: ' + this.count); }); ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.isPlaying = !this.isPlaying; }); }, undefined, this.isPlaying ? 'play' : 'pause'); }); ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.action1(); }); }, undefined, "Option A"); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.action2(47, "Option B is great choice"); }); @@ -151,26 +151,26 @@ class ArkCustomDialogUserComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogUserOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'current countInitValue is: ' + this.countInitValue); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'current playingInitValue is: ' + this.playingInitValue); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.countInitValue--; this.dialogController.open(); }); }, undefined, "Click to open Dialog -1"); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.countInitValue++; this.dialogController.close(); }); @@ -180,7 +180,7 @@ class ArkCustomDialogUserComponent extends ArkStructBase new ArkDialogExampleComponent, undefined, updatedInitializers); + ArkDialogExampleComponent._instantiate(undefined, () => new ArkDialogExampleComponent, undefined, updatedInitializers); } export function DialogExample(initializer: Partial = {}) { return { build: bindCustomDialog(DialogExampleImpl, initializer), buildOptions: initializer }; @@ -198,15 +198,15 @@ export function DialogExample(initializer: Partial = /** @memo */ export function CustomDialogUser(/**/ /** @memo */ -style?: (instance: ArkCustomDialogUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogUserOptions): ArkCustomDialogUserComponent { +content?: () => void, initializers?: CustomDialogUserOptions): void { const updatedInitializers: CustomDialogUserOptions = { __backing_countInitValue: initializers?.__backing_countInitValue, __backing_playingInitValue: initializers?.__backing_playingInitValue, dialogController: initializers?.dialogController }; - return ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); + ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); } export interface DialogExampleOptions { __backing_count?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@link.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@link.ts index 0f0c99eee..b2e7cd520 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@link.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@link.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,12 +17,12 @@ class ArkLinkComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponentOptions) { - ArkText(undefined, undefined, this.counter); + ArkText(__builder, undefined, this.counter); } } class ArkParentComponentComponent extends ArkStructBase { @@ -40,12 +40,12 @@ class ArkParentComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { LinkComponent(undefined, undefined, { __backing_counter: this.__backing_value } as LinkComponentOptions); }); } @@ -54,24 +54,24 @@ export {}; /** @memo */ export function LinkComponent(/**/ /** @memo */ -style?: (instance: ArkLinkComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponentOptions): ArkLinkComponentComponent { +content?: () => void, initializers?: LinkComponentOptions): void { const updatedInitializers: LinkComponentOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkLinkComponentComponent._instantiate(style, () => new ArkLinkComponentComponent, content, updatedInitializers); + ArkLinkComponentComponent._instantiate(style, () => new ArkLinkComponentComponent, content, updatedInitializers); } /** @memo */ export function ParentComponent(/**/ /** @memo */ -style?: (instance: ArkParentComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentComponentOptions): ArkParentComponentComponent { +content?: () => void, initializers?: ParentComponentOptions): void { const updatedInitializers: ParentComponentOptions = { __backing_value: initializers?.__backing_value }; - return ArkParentComponentComponent._instantiate(style, () => new ArkParentComponentComponent, content, updatedInitializers); + ArkParentComponentComponent._instantiate(style, () => new ArkParentComponentComponent, content, updatedInitializers); } export interface LinkComponentOptions { __backing_counter?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@objectLink.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@objectLink.ts index a38b65af2..2bd8c1d49 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@objectLink.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@objectLink.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ForEach, SyncedProperty, objectLinkState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ForEach, SyncedProperty, objectLinkState, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; @@ -31,12 +31,12 @@ class ArkCustomTextComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomTextOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, this.model.text); }); } @@ -64,12 +64,12 @@ class ArkParentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ForEach(this.models, (item) => { CustomText(undefined, undefined, { model: item } as CustomTextOptions); }, (item) => item.text); @@ -80,26 +80,26 @@ export {}; /** @memo */ export function CustomText(/**/ /** @memo */ -style?: (instance: ArkCustomTextComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomTextOptions): ArkCustomTextComponent { +content?: () => void, initializers?: CustomTextOptions): void { const updatedInitializers: CustomTextOptions = { model: initializers?.model, __backing_model: initializers?.__backing_model }; - return ArkCustomTextComponent._instantiate(style, () => new ArkCustomTextComponent, content, updatedInitializers); + ArkCustomTextComponent._instantiate(style, () => new ArkCustomTextComponent, content, updatedInitializers); } /** @memo */ export function Parent(/**/ /** @memo */ -style?: (instance: ArkParentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentOptions): ArkParentComponent { +content?: () => void, initializers?: ParentOptions): void { const updatedInitializers: ParentOptions = { nextId: initializers?.nextId, __backing_models: initializers?.__backing_models }; - return ArkParentComponent._instantiate(style, () => new ArkParentComponent, content, updatedInitializers); + ArkParentComponent._instantiate(style, () => new ArkParentComponent, content, updatedInitializers); } export interface CustomTextOptions { __backing_model?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@observed_@objectLink.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@observed_@objectLink.ts index 78f4f2202..53422853e 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@observed_@objectLink.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@observed_@objectLink.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, SyncedProperty, objectLinkState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, SyncedProperty, objectLinkState, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; @@ -38,12 +38,12 @@ class ArkViewAComponent extends ArkStructBase { this.__backing_varA?.update(initializers?.varA); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewAOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, 'ViewA-' + this.varA.id); }); } @@ -63,12 +63,12 @@ class ArkViewBComponent extends ArkStructBase { this.__backing_varB!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewBOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkRow(undefined, () => { ViewA(undefined, undefined, { varA: this.varB.a } as ViewAOptions); ArkText(undefined, undefined, 'ViewB'); @@ -80,25 +80,25 @@ export {}; /** @memo */ export function ViewA(/**/ /** @memo */ -style?: (instance: ArkViewAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewAOptions): ArkViewAComponent { +content?: () => void, initializers?: ViewAOptions): void { const updatedInitializers: ViewAOptions = { varA: initializers?.varA, __backing_varA: initializers?.__backing_varA }; - return ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); + ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); } /** @memo */ export function ViewB(/**/ /** @memo */ -style?: (instance: ArkViewBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewBOptions): ArkViewBComponent { +content?: () => void, initializers?: ViewBOptions): void { const updatedInitializers: ViewBOptions = { __backing_varB: initializers?.__backing_varB }; - return ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); + ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); } export interface ViewAOptions { __backing_varA?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@preview.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@preview.ts index aee17092a..6fef7ca78 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@preview.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@preview.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkHomePreviewComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,13 +15,16 @@ class ArkHomePreviewComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomePreviewComponentOptions) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText(__instance => { + { + __instance.fontSize(50); + } + __builder?.(__instance); }, undefined, this.value); } } @@ -32,12 +35,12 @@ class ArkHomePreviewComponent_PreviewComponent extends ArkStructBase void, initializers?: HomePreviewComponent_PreviewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkHomePreviewComponent_PreviewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomePreviewComponent_PreviewOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { HomePreviewComponent(undefined, undefined); }); } @@ -46,22 +49,22 @@ export {}; /** @memo */ export function HomePreviewComponent(/**/ /** @memo */ -style?: (instance: ArkHomePreviewComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomePreviewComponentOptions): ArkHomePreviewComponentComponent { +content?: () => void, initializers?: HomePreviewComponentOptions): void { const updatedInitializers: HomePreviewComponentOptions = { value: initializers?.value }; - return ArkHomePreviewComponentComponent._instantiate(style, () => new ArkHomePreviewComponentComponent, content, updatedInitializers); + ArkHomePreviewComponentComponent._instantiate(style, () => new ArkHomePreviewComponentComponent, content, updatedInitializers); } /** @memo */ export function HomePreviewComponent_Preview(/**/ /** @memo */ -style?: (instance: ArkHomePreviewComponent_PreviewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomePreviewComponent_PreviewOptions): ArkHomePreviewComponent_PreviewComponent { +content?: () => void, initializers?: HomePreviewComponent_PreviewOptions): void { const updatedInitializers: HomePreviewComponent_PreviewOptions = {}; - return ArkHomePreviewComponent_PreviewComponent._instantiate(style, () => new ArkHomePreviewComponent_PreviewComponent, content, updatedInitializers); + ArkHomePreviewComponent_PreviewComponent._instantiate(style, () => new ArkHomePreviewComponent_PreviewComponent, content, updatedInitializers); } export interface HomePreviewComponentOptions { value?: string; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@prop.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@prop.ts index 76d73f1be..b99555ebf 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@prop.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@prop.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; @@ -21,9 +21,9 @@ class ArkCustomXComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomXOptions) { } @@ -43,12 +43,12 @@ class ArkCustomYComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomYOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { CustomX(undefined, undefined, { fruit: this.parentFruit } as CustomXOptions); CustomX(undefined, undefined, {} as CustomXOptions); }); @@ -58,25 +58,25 @@ export {}; /** @memo */ export function CustomX(/**/ /** @memo */ -style?: (instance: ArkCustomXComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomXOptions): ArkCustomXComponent { +content?: () => void, initializers?: CustomXOptions): void { const updatedInitializers: CustomXOptions = { fruit: initializers?.fruit, __backing_fruit: initializers?.__backing_fruit }; - return ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); + ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); } /** @memo */ export function CustomY(/**/ /** @memo */ -style?: (instance: ArkCustomYComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomYOptions): ArkCustomYComponent { +content?: () => void, initializers?: CustomYOptions): void { const updatedInitializers: CustomYOptions = { __backing_parentFruit: initializers?.__backing_parentFruit }; - return ArkCustomYComponent._instantiate(style, () => new ArkCustomYComponent, content, updatedInitializers); + ArkCustomYComponent._instantiate(style, () => new ArkCustomYComponent, content, updatedInitializers); } export interface CustomXOptions { __backing_fruit?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@propComplexType.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@propComplexType.ts index 0772307eb..83383c978 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@propComplexType.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@propComplexType.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; @@ -33,12 +33,12 @@ class ArkCustomXComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomXOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, JSON.stringify(this.fruit.c)); }); } @@ -58,12 +58,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_arrA!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { CustomX(undefined, undefined, { fruit: this.arrA[0] } as CustomXOptions); CustomX(undefined, undefined, {} as CustomXOptions); }); @@ -73,25 +73,25 @@ export {}; /** @memo */ export function CustomX(/**/ /** @memo */ -style?: (instance: ArkCustomXComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomXOptions): ArkCustomXComponent { +content?: () => void, initializers?: CustomXOptions): void { const updatedInitializers: CustomXOptions = { fruit: initializers?.fruit, __backing_fruit: initializers?.__backing_fruit }; - return ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); + ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); } /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_arrA: initializers?.__backing_arrA }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface CustomXOptions { __backing_fruit?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@state.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@state.ts index fd4f90f1a..17d15800a 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@state.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@state.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,12 +17,12 @@ class ArkStatePageComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StatePageOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, "counter:" + this.counter); }); } @@ -31,13 +31,13 @@ export {}; /** @memo */ export function StatePage(/**/ /** @memo */ -style?: (instance: ArkStatePageComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StatePageOptions): ArkStatePageComponent { +content?: () => void, initializers?: StatePageOptions): void { const updatedInitializers: StatePageOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkStatePageComponent._instantiate(style, () => new ArkStatePageComponent, content, updatedInitializers); + ArkStatePageComponent._instantiate(style, () => new ArkStatePageComponent, content, updatedInitializers); } export interface StatePageOptions { __backing_counter?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@storageLink.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@storageLink.ts index 97f499909..ee477bffb 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@storageLink.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@storageLink.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, RowOptions, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, RowOptions, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -42,19 +42,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -71,15 +71,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@storageProp.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@storageProp.ts index 97f499909..ee477bffb 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@storageProp.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@storageProp.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, RowOptions, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, RowOptions, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -42,19 +42,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -71,15 +71,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@styles.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@styles.ts index 09b146c20..474d717bc 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@styles.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@styles.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, ColumnOptions, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, ColumnOptions, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,24 +25,24 @@ class ArkFancyUseComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: FancyUseOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(100) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .width(100) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }) @@ -63,13 +63,13 @@ export {}; /** @memo */ export function FancyUse(/**/ /** @memo */ -style?: (instance: ArkFancyUseComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: FancyUseOptions): ArkFancyUseComponent { +content?: () => void, initializers?: FancyUseOptions): void { const updatedInitializers: FancyUseOptions = { __backing_enable: initializers?.__backing_enable }; - return ArkFancyUseComponent._instantiate(style, () => new ArkFancyUseComponent, content, updatedInitializers); + ArkFancyUseComponent._instantiate(style, () => new ArkFancyUseComponent, content, updatedInitializers); } export interface FancyUseOptions { __backing_enable?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@stylesExport.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@stylesExport.ts index 36832a6be..0cf7f6c95 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@stylesExport.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@stylesExport.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, ColumnOptions, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, ColumnOptions, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,24 +25,24 @@ export class ArkFancyUseExpComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: FancyUseExpOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(100) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .width(100) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }) @@ -63,13 +63,13 @@ export {}; /** @memo */ export function FancyUseExp(/**/ /** @memo */ -style?: (instance: ArkFancyUseExpComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: FancyUseExpOptions): ArkFancyUseExpComponent { +content?: () => void, initializers?: FancyUseExpOptions): void { const updatedInitializers: FancyUseExpOptions = { __backing_enable: initializers?.__backing_enable }; - return ArkFancyUseExpComponent._instantiate(style, () => new ArkFancyUseExpComponent, content, updatedInitializers); + ArkFancyUseExpComponent._instantiate(style, () => new ArkFancyUseExpComponent, content, updatedInitializers); } export interface FancyUseExpOptions { __backing_enable?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/@watch.ts b/arkoala/ets-plugin/test/golden/arkts/spec/@watch.ts index 57a7110e0..80f757933 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/@watch.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/@watch.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, animateTo, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, animateTo, stateOf } from "@koalaui/arkts-arkui"; import { MutableState, OnChange } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -68,29 +68,29 @@ class ArkCompAComponent extends ArkStructBase { this.updateTip(); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompAOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.shopBasket.push(Math.round(100 * Math.random())); }); }, undefined, "add to basket"); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'totalPurchase: ' + this.totalPurchase); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { let alList = 'abcdefghijklmnopqrstuvwxyz'; let ranItem = alList[Math.floor(Math.random() * 26)]; this.defArray.push(ranItem); }); }, undefined, "put item"); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'tips: ' + this.resultTip); }); } @@ -99,16 +99,16 @@ export {}; /** @memo */ export function CompA(/**/ /** @memo */ -style?: (instance: ArkCompAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompAOptions): ArkCompAComponent { +content?: () => void, initializers?: CompAOptions): void { const updatedInitializers: CompAOptions = { __backing_shopBasket: initializers?.__backing_shopBasket, __backing_totalPurchase: initializers?.__backing_totalPurchase, __backing_defArray: initializers?.__backing_defArray, __backing_resultTip: initializers?.__backing_resultTip }; - return ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); + ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); } export interface CompAOptions { __backing_shopBasket?: MutableState>; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/GridItem.ts b/arkoala/ets-plugin/test/golden/arkts/spec/GridItem.ts index 5b21ba373..cbef9e863 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/GridItem.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/GridItem.ts @@ -1,4 +1,4 @@ -import { ArkGrid, ArkGridItem, ArkGridItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkGrid, ArkGridItem, ArkGridItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkParentViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,17 +7,17 @@ class ArkParentViewComponent extends ArkStructBase void, initializers?: ParentViewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentViewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkGrid(undefined, () => { - ArkGridItem((instance: ArkGridItemComponent) => { - instance.width(200).height(100); + ArkGrid(__builder, () => { + ArkGridItem((__instance: ArkGridItemComponent) => { + __instance.width(200).height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(100); + ArkText((__instance: ArkTextComponent) => { + __instance.width(100); }, undefined, 'xx'); }); }); @@ -27,11 +27,11 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = {}; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } export interface ParentViewOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/ListItem.ts b/arkoala/ets-plugin/test/golden/arkts/spec/ListItem.ts index 2509bef06..779428261 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/ListItem.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/ListItem.ts @@ -1,4 +1,4 @@ -import { ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkParentViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,17 +7,17 @@ class ArkParentViewComponent extends ArkStructBase void, initializers?: ParentViewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentViewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkList(undefined, () => { - ArkListItem((instance: ArkListItemComponent) => { - instance.width(200).height(100); + ArkList(__builder, () => { + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(200).height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(100); + ArkText((__instance: ArkTextComponent) => { + __instance.width(100); }, undefined, 'xx'); }, 'true'); }); @@ -27,11 +27,11 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = {}; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } export interface ParentViewOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/XComponentContainer.ts b/arkoala/ets-plugin/test/golden/arkts/spec/XComponentContainer.ts index d00ce52c6..dd10d9098 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/XComponentContainer.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/XComponentContainer.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkXComponent, XComponentOptions, XComponentType } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkXComponent, XComponentOptions, XComponentType } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkHomeComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,12 +7,12 @@ class ArkHomeComponentComponent extends ArkStructBase void, initializers?: HomeComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkHomeComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkXComponent(undefined, undefined, { id: '1', type: 'component' } as XComponentOptions); ArkXComponent(undefined, undefined, { id: '2', type: 1 } as XComponentOptions); ArkXComponent(undefined, undefined, { id: '3', type: XComponentType.COMPONENT } as XComponentOptions); @@ -23,11 +23,11 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = {}; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } export interface HomeComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/animatableExtend.ts b/arkoala/ets-plugin/test/golden/arkts/spec/animatableExtend.ts index 584c0b170..2e579335d 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/animatableExtend.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/animatableExtend.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkPolyline, ArkPolylineComponent, ArkStructBase, ArkText, ArkTextComponent, Color } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkPolyline, ArkPolylineComponent, ArkStructBase, ArkText, ArkTextComponent, Color } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; /** @memo */ function animatablePoints__Polyline(PolylineInstance: T, points: number): T { @@ -24,20 +24,20 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { - ArkPolyline((instance: ArkPolylineComponent) => { - instance.__applyAnimatableExtend(animatablePoints__Polyline, this.points) + ArkColumn(__builder, () => { + ArkPolyline((__instance: ArkPolylineComponent) => { + __instance.__applyAnimatableExtend(animatablePoints__Polyline, this.points) .strokeWidth(3) .height(100) .width(100); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.__applyAnimatableExtend(attributeExtend__Text); + ArkText((__instance: ArkTextComponent) => { + __instance.__applyAnimatableExtend(attributeExtend__Text); }, undefined, "hello"); }); } @@ -46,13 +46,13 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { points: initializers?.points }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } export interface HomeComponentOptions { points?: number; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/animateTo.ts b/arkoala/ets-plugin/test/golden/arkts/spec/animateTo.ts index beb0c699c..22ac6c543 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/animateTo.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/animateTo.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, Color, ColumnOptions, Curve, FlexDirection, FlexOptions, ItemAlign, PlayMode, TransitionType, animateTo, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, Color, ColumnOptions, Curve, FlexDirection, FlexOptions, ItemAlign, PlayMode, TransitionType, animateTo, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -81,16 +81,19 @@ class ArkTransitionExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TransitionExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(400).width("100%").padding({ top: 100 }); + ArkFlex(__instance => { + { + __instance.height(400).width("100%").padding({ top: 100 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { animateTo({ duration: 1000 }, () => { this.btn1 = !this.btn1; if (this.btn1) { @@ -103,14 +106,14 @@ class ArkTransitionExampleComponent extends ArkStructBase { - instance.width("80%").height(30) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width("80%").height(30) .transition({ type: TransitionType.Insert, scale: { x: 0, y: 1.0 } }) .transition({ type: TransitionType.Delete, scale: { x: 1.0, y: 0.0 } }); }, undefined); } - ArkButton((instance: ArkButtonComponent) => { - instance.width(this.btnW).height(this.btnH) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width(this.btnW).height(this.btnH) .onClick(() => { this.btnW += 50; }) @@ -122,12 +125,12 @@ class ArkTransitionExampleComponent extends ArkStructBase { - instance.width("100%") + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width("100%") .height("100%"); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.opacity(this.opacity1) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.opacity(this.opacity1) .backgroundColor(this.color) .animation({ duration: 1000 }) .width(this.width1) @@ -151,9 +154,9 @@ export {}; /** @memo */ export function TransitionExample(/**/ /** @memo */ -style?: (instance: ArkTransitionExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TransitionExampleOptions): ArkTransitionExampleComponent { +content?: () => void, initializers?: TransitionExampleOptions): void { const updatedInitializers: TransitionExampleOptions = { __backing_btnW: initializers?.__backing_btnW, __backing_btnH: initializers?.__backing_btnH, @@ -165,7 +168,7 @@ content?: () => void, initializers?: TransitionExampleOptions): ArkTransitionExa __backing_opacity1: initializers?.__backing_opacity1, __backing_borderRaius1: initializers?.__backing_borderRaius1 }; - return ArkTransitionExampleComponent._instantiate(style, () => new ArkTransitionExampleComponent, content, updatedInitializers); + ArkTransitionExampleComponent._instantiate(style, () => new ArkTransitionExampleComponent, content, updatedInitializers); } export interface TransitionExampleOptions { __backing_btnW?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/appStorage.ts b/arkoala/ets-plugin/test/golden/arkts/spec/appStorage.ts index 97f499909..ee477bffb 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/appStorage.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/appStorage.ts @@ -1,4 +1,4 @@ -import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, RowOptions, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, RowOptions, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -42,19 +42,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -71,15 +71,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/button.ts b/arkoala/ets-plugin/test/golden/arkts/spec/button.ts index 307d2f34f..f483e4d02 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/button.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/button.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, ButtonOptions, ButtonType, FlexAlign, FlexDirection, FlexOptions, ItemAlign, VerticalAlign } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, ButtonOptions, ButtonType, FlexAlign, FlexDirection, FlexOptions, ItemAlign, VerticalAlign } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkButtonExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,29 +7,29 @@ class ArkButtonExampleComponent extends ArkStructBase void, initializers?: ButtonExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkButtonExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ButtonExampleOptions) { - ArkFlex(undefined, () => { + ArkFlex(__builder, () => { ArkFlex(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.borderRadius(8).backgroundColor(0x317aff).width(90); + ArkButton((__instance: ArkButtonComponent) => { + __instance.borderRadius(8).backgroundColor(0x317aff).width(90); }, undefined, 'Ok', { type: ButtonType.Normal, stateEffect: true }); - ArkButton((instance: ArkButtonComponent) => { - instance.borderRadius(8).backgroundColor(0x317aff).width(90); + ArkButton((__instance: ArkButtonComponent) => { + __instance.borderRadius(8).backgroundColor(0x317aff).width(90); }, () => { - ArkRow((instance: ArkRowComponent) => { - instance.alignItems(VerticalAlign.Center); + ArkRow((__instance: ArkRowComponent) => { + __instance.alignItems(VerticalAlign.Center); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(12).fontColor(0xffffff).margin({ left: 5, right: 12 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(12).fontColor(0xffffff).margin({ left: 5, right: 12 }); }, undefined, 'loading'); }); }, { type: ButtonType.Normal, stateEffect: true } as ButtonOptions); - ArkButton((instance: ArkButtonComponent) => { - instance.opacity(0.5) + ArkButton((__instance: ArkButtonComponent) => { + __instance.opacity(0.5) .borderRadius(8).backgroundColor(0x317aff).width(90); }, undefined, 'Disable', { type: ButtonType.Normal, stateEffect: false }); }, { alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween } as FlexOptions); @@ -40,11 +40,11 @@ export {}; /** @memo */ export function ButtonExample(/**/ /** @memo */ -style?: (instance: ArkButtonExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ButtonExampleOptions): ArkButtonExampleComponent { +content?: () => void, initializers?: ButtonExampleOptions): void { const updatedInitializers: ButtonExampleOptions = {}; - return ArkButtonExampleComponent._instantiate(style, () => new ArkButtonExampleComponent, content, updatedInitializers); + ArkButtonExampleComponent._instantiate(style, () => new ArkButtonExampleComponent, content, updatedInitializers); } export interface ButtonExampleOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/component_object.ts b/arkoala/ets-plugin/test/golden/arkts/spec/component_object.ts index 9cf5d74ac..a766edfd6 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/component_object.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/component_object.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -29,12 +29,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_message2 = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { Child(undefined, undefined, { options, message1: this.message1, message2: this.message2 } as ChildOptions); Child2(undefined, undefined, options as Child2Options); }); @@ -77,12 +77,12 @@ class ArkChildComponent extends ArkStructBase { this.__backing_message2?.update(initializers?.message2); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.message1); }); } @@ -104,12 +104,12 @@ class ArkChild2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: Child2Options) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.message); }); } @@ -118,39 +118,39 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_message1: initializers?.__backing_message1, message2: initializers?.message2 }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = { options: initializers?.options, __backing_message1: initializers?.__backing_message1, message2: initializers?.message2, __backing_message2: initializers?.__backing_message2 }; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); } /** @memo */ export function Child2(/**/ /** @memo */ -style?: (instance: ArkChild2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: Child2Options): ArkChild2Component { +content?: () => void, initializers?: Child2Options): void { const updatedInitializers: Child2Options = { message: initializers?.message }; - return ArkChild2Component._instantiate(style, () => new ArkChild2Component, content, updatedInitializers); + ArkChild2Component._instantiate(style, () => new ArkChild2Component, content, updatedInitializers); } export interface IndexOptions { __backing_message1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/custom_component.ts b/arkoala/ets-plugin/test/golden/arkts/spec/custom_component.ts index 7f58d385f..17b1cf136 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/custom_component.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/custom_component.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,24 +7,28 @@ class ArkMyComponentComponent extends ArkStructBase void, initializers?: MyComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkMyComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { Banner(undefined, undefined); - Banner(undefined, undefined) - .width(100); - Banner(undefined, undefined) - .width(100) - .height(200); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100); + }, undefined); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100) + .height(200); + }, undefined); Banner(undefined, undefined, { value: "Hello" } as BannerOptions); - Banner(undefined, undefined, { value: "Hello" } as BannerOptions) - .width(100); - Banner(undefined, undefined, { value: "Hello" } as BannerOptions) - .width(100) - .height(200); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100); + }, undefined, { value: "Hello" } as BannerOptions); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100) + .height(200); + }, undefined, { value: "Hello" } as BannerOptions); }); } } @@ -43,12 +47,12 @@ class ArkBannerComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BannerOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.value); }); } @@ -57,22 +61,22 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = {}; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } /** @memo */ export function Banner(/**/ /** @memo */ -style?: (instance: ArkBannerComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BannerOptions): ArkBannerComponent { +content?: () => void, initializers?: BannerOptions): void { const updatedInitializers: BannerOptions = { value: initializers?.value }; - return ArkBannerComponent._instantiate(style, () => new ArkBannerComponent, content, updatedInitializers); + ArkBannerComponent._instantiate(style, () => new ArkBannerComponent, content, updatedInitializers); } export interface MyComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/decoratorKeyCheck.ts b/arkoala/ets-plugin/test/golden/arkts/spec/decoratorKeyCheck.ts index 67fa064bb..ca00d7015 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/decoratorKeyCheck.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/decoratorKeyCheck.ts @@ -1,4 +1,4 @@ -import { AppStorageLinkState, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, StorageLinkState, SyncedProperty, contextLocalStateOf, propState } from "@koalaui/arkts-arkui"; +import { AppStorageLinkState, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, StorageLinkState, SyncedProperty, contextLocalStateOf, propState } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState, contextLocal } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -199,21 +199,21 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_StorageProp3?.update(AppStorageLinkState('StorageProp3', 'StorageProp3').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, undefined); + ArkRow(__builder, undefined); } } export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const __provide_stringVariable = contextLocalStateOf("stringVariable", () => 'Provide'); const __provide_Provide32 = contextLocalStateOf("Provide32", () => 'Provide3'); const __provide_Provide4 = contextLocalStateOf("Provide4", () => 'Provide4'); @@ -244,7 +244,7 @@ content?: () => void, initializers?: IndexOptions): ArkIndexComponent { __backing_Consume3: __consume_Consume3, __backing_Consume4: __consume_Consume4 }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { __backing_LocalStorageLink?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/forEachSecondFunction.ts b/arkoala/ets-plugin/test/golden/arkts/spec/forEachSecondFunction.ts index e27d25c1b..d402e87c6 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/forEachSecondFunction.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/forEachSecondFunction.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkDivider, ArkDividerComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ColumnOptions, ForEach, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ColumnOptions, ForEach, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,25 +17,28 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width("100%").height("100%"); + ArkColumn(__instance => { + { + __instance.width("100%").height("100%"); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.arr.reverse(); }); }, undefined, 'Reverse Array'); ForEach(this.arr, ((item: number) => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(18); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(18); }, undefined, 'item'); - ArkDivider((instance: ArkDividerComponent) => { - instance.strokeWidth(2); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.strokeWidth(2); }, undefined); }), (item: number) => item.toString()); }, { space: 5 } as ColumnOptions); @@ -45,13 +48,13 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/forEachTwo.ts b/arkoala/ets-plugin/test/golden/arkts/spec/forEachTwo.ts index 64d1c19cf..2c7f4972f 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/forEachTwo.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/forEachTwo.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ForEach, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ForEach, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -35,20 +35,23 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_WIDTH_AND_HEIGHT!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow((instance: ArkRowComponent) => { - instance.height('100%'); + ArkRow(__instance => { + { + __instance.height('100%'); + } + __builder?.(__instance); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width('100%'); }, () => { ForEach(this.WIDTH_AND_HEIGHT, ({ w, h }) => { - ArkButton((instance: ArkButtonComponent) => { - instance.width(w) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width(w) .height(h); }, undefined); }, item => item.toString()); @@ -60,13 +63,13 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_WIDTH_AND_HEIGHT: initializers?.__backing_WIDTH_AND_HEIGHT }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { __backing_WIDTH_AND_HEIGHT?: MutableState void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }); @@ -44,12 +44,12 @@ class ArkParentView1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView1Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }); @@ -71,12 +71,12 @@ class ArkParentView2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView2Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }, item => item.toString()); @@ -98,12 +98,12 @@ class ArkParentView3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView3Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }, (item, index) => item.toString()); @@ -125,12 +125,12 @@ class ArkParentView4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView4Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }, (item, index) => item.toString()); @@ -152,12 +152,12 @@ class ArkParentView5Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView5Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }, item => item.toString()); @@ -168,68 +168,68 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } /** @memo */ export function ParentView1(/**/ /** @memo */ -style?: (instance: ArkParentView1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView1Options): ArkParentView1Component { +content?: () => void, initializers?: ParentView1Options): void { const updatedInitializers: ParentView1Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView1Component._instantiate(style, () => new ArkParentView1Component, content, updatedInitializers); + ArkParentView1Component._instantiate(style, () => new ArkParentView1Component, content, updatedInitializers); } /** @memo */ export function ParentView2(/**/ /** @memo */ -style?: (instance: ArkParentView2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView2Options): ArkParentView2Component { +content?: () => void, initializers?: ParentView2Options): void { const updatedInitializers: ParentView2Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView2Component._instantiate(style, () => new ArkParentView2Component, content, updatedInitializers); + ArkParentView2Component._instantiate(style, () => new ArkParentView2Component, content, updatedInitializers); } /** @memo */ export function ParentView3(/**/ /** @memo */ -style?: (instance: ArkParentView3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView3Options): ArkParentView3Component { +content?: () => void, initializers?: ParentView3Options): void { const updatedInitializers: ParentView3Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView3Component._instantiate(style, () => new ArkParentView3Component, content, updatedInitializers); + ArkParentView3Component._instantiate(style, () => new ArkParentView3Component, content, updatedInitializers); } /** @memo */ export function ParentView4(/**/ /** @memo */ -style?: (instance: ArkParentView4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView4Options): ArkParentView4Component { +content?: () => void, initializers?: ParentView4Options): void { const updatedInitializers: ParentView4Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView4Component._instantiate(style, () => new ArkParentView4Component, content, updatedInitializers); + ArkParentView4Component._instantiate(style, () => new ArkParentView4Component, content, updatedInitializers); } /** @memo */ export function ParentView5(/**/ /** @memo */ -style?: (instance: ArkParentView5Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView5Options): ArkParentView5Component { +content?: () => void, initializers?: ParentView5Options): void { const updatedInitializers: ParentView5Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView5Component._instantiate(style, () => new ArkParentView5Component, content, updatedInitializers); + ArkParentView5Component._instantiate(style, () => new ArkParentView5Component, content, updatedInitializers); } export interface ParentViewOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/handleCustomBuilder.ts b/arkoala/ets-plugin/test/golden/arkts/spec/handleCustomBuilder.ts index 1725e3f3a..141632b83 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/handleCustomBuilder.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/handleCustomBuilder.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, DragEvent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, DragEvent } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; /** @memo */ function global() { @@ -20,40 +20,40 @@ class ArkIndexComponent extends ArkStructBase { } /** @memo */ inner(param: string) { - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: /* */ /** @memo */ (): void => global() }); }, undefined, 'Inner Builder Text'); - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: this.judge ? global : undefined }); }, undefined, 'Inner Builder Text2'); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkColumn(undefined, () => { - ArkRow((instance: ArkRowComponent) => { - instance.bindMenu(/* */ + ArkColumn(__builder, () => { + ArkRow((__instance: ArkRowComponent) => { + __instance.bindMenu(/* */ /** @memo */ (): void => this.inner("111")); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.bindMenu(this.judge ? /* */ + ArkRow((__instance: ArkRowComponent) => { + __instance.bindMenu(this.judge ? /* */ /** @memo */ (): void => this.inner("111") : global); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkRow((__instance: ArkRowComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); return this.judge ? /* */ /** @memo */ @@ -62,8 +62,8 @@ class ArkIndexComponent extends ArkStructBase { (): void => global(); }); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkRow((__instance: ArkRowComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); return { builder: this.judge ? /* */ @@ -72,8 +72,8 @@ class ArkIndexComponent extends ArkStructBase { }; }); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: undefined }); @@ -85,13 +85,13 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { judge: initializers?.judge }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { judge?: boolean; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/id_if.ts b/arkoala/ets-plugin/test/golden/arkts/spec/id_if.ts index 2d471c90f..60a5bc487 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/id_if.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/id_if.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkDivider, ArkDividerComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ArkXComponent, ArkXComponentComponent, BarPosition, Color, ListOptions, TabsController, TabsOptions, XComponentOptions } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ArkXComponent, ArkXComponentComponent, BarPosition, Color, ListOptions, TabsController, TabsOptions, XComponentOptions } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -31,62 +31,62 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { if (this.pass) { if (this.count < 0) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id1'); }, undefined, 'count is negative'); } else if (this.count % 2 === 0) { - ArkDivider((instance: ArkDividerComponent) => { - instance.id('id2'); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.id('id2'); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id3'); }, undefined, 'even'); } else { - ArkDivider((instance: ArkDividerComponent) => { - instance.id('id4'); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.id('id4'); }, undefined); - ArkColumn((instance: ArkColumnComponent) => { - instance.id('id10'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.id('id10'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id5'); }, undefined, 'odd'); }); } } else { - ArkText((instance: ArkTextComponent) => { - instance.id('id6') + ArkText((__instance: ArkTextComponent) => { + __instance.id('id6') .fontSize(32); }, undefined, 'fail'); } if (this.pass) - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32).id('id7'); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32).id('id7'); }, undefined, 'odd2'); ArkList(undefined, () => { if (this.pass) { - ArkListItem((instance: ArkListItemComponent) => { - instance.id('id8'); + ArkListItem((__instance: ArkListItemComponent) => { + __instance.id('id8'); }, () => { - ArkRow((instance: ArkRowComponent) => { - instance.margin({ left: 10, right: 10 }).id('id11'); + ArkRow((__instance: ArkRowComponent) => { + __instance.margin({ left: 10, right: 10 }).id('id11'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20).margin({ left: 10 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20).margin({ left: 10 }); }, undefined); }); }); @@ -94,12 +94,12 @@ class ArkMyComponentComponent extends ArkStructBase { if (this.pass) { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('pink') + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('pink') .id('id9'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Pink); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Pink); }, undefined, '111'); }); } @@ -109,11 +109,11 @@ class ArkMyComponentComponent extends ArkStructBase { ArkText(undefined, undefined, '111'); }); - ArkXComponent((instance: ArkXComponentComponent) => { - instance.id('id12'); + ArkXComponent((__instance: ArkXComponentComponent) => { + __instance.id('id12'); }, undefined, { id: 'special', type: '' } as XComponentOptions); - ArkColumn((instance: ArkColumnComponent) => { - instance.id('id13'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.id('id13'); }, () => { ArkText(undefined, undefined, '11'); }); @@ -123,8 +123,9 @@ class ArkMyComponentComponent extends ArkStructBase { + __instance.id('id14'); + }, undefined); ArkText(undefined, undefined, '111'); } }); @@ -137,14 +138,14 @@ class ArkChildComponent extends ArkStructBase { content?: () => void, initializers?: ChildOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, 'Child'); }); } @@ -153,24 +154,24 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { pass: initializers?.pass, count: initializers?.count, controller: initializers?.controller }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = {}; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); } export interface MyComponentOptions { pass?: boolean; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/if.ts b/arkoala/ets-plugin/test/golden/arkts/spec/if.ts index 6a071cf00..c02ce0eb1 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/if.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/if.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -33,12 +33,12 @@ class ArkIFViewComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IFViewOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { if (this.toggle1) { ArkText(undefined, undefined, 'toggle1'); } @@ -61,15 +61,15 @@ export {}; /** @memo */ export function IFView(/**/ /** @memo */ -style?: (instance: ArkIFViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IFViewOptions): ArkIFViewComponent { +content?: () => void, initializers?: IFViewOptions): void { const updatedInitializers: IFViewOptions = { __backing_toggle1: initializers?.__backing_toggle1, __backing_toggle2: initializers?.__backing_toggle2, __backing_toggle3: initializers?.__backing_toggle3 }; - return ArkIFViewComponent._instantiate(style, () => new ArkIFViewComponent, content, updatedInitializers); + ArkIFViewComponent._instantiate(style, () => new ArkIFViewComponent, content, updatedInitializers); } export interface IFViewOptions { __backing_toggle1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/import@CustomDialog.ts b/arkoala/ets-plugin/test/golden/arkts/spec/import@CustomDialog.ts index 3ada7f0f7..e3ef6c838 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/import@CustomDialog.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/import@CustomDialog.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CustomDialogController, DialogAlignment, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CustomDialogController, DialogAlignment, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -56,16 +56,19 @@ class ArkCustomDialogUserComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogUserOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%').margin({ top: 5 }); + ArkColumn(__instance => { + { + __instance.width('100%').margin({ top: 5 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.dialogController.open(); }).backgroundColor(0x317aff); }, undefined, this.inputValue); @@ -76,15 +79,15 @@ export {}; /** @memo */ export function CustomDialogUser(/**/ /** @memo */ -style?: (instance: ArkCustomDialogUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogUserOptions): ArkCustomDialogUserComponent { +content?: () => void, initializers?: CustomDialogUserOptions): void { const updatedInitializers: CustomDialogUserOptions = { __backing_textValue: initializers?.__backing_textValue, __backing_inputValue: initializers?.__backing_inputValue, dialogController: initializers?.dialogController }; - return ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); + ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); } export interface CustomDialogUserOptions { __backing_textValue?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/import@Observed.ts b/arkoala/ets-plugin/test/golden/arkts/spec/import@Observed.ts index 7ad185d91..0baf8cbfe 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/import@Observed.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/import@Observed.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ForEach, SyncedProperty, objectLinkState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ForEach, SyncedProperty, objectLinkState, stateOf } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; @@ -30,16 +30,19 @@ class ArkViewAComponent extends ArkStructBase { this.__backing_a?.update(initializers?.a); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewAOptions) { - ArkRow((instance: ArkRowComponent) => { - instance.margin({ top: 10 }); + ArkRow(__instance => { + { + __instance.margin({ top: 10 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.a.c += 1; }); }, undefined, 'ViewA' + JSON.stringify(this.label) + 'this.a.c=' + JSON.stringify(this.a.c)); @@ -61,33 +64,36 @@ class ArkViewBComponent extends ArkStructBase { this.__backing_arrA!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewBOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%'); + ArkColumn(__instance => { + { + __instance.width('100%'); + } + __builder?.(__instance); }, () => { ForEach(this.arrA, (item) => { ViewA(undefined, undefined, { label: JSON.stringify(item.id), a: item } as ViewAOptions); }, (item) => item.id.toString()); ViewA(undefined, undefined, { label: JSON.stringify(this.arrA[0]), a: this.arrA[0] } as ViewAOptions); ViewA(undefined, undefined, { label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1] } as ViewAOptions); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA = [new ClassA(0), new ClassA(0)]; }); }, undefined, 'ViewB: reset array'); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA.push(new ClassA(0)); }); }, undefined, 'ViewB: push'); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA.shift(); }); @@ -99,26 +105,26 @@ export {}; /** @memo */ export function ViewA(/**/ /** @memo */ -style?: (instance: ArkViewAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewAOptions): ArkViewAComponent { +content?: () => void, initializers?: ViewAOptions): void { const updatedInitializers: ViewAOptions = { label: initializers?.label, a: initializers?.a, __backing_a: initializers?.__backing_a }; - return ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); + ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); } /** @memo */ export function ViewB(/**/ /** @memo */ -style?: (instance: ArkViewBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewBOptions): ArkViewBComponent { +content?: () => void, initializers?: ViewBOptions): void { const updatedInitializers: ViewBOptions = { __backing_arrA: initializers?.__backing_arrA }; - return ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); + ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); } export interface ViewAOptions { label?: string; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/importAllEts.ts b/arkoala/ets-plugin/test/golden/arkts/spec/importAllEts.ts index 4cabafddd..be4ed0dce 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/importAllEts.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/importAllEts.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllComponent.NamespaceComponent1({ __backing_NamespaceComponent1Link1: this.__backing_myState1, __backing_NamespaceComponent1Link2: this.__backing_myState2, @@ -90,16 +90,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/importEts.ts b/arkoala/ets-plugin/test/golden/arkts/spec/importEts.ts index 8fc50345d..9a80d5e8d 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/importEts.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/importEts.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -45,12 +45,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { LinkComponent2Ref({ __backing_LinkComponent2Link1: this.__backing_myState1, __backing_LinkComponent2Link2: this.__backing_myState2, @@ -61,8 +61,8 @@ class ArkImportTestComponent extends ArkStructBase { - instance.fontSize(20) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20) .fontColor(Color.Red); }, undefined, 'space'); LinkComponent1Ref({ @@ -118,16 +118,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/importExportEts.ts b/arkoala/ets-plugin/test/golden/arkts/spec/importExportEts.ts index 8e1b64021..9a8f0791f 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/importExportEts.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/importExportEts.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllStarComponent.ExportComponent({ __backing_ExportComponent1Link1: this.__backing_myState1, __backing_ExportComponent1Link2: this.__backing_myState2, @@ -76,16 +76,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/importExportNest.ts b/arkoala/ets-plugin/test/golden/arkts/spec/importExportNest.ts index e7028b2cd..99e534c74 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/importExportNest.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/importExportNest.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -82,21 +82,21 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.testText1); tExtend(20); ArkText(undefined, undefined, this.testText2); tStyles(); ArkButton(undefined, undefined, this.testText3); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.testText4); Base({ __backing_testStr: this.__backing_testState1, @@ -114,9 +114,9 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_testText1: initializers?.__backing_testText1, __backing_testText2: initializers?.__backing_testText2, @@ -128,7 +128,7 @@ content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent __backing_testState4: initializers?.__backing_testState4, __backing_testState5: initializers?.__backing_testState5 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_testText1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/importTs.ts b/arkoala/ets-plugin/test/golden/arkts/spec/importTs.ts index 8e1b64021..9a8f0791f 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/importTs.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/importTs.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllStarComponent.ExportComponent({ __backing_ExportComponent1Link1: this.__backing_myState1, __backing_ExportComponent1Link2: this.__backing_myState2, @@ -76,16 +76,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/lazyforeach.ts b/arkoala/ets-plugin/test/golden/arkts/spec/lazyforeach.ts index a7e2f70cf..772561aaa 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/lazyforeach.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/lazyforeach.ts @@ -1,4 +1,4 @@ -import { ArkGrid, ArkGridItem, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, DataChangeListener, IDataSource, LazyForEach } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkGrid, ArkGridItem, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, DataChangeListener, IDataSource, LazyForEach } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class BasicDataSource implements IDataSource { private listeners: DataChangeListener[] = []; @@ -79,12 +79,12 @@ class ArkTestComponent extends ArkStructBase { this.__backing_data = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkTestComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestOptions) { - ArkGrid(undefined, () => { + ArkGrid(__builder, () => { LazyForEach(this.data, (row) => { ArkGridItem(undefined, () => { ArkText(undefined, undefined, row); @@ -97,13 +97,13 @@ export {}; /** @memo */ export function Test(/**/ /** @memo */ -style?: (instance: ArkTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestOptions): ArkTestComponent { +content?: () => void, initializers?: TestOptions): void { const updatedInitializers: TestOptions = { data: initializers?.data }; - return ArkTestComponent._instantiate(style, () => new ArkTestComponent, content, updatedInitializers); + ArkTestComponent._instantiate(style, () => new ArkTestComponent, content, updatedInitializers); } export interface TestOptions { data?: MyDataSource; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/localStorage.ts b/arkoala/ets-plugin/test/golden/arkts/spec/localStorage.ts index c091a4365..444954262 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/localStorage.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/localStorage.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -38,16 +38,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -59,14 +62,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForBoth.ts b/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForBoth.ts index 5173d371c..f698ffd34 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForBoth.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForBoth.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -42,16 +42,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -63,14 +66,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForRoute.ts b/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForRoute.ts index 59a4cd2a5..9ae67b53e 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForRoute.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForRoute.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase } from "@koalaui/arkts-arkui"; let route = 'pages/Index'; class ArkLocalStorageComponentComponent extends ArkStructBase { private _entry_local_storage_ = { @@ -9,13 +9,16 @@ class ArkLocalStorageComponentComponent extends ArkStructBase void, initializers?: LocalStorageComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, undefined); } } @@ -23,11 +26,11 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = {}; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForStorage.ts b/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForStorage.ts index 0c4d316ef..bd9264e93 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForStorage.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/localStorageForStorage.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, StorageLinkState, SyncedProperty, propState } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -40,16 +40,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -61,14 +64,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/longPressGesture.ts b/arkoala/ets-plugin/test/golden/arkts/spec/longPressGesture.ts index d92e22606..e962969d1 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/longPressGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/longPressGesture.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,22 +17,25 @@ class ArkLongPressGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LongPressGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) - .gesture(LongPressGesture({ repeat: true }) - .onAction((event: GestureEvent) => { - if (event.repeat) { - this.count++; - } - }) - .onActionEnd(() => { - this.count = 0; - })); + ArkFlex(__instance => { + { + __instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) + .gesture(LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event.repeat) { + this.count++; + } + }) + .onActionEnd(() => { + this.count = 0; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'LongPress onAction:' + this.count); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween } as FlexOptions); @@ -42,13 +45,13 @@ export {}; /** @memo */ export function LongPressGestureExample(/**/ /** @memo */ -style?: (instance: ArkLongPressGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LongPressGestureExampleOptions): ArkLongPressGestureExampleComponent { +content?: () => void, initializers?: LongPressGestureExampleOptions): void { const updatedInitializers: LongPressGestureExampleOptions = { __backing_count: initializers?.__backing_count }; - return ArkLongPressGestureExampleComponent._instantiate(style, () => new ArkLongPressGestureExampleComponent, content, updatedInitializers); + ArkLongPressGestureExampleComponent._instantiate(style, () => new ArkLongPressGestureExampleComponent, content, updatedInitializers); } export interface LongPressGestureExampleOptions { __backing_count?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/pageTransition.ts b/arkoala/ets-plugin/test/golden/arkts/spec/pageTransition.ts index a5e7d56b2..15f705d37 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/pageTransition.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/pageTransition.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkNavigator, ArkNavigatorComponent, ArkPageTransitionEnter, ArkPageTransitionEnterComponent, ArkPageTransitionExit, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Curve, NavigationType, NavigatorOptions, PageTransitionOptions, RouteType, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkNavigator, ArkNavigatorComponent, ArkPageTransitionEnter, ArkPageTransitionEnterComponent, ArkPageTransitionExit, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Curve, NavigationType, NavigatorOptions, PageTransitionOptions, RouteType, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -33,35 +33,38 @@ class ArkPageTransitionExample1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PageTransitionExample1Options) { - ArkColumn((instance: ArkColumnComponent) => { - instance.scale({ x: this.scale2 }).opacity(this.opacity2); + ArkColumn(__instance => { + { + __instance.scale({ x: this.scale2 }).opacity(this.opacity2); + } + __builder?.(__instance); }, () => { - ArkNavigator((instance: ArkNavigatorComponent) => { - instance.onClick(() => { + ArkNavigator((__instance: ArkNavigatorComponent) => { + __instance.onClick(() => { this.active = true; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width("100%").height("100%"); + ArkText((__instance: ArkTextComponent) => { + __instance.width("100%").height("100%"); }, undefined, 'page transition'); }, { target: 'pages/page1', type: NavigationType.Push } as NavigatorOptions); }); } /** @memo */ pageTransition() { - ArkPageTransitionEnter((instance: ArkPageTransitionEnterComponent) => { - instance.onEnter((type: RouteType, progress: number) => { + ArkPageTransitionEnter((__instance: ArkPageTransitionEnterComponent) => { + __instance.onEnter((type: RouteType, progress: number) => { this.scale2 = 1; this.opacity2 = progress; }); }, undefined, { duration: 1200, curve: Curve.Linear } as PageTransitionOptions); - ArkPageTransitionExit((instance: ArkPageTransitionExitComponent) => { - instance.onExit((type: RouteType, progress: number) => { + ArkPageTransitionExit((__instance: ArkPageTransitionExitComponent) => { + __instance.onExit((type: RouteType, progress: number) => { this.scale2 = 1 - progress; this.opacity2 = 1; }); @@ -72,15 +75,15 @@ export {}; /** @memo */ export function PageTransitionExample1(/**/ /** @memo */ -style?: (instance: ArkPageTransitionExample1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PageTransitionExample1Options): ArkPageTransitionExample1Component { +content?: () => void, initializers?: PageTransitionExample1Options): void { const updatedInitializers: PageTransitionExample1Options = { __backing_scale2: initializers?.__backing_scale2, __backing_opacity2: initializers?.__backing_opacity2, __backing_active: initializers?.__backing_active }; - return ArkPageTransitionExample1Component._instantiate(style, () => new ArkPageTransitionExample1Component, content, updatedInitializers); + ArkPageTransitionExample1Component._instantiate(style, () => new ArkPageTransitionExample1Component, content, updatedInitializers); } export interface PageTransitionExample1Options { __backing_scale2?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/panGestrue.ts b/arkoala/ets-plugin/test/golden/arkts/spec/panGestrue.ts index 07b0266a0..6366ffb74 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/panGestrue.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/panGestrue.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,25 +25,28 @@ class ArkPanGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PanGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) - .gesture(PanGesture({}) - .onActionStart((event: GestureEvent) => { - console.info('Pan start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.offsetX = event.offsetX; - this.offsetY = event.offsetY; - }) - .onActionEnd(() => { - console.info('Pan end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) + .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) + .gesture(PanGesture({}) + .onActionStart((event: GestureEvent) => { + console.info('Pan start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX; + this.offsetY = event.offsetY; + }) + .onActionEnd(() => { + console.info('Pan end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'PanGesture offset X: ' + this.offsetX); ArkText(undefined, undefined, 'PanGesture offset Y: ' + this.offsetY); @@ -54,14 +57,14 @@ export {}; /** @memo */ export function PanGestureExample(/**/ /** @memo */ -style?: (instance: ArkPanGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PanGestureExampleOptions): ArkPanGestureExampleComponent { +content?: () => void, initializers?: PanGestureExampleOptions): void { const updatedInitializers: PanGestureExampleOptions = { __backing_offsetX: initializers?.__backing_offsetX, __backing_offsetY: initializers?.__backing_offsetY }; - return ArkPanGestureExampleComponent._instantiate(style, () => new ArkPanGestureExampleComponent, content, updatedInitializers); + ArkPanGestureExampleComponent._instantiate(style, () => new ArkPanGestureExampleComponent, content, updatedInitializers); } export interface PanGestureExampleOptions { __backing_offsetX?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/pinchGesture.ts b/arkoala/ets-plugin/test/golden/arkts/spec/pinchGesture.ts index 6207de045..609873950 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/pinchGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/pinchGesture.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,24 +17,27 @@ class ArkPinchGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PinchGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .scale({ x: this.scale2, y: this.scale2, z: this.scale2 }) - .gesture(PinchGesture() - .onActionStart((event: GestureEvent) => { - console.info('Pinch start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.scale2 = event.scale; - }) - .onActionEnd(() => { - console.info('Pinch end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) + .scale({ x: this.scale2, y: this.scale2, z: this.scale2 }) + .gesture(PinchGesture() + .onActionStart((event: GestureEvent) => { + console.info('Pinch start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.scale2 = event.scale; + }) + .onActionEnd(() => { + console.info('Pinch end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'PinchGesture scale:' + this.scale2); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween } as FlexOptions); @@ -44,13 +47,13 @@ export {}; /** @memo */ export function PinchGestureExample(/**/ /** @memo */ -style?: (instance: ArkPinchGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PinchGestureExampleOptions): ArkPinchGestureExampleComponent { +content?: () => void, initializers?: PinchGestureExampleOptions): void { const updatedInitializers: PinchGestureExampleOptions = { __backing_scale2: initializers?.__backing_scale2 }; - return ArkPinchGestureExampleComponent._instantiate(style, () => new ArkPinchGestureExampleComponent, content, updatedInitializers); + ArkPinchGestureExampleComponent._instantiate(style, () => new ArkPinchGestureExampleComponent, content, updatedInitializers); } export interface PinchGestureExampleOptions { __backing_scale2?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/recycle.ts b/arkoala/ets-plugin/test/golden/arkts/spec/recycle.ts index f467ba121..5780a004c 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/recycle.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/recycle.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkTabsComponent, ArkText, ArkTextComponent, BarPosition, Color, SyncedProperty, TabsController, TabsOptions, propState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkTabsComponent, ArkText, ArkTextComponent, BarPosition, Color, SyncedProperty, TabsController, TabsOptions, propState, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,20 +25,24 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(this.state_value) - .height(100); + ArkColumn(__instance => { + { + __instance.width(this.state_value) + .height(100); + } + __builder?.(__instance); }, () => { - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value); - ArkText((instance: ArkTextComponent) => { - instance.width(this.state_value) + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.state_value) .height(100); }, undefined, "aa"); }); @@ -111,79 +115,80 @@ class ArkchildComponent extends ArkStructBase { this.__backing_propvalue?.update(initializers?.propvalue); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, () => { - AnimationTest(undefined, undefined) - .border({ width: 3, color: Color.Red }) - .height(this.heightValue); - ArkText((instance: ArkTextComponent) => { - instance.width(this.propvalue) + ArkColumn(__builder, () => { + AnimationTest((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .height(this.heightValue); + }, undefined); + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.propvalue) .fontSize(this.reguar_value) .height(100) .fontColor(Color.Red) .border({ width: this.propvalue, color: Color.Red, radius: 100 }); }, undefined, "hello"); - ArkButton((instance: ArkButtonComponent) => { - instance.border({ width: this.reguar_value, color: Color.Red, radius: 100 }); + ArkButton((__instance: ArkButtonComponent) => { + __instance.border({ width: this.reguar_value, color: Color.Red, radius: 100 }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(this.state_value) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(this.state_value) .width(100); }, undefined, "hhhhhhhhhhhhh"); }); - ArkListItem((instance: ArkListItemComponent) => { - instance.width(this.width_value) + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'ListItem'); }, 'true'); - ArkListItem((instance: ArkListItemComponent) => { - instance.width(this.width_value) + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'true'); - ArkTabs((instance: ArkTabsComponent) => { - instance.width(this.width_value) + ArkTabs((__instance: ArkTabsComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar") .width(this.width_value) .height(100); }, () => { - ArkFlex((instance: ArkFlexComponent) => { - instance.width(this.width_value) + ArkFlex((__instance: ArkFlexComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(this.width_value) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'text1'); }); }); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar 2") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar 2") .width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'text2'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.width(this.width_value) + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.width(this.width_value) .height(100); }, undefined); }, { barPosition: BarPosition.Start, index: 1, controller: this.controller } as TabsOptions); @@ -205,14 +210,14 @@ class ArkNormalComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NormalComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, "hello"); }); @@ -233,14 +238,14 @@ class ArkAnimationTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AnimationTestOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(this.width_value) .animation({ duration: 300 }); }, undefined, "hello"); @@ -251,21 +256,21 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_state_value: initializers?.__backing_state_value, __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { propvalue: initializers?.propvalue, __backing_propvalue: initializers?.__backing_propvalue, @@ -276,29 +281,29 @@ content?: () => void, initializers?: childOptions): ArkchildComponent { controller: initializers?.controller, __backing_heightValue: initializers?.__backing_heightValue }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } /** @memo */ export function NormalComponent(/**/ /** @memo */ -style?: (instance: ArkNormalComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NormalComponentOptions): ArkNormalComponentComponent { +content?: () => void, initializers?: NormalComponentOptions): void { const updatedInitializers: NormalComponentOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkNormalComponentComponent._instantiate(style, () => new ArkNormalComponentComponent, content, updatedInitializers); + ArkNormalComponentComponent._instantiate(style, () => new ArkNormalComponentComponent, content, updatedInitializers); } /** @memo */ export function AnimationTest(/**/ /** @memo */ -style?: (instance: ArkAnimationTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AnimationTestOptions): ArkAnimationTestComponent { +content?: () => void, initializers?: AnimationTestOptions): void { const updatedInitializers: AnimationTestOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkAnimationTestComponent._instantiate(style, () => new ArkAnimationTestComponent, content, updatedInitializers); + ArkAnimationTestComponent._instantiate(style, () => new ArkAnimationTestComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_state_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_extend_styles.ts b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_extend_styles.ts index 82af89926..dbe831e45 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_extend_styles.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_extend_styles.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, ColumnOptions, stateOf } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color, ColumnOptions, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -23,17 +23,17 @@ class ArkExtendComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExtendComponentOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.__applyStyle(fancybut__Button, Color.Green); + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.__applyStyle(fancybut__Button, Color.Green); }, undefined, "Fancy Button"); - ArkButton((instance: ArkButtonComponent) => { - instance.__applyStyle(fancybut__Button, Color.Green).height(100).width(this.width_value); + ArkButton((__instance: ArkButtonComponent) => { + __instance.__applyStyle(fancybut__Button, Color.Green).height(100).width(this.width_value); }, undefined, "Fancy Button"); }); } @@ -78,24 +78,24 @@ class ArkStylesComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(this.width_value) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .fontSize(this.size_value) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }).__applyStyle(this.componentFancy.bind(this)) @@ -109,8 +109,8 @@ class ArkStylesComponentComponent extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .fontSize(this.size_value) .height(100); }, undefined, "Fancy"); @@ -122,26 +122,26 @@ export {}; /** @memo */ export function ExtendComponent(/**/ /** @memo */ -style?: (instance: ArkExtendComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExtendComponentOptions): ArkExtendComponentComponent { +content?: () => void, initializers?: ExtendComponentOptions): void { const updatedInitializers: ExtendComponentOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkExtendComponentComponent._instantiate(style, () => new ArkExtendComponentComponent, content, updatedInitializers); + ArkExtendComponentComponent._instantiate(style, () => new ArkExtendComponentComponent, content, updatedInitializers); } /** @memo */ export function StylesComponent(/**/ /** @memo */ -style?: (instance: ArkStylesComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesComponentOptions): ArkStylesComponentComponent { +content?: () => void, initializers?: StylesComponentOptions): void { const updatedInitializers: StylesComponentOptions = { enable: initializers?.enable, __backing_width_value: initializers?.__backing_width_value, __backing_size_value: initializers?.__backing_size_value }; - return ArkStylesComponentComponent._instantiate(style, () => new ArkStylesComponentComponent, content, updatedInitializers); + ArkStylesComponentComponent._instantiate(style, () => new ArkStylesComponentComponent, content, updatedInitializers); } export interface ExtendComponentOptions { __backing_width_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_function_array.ts b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_function_array.ts index eef0d2628..c9e0529b3 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_function_array.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_function_array.ts @@ -1,4 +1,4 @@ -import { ArkCircle, ArkCircleComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCircle, ArkCircleComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,12 +17,12 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { child(undefined, undefined); }); } @@ -50,24 +50,24 @@ class ArkchildComponent extends ArkStructBase { this.__backing_reguar_value = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, () => { - ArkCircle((instance: ArkCircleComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkCircle((__instance: ArkCircleComponent) => { + __instance.onClick(() => { console.log("hello"); }) .strokeDashArray(["hello", this.reguar_value]) .height(100); }, undefined); - ArkCircle((instance: ArkCircleComponent) => { - instance.strokeDashArray([this.state_value]); + ArkCircle((__instance: ArkCircleComponent) => { + __instance.strokeDashArray([this.state_value]); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { console.log("hello"); }); }, undefined, "hello"); @@ -78,25 +78,25 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { __backing_state_value: initializers?.__backing_state_value, reguar_value: initializers?.reguar_value }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_gesture.ts b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_gesture.ts index 13de98edf..310f53801 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_gesture.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_gesture.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,25 +25,28 @@ class ArkGestureTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: GestureTestOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(this.width_value).padding(60).border({ width: 1 }).margin(30) - .gesture(LongPressGesture({ repeat: true }) - .onAction((event: GestureEvent) => { - if (event.repeat) { - this.count++; - } - }) - .onActionEnd(() => { - this.count = 0; - })); + ArkFlex(__instance => { + { + __instance.height(100).width(this.width_value).padding(60).border({ width: 1 }).margin(30) + .gesture(LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event.repeat) { + this.count++; + } + }) + .onActionEnd(() => { + this.count = 0; + })); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(this.width_value); }, undefined, 'LongPress onAction:' + this.count); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween } as FlexOptions); @@ -53,14 +56,14 @@ export {}; /** @memo */ export function GestureTest(/**/ /** @memo */ -style?: (instance: ArkGestureTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: GestureTestOptions): ArkGestureTestComponent { +content?: () => void, initializers?: GestureTestOptions): void { const updatedInitializers: GestureTestOptions = { __backing_count: initializers?.__backing_count, __backing_width_value: initializers?.__backing_width_value }; - return ArkGestureTestComponent._instantiate(style, () => new ArkGestureTestComponent, content, updatedInitializers); + ArkGestureTestComponent._instantiate(style, () => new ArkGestureTestComponent, content, updatedInitializers); } export interface GestureTestOptions { __backing_count?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_reuseId.ts b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_reuseId.ts index de8292386..b4cc48178 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/recycle_reuseId.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/recycle_reuseId.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, Color, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, Color, SyncedProperty, propState, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -26,26 +26,31 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value) - .reuseId("reuse_key"); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .reuseId(this.state_value); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .reuseId("reuse_key11111111111"); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .reuseId(a); + ArkColumn(__builder, () => { + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value) + .reuseId("reuse_key"); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .reuseId(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.reuseId("reuse_key11111111111"); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.reuseId(a); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); }); } } @@ -76,39 +81,39 @@ class ArkchildComponent extends ArkStructBase { this.__backing_propvalue?.update(initializers?.propvalue); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, undefined); + ArkColumn(__builder, undefined); } } export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_state_value: initializers?.__backing_state_value, __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { propvalue: initializers?.propvalue, __backing_propvalue: initializers?.__backing_propvalue, __backing_linkvalue: initializers?.__backing_linkvalue }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_state_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/rotationGesture.ts b/arkoala/ets-plugin/test/golden/arkts/spec/rotationGesture.ts index 5a63f8b02..78cd1a247 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/rotationGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/rotationGesture.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, GestureEvent, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,24 +17,27 @@ class ArkRotationGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: RotationGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }) - .margin(80).rotate({ x: 1, y: 2, z: 3, angle: this.angle }) - .gesture(RotationGesture() - .onActionStart((event: GestureEvent) => { - console.log('Rotation start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.angle = event.angle; - }) - .onActionEnd(() => { - console.log('Rotation end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }) + .margin(80).rotate({ x: 1, y: 2, z: 3, angle: this.angle }) + .gesture(RotationGesture() + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.angle = event.angle; + }) + .onActionEnd(() => { + console.log('Rotation end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'RotationGesture angle:' + this.angle); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween } as FlexOptions); @@ -44,13 +47,13 @@ export {}; /** @memo */ export function RotationGestureExample(/**/ /** @memo */ -style?: (instance: ArkRotationGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: RotationGestureExampleOptions): ArkRotationGestureExampleComponent { +content?: () => void, initializers?: RotationGestureExampleOptions): void { const updatedInitializers: RotationGestureExampleOptions = { __backing_angle: initializers?.__backing_angle }; - return ArkRotationGestureExampleComponent._instantiate(style, () => new ArkRotationGestureExampleComponent, content, updatedInitializers); + ArkRotationGestureExampleComponent._instantiate(style, () => new ArkRotationGestureExampleComponent, content, updatedInitializers); } export interface RotationGestureExampleOptions { __backing_angle?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/swipeGesture.ts b/arkoala/ets-plugin/test/golden/arkts/spec/swipeGesture.ts index faf62bd49..481d198b4 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/swipeGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/swipeGesture.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, GestureEvent, SwipeDirection, stateOf } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, GestureEvent, SwipeDirection, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -25,20 +25,23 @@ class ArkSwipeGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: SwipeGestureExampleOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.border({ width: 2 }) - .width(260).height(260) - .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) - .gesture(SwipeGesture({ fingers: 1, direction: SwipeDirection.Vertical }) - .onAction((event: GestureEvent) => { - this.speed = event.speed; - this.rotateAngle = event.angle; - })); + ArkColumn(__instance => { + { + __instance.border({ width: 2 }) + .width(260).height(260) + .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) + .gesture(SwipeGesture({ fingers: 1, direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + this.speed = event.speed; + this.rotateAngle = event.angle; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, "SwipGesture speed : " + this.speed); ArkText(undefined, undefined, "SwipGesture angle : " + this.rotateAngle); @@ -49,14 +52,14 @@ export {}; /** @memo */ export function SwipeGestureExample(/**/ /** @memo */ -style?: (instance: ArkSwipeGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: SwipeGestureExampleOptions): ArkSwipeGestureExampleComponent { +content?: () => void, initializers?: SwipeGestureExampleOptions): void { const updatedInitializers: SwipeGestureExampleOptions = { __backing_rotateAngle: initializers?.__backing_rotateAngle, __backing_speed: initializers?.__backing_speed }; - return ArkSwipeGestureExampleComponent._instantiate(style, () => new ArkSwipeGestureExampleComponent, content, updatedInitializers); + ArkSwipeGestureExampleComponent._instantiate(style, () => new ArkSwipeGestureExampleComponent, content, updatedInitializers); } export interface SwipeGestureExampleOptions { __backing_rotateAngle?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/tab.ts b/arkoala/ets-plugin/test/golden/arkts/spec/tab.ts index 7188cd8c8..739d698af 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/tab.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/tab.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, BarPosition, TabsController, TabsOptions } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, BarPosition, TabsController, TabsOptions } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; class ArkTabSimpleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,39 +15,39 @@ class ArkTabSimpleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TabSimpleOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkTabs(undefined, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar") .height(100) .width(200); }, () => { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100) + ArkFlex((__instance: ArkFlexComponent) => { + __instance.height(100) .width(200); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(100) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.height(100) .width(200); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(200); }, undefined, 'text1'); - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(200); }, undefined, 'xxx'); }); }); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar 2") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar 2") .height(100) .width(200); }, () => { @@ -61,13 +61,13 @@ export {}; /** @memo */ export function TabSimple(/**/ /** @memo */ -style?: (instance: ArkTabSimpleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TabSimpleOptions): ArkTabSimpleComponent { +content?: () => void, initializers?: TabSimpleOptions): void { const updatedInitializers: TabSimpleOptions = { controller: initializers?.controller }; - return ArkTabSimpleComponent._instantiate(style, () => new ArkTabSimpleComponent, content, updatedInitializers); + ArkTabSimpleComponent._instantiate(style, () => new ArkTabSimpleComponent, content, updatedInitializers); } export interface TabSimpleOptions { controller?: TabsController; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/tapGesture.ts b/arkoala/ets-plugin/test/golden/arkts/spec/tapGesture.ts index 43b7fb6b3..e902592be 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/tapGesture.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/tapGesture.ts @@ -1,4 +1,4 @@ -import { ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, FlexAlign, FlexDirection, FlexOptions, ItemAlign, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -17,17 +17,20 @@ class ArkTapGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TapGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) - .gesture(TapGesture({ count: 2 }) - .onAction(() => { - this.value = 'TapGesture onAction'; - })); + ArkFlex(__instance => { + { + __instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) + .gesture(TapGesture({ count: 2 }) + .onAction(() => { + this.value = 'TapGesture onAction'; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'Click twice'); ArkText(undefined, undefined, this.value); @@ -38,13 +41,13 @@ export {}; /** @memo */ export function TapGestureExample(/**/ /** @memo */ -style?: (instance: ArkTapGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TapGestureExampleOptions): ArkTapGestureExampleComponent { +content?: () => void, initializers?: TapGestureExampleOptions): void { const updatedInitializers: TapGestureExampleOptions = { __backing_value: initializers?.__backing_value }; - return ArkTapGestureExampleComponent._instantiate(style, () => new ArkTapGestureExampleComponent, content, updatedInitializers); + ArkTapGestureExampleComponent._instantiate(style, () => new ArkTapGestureExampleComponent, content, updatedInitializers); } export interface TapGestureExampleOptions { __backing_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/AMDComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/AMDComponent.ts index 3c254609c..92f1ec743 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/AMDComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/AMDComponent.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -59,32 +59,32 @@ class ArkAMDComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AMDComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink1: ' + JSON.stringify(this.AMDComponentLink1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink2: ' + JSON.stringify(this.AMDComponentLink2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink3: ' + JSON.stringify(this.AMDComponentLink3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink4: ' + JSON.stringify(this.AMDComponentLink4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -94,9 +94,9 @@ export {}; /** @memo */ export function AMDComponent(/**/ /** @memo */ -style?: (instance: ArkAMDComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AMDComponentOptions): ArkAMDComponentComponent { +content?: () => void, initializers?: AMDComponentOptions): void { const updatedInitializers: AMDComponentOptions = { __backing_AMDComponentLink1: initializers?.__backing_AMDComponentLink1, __backing_AMDComponentLink2: initializers?.__backing_AMDComponentLink2, @@ -105,7 +105,7 @@ content?: () => void, initializers?: AMDComponentOptions): ArkAMDComponentCompon myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkAMDComponentComponent._instantiate(style, () => new ArkAMDComponentComponent, content, updatedInitializers); + ArkAMDComponentComponent._instantiate(style, () => new ArkAMDComponentComponent, content, updatedInitializers); } export interface AMDComponentOptions { __backing_AMDComponentLink1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/BaseComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/BaseComponent.ts index 4099d3f06..6789f6911 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/BaseComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/BaseComponent.ts @@ -1,11 +1,11 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; /** @memo */ function textExtend(fontsize: number) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(fontsize); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(fontsize); }, undefined, 'Builder'); } class ArkBaseComponentComponent extends ArkStructBase { @@ -39,23 +39,23 @@ class ArkBaseComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BaseComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'BaseComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testStr: ' + JSON.stringify(this.testStr)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testNum: ' + JSON.stringify(this.testNum)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testObj: ' + JSON.stringify(this.testObj)); }); } @@ -65,15 +65,15 @@ export {}; /** @memo */ export function BaseComponent(/**/ /** @memo */ -style?: (instance: ArkBaseComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BaseComponentOptions): ArkBaseComponentComponent { +content?: () => void, initializers?: BaseComponentOptions): void { const updatedInitializers: BaseComponentOptions = { __backing_testStr: initializers?.__backing_testStr, __backing_testNum: initializers?.__backing_testNum, __backing_testObj: initializers?.__backing_testObj }; - return ArkBaseComponentComponent._instantiate(style, () => new ArkBaseComponentComponent, content, updatedInitializers); + ArkBaseComponentComponent._instantiate(style, () => new ArkBaseComponentComponent, content, updatedInitializers); } export interface BaseComponentOptions { __backing_testStr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DefaultComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DefaultComponent.ts index c9ce07ff0..794794354 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DefaultComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DefaultComponent.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -59,32 +59,32 @@ class ArkDefaultComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DefaultComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink1: ' + JSON.stringify(this.DefaultComponentLink1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink2: ' + JSON.stringify(this.DefaultComponentLink2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink3: ' + JSON.stringify(this.DefaultComponentLink3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink4: ' + JSON.stringify(this.DefaultComponentLink4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -94,9 +94,9 @@ export {}; /** @memo */ export function DefaultComponent(/**/ /** @memo */ -style?: (instance: ArkDefaultComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: DefaultComponentOptions): ArkDefaultComponentComponent { +content?: () => void, initializers?: DefaultComponentOptions): void { const updatedInitializers: DefaultComponentOptions = { __backing_DefaultComponentLink1: initializers?.__backing_DefaultComponentLink1, __backing_DefaultComponentLink2: initializers?.__backing_DefaultComponentLink2, @@ -105,7 +105,7 @@ content?: () => void, initializers?: DefaultComponentOptions): ArkDefaultCompone myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkDefaultComponentComponent._instantiate(style, () => new ArkDefaultComponentComponent, content, updatedInitializers); + ArkDefaultComponentComponent._instantiate(style, () => new ArkDefaultComponentComponent, content, updatedInitializers); } export interface DefaultComponentOptions { __backing_DefaultComponentLink1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DivideComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DivideComponent.ts index 75732964a..feedcfb75 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DivideComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/DivideComponent.ts @@ -1,11 +1,11 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, Color } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; /** @memo */ function textStyles() { - ArkText((instance: ArkTextComponent) => { - instance.backgroundColor(Color.Red); + ArkText((__instance: ArkTextComponent) => { + __instance.backgroundColor(Color.Red); }, undefined, 'Builder'); } class ArkDivideComponentComponent extends ArkStructBase { @@ -31,17 +31,17 @@ class ArkDivideComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DivideComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DivideComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DivideResult: ' + JSON.stringify(this.testNum1 / this.testNum2)); }); } @@ -51,14 +51,14 @@ export {}; /** @memo */ export function DivideComponent(/**/ /** @memo */ -style?: (instance: ArkDivideComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: DivideComponentOptions): ArkDivideComponentComponent { +content?: () => void, initializers?: DivideComponentOptions): void { const updatedInitializers: DivideComponentOptions = { __backing_testNum1: initializers?.__backing_testNum1, __backing_testNum2: initializers?.__backing_testNum2 }; - return ArkDivideComponentComponent._instantiate(style, () => new ArkDivideComponentComponent, content, updatedInitializers); + ArkDivideComponentComponent._instantiate(style, () => new ArkDivideComponentComponent, content, updatedInitializers); } export interface DivideComponentOptions { __backing_testNum1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/ExportComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/ExportComponent.ts index 725455df5..a8726ddac 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/ExportComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/ExportComponent.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -88,12 +88,12 @@ class ArkExportComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent1Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -176,12 +176,12 @@ class ArkExportComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent2Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -264,12 +264,12 @@ class ArkExportComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent3Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -352,12 +352,12 @@ export default class ArkExportComponent4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent4Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -374,9 +374,9 @@ export {}; /** @memo */ export function ExportComponent1(/**/ /** @memo */ -style?: (instance: ArkExportComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent1Options): ArkExportComponent1Component { +content?: () => void, initializers?: ExportComponent1Options): void { const updatedInitializers: ExportComponent1Options = { __backing_ExportComponent1Link1: initializers?.__backing_ExportComponent1Link1, __backing_ExportComponent1Link2: initializers?.__backing_ExportComponent1Link2, @@ -387,14 +387,14 @@ content?: () => void, initializers?: ExportComponent1Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent1Component._instantiate(style, () => new ArkExportComponent1Component, content, updatedInitializers); + ArkExportComponent1Component._instantiate(style, () => new ArkExportComponent1Component, content, updatedInitializers); } /** @memo */ export function ExportComponent2(/**/ /** @memo */ -style?: (instance: ArkExportComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent2Options): ArkExportComponent2Component { +content?: () => void, initializers?: ExportComponent2Options): void { const updatedInitializers: ExportComponent2Options = { __backing_ExportComponent2Link1: initializers?.__backing_ExportComponent2Link1, __backing_ExportComponent2Link2: initializers?.__backing_ExportComponent2Link2, @@ -405,14 +405,14 @@ content?: () => void, initializers?: ExportComponent2Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent2Component._instantiate(style, () => new ArkExportComponent2Component, content, updatedInitializers); + ArkExportComponent2Component._instantiate(style, () => new ArkExportComponent2Component, content, updatedInitializers); } /** @memo */ export function ExportComponent3(/**/ /** @memo */ -style?: (instance: ArkExportComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent3Options): ArkExportComponent3Component { +content?: () => void, initializers?: ExportComponent3Options): void { const updatedInitializers: ExportComponent3Options = { __backing_ExportComponent3Link1: initializers?.__backing_ExportComponent3Link1, __backing_ExportComponent3Link2: initializers?.__backing_ExportComponent3Link2, @@ -423,14 +423,14 @@ content?: () => void, initializers?: ExportComponent3Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent3Component._instantiate(style, () => new ArkExportComponent3Component, content, updatedInitializers); + ArkExportComponent3Component._instantiate(style, () => new ArkExportComponent3Component, content, updatedInitializers); } /** @memo */ export function ExportComponent4(/**/ /** @memo */ -style?: (instance: ArkExportComponent4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent4Options): ArkExportComponent4Component { +content?: () => void, initializers?: ExportComponent4Options): void { const updatedInitializers: ExportComponent4Options = { __backing_ExportComponent4Link1: initializers?.__backing_ExportComponent4Link1, __backing_ExportComponent4Link2: initializers?.__backing_ExportComponent4Link2, @@ -441,7 +441,7 @@ content?: () => void, initializers?: ExportComponent4Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent4Component._instantiate(style, () => new ArkExportComponent4Component, content, updatedInitializers); + ArkExportComponent4Component._instantiate(style, () => new ArkExportComponent4Component, content, updatedInitializers); } export interface ExportComponent1Options { __backing_ExportComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/LinkComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/LinkComponent.ts index 4c9bbb696..94df568c5 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/LinkComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/LinkComponent.ts @@ -1,4 +1,4 @@ -import { ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; +import { ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, stateOf } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -88,12 +88,12 @@ class ArkLinkComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent1Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -176,12 +176,12 @@ class ArkLinkComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent2Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -264,12 +264,12 @@ class ArkLinkComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent3Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -352,12 +352,12 @@ class ArkLinkComponent4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent4Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -375,9 +375,9 @@ export {}; /** @memo */ export function LinkComponent1(/**/ /** @memo */ -style?: (instance: ArkLinkComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent1Options): ArkLinkComponent1Component { +content?: () => void, initializers?: LinkComponent1Options): void { const updatedInitializers: LinkComponent1Options = { __backing_LinkComponent1Link1: initializers?.__backing_LinkComponent1Link1, __backing_LinkComponent1Link2: initializers?.__backing_LinkComponent1Link2, @@ -388,14 +388,14 @@ content?: () => void, initializers?: LinkComponent1Options): ArkLinkComponent1Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent1Component._instantiate(style, () => new ArkLinkComponent1Component, content, updatedInitializers); + ArkLinkComponent1Component._instantiate(style, () => new ArkLinkComponent1Component, content, updatedInitializers); } /** @memo */ export function LinkComponent2(/**/ /** @memo */ -style?: (instance: ArkLinkComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent2Options): ArkLinkComponent2Component { +content?: () => void, initializers?: LinkComponent2Options): void { const updatedInitializers: LinkComponent2Options = { __backing_LinkComponent2Link1: initializers?.__backing_LinkComponent2Link1, __backing_LinkComponent2Link2: initializers?.__backing_LinkComponent2Link2, @@ -406,14 +406,14 @@ content?: () => void, initializers?: LinkComponent2Options): ArkLinkComponent2Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent2Component._instantiate(style, () => new ArkLinkComponent2Component, content, updatedInitializers); + ArkLinkComponent2Component._instantiate(style, () => new ArkLinkComponent2Component, content, updatedInitializers); } /** @memo */ export function LinkComponent3(/**/ /** @memo */ -style?: (instance: ArkLinkComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent3Options): ArkLinkComponent3Component { +content?: () => void, initializers?: LinkComponent3Options): void { const updatedInitializers: LinkComponent3Options = { __backing_LinkComponent3Link1: initializers?.__backing_LinkComponent3Link1, __backing_LinkComponent3Link2: initializers?.__backing_LinkComponent3Link2, @@ -424,14 +424,14 @@ content?: () => void, initializers?: LinkComponent3Options): ArkLinkComponent3Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent3Component._instantiate(style, () => new ArkLinkComponent3Component, content, updatedInitializers); + ArkLinkComponent3Component._instantiate(style, () => new ArkLinkComponent3Component, content, updatedInitializers); } /** @memo */ export function LinkComponent4(/**/ /** @memo */ -style?: (instance: ArkLinkComponent4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent4Options): ArkLinkComponent4Component { +content?: () => void, initializers?: LinkComponent4Options): void { const updatedInitializers: LinkComponent4Options = { __backing_LinkComponent3Link1: initializers?.__backing_LinkComponent3Link1, __backing_LinkComponent3Link2: initializers?.__backing_LinkComponent3Link2, @@ -442,7 +442,7 @@ content?: () => void, initializers?: LinkComponent4Options): ArkLinkComponent4Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent4Component._instantiate(style, () => new ArkLinkComponent4Component, content, updatedInitializers); + ArkLinkComponent4Component._instantiate(style, () => new ArkLinkComponent4Component, content, updatedInitializers); } export interface LinkComponent1Options { __backing_LinkComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/NamespaceComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/NamespaceComponent.ts index 8508c3af7..d580cb8e9 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/NamespaceComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/NamespaceComponent.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -59,32 +59,32 @@ class ArkNamespaceComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent1Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link1: ' + JSON.stringify(this.NamespaceComponent1Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link2: ' + JSON.stringify(this.NamespaceComponent1Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link3: ' + JSON.stringify(this.NamespaceComponent1Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link4: ' + JSON.stringify(this.NamespaceComponent1Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -146,32 +146,32 @@ class ArkNamespaceComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent2Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link1: ' + JSON.stringify(this.NamespaceComponent2Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link2: ' + JSON.stringify(this.NamespaceComponent2Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link3: ' + JSON.stringify(this.NamespaceComponent2Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link4: ' + JSON.stringify(this.NamespaceComponent2Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -233,32 +233,32 @@ class ArkNamespaceComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent3Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link1: ' + JSON.stringify(this.NamespaceComponent3Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link2: ' + JSON.stringify(this.NamespaceComponent3Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link3: ' + JSON.stringify(this.NamespaceComponent3Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link4: ' + JSON.stringify(this.NamespaceComponent3Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -269,9 +269,9 @@ export {}; /** @memo */ export function NamespaceComponent1(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent1Options): ArkNamespaceComponent1Component { +content?: () => void, initializers?: NamespaceComponent1Options): void { const updatedInitializers: NamespaceComponent1Options = { __backing_NamespaceComponent1Link1: initializers?.__backing_NamespaceComponent1Link1, __backing_NamespaceComponent1Link2: initializers?.__backing_NamespaceComponent1Link2, @@ -280,14 +280,14 @@ content?: () => void, initializers?: NamespaceComponent1Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent1Component._instantiate(style, () => new ArkNamespaceComponent1Component, content, updatedInitializers); + ArkNamespaceComponent1Component._instantiate(style, () => new ArkNamespaceComponent1Component, content, updatedInitializers); } /** @memo */ export function NamespaceComponent2(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent2Options): ArkNamespaceComponent2Component { +content?: () => void, initializers?: NamespaceComponent2Options): void { const updatedInitializers: NamespaceComponent2Options = { __backing_NamespaceComponent2Link1: initializers?.__backing_NamespaceComponent2Link1, __backing_NamespaceComponent2Link2: initializers?.__backing_NamespaceComponent2Link2, @@ -296,14 +296,14 @@ content?: () => void, initializers?: NamespaceComponent2Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent2Component._instantiate(style, () => new ArkNamespaceComponent2Component, content, updatedInitializers); + ArkNamespaceComponent2Component._instantiate(style, () => new ArkNamespaceComponent2Component, content, updatedInitializers); } /** @memo */ export function NamespaceComponent3(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent3Options): ArkNamespaceComponent3Component { +content?: () => void, initializers?: NamespaceComponent3Options): void { const updatedInitializers: NamespaceComponent3Options = { __backing_NamespaceComponent3Link1: initializers?.__backing_NamespaceComponent3Link1, __backing_NamespaceComponent3Link2: initializers?.__backing_NamespaceComponent3Link2, @@ -312,7 +312,7 @@ content?: () => void, initializers?: NamespaceComponent3Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent3Component._instantiate(style, () => new ArkNamespaceComponent3Component, content, updatedInitializers); + ArkNamespaceComponent3Component._instantiate(style, () => new ArkNamespaceComponent3Component, content, updatedInitializers); } export interface NamespaceComponent1Options { __backing_NamespaceComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/TestComponent.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/TestComponent.ts index 72a04a852..d3095acd6 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/TestComponent.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/TestComponent.ts @@ -1,4 +1,4 @@ -import { ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; +import { ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent } from "@koalaui/arkts-arkui"; import { LocalStorage } from "@koalaui/arkui-common"; export class ArkTestComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,14 +15,14 @@ export class ArkTestComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32); }, undefined, this.content); }); } @@ -58,14 +58,14 @@ export class ArkCustomContainerExportComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerExportOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.header); this.closer(); }); @@ -75,25 +75,25 @@ export {}; /** @memo */ export function TestComponent(/**/ /** @memo */ -style?: (instance: ArkTestComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestComponentOptions): ArkTestComponentComponent { +content?: () => void, initializers?: TestComponentOptions): void { const updatedInitializers: TestComponentOptions = { content: initializers?.content }; - return ArkTestComponentComponent._instantiate(style, () => new ArkTestComponentComponent, content, updatedInitializers); + ArkTestComponentComponent._instantiate(style, () => new ArkTestComponentComponent, content, updatedInitializers); } /** @memo */ export function CustomContainerExport(/**/ /** @memo */ -style?: (instance: ArkCustomContainerExportComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerExportOptions): ArkCustomContainerExportComponent { +content?: () => void, initializers?: CustomContainerExportOptions): void { const updatedInitializers: CustomContainerExportOptions = { header: initializers?.header, closer: initializers?.closer }; - return ArkCustomContainerExportComponent._instantiate(style, () => new ArkCustomContainerExportComponent, content, updatedInitializers); + ArkCustomContainerExportComponent._instantiate(style, () => new ArkCustomContainerExportComponent, content, updatedInitializers); } export interface TestComponentOptions { content?: string; diff --git a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/import@CustomDialog.ts b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/import@CustomDialog.ts index b5b8f2a3f..22be2c938 100644 --- a/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/import@CustomDialog.ts +++ b/arkoala/ets-plugin/test/golden/arkts/spec/test/pages/import@CustomDialog.ts @@ -1,4 +1,4 @@ -import { ArkButton, ArkButtonComponent, ArkColumn, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ArkTextInput, ArkTextInputComponent, Color, CustomDialogController, FlexAlign, FlexOptions, TextInputOptions, bindCustomDialog } from "@koalaui/arkts-arkui"; +import { ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ArkTextInput, ArkTextInputComponent, Color, CustomDialogController, FlexAlign, FlexOptions, TextInputOptions, bindCustomDialog } from "@koalaui/arkts-arkui"; import { MutableState } from "@koalaui/runtime"; import { LocalStorage } from "@koalaui/arkui-common"; import { observableProxy } from "@koalaui/common"; @@ -55,35 +55,35 @@ export class ArkCustomDialogExample1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogExample1Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20).margin({ top: 10, bottom: 10 }); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20).margin({ top: 10, bottom: 10 }); }, undefined, 'Change text'); - ArkTextInput((instance: ArkTextInputComponent) => { - instance.height(60).width('90%') + ArkTextInput((__instance: ArkTextInputComponent) => { + __instance.height(60).width('90%') .onChange((value: string) => { this.textValue = value; }); }, undefined, { placeholder: '', text: this.textValue } as TextInputOptions); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(16).margin({ bottom: 10 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(16).margin({ bottom: 10 }); }, undefined, 'Whether to change a text?'); - ArkFlex((instance: ArkFlexComponent) => { - instance.margin({ bottom: 10 }); + ArkFlex((__instance: ArkFlexComponent) => { + __instance.margin({ bottom: 10 }); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.cancel(); }).backgroundColor(0xffffff).fontColor(Color.Black); }, undefined, 'cancel'); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.inputValue = this.textValue; this.controller.close(); this.confirm(); @@ -95,7 +95,7 @@ export class ArkCustomDialogExample1Component extends ArkStructBase new ArkCustomDialogExample1Component, undefined, updatedInitializers); + ArkCustomDialogExample1Component._instantiate(undefined, () => new ArkCustomDialogExample1Component, undefined, updatedInitializers); } export function CustomDialogExample1(initializer: Partial = {}) { return { build: bindCustomDialog(CustomDialogExample1Impl, initializer), buildOptions: initializer }; diff --git a/arkoala/ets-plugin/test/golden/koala/ets/PropertyDeps.ts b/arkoala/ets-plugin/test/golden/koala/ets/PropertyDeps.ts index 8ce2b1e99..fc97051bc 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/PropertyDeps.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/PropertyDeps.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; class ArkStateToStateComponent extends ArkStructBase { @@ -24,12 +24,12 @@ class ArkStateToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToPropComponent extends ArkStructBase { @@ -59,12 +59,12 @@ class ArkStateToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToProvideComponent extends ArkStructBase { @@ -90,12 +90,12 @@ class ArkStateToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToStorageLinkComponent extends ArkStructBase { @@ -121,12 +121,12 @@ class ArkStateToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToLocalStorageLinkComponent extends ArkStructBase { @@ -152,12 +152,12 @@ class ArkStateToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToStoragePropComponent extends ArkStructBase { @@ -187,12 +187,12 @@ class ArkStateToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStateToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToLocalStoragePropComponent extends ArkStructBase { @@ -222,12 +222,12 @@ class ArkStateToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStateToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToBuilderParamComponent extends ArkStructBase { @@ -259,12 +259,12 @@ class ArkStateToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStateToPlainComponent extends ArkStructBase { @@ -290,12 +290,12 @@ class ArkStateToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStateComponent extends ArkStructBase { @@ -325,12 +325,12 @@ class ArkPropToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToPropComponent extends ArkStructBase { @@ -361,12 +361,12 @@ class ArkPropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToProvideComponent extends ArkStructBase { @@ -396,12 +396,12 @@ class ArkPropToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStorageLinkComponent extends ArkStructBase { @@ -431,12 +431,12 @@ class ArkPropToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToLocalStorageLinkComponent extends ArkStructBase { @@ -466,12 +466,12 @@ class ArkPropToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToStoragePropComponent extends ArkStructBase { @@ -502,12 +502,12 @@ class ArkPropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToLocalStoragePropComponent extends ArkStructBase { @@ -538,12 +538,12 @@ class ArkPropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToBuilderParamComponent extends ArkStructBase { @@ -579,12 +579,12 @@ class ArkPropToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPropToPlainComponent extends ArkStructBase { @@ -614,12 +614,12 @@ class ArkPropToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStateComponent extends ArkStructBase { @@ -645,12 +645,12 @@ class ArkProvideToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToPropComponent extends ArkStructBase { @@ -680,12 +680,12 @@ class ArkProvideToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToProvideComponent extends ArkStructBase { @@ -711,12 +711,12 @@ class ArkProvideToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStorageLinkComponent extends ArkStructBase { @@ -742,12 +742,12 @@ class ArkProvideToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToLocalStorageLinkComponent extends ArkStructBase { @@ -773,12 +773,12 @@ class ArkProvideToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToStoragePropComponent extends ArkStructBase { @@ -808,12 +808,12 @@ class ArkProvideToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkProvideToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToLocalStoragePropComponent extends ArkStructBase { @@ -843,12 +843,12 @@ class ArkProvideToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkProvideToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToBuilderParamComponent extends ArkStructBase { @@ -880,12 +880,12 @@ class ArkProvideToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkProvideToPlainComponent extends ArkStructBase { @@ -911,12 +911,12 @@ class ArkProvideToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStateComponent extends ArkStructBase { @@ -942,12 +942,12 @@ class ArkStorageLinkToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToPropComponent extends ArkStructBase { @@ -977,12 +977,12 @@ class ArkStorageLinkToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToProvideComponent extends ArkStructBase { @@ -1008,12 +1008,12 @@ class ArkStorageLinkToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStorageLinkComponent extends ArkStructBase { @@ -1039,12 +1039,12 @@ class ArkStorageLinkToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToLocalStorageLinkComponent extends ArkStructBase { @@ -1070,12 +1070,12 @@ class ArkStorageLinkToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToStoragePropComponent extends ArkStructBase { @@ -1105,12 +1105,12 @@ class ArkStorageLinkToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStorageLinkToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToLocalStoragePropComponent extends ArkStructBase { @@ -1140,12 +1140,12 @@ class ArkStorageLinkToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStorageLinkToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToBuilderParamComponent extends ArkStructBase { @@ -1177,12 +1177,12 @@ class ArkStorageLinkToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStorageLinkToPlainComponent extends ArkStructBase { @@ -1208,12 +1208,12 @@ class ArkStorageLinkToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStateComponent extends ArkStructBase { @@ -1239,12 +1239,12 @@ class ArkLocalStorageLinkToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToPropComponent extends ArkStructBase { @@ -1274,12 +1274,12 @@ class ArkLocalStorageLinkToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToProvideComponent extends ArkStructBase { @@ -1305,12 +1305,12 @@ class ArkLocalStorageLinkToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStorageLinkComponent extends ArkStructBase { @@ -1336,12 +1336,12 @@ class ArkLocalStorageLinkToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToLocalStorageLinkComponent extends ArkStructBase { @@ -1367,12 +1367,12 @@ class ArkLocalStorageLinkToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToStoragePropComponent extends ArkStructBase { @@ -1402,12 +1402,12 @@ class ArkLocalStorageLinkToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageLinkToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToLocalStoragePropComponent extends ArkStructBase { @@ -1437,12 +1437,12 @@ class ArkLocalStorageLinkToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageLinkToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToBuilderParamComponent extends ArkStructBase { @@ -1474,12 +1474,12 @@ class ArkLocalStorageLinkToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStorageLinkToPlainComponent extends ArkStructBase { @@ -1505,12 +1505,12 @@ class ArkLocalStorageLinkToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStateComponent extends ArkStructBase { @@ -1540,12 +1540,12 @@ class ArkStoragePropToStateComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStateComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToPropComponent extends ArkStructBase { @@ -1576,12 +1576,12 @@ class ArkStoragePropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToProvideComponent extends ArkStructBase { @@ -1611,12 +1611,12 @@ class ArkStoragePropToProvideComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToProvideComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStorageLinkComponent extends ArkStructBase { @@ -1646,12 +1646,12 @@ class ArkStoragePropToStorageLinkComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToLocalStorageLinkComponent extends ArkStructBase { @@ -1681,12 +1681,12 @@ class ArkStoragePropToLocalStorageLinkComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToLocalStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToStoragePropComponent extends ArkStructBase { @@ -1717,12 +1717,12 @@ class ArkStoragePropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToLocalStoragePropComponent extends ArkStructBase { @@ -1753,12 +1753,12 @@ class ArkStoragePropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToBuilderParamComponent extends ArkStructBase { @@ -1794,12 +1794,12 @@ class ArkStoragePropToBuilderParamComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToBuilderParamComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkStoragePropToPlainComponent extends ArkStructBase { @@ -1829,12 +1829,12 @@ class ArkStoragePropToPlainComponent extends ArkStructBase("key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropToPlainComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStateComponent extends ArkStructBase { @@ -1864,12 +1864,12 @@ class ArkLocalStoragePropToStateComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStateComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToPropComponent extends ArkStructBase { @@ -1900,12 +1900,12 @@ class ArkLocalStoragePropToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToProvideComponent extends ArkStructBase { @@ -1935,12 +1935,12 @@ class ArkLocalStoragePropToProvideComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToProvideComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStorageLinkComponent extends ArkStructBase { @@ -1970,12 +1970,12 @@ class ArkLocalStoragePropToStorageLinkComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToLocalStorageLinkComponent extends ArkStructBase { @@ -2005,12 +2005,12 @@ class ArkLocalStoragePropToLocalStorageLinkComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToLocalStorageLinkComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToStoragePropComponent extends ArkStructBase { @@ -2041,12 +2041,12 @@ class ArkLocalStoragePropToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToLocalStoragePropComponent extends ArkStructBase { @@ -2077,12 +2077,12 @@ class ArkLocalStoragePropToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToBuilderParamComponent extends ArkStructBase { @@ -2118,12 +2118,12 @@ class ArkLocalStoragePropToBuilderParamComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToBuilderParamComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkLocalStoragePropToPlainComponent extends ArkStructBase { @@ -2153,12 +2153,12 @@ class ArkLocalStoragePropToPlainComponent extends ArkStructBase(this._entry_local_storage_, "key", 'Hello World').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropToPlainComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStateComponent extends ArkStructBase { @@ -2190,12 +2190,12 @@ class ArkBuilderParamToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToPropComponent extends ArkStructBase { @@ -2231,12 +2231,12 @@ class ArkBuilderParamToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToProvideComponent extends ArkStructBase { @@ -2268,12 +2268,12 @@ class ArkBuilderParamToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStorageLinkComponent extends ArkStructBase { @@ -2305,12 +2305,12 @@ class ArkBuilderParamToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToLocalStorageLinkComponent extends ArkStructBase { @@ -2342,12 +2342,12 @@ class ArkBuilderParamToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToStoragePropComponent extends ArkStructBase { @@ -2383,12 +2383,12 @@ class ArkBuilderParamToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuilderParamToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToLocalStoragePropComponent extends ArkStructBase { @@ -2424,12 +2424,12 @@ class ArkBuilderParamToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuilderParamToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToBuilderParamComponent extends ArkStructBase { @@ -2465,12 +2465,12 @@ class ArkBuilderParamToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkBuilderParamToPlainComponent extends ArkStructBase { @@ -2502,12 +2502,12 @@ class ArkBuilderParamToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStateComponent extends ArkStructBase { @@ -2533,12 +2533,12 @@ class ArkPlainToStateComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStateOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToPropComponent extends ArkStructBase { @@ -2568,12 +2568,12 @@ class ArkPlainToPropComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToPropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToProvideComponent extends ArkStructBase { @@ -2599,12 +2599,12 @@ class ArkPlainToProvideComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToProvideOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStorageLinkComponent extends ArkStructBase { @@ -2630,12 +2630,12 @@ class ArkPlainToStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToLocalStorageLinkComponent extends ArkStructBase { @@ -2661,12 +2661,12 @@ class ArkPlainToLocalStorageLinkComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToLocalStorageLinkOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToStoragePropComponent extends ArkStructBase { @@ -2696,12 +2696,12 @@ class ArkPlainToStoragePropComponent extends ArkStructBase("test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPlainToStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToLocalStoragePropComponent extends ArkStructBase { @@ -2731,12 +2731,12 @@ class ArkPlainToLocalStoragePropComponent extends ArkStructBase(this._entry_local_storage_, "test", this.state + "!").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkPlainToLocalStoragePropComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToLocalStoragePropOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToBuilderParamComponent extends ArkStructBase { @@ -2768,12 +2768,12 @@ class ArkPlainToBuilderParamComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToBuilderParamOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } class ArkPlainToPlainComponent extends ArkStructBase { @@ -2799,1021 +2799,1021 @@ class ArkPlainToPlainComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PlainToPlainOptions) { - ArkText(undefined, undefined, this.test); + ArkText(__builder, undefined, this.test); } } /** @memo */ export function StateToState(/**/ /** @memo */ -style?: (instance: ArkStateToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStateOptions): ArkStateToStateComponent { +content?: () => void, initializers?: StateToStateOptions): void { const updatedInitializers: StateToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStateComponent._instantiate(style, () => new ArkStateToStateComponent, content, updatedInitializers); + ArkStateToStateComponent._instantiate(style, () => new ArkStateToStateComponent, content, updatedInitializers); } /** @memo */ export function StateToProp(/**/ /** @memo */ -style?: (instance: ArkStateToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToPropOptions): ArkStateToPropComponent { +content?: () => void, initializers?: StateToPropOptions): void { const updatedInitializers: StateToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStateToPropComponent._instantiate(style, () => new ArkStateToPropComponent, content, updatedInitializers); + ArkStateToPropComponent._instantiate(style, () => new ArkStateToPropComponent, content, updatedInitializers); } /** @memo */ export function StateToProvide(/**/ /** @memo */ -style?: (instance: ArkStateToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToProvideOptions): ArkStateToProvideComponent { +content?: () => void, initializers?: StateToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StateToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStateToProvideComponent._instantiate(style, () => new ArkStateToProvideComponent, content, updatedInitializers); + ArkStateToProvideComponent._instantiate(style, () => new ArkStateToProvideComponent, content, updatedInitializers); } /** @memo */ export function StateToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStateToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStorageLinkOptions): ArkStateToStorageLinkComponent { +content?: () => void, initializers?: StateToStorageLinkOptions): void { const updatedInitializers: StateToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStorageLinkComponent._instantiate(style, () => new ArkStateToStorageLinkComponent, content, updatedInitializers); + ArkStateToStorageLinkComponent._instantiate(style, () => new ArkStateToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StateToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStateToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToLocalStorageLinkOptions): ArkStateToLocalStorageLinkComponent { +content?: () => void, initializers?: StateToLocalStorageLinkOptions): void { const updatedInitializers: StateToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToLocalStorageLinkComponent._instantiate(style, () => new ArkStateToLocalStorageLinkComponent, content, updatedInitializers); + ArkStateToLocalStorageLinkComponent._instantiate(style, () => new ArkStateToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StateToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStateToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToStoragePropOptions): ArkStateToStoragePropComponent { +content?: () => void, initializers?: StateToStoragePropOptions): void { const updatedInitializers: StateToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToStoragePropComponent._instantiate(style, () => new ArkStateToStoragePropComponent, content, updatedInitializers); + ArkStateToStoragePropComponent._instantiate(style, () => new ArkStateToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StateToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStateToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToLocalStoragePropOptions): ArkStateToLocalStoragePropComponent { +content?: () => void, initializers?: StateToLocalStoragePropOptions): void { const updatedInitializers: StateToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStateToLocalStoragePropComponent._instantiate(style, () => new ArkStateToLocalStoragePropComponent, content, updatedInitializers); + ArkStateToLocalStoragePropComponent._instantiate(style, () => new ArkStateToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StateToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStateToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToBuilderParamOptions): ArkStateToBuilderParamComponent { +content?: () => void, initializers?: StateToBuilderParamOptions): void { const updatedInitializers: StateToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStateToBuilderParamComponent._instantiate(style, () => new ArkStateToBuilderParamComponent, content, updatedInitializers); + ArkStateToBuilderParamComponent._instantiate(style, () => new ArkStateToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StateToPlain(/**/ /** @memo */ -style?: (instance: ArkStateToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateToPlainOptions): ArkStateToPlainComponent { +content?: () => void, initializers?: StateToPlainOptions): void { const updatedInitializers: StateToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStateToPlainComponent._instantiate(style, () => new ArkStateToPlainComponent, content, updatedInitializers); + ArkStateToPlainComponent._instantiate(style, () => new ArkStateToPlainComponent, content, updatedInitializers); } /** @memo */ export function PropToState(/**/ /** @memo */ -style?: (instance: ArkPropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStateOptions): ArkPropToStateComponent { +content?: () => void, initializers?: PropToStateOptions): void { const updatedInitializers: PropToStateOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStateComponent._instantiate(style, () => new ArkPropToStateComponent, content, updatedInitializers); + ArkPropToStateComponent._instantiate(style, () => new ArkPropToStateComponent, content, updatedInitializers); } /** @memo */ export function PropToProp(/**/ /** @memo */ -style?: (instance: ArkPropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToPropOptions): ArkPropToPropComponent { +content?: () => void, initializers?: PropToPropOptions): void { const updatedInitializers: PropToPropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkPropToPropComponent._instantiate(style, () => new ArkPropToPropComponent, content, updatedInitializers); + ArkPropToPropComponent._instantiate(style, () => new ArkPropToPropComponent, content, updatedInitializers); } /** @memo */ export function PropToProvide(/**/ /** @memo */ -style?: (instance: ArkPropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToProvideOptions): ArkPropToProvideComponent { +content?: () => void, initializers?: PropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: PropToProvideOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkPropToProvideComponent._instantiate(style, () => new ArkPropToProvideComponent, content, updatedInitializers); + ArkPropToProvideComponent._instantiate(style, () => new ArkPropToProvideComponent, content, updatedInitializers); } /** @memo */ export function PropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkPropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStorageLinkOptions): ArkPropToStorageLinkComponent { +content?: () => void, initializers?: PropToStorageLinkOptions): void { const updatedInitializers: PropToStorageLinkOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStorageLinkComponent._instantiate(style, () => new ArkPropToStorageLinkComponent, content, updatedInitializers); + ArkPropToStorageLinkComponent._instantiate(style, () => new ArkPropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkPropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToLocalStorageLinkOptions): ArkPropToLocalStorageLinkComponent { +content?: () => void, initializers?: PropToLocalStorageLinkOptions): void { const updatedInitializers: PropToLocalStorageLinkOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToLocalStorageLinkComponent._instantiate(style, () => new ArkPropToLocalStorageLinkComponent, content, updatedInitializers); + ArkPropToLocalStorageLinkComponent._instantiate(style, () => new ArkPropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkPropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToStoragePropOptions): ArkPropToStoragePropComponent { +content?: () => void, initializers?: PropToStoragePropOptions): void { const updatedInitializers: PropToStoragePropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToStoragePropComponent._instantiate(style, () => new ArkPropToStoragePropComponent, content, updatedInitializers); + ArkPropToStoragePropComponent._instantiate(style, () => new ArkPropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkPropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToLocalStoragePropOptions): ArkPropToLocalStoragePropComponent { +content?: () => void, initializers?: PropToLocalStoragePropOptions): void { const updatedInitializers: PropToLocalStoragePropOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkPropToLocalStoragePropComponent._instantiate(style, () => new ArkPropToLocalStoragePropComponent, content, updatedInitializers); + ArkPropToLocalStoragePropComponent._instantiate(style, () => new ArkPropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkPropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToBuilderParamOptions): ArkPropToBuilderParamComponent { +content?: () => void, initializers?: PropToBuilderParamOptions): void { const updatedInitializers: PropToBuilderParamOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkPropToBuilderParamComponent._instantiate(style, () => new ArkPropToBuilderParamComponent, content, updatedInitializers); + ArkPropToBuilderParamComponent._instantiate(style, () => new ArkPropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function PropToPlain(/**/ /** @memo */ -style?: (instance: ArkPropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropToPlainOptions): ArkPropToPlainComponent { +content?: () => void, initializers?: PropToPlainOptions): void { const updatedInitializers: PropToPlainOptions = { state: initializers?.state, __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkPropToPlainComponent._instantiate(style, () => new ArkPropToPlainComponent, content, updatedInitializers); + ArkPropToPlainComponent._instantiate(style, () => new ArkPropToPlainComponent, content, updatedInitializers); } /** @memo */ export function ProvideToState(/**/ /** @memo */ -style?: (instance: ArkProvideToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStateOptions): ArkProvideToStateComponent { +content?: () => void, initializers?: ProvideToStateOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStateOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStateComponent._instantiate(style, () => new ArkProvideToStateComponent, content, updatedInitializers); + ArkProvideToStateComponent._instantiate(style, () => new ArkProvideToStateComponent, content, updatedInitializers); } /** @memo */ export function ProvideToProp(/**/ /** @memo */ -style?: (instance: ArkProvideToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToPropOptions): ArkProvideToPropComponent { +content?: () => void, initializers?: ProvideToPropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToPropOptions = { __backing_state: __provide_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkProvideToPropComponent._instantiate(style, () => new ArkProvideToPropComponent, content, updatedInitializers); + ArkProvideToPropComponent._instantiate(style, () => new ArkProvideToPropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToProvide(/**/ /** @memo */ -style?: (instance: ArkProvideToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToProvideOptions): ArkProvideToProvideComponent { +content?: () => void, initializers?: ProvideToProvideOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: ProvideToProvideOptions = { __backing_state: __provide_state, __backing_test: __provide_test }; - return ArkProvideToProvideComponent._instantiate(style, () => new ArkProvideToProvideComponent, content, updatedInitializers); + ArkProvideToProvideComponent._instantiate(style, () => new ArkProvideToProvideComponent, content, updatedInitializers); } /** @memo */ export function ProvideToStorageLink(/**/ /** @memo */ -style?: (instance: ArkProvideToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStorageLinkOptions): ArkProvideToStorageLinkComponent { +content?: () => void, initializers?: ProvideToStorageLinkOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStorageLinkOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStorageLinkComponent._instantiate(style, () => new ArkProvideToStorageLinkComponent, content, updatedInitializers); + ArkProvideToStorageLinkComponent._instantiate(style, () => new ArkProvideToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function ProvideToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkProvideToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToLocalStorageLinkOptions): ArkProvideToLocalStorageLinkComponent { +content?: () => void, initializers?: ProvideToLocalStorageLinkOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToLocalStorageLinkOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToLocalStorageLinkComponent._instantiate(style, () => new ArkProvideToLocalStorageLinkComponent, content, updatedInitializers); + ArkProvideToLocalStorageLinkComponent._instantiate(style, () => new ArkProvideToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function ProvideToStorageProp(/**/ /** @memo */ -style?: (instance: ArkProvideToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToStoragePropOptions): ArkProvideToStoragePropComponent { +content?: () => void, initializers?: ProvideToStoragePropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToStoragePropOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToStoragePropComponent._instantiate(style, () => new ArkProvideToStoragePropComponent, content, updatedInitializers); + ArkProvideToStoragePropComponent._instantiate(style, () => new ArkProvideToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkProvideToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToLocalStoragePropOptions): ArkProvideToLocalStoragePropComponent { +content?: () => void, initializers?: ProvideToLocalStoragePropOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToLocalStoragePropOptions = { __backing_state: __provide_state, __backing_test: initializers?.__backing_test }; - return ArkProvideToLocalStoragePropComponent._instantiate(style, () => new ArkProvideToLocalStoragePropComponent, content, updatedInitializers); + ArkProvideToLocalStoragePropComponent._instantiate(style, () => new ArkProvideToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function ProvideToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkProvideToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToBuilderParamOptions): ArkProvideToBuilderParamComponent { +content?: () => void, initializers?: ProvideToBuilderParamOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToBuilderParamOptions = { __backing_state: __provide_state, test: initializers?.test }; - return ArkProvideToBuilderParamComponent._instantiate(style, () => new ArkProvideToBuilderParamComponent, content, updatedInitializers); + ArkProvideToBuilderParamComponent._instantiate(style, () => new ArkProvideToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function ProvideToPlain(/**/ /** @memo */ -style?: (instance: ArkProvideToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideToPlainOptions): ArkProvideToPlainComponent { +content?: () => void, initializers?: ProvideToPlainOptions): void { const __provide_state = contextLocalStateOf("state", () => 'Hello World'); const updatedInitializers: ProvideToPlainOptions = { __backing_state: __provide_state, test: initializers?.test }; - return ArkProvideToPlainComponent._instantiate(style, () => new ArkProvideToPlainComponent, content, updatedInitializers); + ArkProvideToPlainComponent._instantiate(style, () => new ArkProvideToPlainComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToState(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStateOptions): ArkStorageLinkToStateComponent { +content?: () => void, initializers?: StorageLinkToStateOptions): void { const updatedInitializers: StorageLinkToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStateComponent._instantiate(style, () => new ArkStorageLinkToStateComponent, content, updatedInitializers); + ArkStorageLinkToStateComponent._instantiate(style, () => new ArkStorageLinkToStateComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToPropOptions): ArkStorageLinkToPropComponent { +content?: () => void, initializers?: StorageLinkToPropOptions): void { const updatedInitializers: StorageLinkToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToPropComponent._instantiate(style, () => new ArkStorageLinkToPropComponent, content, updatedInitializers); + ArkStorageLinkToPropComponent._instantiate(style, () => new ArkStorageLinkToPropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToProvide(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToProvideOptions): ArkStorageLinkToProvideComponent { +content?: () => void, initializers?: StorageLinkToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StorageLinkToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStorageLinkToProvideComponent._instantiate(style, () => new ArkStorageLinkToProvideComponent, content, updatedInitializers); + ArkStorageLinkToProvideComponent._instantiate(style, () => new ArkStorageLinkToProvideComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStorageLinkOptions): ArkStorageLinkToStorageLinkComponent { +content?: () => void, initializers?: StorageLinkToStorageLinkOptions): void { const updatedInitializers: StorageLinkToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToStorageLinkComponent, content, updatedInitializers); + ArkStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions): ArkStorageLinkToLocalStorageLinkComponent { +content?: () => void, initializers?: StorageLinkToLocalStorageLinkOptions): void { const updatedInitializers: StorageLinkToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); + ArkStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToStoragePropOptions): ArkStorageLinkToStoragePropComponent { +content?: () => void, initializers?: StorageLinkToStoragePropOptions): void { const updatedInitializers: StorageLinkToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToStoragePropComponent._instantiate(style, () => new ArkStorageLinkToStoragePropComponent, content, updatedInitializers); + ArkStorageLinkToStoragePropComponent._instantiate(style, () => new ArkStorageLinkToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions): ArkStorageLinkToLocalStoragePropComponent { +content?: () => void, initializers?: StorageLinkToLocalStoragePropOptions): void { const updatedInitializers: StorageLinkToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkStorageLinkToLocalStoragePropComponent, content, updatedInitializers); + ArkStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkStorageLinkToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToBuilderParamOptions): ArkStorageLinkToBuilderParamComponent { +content?: () => void, initializers?: StorageLinkToBuilderParamOptions): void { const updatedInitializers: StorageLinkToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkStorageLinkToBuilderParamComponent, content, updatedInitializers); + ArkStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkStorageLinkToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkToPlain(/**/ /** @memo */ -style?: (instance: ArkStorageLinkToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkToPlainOptions): ArkStorageLinkToPlainComponent { +content?: () => void, initializers?: StorageLinkToPlainOptions): void { const updatedInitializers: StorageLinkToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStorageLinkToPlainComponent._instantiate(style, () => new ArkStorageLinkToPlainComponent, content, updatedInitializers); + ArkStorageLinkToPlainComponent._instantiate(style, () => new ArkStorageLinkToPlainComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToState(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStateOptions): ArkLocalStorageLinkToStateComponent { +content?: () => void, initializers?: LocalStorageLinkToStateOptions): void { const updatedInitializers: LocalStorageLinkToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStateComponent._instantiate(style, () => new ArkLocalStorageLinkToStateComponent, content, updatedInitializers); + ArkLocalStorageLinkToStateComponent._instantiate(style, () => new ArkLocalStorageLinkToStateComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToPropOptions): ArkLocalStorageLinkToPropComponent { +content?: () => void, initializers?: LocalStorageLinkToPropOptions): void { const updatedInitializers: LocalStorageLinkToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToPropComponent._instantiate(style, () => new ArkLocalStorageLinkToPropComponent, content, updatedInitializers); + ArkLocalStorageLinkToPropComponent._instantiate(style, () => new ArkLocalStorageLinkToPropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToProvide(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToProvideOptions): ArkLocalStorageLinkToProvideComponent { +content?: () => void, initializers?: LocalStorageLinkToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: LocalStorageLinkToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkLocalStorageLinkToProvideComponent._instantiate(style, () => new ArkLocalStorageLinkToProvideComponent, content, updatedInitializers); + ArkLocalStorageLinkToProvideComponent._instantiate(style, () => new ArkLocalStorageLinkToProvideComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions): ArkLocalStorageLinkToStorageLinkComponent { +content?: () => void, initializers?: LocalStorageLinkToStorageLinkOptions): void { const updatedInitializers: LocalStorageLinkToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToStorageLinkComponent, content, updatedInitializers); + ArkLocalStorageLinkToStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions): ArkLocalStorageLinkToLocalStorageLinkComponent { +content?: () => void, initializers?: LocalStorageLinkToLocalStorageLinkOptions): void { const updatedInitializers: LocalStorageLinkToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); + ArkLocalStorageLinkToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions): ArkLocalStorageLinkToStoragePropComponent { +content?: () => void, initializers?: LocalStorageLinkToStoragePropOptions): void { const updatedInitializers: LocalStorageLinkToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToStoragePropComponent, content, updatedInitializers); + ArkLocalStorageLinkToStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions): ArkLocalStorageLinkToLocalStoragePropComponent { +content?: () => void, initializers?: LocalStorageLinkToLocalStoragePropOptions): void { const updatedInitializers: LocalStorageLinkToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStoragePropComponent, content, updatedInitializers); + ArkLocalStorageLinkToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStorageLinkToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions): ArkLocalStorageLinkToBuilderParamComponent { +content?: () => void, initializers?: LocalStorageLinkToBuilderParamOptions): void { const updatedInitializers: LocalStorageLinkToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkLocalStorageLinkToBuilderParamComponent, content, updatedInitializers); + ArkLocalStorageLinkToBuilderParamComponent._instantiate(style, () => new ArkLocalStorageLinkToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function LocalStorageLinkToPlain(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkToPlainOptions): ArkLocalStorageLinkToPlainComponent { +content?: () => void, initializers?: LocalStorageLinkToPlainOptions): void { const updatedInitializers: LocalStorageLinkToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStorageLinkToPlainComponent._instantiate(style, () => new ArkLocalStorageLinkToPlainComponent, content, updatedInitializers); + ArkLocalStorageLinkToPlainComponent._instantiate(style, () => new ArkLocalStorageLinkToPlainComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToState(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStateOptions): ArkStoragePropToStateComponent { +content?: () => void, initializers?: StoragePropToStateOptions): void { const updatedInitializers: StoragePropToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStateComponent._instantiate(style, () => new ArkStoragePropToStateComponent, content, updatedInitializers); + ArkStoragePropToStateComponent._instantiate(style, () => new ArkStoragePropToStateComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToPropOptions): ArkStoragePropToPropComponent { +content?: () => void, initializers?: StoragePropToPropOptions): void { const updatedInitializers: StoragePropToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToPropComponent._instantiate(style, () => new ArkStoragePropToPropComponent, content, updatedInitializers); + ArkStoragePropToPropComponent._instantiate(style, () => new ArkStoragePropToPropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToProvide(/**/ /** @memo */ -style?: (instance: ArkStoragePropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToProvideOptions): ArkStoragePropToProvideComponent { +content?: () => void, initializers?: StoragePropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: StoragePropToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkStoragePropToProvideComponent._instantiate(style, () => new ArkStoragePropToProvideComponent, content, updatedInitializers); + ArkStoragePropToProvideComponent._instantiate(style, () => new ArkStoragePropToProvideComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStorageLinkOptions): ArkStoragePropToStorageLinkComponent { +content?: () => void, initializers?: StoragePropToStorageLinkOptions): void { const updatedInitializers: StoragePropToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStorageLinkComponent._instantiate(style, () => new ArkStoragePropToStorageLinkComponent, content, updatedInitializers); + ArkStoragePropToStorageLinkComponent._instantiate(style, () => new ArkStoragePropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkStoragePropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions): ArkStoragePropToLocalStorageLinkComponent { +content?: () => void, initializers?: StoragePropToLocalStorageLinkOptions): void { const updatedInitializers: StoragePropToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkStoragePropToLocalStorageLinkComponent, content, updatedInitializers); + ArkStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkStoragePropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToStoragePropOptions): ArkStoragePropToStoragePropComponent { +content?: () => void, initializers?: StoragePropToStoragePropOptions): void { const updatedInitializers: StoragePropToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToStoragePropComponent._instantiate(style, () => new ArkStoragePropToStoragePropComponent, content, updatedInitializers); + ArkStoragePropToStoragePropComponent._instantiate(style, () => new ArkStoragePropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkStoragePropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToLocalStoragePropOptions): ArkStoragePropToLocalStoragePropComponent { +content?: () => void, initializers?: StoragePropToLocalStoragePropOptions): void { const updatedInitializers: StoragePropToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkStoragePropToLocalStoragePropComponent, content, updatedInitializers); + ArkStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkStoragePropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkStoragePropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToBuilderParamOptions): ArkStoragePropToBuilderParamComponent { +content?: () => void, initializers?: StoragePropToBuilderParamOptions): void { const updatedInitializers: StoragePropToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStoragePropToBuilderParamComponent._instantiate(style, () => new ArkStoragePropToBuilderParamComponent, content, updatedInitializers); + ArkStoragePropToBuilderParamComponent._instantiate(style, () => new ArkStoragePropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function StoragePropToPlain(/**/ /** @memo */ -style?: (instance: ArkStoragePropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropToPlainOptions): ArkStoragePropToPlainComponent { +content?: () => void, initializers?: StoragePropToPlainOptions): void { const updatedInitializers: StoragePropToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkStoragePropToPlainComponent._instantiate(style, () => new ArkStoragePropToPlainComponent, content, updatedInitializers); + ArkStoragePropToPlainComponent._instantiate(style, () => new ArkStoragePropToPlainComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToState(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStateOptions): ArkLocalStoragePropToStateComponent { +content?: () => void, initializers?: LocalStoragePropToStateOptions): void { const updatedInitializers: LocalStoragePropToStateOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStateComponent._instantiate(style, () => new ArkLocalStoragePropToStateComponent, content, updatedInitializers); + ArkLocalStoragePropToStateComponent._instantiate(style, () => new ArkLocalStoragePropToStateComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToPropOptions): ArkLocalStoragePropToPropComponent { +content?: () => void, initializers?: LocalStoragePropToPropOptions): void { const updatedInitializers: LocalStoragePropToPropOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToPropComponent._instantiate(style, () => new ArkLocalStoragePropToPropComponent, content, updatedInitializers); + ArkLocalStoragePropToPropComponent._instantiate(style, () => new ArkLocalStoragePropToPropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToProvide(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToProvideOptions): ArkLocalStoragePropToProvideComponent { +content?: () => void, initializers?: LocalStoragePropToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: LocalStoragePropToProvideOptions = { __backing_state: initializers?.__backing_state, __backing_test: __provide_test }; - return ArkLocalStoragePropToProvideComponent._instantiate(style, () => new ArkLocalStoragePropToProvideComponent, content, updatedInitializers); + ArkLocalStoragePropToProvideComponent._instantiate(style, () => new ArkLocalStoragePropToProvideComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions): ArkLocalStoragePropToStorageLinkComponent { +content?: () => void, initializers?: LocalStoragePropToStorageLinkOptions): void { const updatedInitializers: LocalStoragePropToStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToStorageLinkComponent, content, updatedInitializers); + ArkLocalStoragePropToStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions): ArkLocalStoragePropToLocalStorageLinkComponent { +content?: () => void, initializers?: LocalStoragePropToLocalStorageLinkOptions): void { const updatedInitializers: LocalStoragePropToLocalStorageLinkOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStorageLinkComponent, content, updatedInitializers); + ArkLocalStoragePropToLocalStorageLinkComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToStoragePropOptions): ArkLocalStoragePropToStoragePropComponent { +content?: () => void, initializers?: LocalStoragePropToStoragePropOptions): void { const updatedInitializers: LocalStoragePropToStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToStoragePropComponent, content, updatedInitializers); + ArkLocalStoragePropToStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions): ArkLocalStoragePropToLocalStoragePropComponent { +content?: () => void, initializers?: LocalStoragePropToLocalStoragePropOptions): void { const updatedInitializers: LocalStoragePropToLocalStoragePropOptions = { __backing_state: initializers?.__backing_state, __backing_test: initializers?.__backing_test }; - return ArkLocalStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStoragePropComponent, content, updatedInitializers); + ArkLocalStoragePropToLocalStoragePropComponent._instantiate(style, () => new ArkLocalStoragePropToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions): ArkLocalStoragePropToBuilderParamComponent { +content?: () => void, initializers?: LocalStoragePropToBuilderParamOptions): void { const updatedInitializers: LocalStoragePropToBuilderParamOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStoragePropToBuilderParamComponent._instantiate(style, () => new ArkLocalStoragePropToBuilderParamComponent, content, updatedInitializers); + ArkLocalStoragePropToBuilderParamComponent._instantiate(style, () => new ArkLocalStoragePropToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function LocalStoragePropToPlain(/**/ /** @memo */ -style?: (instance: ArkLocalStoragePropToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropToPlainOptions): ArkLocalStoragePropToPlainComponent { +content?: () => void, initializers?: LocalStoragePropToPlainOptions): void { const updatedInitializers: LocalStoragePropToPlainOptions = { __backing_state: initializers?.__backing_state, test: initializers?.test }; - return ArkLocalStoragePropToPlainComponent._instantiate(style, () => new ArkLocalStoragePropToPlainComponent, content, updatedInitializers); + ArkLocalStoragePropToPlainComponent._instantiate(style, () => new ArkLocalStoragePropToPlainComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToState(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStateOptions): ArkBuilderParamToStateComponent { +content?: () => void, initializers?: BuilderParamToStateOptions): void { const updatedInitializers: BuilderParamToStateOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStateComponent._instantiate(style, () => new ArkBuilderParamToStateComponent, content, updatedInitializers); + ArkBuilderParamToStateComponent._instantiate(style, () => new ArkBuilderParamToStateComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToPropOptions): ArkBuilderParamToPropComponent { +content?: () => void, initializers?: BuilderParamToPropOptions): void { const updatedInitializers: BuilderParamToPropOptions = { state: initializers?.state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToPropComponent._instantiate(style, () => new ArkBuilderParamToPropComponent, content, updatedInitializers); + ArkBuilderParamToPropComponent._instantiate(style, () => new ArkBuilderParamToPropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToProvide(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToProvideOptions): ArkBuilderParamToProvideComponent { +content?: () => void, initializers?: BuilderParamToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: BuilderParamToProvideOptions = { state: initializers?.state, __backing_test: __provide_test }; - return ArkBuilderParamToProvideComponent._instantiate(style, () => new ArkBuilderParamToProvideComponent, content, updatedInitializers); + ArkBuilderParamToProvideComponent._instantiate(style, () => new ArkBuilderParamToProvideComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToStorageLink(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStorageLinkOptions): ArkBuilderParamToStorageLinkComponent { +content?: () => void, initializers?: BuilderParamToStorageLinkOptions): void { const updatedInitializers: BuilderParamToStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToStorageLinkComponent, content, updatedInitializers); + ArkBuilderParamToStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions): ArkBuilderParamToLocalStorageLinkComponent { +content?: () => void, initializers?: BuilderParamToLocalStorageLinkOptions): void { const updatedInitializers: BuilderParamToLocalStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToLocalStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToLocalStorageLinkComponent, content, updatedInitializers); + ArkBuilderParamToLocalStorageLinkComponent._instantiate(style, () => new ArkBuilderParamToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToStorageProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToStoragePropOptions): ArkBuilderParamToStoragePropComponent { +content?: () => void, initializers?: BuilderParamToStoragePropOptions): void { const updatedInitializers: BuilderParamToStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToStoragePropComponent._instantiate(style, () => new ArkBuilderParamToStoragePropComponent, content, updatedInitializers); + ArkBuilderParamToStoragePropComponent._instantiate(style, () => new ArkBuilderParamToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions): ArkBuilderParamToLocalStoragePropComponent { +content?: () => void, initializers?: BuilderParamToLocalStoragePropOptions): void { const updatedInitializers: BuilderParamToLocalStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkBuilderParamToLocalStoragePropComponent._instantiate(style, () => new ArkBuilderParamToLocalStoragePropComponent, content, updatedInitializers); + ArkBuilderParamToLocalStoragePropComponent._instantiate(style, () => new ArkBuilderParamToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToBuilderParamOptions): ArkBuilderParamToBuilderParamComponent { +content?: () => void, initializers?: BuilderParamToBuilderParamOptions): void { const updatedInitializers: BuilderParamToBuilderParamOptions = { state: initializers?.state, test: initializers?.test }; - return ArkBuilderParamToBuilderParamComponent._instantiate(style, () => new ArkBuilderParamToBuilderParamComponent, content, updatedInitializers); + ArkBuilderParamToBuilderParamComponent._instantiate(style, () => new ArkBuilderParamToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamToPlain(/**/ /** @memo */ -style?: (instance: ArkBuilderParamToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamToPlainOptions): ArkBuilderParamToPlainComponent { +content?: () => void, initializers?: BuilderParamToPlainOptions): void { const updatedInitializers: BuilderParamToPlainOptions = { state: initializers?.state, test: initializers?.test }; - return ArkBuilderParamToPlainComponent._instantiate(style, () => new ArkBuilderParamToPlainComponent, content, updatedInitializers); + ArkBuilderParamToPlainComponent._instantiate(style, () => new ArkBuilderParamToPlainComponent, content, updatedInitializers); } /** @memo */ export function PlainToState(/**/ /** @memo */ -style?: (instance: ArkPlainToStateComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStateOptions): ArkPlainToStateComponent { +content?: () => void, initializers?: PlainToStateOptions): void { const updatedInitializers: PlainToStateOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStateComponent._instantiate(style, () => new ArkPlainToStateComponent, content, updatedInitializers); + ArkPlainToStateComponent._instantiate(style, () => new ArkPlainToStateComponent, content, updatedInitializers); } /** @memo */ export function PlainToProp(/**/ /** @memo */ -style?: (instance: ArkPlainToPropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToPropOptions): ArkPlainToPropComponent { +content?: () => void, initializers?: PlainToPropOptions): void { const updatedInitializers: PlainToPropOptions = { state: initializers?.state, test: initializers?.test, __backing_test: initializers?.__backing_test }; - return ArkPlainToPropComponent._instantiate(style, () => new ArkPlainToPropComponent, content, updatedInitializers); + ArkPlainToPropComponent._instantiate(style, () => new ArkPlainToPropComponent, content, updatedInitializers); } /** @memo */ export function PlainToProvide(/**/ /** @memo */ -style?: (instance: ArkPlainToProvideComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToProvideOptions): ArkPlainToProvideComponent { +content?: () => void, initializers?: PlainToProvideOptions): void { const __provide_test = contextLocalStateOf("test", () => this.state + "!"); const updatedInitializers: PlainToProvideOptions = { state: initializers?.state, __backing_test: __provide_test }; - return ArkPlainToProvideComponent._instantiate(style, () => new ArkPlainToProvideComponent, content, updatedInitializers); + ArkPlainToProvideComponent._instantiate(style, () => new ArkPlainToProvideComponent, content, updatedInitializers); } /** @memo */ export function PlainToStorageLink(/**/ /** @memo */ -style?: (instance: ArkPlainToStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStorageLinkOptions): ArkPlainToStorageLinkComponent { +content?: () => void, initializers?: PlainToStorageLinkOptions): void { const updatedInitializers: PlainToStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStorageLinkComponent._instantiate(style, () => new ArkPlainToStorageLinkComponent, content, updatedInitializers); + ArkPlainToStorageLinkComponent._instantiate(style, () => new ArkPlainToStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PlainToLocalStorageLink(/**/ /** @memo */ -style?: (instance: ArkPlainToLocalStorageLinkComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToLocalStorageLinkOptions): ArkPlainToLocalStorageLinkComponent { +content?: () => void, initializers?: PlainToLocalStorageLinkOptions): void { const updatedInitializers: PlainToLocalStorageLinkOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToLocalStorageLinkComponent._instantiate(style, () => new ArkPlainToLocalStorageLinkComponent, content, updatedInitializers); + ArkPlainToLocalStorageLinkComponent._instantiate(style, () => new ArkPlainToLocalStorageLinkComponent, content, updatedInitializers); } /** @memo */ export function PlainToStorageProp(/**/ /** @memo */ -style?: (instance: ArkPlainToStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToStoragePropOptions): ArkPlainToStoragePropComponent { +content?: () => void, initializers?: PlainToStoragePropOptions): void { const updatedInitializers: PlainToStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToStoragePropComponent._instantiate(style, () => new ArkPlainToStoragePropComponent, content, updatedInitializers); + ArkPlainToStoragePropComponent._instantiate(style, () => new ArkPlainToStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PlainToLocalStorageProp(/**/ /** @memo */ -style?: (instance: ArkPlainToLocalStoragePropComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToLocalStoragePropOptions): ArkPlainToLocalStoragePropComponent { +content?: () => void, initializers?: PlainToLocalStoragePropOptions): void { const updatedInitializers: PlainToLocalStoragePropOptions = { state: initializers?.state, __backing_test: initializers?.__backing_test }; - return ArkPlainToLocalStoragePropComponent._instantiate(style, () => new ArkPlainToLocalStoragePropComponent, content, updatedInitializers); + ArkPlainToLocalStoragePropComponent._instantiate(style, () => new ArkPlainToLocalStoragePropComponent, content, updatedInitializers); } /** @memo */ export function PlainToBuilderParam(/**/ /** @memo */ -style?: (instance: ArkPlainToBuilderParamComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToBuilderParamOptions): ArkPlainToBuilderParamComponent { +content?: () => void, initializers?: PlainToBuilderParamOptions): void { const updatedInitializers: PlainToBuilderParamOptions = { state: initializers?.state, test: initializers?.test }; - return ArkPlainToBuilderParamComponent._instantiate(style, () => new ArkPlainToBuilderParamComponent, content, updatedInitializers); + ArkPlainToBuilderParamComponent._instantiate(style, () => new ArkPlainToBuilderParamComponent, content, updatedInitializers); } /** @memo */ export function PlainToPlain(/**/ /** @memo */ -style?: (instance: ArkPlainToPlainComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainToPlainOptions): ArkPlainToPlainComponent { +content?: () => void, initializers?: PlainToPlainOptions): void { const updatedInitializers: PlainToPlainOptions = { state: initializers?.state, test: initializers?.test }; - return ArkPlainToPlainComponent._instantiate(style, () => new ArkPlainToPlainComponent, content, updatedInitializers); + ArkPlainToPlainComponent._instantiate(style, () => new ArkPlainToPlainComponent, content, updatedInitializers); } export interface StateToStateOptions { __backing_state?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/ets/Rewrite.ts b/arkoala/ets-plugin/test/golden/koala/ets/Rewrite.ts index 036756acc..e358a50ec 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/Rewrite.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/Rewrite.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, bindCustomDialog, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, bindCustomDialog, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { MutableState, OnChange, contextLocal } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; @@ -9,9 +9,9 @@ export class ArkEntryExampleComponent extends ArkStructBase void, initializers?: EntryExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkEntryExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: EntryExampleOptions) { } } @@ -22,9 +22,9 @@ class ArkComponentExampleComponent extends ArkStructBase void, initializers?: ComponentExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkComponentExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ComponentExampleOptions) { } } @@ -35,14 +35,17 @@ class ArkBuildExampleComponent extends ArkStructBase void, initializers?: BuildExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkBuildExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuildExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.fontColor(Color.Red) - .width(100); + ArkText(__instance => { + { + __instance.fontColor(Color.Red) + .width(100); + } + __builder?.(__instance); }, undefined, "message"); } } @@ -61,12 +64,12 @@ class ArkStateExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StateExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkLinkExampleComponent extends ArkStructBase { @@ -84,12 +87,12 @@ class ArkLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkPropExampleComponent extends ArkStructBase { @@ -111,12 +114,12 @@ class ArkPropExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkPropInitializedExampleComponent extends ArkStructBase { @@ -138,12 +141,12 @@ class ArkPropInitializedExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PropInitializedExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkProvideExampleComponent extends ArkStructBase { @@ -161,12 +164,12 @@ class ArkProvideExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ProvideExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkConsumeExampleComponent extends ArkStructBase { @@ -184,12 +187,12 @@ class ArkConsumeExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ConsumeExampleOptions) { - ArkText(undefined, undefined, this.x); + ArkText(__builder, undefined, this.x); } } class ArkBuilderExampleComponent extends ArkStructBase { @@ -203,9 +206,9 @@ class ArkBuilderExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderExampleOptions) { this.foo(); @@ -222,9 +225,9 @@ class ArkGlobalBuilderExampleComponent extends ArkStructBase void, initializers?: GlobalBuilderExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkGlobalBuilderExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: GlobalBuilderExampleOptions) { bar(); @@ -253,9 +256,9 @@ class ArkBuilderParamExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BuilderParamExampleOptions) { this.foo(); @@ -273,13 +276,16 @@ class ArkStylesExampleComponent extends ArkStructBase void, initializers?: StylesExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStylesExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyStyle(looks); + ArkText(__instance => { + { + __instance.width(17).__applyStyle(looks); + } + __builder?.(__instance); }, undefined); } } @@ -295,13 +301,16 @@ class ArkStylesMethodExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesMethodExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyStyle(this.nice.bind(this)); + ArkText(__instance => { + { + __instance.width(17).__applyStyle(this.nice.bind(this)); + } + __builder?.(__instance); }, undefined); } } @@ -317,13 +326,16 @@ class ArkExtendExampleComponent extends ArkStructBase void, initializers?: ExtendExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkExtendExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExtendExampleOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(17).__applyStyle(clown__Column); + ArkColumn(__instance => { + { + __instance.width(17).__applyStyle(clown__Column); + } + __builder?.(__instance); }, undefined); } } @@ -337,13 +349,16 @@ class ArkAnimatableExtendExampleComponent extends ArkStructBase void, initializers?: AnimatableExtendExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkAnimatableExtendExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AnimatableExtendExampleOptions) { - ArkText((instance: ArkTextComponent) => { - instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused"); + ArkText(__instance => { + { + __instance.width(17).__applyAnimatableExtend(attributeExtend__Text, 50, "unused"); + } + __builder?.(__instance); }, undefined); } } @@ -369,9 +384,9 @@ class ArkWatchExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: WatchExampleOptions) { } @@ -391,9 +406,9 @@ class ArkStorageLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StorageLinkExampleOptions) { } @@ -417,9 +432,9 @@ class ArkStoragePropExampleComponent extends ArkStructBase("storage", "Start").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkStoragePropExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StoragePropExampleOptions) { } @@ -441,9 +456,9 @@ class ArkCustomDialogExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogExampleOptions) { } @@ -476,9 +491,9 @@ export class ArkCustomDialogControllerExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogControllerExampleOptions) { } @@ -510,15 +525,18 @@ class ArkObjectLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ObjectLinkExampleOptions) { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { - this.a.c += 1; - }); + ArkButton(__instance => { + { + __instance.onClick(() => { + this.a.c += 1; + }); + } + __builder?.(__instance); }, undefined); } } @@ -537,12 +555,12 @@ class ArkObjectLinkExampleParentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ObjectLinkExampleParentOptions) { - ObjectLinkExample(undefined, undefined); + ObjectLinkExample(__builder, undefined); } } class ArkPlainPropertyExampleComponent extends ArkStructBase { @@ -575,12 +593,12 @@ class ArkCallExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CallExampleOptions) { - Child(undefined, undefined, { __backing_counter: this.__backing_state } as ChildOptions); + Child(__builder, undefined, { __backing_counter: this.__backing_state } as ChildOptions); } } class ArkChildComponent extends ArkStructBase { @@ -598,213 +616,248 @@ class ArkChildComponent extends ArkStructBase { this.__backing_counter!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { } } +class ArkBuilderPropagationExampleComponent extends ArkStructBase { + private _entry_local_storage_ = new LocalStorage(); + __initializeStruct(/**/ + /** @memo */ + content?: () => void, initializers?: BuilderPropagationExampleOptions): void { + } + /** @memo */ + __build(/**/ + /** @memo */ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ + /** @memo */ + content?: () => void, initializers?: BuilderPropagationExampleOptions) { + ChildWithBuilder(__instance => { + { + __instance.width(100); + } + __builder?.(__instance); + }, undefined); + } +} +class ArkChildWithBuilderComponent extends ArkStructBase { + private _entry_local_storage_ = new LocalStorage(); + __initializeStruct(/**/ + /** @memo */ + content?: () => void, initializers?: ChildWithBuilderOptions): void { + } + /** @memo */ + __build(/**/ + /** @memo */ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ + /** @memo */ + content?: () => void, initializers?: ChildWithBuilderOptions) { + ArkColumn(__builder, undefined); + } +} /** @memo */ export function EntryExample(/**/ /** @memo */ -style?: (instance: ArkEntryExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: EntryExampleOptions): ArkEntryExampleComponent { +content?: () => void, initializers?: EntryExampleOptions): void { const updatedInitializers: EntryExampleOptions = {}; - return ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, updatedInitializers); + ArkEntryExampleComponent._instantiate(style, () => new ArkEntryExampleComponent, content, updatedInitializers); } /** @memo */ export function ComponentExample(/**/ /** @memo */ -style?: (instance: ArkComponentExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ComponentExampleOptions): ArkComponentExampleComponent { +content?: () => void, initializers?: ComponentExampleOptions): void { const updatedInitializers: ComponentExampleOptions = {}; - return ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, updatedInitializers); + ArkComponentExampleComponent._instantiate(style, () => new ArkComponentExampleComponent, content, updatedInitializers); } /** @memo */ export function BuildExample(/**/ /** @memo */ -style?: (instance: ArkBuildExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuildExampleOptions): ArkBuildExampleComponent { +content?: () => void, initializers?: BuildExampleOptions): void { const updatedInitializers: BuildExampleOptions = {}; - return ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, updatedInitializers); + ArkBuildExampleComponent._instantiate(style, () => new ArkBuildExampleComponent, content, updatedInitializers); } /** @memo */ export function StateExample(/**/ /** @memo */ -style?: (instance: ArkStateExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StateExampleOptions): ArkStateExampleComponent { +content?: () => void, initializers?: StateExampleOptions): void { const updatedInitializers: StateExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, updatedInitializers); + ArkStateExampleComponent._instantiate(style, () => new ArkStateExampleComponent, content, updatedInitializers); } /** @memo */ export function LinkExample(/**/ /** @memo */ -style?: (instance: ArkLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkExampleOptions): ArkLinkExampleComponent { +content?: () => void, initializers?: LinkExampleOptions): void { const updatedInitializers: LinkExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, updatedInitializers); + ArkLinkExampleComponent._instantiate(style, () => new ArkLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function PropExample(/**/ /** @memo */ -style?: (instance: ArkPropExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropExampleOptions): ArkPropExampleComponent { +content?: () => void, initializers?: PropExampleOptions): void { const updatedInitializers: PropExampleOptions = { x: initializers?.x, __backing_x: initializers?.__backing_x }; - return ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, updatedInitializers); + ArkPropExampleComponent._instantiate(style, () => new ArkPropExampleComponent, content, updatedInitializers); } /** @memo */ export function PropInitializedExample(/**/ /** @memo */ -style?: (instance: ArkPropInitializedExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PropInitializedExampleOptions): ArkPropInitializedExampleComponent { +content?: () => void, initializers?: PropInitializedExampleOptions): void { const updatedInitializers: PropInitializedExampleOptions = { x: initializers?.x, __backing_x: initializers?.__backing_x }; - return ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, updatedInitializers); + ArkPropInitializedExampleComponent._instantiate(style, () => new ArkPropInitializedExampleComponent, content, updatedInitializers); } /** @memo */ export function ProvideExample(/**/ /** @memo */ -style?: (instance: ArkProvideExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ProvideExampleOptions): ArkProvideExampleComponent { +content?: () => void, initializers?: ProvideExampleOptions): void { const __provide_name = contextLocalStateOf("name", () => "text"); const updatedInitializers: ProvideExampleOptions = { __backing_x: __provide_name }; - return ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, updatedInitializers); + ArkProvideExampleComponent._instantiate(style, () => new ArkProvideExampleComponent, content, updatedInitializers); } /** @memo */ export function ConsumeExample(/**/ /** @memo */ -style?: (instance: ArkConsumeExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ConsumeExampleOptions): ArkConsumeExampleComponent { +content?: () => void, initializers?: ConsumeExampleOptions): void { const __consume_name = contextLocal("name") as MutableState; const updatedInitializers: ConsumeExampleOptions = { __backing_x: __consume_name }; - return ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, updatedInitializers); + ArkConsumeExampleComponent._instantiate(style, () => new ArkConsumeExampleComponent, content, updatedInitializers); } /** @memo */ export function BuilderExample(/**/ /** @memo */ -style?: (instance: ArkBuilderExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderExampleOptions): ArkBuilderExampleComponent { +content?: () => void, initializers?: BuilderExampleOptions): void { const updatedInitializers: BuilderExampleOptions = {}; - return ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, updatedInitializers); + ArkBuilderExampleComponent._instantiate(style, () => new ArkBuilderExampleComponent, content, updatedInitializers); } /** @memo */ export function GlobalBuilderExample(/**/ /** @memo */ -style?: (instance: ArkGlobalBuilderExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: GlobalBuilderExampleOptions): ArkGlobalBuilderExampleComponent { +content?: () => void, initializers?: GlobalBuilderExampleOptions): void { const updatedInitializers: GlobalBuilderExampleOptions = {}; - return ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, updatedInitializers); + ArkGlobalBuilderExampleComponent._instantiate(style, () => new ArkGlobalBuilderExampleComponent, content, updatedInitializers); } /** @memo */ export function BuilderParamExample(/**/ /** @memo */ -style?: (instance: ArkBuilderParamExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BuilderParamExampleOptions): ArkBuilderParamExampleComponent { +content?: () => void, initializers?: BuilderParamExampleOptions): void { const updatedInitializers: BuilderParamExampleOptions = { foo: initializers?.foo }; - return ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, updatedInitializers); + ArkBuilderParamExampleComponent._instantiate(style, () => new ArkBuilderParamExampleComponent, content, updatedInitializers); } /** @memo */ export function StylesExample(/**/ /** @memo */ -style?: (instance: ArkStylesExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesExampleOptions): ArkStylesExampleComponent { +content?: () => void, initializers?: StylesExampleOptions): void { const updatedInitializers: StylesExampleOptions = {}; - return ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, updatedInitializers); + ArkStylesExampleComponent._instantiate(style, () => new ArkStylesExampleComponent, content, updatedInitializers); } /** @memo */ export function StylesMethodExample(/**/ /** @memo */ -style?: (instance: ArkStylesMethodExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesMethodExampleOptions): ArkStylesMethodExampleComponent { +content?: () => void, initializers?: StylesMethodExampleOptions): void { const updatedInitializers: StylesMethodExampleOptions = {}; - return ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, updatedInitializers); + ArkStylesMethodExampleComponent._instantiate(style, () => new ArkStylesMethodExampleComponent, content, updatedInitializers); } /** @memo */ export function ExtendExample(/**/ /** @memo */ -style?: (instance: ArkExtendExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExtendExampleOptions): ArkExtendExampleComponent { +content?: () => void, initializers?: ExtendExampleOptions): void { const updatedInitializers: ExtendExampleOptions = {}; - return ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, updatedInitializers); + ArkExtendExampleComponent._instantiate(style, () => new ArkExtendExampleComponent, content, updatedInitializers); } /** @memo */ export function AnimatableExtendExample(/**/ /** @memo */ -style?: (instance: ArkAnimatableExtendExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AnimatableExtendExampleOptions): ArkAnimatableExtendExampleComponent { +content?: () => void, initializers?: AnimatableExtendExampleOptions): void { const updatedInitializers: AnimatableExtendExampleOptions = {}; - return ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, updatedInitializers); + ArkAnimatableExtendExampleComponent._instantiate(style, () => new ArkAnimatableExtendExampleComponent, content, updatedInitializers); } /** @memo */ export function WatchExample(/**/ /** @memo */ -style?: (instance: ArkWatchExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: WatchExampleOptions): ArkWatchExampleComponent { +content?: () => void, initializers?: WatchExampleOptions): void { const updatedInitializers: WatchExampleOptions = { __backing_x: initializers?.__backing_x }; - return ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, updatedInitializers); + ArkWatchExampleComponent._instantiate(style, () => new ArkWatchExampleComponent, content, updatedInitializers); } /** @memo */ export function StorageLinkExample(/**/ /** @memo */ -style?: (instance: ArkStorageLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StorageLinkExampleOptions): ArkStorageLinkExampleComponent { +content?: () => void, initializers?: StorageLinkExampleOptions): void { const updatedInitializers: StorageLinkExampleOptions = { __backing_link: initializers?.__backing_link }; - return ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, updatedInitializers); + ArkStorageLinkExampleComponent._instantiate(style, () => new ArkStorageLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function StoragePropExample(/**/ /** @memo */ -style?: (instance: ArkStoragePropExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StoragePropExampleOptions): ArkStoragePropExampleComponent { +content?: () => void, initializers?: StoragePropExampleOptions): void { const updatedInitializers: StoragePropExampleOptions = { __backing_prop: initializers?.__backing_prop }; - return ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, updatedInitializers); + ArkStoragePropExampleComponent._instantiate(style, () => new ArkStoragePropExampleComponent, content, updatedInitializers); } /** @memo */ -export function CustomDialogExampleImpl(initializers?: CustomDialogExampleOptions): ArkCustomDialogExampleComponent { +export function CustomDialogExampleImpl(initializers?: CustomDialogExampleOptions): void { const updatedInitializers: CustomDialogExampleOptions = { controller: initializers?.controller }; - return ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, updatedInitializers); + ArkCustomDialogExampleComponent._instantiate(undefined, () => new ArkCustomDialogExampleComponent, undefined, updatedInitializers); } export function CustomDialogExample(initializer: Partial = {}) { return { build: bindCustomDialog(CustomDialogExampleImpl, initializer), buildOptions: initializer }; @@ -812,69 +865,87 @@ export function CustomDialogExample(initializer: Partial void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogControllerExampleOptions): ArkCustomDialogControllerExampleComponent { +content?: () => void, initializers?: CustomDialogControllerExampleOptions): void { const updatedInitializers: CustomDialogControllerExampleOptions = { dialogController: initializers?.dialogController }; - return ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, updatedInitializers); + ArkCustomDialogControllerExampleComponent._instantiate(style, () => new ArkCustomDialogControllerExampleComponent, content, updatedInitializers); } /** @memo */ export function ObjectLinkExample(/**/ /** @memo */ -style?: (instance: ArkObjectLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ObjectLinkExampleOptions): ArkObjectLinkExampleComponent { +content?: () => void, initializers?: ObjectLinkExampleOptions): void { const updatedInitializers: ObjectLinkExampleOptions = { a: initializers?.a, __backing_a: initializers?.__backing_a }; - return ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, updatedInitializers); + ArkObjectLinkExampleComponent._instantiate(style, () => new ArkObjectLinkExampleComponent, content, updatedInitializers); } /** @memo */ export function ObjectLinkExampleParent(/**/ /** @memo */ -style?: (instance: ArkObjectLinkExampleParentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ObjectLinkExampleParentOptions): ArkObjectLinkExampleParentComponent { +content?: () => void, initializers?: ObjectLinkExampleParentOptions): void { const updatedInitializers: ObjectLinkExampleParentOptions = { __backing_a: initializers?.__backing_a }; - return ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, updatedInitializers); + ArkObjectLinkExampleParentComponent._instantiate(style, () => new ArkObjectLinkExampleParentComponent, content, updatedInitializers); } /** @memo */ export function PlainPropertyExample(/**/ /** @memo */ -style?: (instance: ArkPlainPropertyExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PlainPropertyExampleOptions): ArkPlainPropertyExampleComponent { +content?: () => void, initializers?: PlainPropertyExampleOptions): void { const updatedInitializers: PlainPropertyExampleOptions = { field: initializers?.field }; - return ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, updatedInitializers); + ArkPlainPropertyExampleComponent._instantiate(style, () => new ArkPlainPropertyExampleComponent, content, updatedInitializers); } /** @memo */ export function CallExample(/**/ /** @memo */ -style?: (instance: ArkCallExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CallExampleOptions): ArkCallExampleComponent { +content?: () => void, initializers?: CallExampleOptions): void { const updatedInitializers: CallExampleOptions = { __backing_state: initializers?.__backing_state }; - return ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, updatedInitializers); + ArkCallExampleComponent._instantiate(style, () => new ArkCallExampleComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); +} +/** @memo */ +export function BuilderPropagationExample(/**/ +/** @memo */ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ +/** @memo */ +content?: () => void, initializers?: BuilderPropagationExampleOptions): void { + const updatedInitializers: BuilderPropagationExampleOptions = {}; + ArkBuilderPropagationExampleComponent._instantiate(style, () => new ArkBuilderPropagationExampleComponent, content, updatedInitializers); +} +/** @memo */ +export function ChildWithBuilder(/**/ +/** @memo */ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ +/** @memo */ +content?: () => void, initializers?: ChildWithBuilderOptions): void { + const updatedInitializers: ChildWithBuilderOptions = {}; + ArkChildWithBuilderComponent._instantiate(style, () => new ArkChildWithBuilderComponent, content, updatedInitializers); } export interface EntryExampleOptions { } @@ -960,3 +1031,7 @@ export interface ChildOptions { __backing_counter?: MutableState; counter?: number; } +export interface BuilderPropagationExampleOptions { +} +export interface ChildWithBuilderOptions { +} diff --git a/arkoala/ets-plugin/test/golden/koala/ets/Rewrite2.ts b/arkoala/ets-plugin/test/golden/koala/ets/Rewrite2.ts index 3968c7ada..3037d71f7 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/Rewrite2.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/Rewrite2.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -32,24 +32,24 @@ class ArkLocalStorageLinkExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageLinkExampleOptions) { - ArkText(undefined, undefined, "LocalStorage entry = " + storage.get("storage")); + ArkText(__builder, undefined, "LocalStorage entry = " + storage.get("storage")); } } /** @memo */ export function LocalStorageLinkExample(/**/ /** @memo */ -style?: (instance: ArkLocalStorageLinkExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageLinkExampleOptions): ArkLocalStorageLinkExampleComponent { +content?: () => void, initializers?: LocalStorageLinkExampleOptions): void { const updatedInitializers: LocalStorageLinkExampleOptions = { __backing_link: initializers?.__backing_link }; - return ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, updatedInitializers); + ArkLocalStorageLinkExampleComponent._instantiate(style, () => new ArkLocalStorageLinkExampleComponent, content, updatedInitializers); } export interface LocalStorageLinkExampleOptions { __backing_link?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/ets/Rewrite3.ts b/arkoala/ets-plugin/test/golden/koala/ets/Rewrite3.ts index d0c507dc8..79fb337aa 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/Rewrite3.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/Rewrite3.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; /* @@ -35,9 +35,9 @@ class ArkLocalStoragePropExampleComponent extends ArkStructBase(this._entry_local_storage_, "storage", "Start").value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStoragePropExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStoragePropExampleOptions) { } @@ -45,13 +45,13 @@ class ArkLocalStoragePropExampleComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStoragePropExampleOptions): ArkLocalStoragePropExampleComponent { +content?: () => void, initializers?: LocalStoragePropExampleOptions): void { const updatedInitializers: LocalStoragePropExampleOptions = { __backing_prop: initializers?.__backing_prop }; - return ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, updatedInitializers); + ArkLocalStoragePropExampleComponent._instantiate(style, () => new ArkLocalStoragePropExampleComponent, content, updatedInitializers); } export interface LocalStoragePropExampleOptions { __backing_prop?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/koala/ets/builder-lambda/builder-lambda.ts b/arkoala/ets-plugin/test/golden/koala/ets/builder-lambda/builder-lambda.ts index 6f1672e6d..86aeed5e2 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/builder-lambda/builder-lambda.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/builder-lambda/builder-lambda.ts @@ -16,7 +16,7 @@ declare function Foo(arg1: string): FooAttribute; function _Foo(builder: (instance) => FooAttribute, arg1: string): void { builder(new FooAttribute()); } -_Foo(instance => { - instance.bar() +_Foo(__instance => { + __instance.bar() .qux(); }, "label"); diff --git a/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/ets-call.ts b/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/ets-call.ts index 1046f503e..0a892fdf0 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/ets-call.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/ets-call.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkColumn, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkColumn, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/user-function-declaration.ts b/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/user-function-declaration.ts index 8254adc8d..7595007a0 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/user-function-declaration.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/ets-component-call/user-function-declaration.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; /* * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,9 +34,9 @@ export class ArkStructComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StructOptions) { } } @@ -71,9 +71,9 @@ export class ArkStructWithContentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StructWithContentOptions) { this.content(); @@ -82,25 +82,25 @@ export class ArkStructWithContentComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StructOptions): ArkStructComponent { +content?: () => void, initializers?: StructOptions): void { const updatedInitializers: StructOptions = { param: initializers?.param }; - return ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, updatedInitializers); + ArkStructComponent._instantiate(style, () => new ArkStructComponent, content, updatedInitializers); } /** @memo */ export function StructWithContent(/**/ /** @memo */ -style?: (instance: ArkStructWithContentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StructWithContentOptions): ArkStructWithContentComponent { +content?: () => void, initializers?: StructWithContentOptions): void { const updatedInitializers: StructWithContentOptions = { param: initializers?.param, content: initializers?.content }; - return ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, updatedInitializers); + ArkStructWithContentComponent._instantiate(style, () => new ArkStructWithContentComponent, content, updatedInitializers); } export interface StructOptions { param?: number; diff --git a/arkoala/ets-plugin/test/golden/koala/ets/trailing-block.ts b/arkoala/ets-plugin/test/golden/koala/ets/trailing-block.ts index ee397865f..50147adef 100644 --- a/arkoala/ets-plugin/test/golden/koala/ets/trailing-block.ts +++ b/arkoala/ets-plugin/test/golden/koala/ets/trailing-block.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; class ArkParentStructComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -6,12 +6,12 @@ class ArkParentStructComponent extends ArkStructBase void, initializers?: ParentStructOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentStructComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentStructOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ChildStruct(undefined, () => { ArkText(undefined, undefined, "xxx"); }); @@ -41,9 +41,9 @@ class ArkChildStructComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildStructOptions) { this.content(); @@ -52,22 +52,22 @@ class ArkChildStructComponent extends ArkStructBase void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentStructOptions): ArkParentStructComponent { +content?: () => void, initializers?: ParentStructOptions): void { const updatedInitializers: ParentStructOptions = {}; - return ArkParentStructComponent._instantiate(style, () => new ArkParentStructComponent, content, updatedInitializers); + ArkParentStructComponent._instantiate(style, () => new ArkParentStructComponent, content, updatedInitializers); } /** @memo */ export function ChildStruct(/**/ /** @memo */ -style?: (instance: ArkChildStructComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildStructOptions): ArkChildStructComponent { +content?: () => void, initializers?: ChildStructOptions): void { const updatedInitializers: ChildStructOptions = { content: initializers?.content }; - return ArkChildStructComponent._instantiate(style, () => new ArkChildStructComponent, content, updatedInitializers); + ArkChildStructComponent._instantiate(style, () => new ArkChildStructComponent, content, updatedInitializers); } export interface ParentStructOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@builder.ts b/arkoala/ets-plugin/test/golden/koala/spec/@builder.ts index 6e3e14c00..c752a4be5 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@builder.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@builder.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkDivider, ArkDividerComponent, ArkFlex, ArkFlexComponent, ArkList, ArkListComponent, ArkListItem, ArkListItemComponent, ArkNavigation, ArkNavigationComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkFlex, ArkFlexComponent, ArkList, ArkListComponent, ArkListItem, ArkListItemComponent, ArkNavigation, ArkNavigationComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -47,57 +47,57 @@ class ArkMyComponentComponent extends ArkStructBase { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, "文本"); } /** @memo */ NavigationTitlePara(label: string) { ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(80) + ArkText((__instance: ArkTextComponent) => { + __instance.width(80) .bindMenu(this.textBuilder); }, undefined, label); }); } /** @memo */ MenuBuilder() { - ArkFlex((instance: ArkFlexComponent) => { - instance.width(100); + ArkFlex((__instance: ArkFlexComponent) => { + __instance.width(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'Test menu item 1'); - ArkDivider((instance: ArkDividerComponent) => { - instance.height(10); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.height(10); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'Test menu item 2'); }, { direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkMyComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkColumn(__builder, () => { + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindMenu(/* */ /** @memo */ (): void => this.NavigationTitlePara("111")); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkText((__instance: ArkTextComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); }); }, undefined, "Drag Me"); specificParam('test1', 'test2'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindPopup(false, { builder: this.MenuBuilder, onStateChange: (e) => { @@ -109,17 +109,17 @@ class ArkMyComponentComponent extends ArkStructBase { ArkText(undefined, undefined, 'Test Text'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10) + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10) .bindContextMenu(this.MenuBuilder, ResponseType.RightClick); }, () => { ArkText(undefined, undefined, 'rightclick for menu'); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10); + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10); }, () => { - ArkNavigation((instance: ArkNavigationComponent) => { - instance.title(noParam) + ArkNavigation((__instance: ArkNavigationComponent) => { + __instance.title(noParam) .menus(this.textBuilder) .toolBar({ items: [ { value: 'app', text: 'Grid', action: () => { @@ -134,18 +134,18 @@ class ArkMyComponentComponent extends ArkStructBase { - ArkList((instance: ArkListComponent) => { - instance.listDirection(Axis.Vertical) + ArkList((__instance: ArkListComponent) => { + __instance.listDirection(Axis.Vertical) .height(300) .margin({ top: 10, left: 18 }) .width('100%'); }, () => { ForEach(this.arr, (item) => { - ArkListItem((instance: ArkListItemComponent) => { - instance.editable(true); + ArkListItem((__instance: ArkListItemComponent) => { + __instance.editable(true); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('90%') + ArkText((__instance: ArkTextComponent) => { + __instance.width('90%') .height(80) .backgroundColor('#3366CC') .borderRadius(15) @@ -155,37 +155,37 @@ class ArkMyComponentComponent extends ArkStructBase item); }, { space: 5, initialIndex: 0 }); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.hideBar = !this.hideBar; }) .margin({ left: 135, top: 60 }); }, undefined, this.hideBar ? "tool bar" : "hide bar"); }); }); - ArkRow((instance: ArkRowComponent) => { - instance.padding(10); + ArkRow((__instance: ArkRowComponent) => { + __instance.padding(10); }, () => { ArkTabs(undefined, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('pink'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('pink'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Pink); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Pink); }, undefined, '111'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('yellow'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('yellow'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Yellow); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Yellow); }, undefined, '222'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('blue'); + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('blue'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Blue); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Blue); }, undefined, '333'); }); }, { barPosition: BarPosition.Start, controller: this.controller }); @@ -197,15 +197,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { arr: initializers?.arr, controller: initializers?.controller, __backing_hideBar: initializers?.__backing_hideBar }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { arr?: number[]; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@builderParam.ts b/arkoala/ets-plugin/test/golden/koala/spec/@builderParam.ts index a82e004d7..5573617f3 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@builderParam.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@builderParam.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -56,12 +56,12 @@ class ArkCustomContainerComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.header); this.content(); this.callContent(); @@ -100,12 +100,12 @@ class ArkCustomContainer2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainer2Options) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.header); this.content(); }); @@ -114,11 +114,11 @@ class ArkCustomContainer2Component extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label1); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label2); }); } @@ -139,32 +139,32 @@ class ArkCustomContainerUserComponent extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, "content"); }); } /** @memo */ callSpecificParam(label1: string, label2: string) { ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label1); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, label2); }); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCustomContainerUserComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerUserOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CustomContainerExport(undefined, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.onClick(() => { + ArkColumn((__instance: ArkColumnComponent) => { + __instance.onClick(() => { this.text = "changeHeader"; }); }, () => { @@ -185,8 +185,8 @@ class ArkCustomContainerUserComponent extends ArkStructBase { CustomContainer2(undefined, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.onClick(() => { + ArkColumn((__instance: ArkColumnComponent) => { + __instance.onClick(() => { this.text = "changeHeader"; }); }, () => { @@ -203,39 +203,39 @@ export {}; /** @memo */ export function CustomContainer(/**/ /** @memo */ -style?: (instance: ArkCustomContainerComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerOptions): ArkCustomContainerComponent { +content?: () => void, initializers?: CustomContainerOptions): void { const updatedInitializers: CustomContainerOptions = { header: initializers?.header, content: initializers?.content, callContent: initializers?.callContent, footer: initializers?.footer }; - return ArkCustomContainerComponent._instantiate(style, () => new ArkCustomContainerComponent, content, updatedInitializers); + ArkCustomContainerComponent._instantiate(style, () => new ArkCustomContainerComponent, content, updatedInitializers); } /** @memo */ export function CustomContainer2(/**/ /** @memo */ -style?: (instance: ArkCustomContainer2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainer2Options): ArkCustomContainer2Component { +content?: () => void, initializers?: CustomContainer2Options): void { const updatedInitializers: CustomContainer2Options = { header: initializers?.header, content: initializers?.content }; - return ArkCustomContainer2Component._instantiate(style, () => new ArkCustomContainer2Component, content, updatedInitializers); + ArkCustomContainer2Component._instantiate(style, () => new ArkCustomContainer2Component, content, updatedInitializers); } /** @memo */ export function CustomContainerUser(/**/ /** @memo */ -style?: (instance: ArkCustomContainerUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerUserOptions): ArkCustomContainerUserComponent { +content?: () => void, initializers?: CustomContainerUserOptions): void { const updatedInitializers: CustomContainerUserOptions = { __backing_text: initializers?.__backing_text }; - return ArkCustomContainerUserComponent._instantiate(style, () => new ArkCustomContainerUserComponent, content, updatedInitializers); + ArkCustomContainerUserComponent._instantiate(style, () => new ArkCustomContainerUserComponent, content, updatedInitializers); } export interface CustomContainerOptions { header?: string; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@builderWithComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/@builderWithComponent.ts index c4a10074f..a9fb2d6ff 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@builderWithComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@builderWithComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; /** @memo */ function myBuilder() { @@ -15,12 +15,12 @@ class ArkIndexComponent extends ArkStructBase { child(undefined, undefined); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { myBuilder(); this.Builder1(); child(undefined, undefined); @@ -34,32 +34,32 @@ class ArkchildComponent extends ArkStructBase { content?: () => void, initializers?: childOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkText(undefined, undefined, 'Hello'); + ArkText(__builder, undefined, 'Hello'); } } export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = {}; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = {}; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface IndexOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@builderWithForEach.ts b/arkoala/ets-plugin/test/golden/koala/spec/@builderWithForEach.ts index 302292393..e58692b6f 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@builderWithForEach.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@builderWithForEach.ts @@ -1,11 +1,13 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; /** @memo */ function ComB(param: string[]) { ForEach(param, item => { - ComA(undefined, undefined).backgroundColor('red'); + ComA((__instance: ArkCommonMethodComponent) => { + __instance.backgroundColor('red'); + }, undefined); }); } class ArkIndexComponent extends ArkStructBase { @@ -23,12 +25,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_arr!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ComB(this.arr); }); } @@ -40,14 +42,14 @@ class ArkComAComponent extends ArkStructBase { content?: () => void, initializers?: ComAOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkComAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ComAOptions) { - ArkRow(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkRow(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '自定义组件'); }); } @@ -56,22 +58,22 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function ComA(/**/ /** @memo */ -style?: (instance: ArkComAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ComAOptions): ArkComAComponent { +content?: () => void, initializers?: ComAOptions): void { const updatedInitializers: ComAOptions = {}; - return ArkComAComponent._instantiate(style, () => new ArkComAComponent, content, updatedInitializers); + ArkComAComponent._instantiate(style, () => new ArkComAComponent, content, updatedInitializers); } export interface IndexOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@builderWithLinkData.ts b/arkoala/ets-plugin/test/golden/koala/spec/@builderWithLinkData.ts index 9fe652537..22f26f0d5 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@builderWithLinkData.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@builderWithLinkData.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -17,12 +17,12 @@ class ArkTitleCompComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TitleCompOptions) { - ArkText(undefined, undefined, this.title); + ArkText(__builder, undefined, this.title); } } class ArkTestPageComponent extends ArkStructBase { @@ -44,12 +44,12 @@ class ArkTestPageComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestPageOptions) { - ArkFlex(undefined, () => { + ArkFlex(__builder, () => { this.TitleCompView(); }); } @@ -58,24 +58,24 @@ export {}; /** @memo */ export function TitleComp(/**/ /** @memo */ -style?: (instance: ArkTitleCompComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TitleCompOptions): ArkTitleCompComponent { +content?: () => void, initializers?: TitleCompOptions): void { const updatedInitializers: TitleCompOptions = { __backing_title: initializers?.__backing_title }; - return ArkTitleCompComponent._instantiate(style, () => new ArkTitleCompComponent, content, updatedInitializers); + ArkTitleCompComponent._instantiate(style, () => new ArkTitleCompComponent, content, updatedInitializers); } /** @memo */ export function TestPage(/**/ /** @memo */ -style?: (instance: ArkTestPageComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestPageOptions): ArkTestPageComponent { +content?: () => void, initializers?: TestPageOptions): void { const updatedInitializers: TestPageOptions = { __backing_value: initializers?.__backing_value }; - return ArkTestPageComponent._instantiate(style, () => new ArkTestPageComponent, content, updatedInitializers); + ArkTestPageComponent._instantiate(style, () => new ArkTestPageComponent, content, updatedInitializers); } export interface TitleCompOptions { __backing_title?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@consume_@provide.ts b/arkoala/ets-plugin/test/golden/koala/spec/@consume_@provide.ts index c6e4e0e1b..dd8e07ae1 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@consume_@provide.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@consume_@provide.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState, contextLocal } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,20 +17,20 @@ class ArkCompAComponent extends ArkStructBase { this.__backing_reviewVotes!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompAOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CompB(undefined, undefined); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.reviewVotes += 1; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '' + this.reviewVotes); }); }); @@ -43,12 +43,12 @@ class ArkCompBComponent extends ArkStructBase { content?: () => void, initializers?: CompBOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompBOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { CompC(undefined, undefined); }); } @@ -68,19 +68,19 @@ class ArkCompCComponent extends ArkStructBase { this.__backing_reviewVotes!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompCComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompCOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.reviewVotes += 1; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(30); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(30); }, undefined, '' + this.reviewVotes); }); }); @@ -90,35 +90,35 @@ export {}; /** @memo */ export function CompA(/**/ /** @memo */ -style?: (instance: ArkCompAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompAOptions): ArkCompAComponent { +content?: () => void, initializers?: CompAOptions): void { const __provide_reviewVote = contextLocalStateOf("reviewVote", () => 0); const updatedInitializers: CompAOptions = { __backing_reviewVotes: __provide_reviewVote }; - return ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); + ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); } /** @memo */ export function CompB(/**/ /** @memo */ -style?: (instance: ArkCompBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompBOptions): ArkCompBComponent { +content?: () => void, initializers?: CompBOptions): void { const updatedInitializers: CompBOptions = {}; - return ArkCompBComponent._instantiate(style, () => new ArkCompBComponent, content, updatedInitializers); + ArkCompBComponent._instantiate(style, () => new ArkCompBComponent, content, updatedInitializers); } /** @memo */ export function CompC(/**/ /** @memo */ -style?: (instance: ArkCompCComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompCOptions): ArkCompCComponent { +content?: () => void, initializers?: CompCOptions): void { const __consume_reviewVote = contextLocal("reviewVote") as MutableState; const updatedInitializers: CompCOptions = { __backing_reviewVotes: __consume_reviewVote }; - return ArkCompCComponent._instantiate(style, () => new ArkCompCComponent, content, updatedInitializers); + ArkCompCComponent._instantiate(style, () => new ArkCompCComponent, content, updatedInitializers); } export interface CompAOptions { __backing_reviewVotes?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@customDialog.ts b/arkoala/ets-plugin/test/golden/koala/spec/@customDialog.ts index 620ea6504..54ea0577c 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@customDialog.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@customDialog.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, bindCustomDialog, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, bindCustomDialog, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -67,35 +67,35 @@ class ArkDialogExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DialogExampleOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.count++; }); }, undefined, 'current count is: ' + this.count); }); ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.isPlaying = !this.isPlaying; }); }, undefined, this.isPlaying ? 'play' : 'pause'); }); ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.action1(); }); }, undefined, "Option A"); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.action2(47, "Option B is great choice"); }); @@ -151,26 +151,26 @@ class ArkCustomDialogUserComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogUserOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'current countInitValue is: ' + this.countInitValue); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'current playingInitValue is: ' + this.playingInitValue); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.countInitValue--; this.dialogController.open(); }); }, undefined, "Click to open Dialog -1"); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.countInitValue++; this.dialogController.close(); }); @@ -180,7 +180,7 @@ class ArkCustomDialogUserComponent extends ArkStructBase new ArkDialogExampleComponent, undefined, updatedInitializers); + ArkDialogExampleComponent._instantiate(undefined, () => new ArkDialogExampleComponent, undefined, updatedInitializers); } export function DialogExample(initializer: Partial = {}) { return { build: bindCustomDialog(DialogExampleImpl, initializer), buildOptions: initializer }; @@ -198,15 +198,15 @@ export function DialogExample(initializer: Partial = /** @memo */ export function CustomDialogUser(/**/ /** @memo */ -style?: (instance: ArkCustomDialogUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogUserOptions): ArkCustomDialogUserComponent { +content?: () => void, initializers?: CustomDialogUserOptions): void { const updatedInitializers: CustomDialogUserOptions = { __backing_countInitValue: initializers?.__backing_countInitValue, __backing_playingInitValue: initializers?.__backing_playingInitValue, dialogController: initializers?.dialogController }; - return ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); + ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); } export interface DialogExampleOptions { __backing_count?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@link.ts b/arkoala/ets-plugin/test/golden/koala/spec/@link.ts index e9f4a4455..122231762 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@link.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@link.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -17,12 +17,12 @@ class ArkLinkComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponentOptions) { - ArkText(undefined, undefined, this.counter); + ArkText(__builder, undefined, this.counter); } } class ArkParentComponentComponent extends ArkStructBase { @@ -40,12 +40,12 @@ class ArkParentComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { LinkComponent(undefined, undefined, { __backing_counter: this.__backing_value } as LinkComponentOptions); }); } @@ -54,24 +54,24 @@ export {}; /** @memo */ export function LinkComponent(/**/ /** @memo */ -style?: (instance: ArkLinkComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponentOptions): ArkLinkComponentComponent { +content?: () => void, initializers?: LinkComponentOptions): void { const updatedInitializers: LinkComponentOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkLinkComponentComponent._instantiate(style, () => new ArkLinkComponentComponent, content, updatedInitializers); + ArkLinkComponentComponent._instantiate(style, () => new ArkLinkComponentComponent, content, updatedInitializers); } /** @memo */ export function ParentComponent(/**/ /** @memo */ -style?: (instance: ArkParentComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentComponentOptions): ArkParentComponentComponent { +content?: () => void, initializers?: ParentComponentOptions): void { const updatedInitializers: ParentComponentOptions = { __backing_value: initializers?.__backing_value }; - return ArkParentComponentComponent._instantiate(style, () => new ArkParentComponentComponent, content, updatedInitializers); + ArkParentComponentComponent._instantiate(style, () => new ArkParentComponentComponent, content, updatedInitializers); } export interface LinkComponentOptions { __backing_counter?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@objectLink.ts b/arkoala/ets-plugin/test/golden/koala/spec/@objectLink.ts index 2e1c13d95..87defb14f 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@objectLink.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@objectLink.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -31,12 +31,12 @@ class ArkCustomTextComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomTextOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, this.model.text); }); } @@ -64,12 +64,12 @@ class ArkParentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ForEach(this.models, (item) => { CustomText(undefined, undefined, { model: item } as CustomTextOptions); }, (item) => item.text); @@ -80,26 +80,26 @@ export {}; /** @memo */ export function CustomText(/**/ /** @memo */ -style?: (instance: ArkCustomTextComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomTextOptions): ArkCustomTextComponent { +content?: () => void, initializers?: CustomTextOptions): void { const updatedInitializers: CustomTextOptions = { model: initializers?.model, __backing_model: initializers?.__backing_model }; - return ArkCustomTextComponent._instantiate(style, () => new ArkCustomTextComponent, content, updatedInitializers); + ArkCustomTextComponent._instantiate(style, () => new ArkCustomTextComponent, content, updatedInitializers); } /** @memo */ export function Parent(/**/ /** @memo */ -style?: (instance: ArkParentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentOptions): ArkParentComponent { +content?: () => void, initializers?: ParentOptions): void { const updatedInitializers: ParentOptions = { nextId: initializers?.nextId, __backing_models: initializers?.__backing_models }; - return ArkParentComponent._instantiate(style, () => new ArkParentComponent, content, updatedInitializers); + ArkParentComponent._instantiate(style, () => new ArkParentComponent, content, updatedInitializers); } export interface CustomTextOptions { __backing_model?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@observed_@objectLink.ts b/arkoala/ets-plugin/test/golden/koala/spec/@observed_@objectLink.ts index 02f6acefb..83e242ef6 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@observed_@objectLink.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@observed_@objectLink.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -38,12 +38,12 @@ class ArkViewAComponent extends ArkStructBase { this.__backing_varA?.update(initializers?.varA); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewAOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, 'ViewA-' + this.varA.id); }); } @@ -63,12 +63,12 @@ class ArkViewBComponent extends ArkStructBase { this.__backing_varB!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewBOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkRow(undefined, () => { ViewA(undefined, undefined, { varA: this.varB.a } as ViewAOptions); ArkText(undefined, undefined, 'ViewB'); @@ -80,25 +80,25 @@ export {}; /** @memo */ export function ViewA(/**/ /** @memo */ -style?: (instance: ArkViewAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewAOptions): ArkViewAComponent { +content?: () => void, initializers?: ViewAOptions): void { const updatedInitializers: ViewAOptions = { varA: initializers?.varA, __backing_varA: initializers?.__backing_varA }; - return ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); + ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); } /** @memo */ export function ViewB(/**/ /** @memo */ -style?: (instance: ArkViewBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewBOptions): ArkViewBComponent { +content?: () => void, initializers?: ViewBOptions): void { const updatedInitializers: ViewBOptions = { __backing_varB: initializers?.__backing_varB }; - return ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); + ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); } export interface ViewAOptions { __backing_varA?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@preview.ts b/arkoala/ets-plugin/test/golden/koala/spec/@preview.ts index 4c79685f6..d7749bd3a 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@preview.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@preview.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkHomePreviewComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,13 +15,16 @@ class ArkHomePreviewComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomePreviewComponentOptions) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText(__instance => { + { + __instance.fontSize(50); + } + __builder?.(__instance); }, undefined, this.value); } } @@ -32,12 +35,12 @@ class ArkHomePreviewComponent_PreviewComponent extends ArkStructBase void, initializers?: HomePreviewComponent_PreviewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkHomePreviewComponent_PreviewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomePreviewComponent_PreviewOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { HomePreviewComponent(undefined, undefined); }); } @@ -46,22 +49,22 @@ export {}; /** @memo */ export function HomePreviewComponent(/**/ /** @memo */ -style?: (instance: ArkHomePreviewComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomePreviewComponentOptions): ArkHomePreviewComponentComponent { +content?: () => void, initializers?: HomePreviewComponentOptions): void { const updatedInitializers: HomePreviewComponentOptions = { value: initializers?.value }; - return ArkHomePreviewComponentComponent._instantiate(style, () => new ArkHomePreviewComponentComponent, content, updatedInitializers); + ArkHomePreviewComponentComponent._instantiate(style, () => new ArkHomePreviewComponentComponent, content, updatedInitializers); } /** @memo */ export function HomePreviewComponent_Preview(/**/ /** @memo */ -style?: (instance: ArkHomePreviewComponent_PreviewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomePreviewComponent_PreviewOptions): ArkHomePreviewComponent_PreviewComponent { +content?: () => void, initializers?: HomePreviewComponent_PreviewOptions): void { const updatedInitializers: HomePreviewComponent_PreviewOptions = {}; - return ArkHomePreviewComponent_PreviewComponent._instantiate(style, () => new ArkHomePreviewComponent_PreviewComponent, content, updatedInitializers); + ArkHomePreviewComponent_PreviewComponent._instantiate(style, () => new ArkHomePreviewComponent_PreviewComponent, content, updatedInitializers); } export interface HomePreviewComponentOptions { value?: string; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@prop.ts b/arkoala/ets-plugin/test/golden/koala/spec/@prop.ts index ecb61aeac..1f4a2d20a 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@prop.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@prop.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -21,9 +21,9 @@ class ArkCustomXComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomXOptions) { } @@ -43,12 +43,12 @@ class ArkCustomYComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomYOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { CustomX(undefined, undefined, { fruit: this.parentFruit } as CustomXOptions); CustomX(undefined, undefined, {} as CustomXOptions); }); @@ -58,25 +58,25 @@ export {}; /** @memo */ export function CustomX(/**/ /** @memo */ -style?: (instance: ArkCustomXComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomXOptions): ArkCustomXComponent { +content?: () => void, initializers?: CustomXOptions): void { const updatedInitializers: CustomXOptions = { fruit: initializers?.fruit, __backing_fruit: initializers?.__backing_fruit }; - return ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); + ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); } /** @memo */ export function CustomY(/**/ /** @memo */ -style?: (instance: ArkCustomYComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomYOptions): ArkCustomYComponent { +content?: () => void, initializers?: CustomYOptions): void { const updatedInitializers: CustomYOptions = { __backing_parentFruit: initializers?.__backing_parentFruit }; - return ArkCustomYComponent._instantiate(style, () => new ArkCustomYComponent, content, updatedInitializers); + ArkCustomYComponent._instantiate(style, () => new ArkCustomYComponent, content, updatedInitializers); } export interface CustomXOptions { __backing_fruit?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@propComplexType.ts b/arkoala/ets-plugin/test/golden/koala/spec/@propComplexType.ts index 82ba90ad5..770a4cf40 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@propComplexType.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@propComplexType.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -33,12 +33,12 @@ class ArkCustomXComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomXOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { ArkText(undefined, undefined, JSON.stringify(this.fruit.c)); }); } @@ -58,12 +58,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_arrA!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { CustomX(undefined, undefined, { fruit: this.arrA[0] } as CustomXOptions); CustomX(undefined, undefined, {} as CustomXOptions); }); @@ -73,25 +73,25 @@ export {}; /** @memo */ export function CustomX(/**/ /** @memo */ -style?: (instance: ArkCustomXComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomXOptions): ArkCustomXComponent { +content?: () => void, initializers?: CustomXOptions): void { const updatedInitializers: CustomXOptions = { fruit: initializers?.fruit, __backing_fruit: initializers?.__backing_fruit }; - return ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); + ArkCustomXComponent._instantiate(style, () => new ArkCustomXComponent, content, updatedInitializers); } /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_arrA: initializers?.__backing_arrA }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface CustomXOptions { __backing_fruit?: SyncedProperty; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@state.ts b/arkoala/ets-plugin/test/golden/koala/spec/@state.ts index e045bf354..d00ef32c6 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@state.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@state.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,12 +17,12 @@ class ArkStatePageComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StatePageOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, "counter:" + this.counter); }); } @@ -31,13 +31,13 @@ export {}; /** @memo */ export function StatePage(/**/ /** @memo */ -style?: (instance: ArkStatePageComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StatePageOptions): ArkStatePageComponent { +content?: () => void, initializers?: StatePageOptions): void { const updatedInitializers: StatePageOptions = { __backing_counter: initializers?.__backing_counter }; - return ArkStatePageComponent._instantiate(style, () => new ArkStatePageComponent, content, updatedInitializers); + ArkStatePageComponent._instantiate(style, () => new ArkStatePageComponent, content, updatedInitializers); } export interface StatePageOptions { __backing_counter?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@storageLink.ts b/arkoala/ets-plugin/test/golden/koala/spec/@storageLink.ts index da4ba4270..a0ff453ab 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@storageLink.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@storageLink.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -42,19 +42,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -71,15 +71,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@storageProp.ts b/arkoala/ets-plugin/test/golden/koala/spec/@storageProp.ts index b25734bb2..488a2cd88 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@storageProp.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@storageProp.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -42,19 +42,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -71,15 +71,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@styles.ts b/arkoala/ets-plugin/test/golden/koala/spec/@styles.ts index 5e2a33d2e..c9a5b765b 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@styles.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@styles.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -23,24 +23,24 @@ class ArkFancyUseComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: FancyUseOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(100) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .width(100) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }) @@ -61,13 +61,13 @@ export {}; /** @memo */ export function FancyUse(/**/ /** @memo */ -style?: (instance: ArkFancyUseComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: FancyUseOptions): ArkFancyUseComponent { +content?: () => void, initializers?: FancyUseOptions): void { const updatedInitializers: FancyUseOptions = { __backing_enable: initializers?.__backing_enable }; - return ArkFancyUseComponent._instantiate(style, () => new ArkFancyUseComponent, content, updatedInitializers); + ArkFancyUseComponent._instantiate(style, () => new ArkFancyUseComponent, content, updatedInitializers); } export interface FancyUseOptions { __backing_enable?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@stylesExport.ts b/arkoala/ets-plugin/test/golden/koala/spec/@stylesExport.ts index b7b683c61..64d20e595 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@stylesExport.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@stylesExport.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -23,24 +23,24 @@ export class ArkFancyUseExpComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: FancyUseExpOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(100) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .width(100) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }) @@ -61,13 +61,13 @@ export {}; /** @memo */ export function FancyUseExp(/**/ /** @memo */ -style?: (instance: ArkFancyUseExpComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: FancyUseExpOptions): ArkFancyUseExpComponent { +content?: () => void, initializers?: FancyUseExpOptions): void { const updatedInitializers: FancyUseExpOptions = { __backing_enable: initializers?.__backing_enable }; - return ArkFancyUseExpComponent._instantiate(style, () => new ArkFancyUseExpComponent, content, updatedInitializers); + ArkFancyUseExpComponent._instantiate(style, () => new ArkFancyUseExpComponent, content, updatedInitializers); } export interface FancyUseExpOptions { __backing_enable?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/@watch.ts b/arkoala/ets-plugin/test/golden/koala/spec/@watch.ts index a025253a9..baa7da551 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/@watch.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/@watch.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState, OnChange } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -68,29 +68,29 @@ class ArkCompAComponent extends ArkStructBase { this.updateTip(); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkCompAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CompAOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.shopBasket.push(Math.round(100 * Math.random())); }); }, undefined, "add to basket"); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'totalPurchase: ' + this.totalPurchase); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { let alList = 'abcdefghijklmnopqrstuvwxyz'; let ranItem = alList[Math.floor(Math.random() * 26)]; this.defArray.push(ranItem); }); }, undefined, "put item"); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'tips: ' + this.resultTip); }); } @@ -99,16 +99,16 @@ export {}; /** @memo */ export function CompA(/**/ /** @memo */ -style?: (instance: ArkCompAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CompAOptions): ArkCompAComponent { +content?: () => void, initializers?: CompAOptions): void { const updatedInitializers: CompAOptions = { __backing_shopBasket: initializers?.__backing_shopBasket, __backing_totalPurchase: initializers?.__backing_totalPurchase, __backing_defArray: initializers?.__backing_defArray, __backing_resultTip: initializers?.__backing_resultTip }; - return ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); + ArkCompAComponent._instantiate(style, () => new ArkCompAComponent, content, updatedInitializers); } export interface CompAOptions { __backing_shopBasket?: MutableState>; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/GridItem.ts b/arkoala/ets-plugin/test/golden/koala/spec/GridItem.ts index 764e970bf..86ee71ab6 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/GridItem.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/GridItem.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkGrid, ArkGridItem, ArkGridItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkGrid, ArkGridItem, ArkGridItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkParentViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,17 +7,17 @@ class ArkParentViewComponent extends ArkStructBase void, initializers?: ParentViewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentViewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkGrid(undefined, () => { - ArkGridItem((instance: ArkGridItemComponent) => { - instance.width(200).height(100); + ArkGrid(__builder, () => { + ArkGridItem((__instance: ArkGridItemComponent) => { + __instance.width(200).height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(100); + ArkText((__instance: ArkTextComponent) => { + __instance.width(100); }, undefined, 'xx'); }); }); @@ -27,11 +27,11 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = {}; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } export interface ParentViewOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/ListItem.ts b/arkoala/ets-plugin/test/golden/koala/spec/ListItem.ts index 1134d9738..4f429aab8 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/ListItem.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/ListItem.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkParentViewComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,17 +7,17 @@ class ArkParentViewComponent extends ArkStructBase void, initializers?: ParentViewOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkParentViewComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkList(undefined, () => { - ArkListItem((instance: ArkListItemComponent) => { - instance.width(200).height(100); + ArkList(__builder, () => { + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(200).height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(100); + ArkText((__instance: ArkTextComponent) => { + __instance.width(100); }, undefined, 'xx'); }, 'true'); }); @@ -27,11 +27,11 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = {}; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } export interface ParentViewOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/XComponentContainer.ts b/arkoala/ets-plugin/test/golden/koala/spec/XComponentContainer.ts index 7d8dcf239..4b4d0fb27 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/XComponentContainer.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/XComponentContainer.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkXComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkXComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkHomeComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,12 +7,12 @@ class ArkHomeComponentComponent extends ArkStructBase void, initializers?: HomeComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkHomeComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkXComponent(undefined, undefined, { id: '1', type: 'component' }); ArkXComponent(undefined, undefined, { id: '2', type: 1 }); ArkXComponent(undefined, undefined, { id: '3', type: XComponentType.COMPONENT }); @@ -23,11 +23,11 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = {}; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } export interface HomeComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/animatableExtend.ts b/arkoala/ets-plugin/test/golden/koala/spec/animatableExtend.ts index 7fe9d7350..e1b580331 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/animatableExtend.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/animatableExtend.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkPolyline, ArkPolylineComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkPolyline, ArkPolylineComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; function animatablePoints__Polyline(PolylineInstance: T, points: number): T { return PolylineInstance.strokeOpacity(points) @@ -22,20 +22,20 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { - ArkPolyline((instance: ArkPolylineComponent) => { - instance.__applyAnimatableExtend(animatablePoints__Polyline, this.points) + ArkColumn(__builder, () => { + ArkPolyline((__instance: ArkPolylineComponent) => { + __instance.__applyAnimatableExtend(animatablePoints__Polyline, this.points) .strokeWidth(3) .height(100) .width(100); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.__applyAnimatableExtend(attributeExtend__Text); + ArkText((__instance: ArkTextComponent) => { + __instance.__applyAnimatableExtend(attributeExtend__Text); }, undefined, "hello"); }); } @@ -44,13 +44,13 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { points: initializers?.points }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } export interface HomeComponentOptions { points?: number; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/animateTo.ts b/arkoala/ets-plugin/test/golden/koala/spec/animateTo.ts index a0d1f7b70..5b23df24b 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/animateTo.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/animateTo.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -81,16 +81,19 @@ class ArkTransitionExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TransitionExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(400).width("100%").padding({ top: 100 }); + ArkFlex(__instance => { + { + __instance.height(400).width("100%").padding({ top: 100 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { animateTo({ duration: 1000 }, () => { this.btn1 = !this.btn1; if (this.btn1) { @@ -103,14 +106,14 @@ class ArkTransitionExampleComponent extends ArkStructBase { - instance.width("80%").height(30) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width("80%").height(30) .transition({ type: TransitionType.Insert, scale: { x: 0, y: 1.0 } }) .transition({ type: TransitionType.Delete, scale: { x: 1.0, y: 0.0 } }); }, undefined); } - ArkButton((instance: ArkButtonComponent) => { - instance.width(this.btnW).height(this.btnH) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width(this.btnW).height(this.btnH) .onClick(() => { this.btnW += 50; }) @@ -122,12 +125,12 @@ class ArkTransitionExampleComponent extends ArkStructBase { - instance.width("100%") + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width("100%") .height("100%"); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.opacity(this.opacity1) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.opacity(this.opacity1) .backgroundColor(this.color) .animation({ duration: 1000 }) .width(this.width1) @@ -151,9 +154,9 @@ export {}; /** @memo */ export function TransitionExample(/**/ /** @memo */ -style?: (instance: ArkTransitionExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TransitionExampleOptions): ArkTransitionExampleComponent { +content?: () => void, initializers?: TransitionExampleOptions): void { const updatedInitializers: TransitionExampleOptions = { __backing_btnW: initializers?.__backing_btnW, __backing_btnH: initializers?.__backing_btnH, @@ -165,7 +168,7 @@ content?: () => void, initializers?: TransitionExampleOptions): ArkTransitionExa __backing_opacity1: initializers?.__backing_opacity1, __backing_borderRaius1: initializers?.__backing_borderRaius1 }; - return ArkTransitionExampleComponent._instantiate(style, () => new ArkTransitionExampleComponent, content, updatedInitializers); + ArkTransitionExampleComponent._instantiate(style, () => new ArkTransitionExampleComponent, content, updatedInitializers); } export interface TransitionExampleOptions { __backing_btnW?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/appStorage.ts b/arkoala/ets-plugin/test/golden/koala/spec/appStorage.ts index f2de5563b..c329f8c35 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/appStorage.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/appStorage.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -42,19 +42,19 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkRow(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkRow(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { AppStorage.Set('varA', AppStorage.Get('varA') + 1); }); }, undefined, this.label + ': ' + this.varA); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { if (this.lang === 'zh') { AppStorage.Set('languageCode', 'en'); } @@ -71,15 +71,15 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_varA: initializers?.__backing_varA, __backing_lang: initializers?.__backing_lang, label: initializers?.label }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_varA?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/button.ts b/arkoala/ets-plugin/test/golden/koala/spec/button.ts index 381e96394..7325b12e6 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/button.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/button.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkCommonMethodComponent, ArkFlex, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkButtonExampleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,29 +7,29 @@ class ArkButtonExampleComponent extends ArkStructBase void, initializers?: ButtonExampleOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkButtonExampleComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ButtonExampleOptions) { - ArkFlex(undefined, () => { + ArkFlex(__builder, () => { ArkFlex(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.borderRadius(8).backgroundColor(0x317aff).width(90); + ArkButton((__instance: ArkButtonComponent) => { + __instance.borderRadius(8).backgroundColor(0x317aff).width(90); }, undefined, 'Ok', { type: ButtonType.Normal, stateEffect: true }); - ArkButton((instance: ArkButtonComponent) => { - instance.borderRadius(8).backgroundColor(0x317aff).width(90); + ArkButton((__instance: ArkButtonComponent) => { + __instance.borderRadius(8).backgroundColor(0x317aff).width(90); }, () => { - ArkRow((instance: ArkRowComponent) => { - instance.alignItems(VerticalAlign.Center); + ArkRow((__instance: ArkRowComponent) => { + __instance.alignItems(VerticalAlign.Center); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(12).fontColor(0xffffff).margin({ left: 5, right: 12 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(12).fontColor(0xffffff).margin({ left: 5, right: 12 }); }, undefined, 'loading'); }); }, { type: ButtonType.Normal, stateEffect: true }); - ArkButton((instance: ArkButtonComponent) => { - instance.opacity(0.5) + ArkButton((__instance: ArkButtonComponent) => { + __instance.opacity(0.5) .borderRadius(8).backgroundColor(0x317aff).width(90); }, undefined, 'Disable', { type: ButtonType.Normal, stateEffect: false }); }, { alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -40,11 +40,11 @@ export {}; /** @memo */ export function ButtonExample(/**/ /** @memo */ -style?: (instance: ArkButtonExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ButtonExampleOptions): ArkButtonExampleComponent { +content?: () => void, initializers?: ButtonExampleOptions): void { const updatedInitializers: ButtonExampleOptions = {}; - return ArkButtonExampleComponent._instantiate(style, () => new ArkButtonExampleComponent, content, updatedInitializers); + ArkButtonExampleComponent._instantiate(style, () => new ArkButtonExampleComponent, content, updatedInitializers); } export interface ButtonExampleOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/component_object.ts b/arkoala/ets-plugin/test/golden/koala/spec/component_object.ts index 7964bda49..f24a2526e 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/component_object.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/component_object.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -29,12 +29,12 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_message2 = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { Child(undefined, undefined, { options, message1: this.message1, message2: this.message2 } as ChildOptions); Child2(undefined, undefined, options as Child2Options); }); @@ -77,12 +77,12 @@ class ArkChildComponent extends ArkStructBase { this.__backing_message2?.update(initializers?.message2); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.message1); }); } @@ -104,12 +104,12 @@ class ArkChild2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: Child2Options) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.message); }); } @@ -118,39 +118,39 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_message1: initializers?.__backing_message1, message2: initializers?.message2 }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = { options: initializers?.options, __backing_message1: initializers?.__backing_message1, message2: initializers?.message2, __backing_message2: initializers?.__backing_message2 }; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); } /** @memo */ export function Child2(/**/ /** @memo */ -style?: (instance: ArkChild2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: Child2Options): ArkChild2Component { +content?: () => void, initializers?: Child2Options): void { const updatedInitializers: Child2Options = { message: initializers?.message }; - return ArkChild2Component._instantiate(style, () => new ArkChild2Component, content, updatedInitializers); + ArkChild2Component._instantiate(style, () => new ArkChild2Component, content, updatedInitializers); } export interface IndexOptions { __backing_message1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/custom_component.ts b/arkoala/ets-plugin/test/golden/koala/spec/custom_component.ts index af59983ca..a91c846ce 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/custom_component.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/custom_component.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -7,24 +7,28 @@ class ArkMyComponentComponent extends ArkStructBase void, initializers?: MyComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkMyComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { Banner(undefined, undefined); - Banner(undefined, undefined) - .width(100); - Banner(undefined, undefined) - .width(100) - .height(200); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100); + }, undefined); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100) + .height(200); + }, undefined); Banner(undefined, undefined, { value: "Hello" } as BannerOptions); - Banner(undefined, undefined, { value: "Hello" } as BannerOptions) - .width(100); - Banner(undefined, undefined, { value: "Hello" } as BannerOptions) - .width(100) - .height(200); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100); + }, undefined, { value: "Hello" } as BannerOptions); + Banner((__instance: ArkCommonMethodComponent) => { + __instance.width(100) + .height(200); + }, undefined, { value: "Hello" } as BannerOptions); }); } } @@ -43,12 +47,12 @@ class ArkBannerComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BannerOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkText(undefined, undefined, this.value); }); } @@ -57,22 +61,22 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = {}; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } /** @memo */ export function Banner(/**/ /** @memo */ -style?: (instance: ArkBannerComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BannerOptions): ArkBannerComponent { +content?: () => void, initializers?: BannerOptions): void { const updatedInitializers: BannerOptions = { value: initializers?.value }; - return ArkBannerComponent._instantiate(style, () => new ArkBannerComponent, content, updatedInitializers); + ArkBannerComponent._instantiate(style, () => new ArkBannerComponent, content, updatedInitializers); } export interface MyComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/decoratorKeyCheck.ts b/arkoala/ets-plugin/test/golden/koala/spec/decoratorKeyCheck.ts index aec5cf338..eec3b45b9 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/decoratorKeyCheck.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/decoratorKeyCheck.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, AppStorageLinkState, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, contextLocalStateOf, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState, contextLocal } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -199,21 +199,21 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_StorageProp3?.update(AppStorageLinkState('StorageProp3', 'StorageProp3').value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow(undefined, undefined); + ArkRow(__builder, undefined); } } export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const __provide_stringVariable = contextLocalStateOf("stringVariable", () => 'Provide'); const __provide_Provide32 = contextLocalStateOf("Provide32", () => 'Provide3'); const __provide_Provide4 = contextLocalStateOf("Provide4", () => 'Provide4'); @@ -244,7 +244,7 @@ content?: () => void, initializers?: IndexOptions): ArkIndexComponent { __backing_Consume3: __consume_Consume3, __backing_Consume4: __consume_Consume4 }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { __backing_LocalStorageLink?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/forEachSecondFunction.ts b/arkoala/ets-plugin/test/golden/koala/spec/forEachSecondFunction.ts index 371a9ceec..f69dc7933 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/forEachSecondFunction.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/forEachSecondFunction.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkDivider, ArkDividerComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,25 +17,28 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width("100%").height("100%"); + ArkColumn(__instance => { + { + __instance.width("100%").height("100%"); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.arr.reverse(); }); }, undefined, 'Reverse Array'); ForEach(this.arr, ((item: number) => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(18); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(18); }, undefined, 'item'); - ArkDivider((instance: ArkDividerComponent) => { - instance.strokeWidth(2); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.strokeWidth(2); }, undefined); }), (item: number) => item.toString()); }, { space: 5 }); @@ -45,13 +48,13 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } export interface MyComponentOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/forEachTwo.ts b/arkoala/ets-plugin/test/golden/koala/spec/forEachTwo.ts index 9043c4edb..9cf833508 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/forEachTwo.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/forEachTwo.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -35,20 +35,23 @@ class ArkIndexComponent extends ArkStructBase { this.__backing_WIDTH_AND_HEIGHT!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkRow((instance: ArkRowComponent) => { - instance.height('100%'); + ArkRow(__instance => { + { + __instance.height('100%'); + } + __builder?.(__instance); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width('100%'); }, () => { ForEach(this.WIDTH_AND_HEIGHT, ({ w, h }) => { - ArkButton((instance: ArkButtonComponent) => { - instance.width(w) + ArkButton((__instance: ArkButtonComponent) => { + __instance.width(w) .height(h); }, undefined); }, item => item.toString()); @@ -60,13 +63,13 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { __backing_WIDTH_AND_HEIGHT: initializers?.__backing_WIDTH_AND_HEIGHT }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { __backing_WIDTH_AND_HEIGHT?: MutableState void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentViewOptions) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }); @@ -44,12 +44,12 @@ class ArkParentView1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView1Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }); @@ -71,12 +71,12 @@ class ArkParentView2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView2Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }, item => item.toString()); @@ -98,12 +98,12 @@ class ArkParentView3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView3Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, (item, index) => { ArkText(undefined, undefined, item); }, (item, index) => item.toString()); @@ -125,12 +125,12 @@ class ArkParentView4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView4Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }, (item, index) => item.toString()); @@ -152,12 +152,12 @@ class ArkParentView5Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ParentView5Options) { - ArkList(undefined, () => { + ArkList(__builder, () => { ForEach(this.arr, item => { ArkText(undefined, undefined, item); }, item => item.toString()); @@ -168,68 +168,68 @@ export {}; /** @memo */ export function ParentView(/**/ /** @memo */ -style?: (instance: ArkParentViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentViewOptions): ArkParentViewComponent { +content?: () => void, initializers?: ParentViewOptions): void { const updatedInitializers: ParentViewOptions = { __backing_arr: initializers?.__backing_arr }; - return ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); + ArkParentViewComponent._instantiate(style, () => new ArkParentViewComponent, content, updatedInitializers); } /** @memo */ export function ParentView1(/**/ /** @memo */ -style?: (instance: ArkParentView1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView1Options): ArkParentView1Component { +content?: () => void, initializers?: ParentView1Options): void { const updatedInitializers: ParentView1Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView1Component._instantiate(style, () => new ArkParentView1Component, content, updatedInitializers); + ArkParentView1Component._instantiate(style, () => new ArkParentView1Component, content, updatedInitializers); } /** @memo */ export function ParentView2(/**/ /** @memo */ -style?: (instance: ArkParentView2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView2Options): ArkParentView2Component { +content?: () => void, initializers?: ParentView2Options): void { const updatedInitializers: ParentView2Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView2Component._instantiate(style, () => new ArkParentView2Component, content, updatedInitializers); + ArkParentView2Component._instantiate(style, () => new ArkParentView2Component, content, updatedInitializers); } /** @memo */ export function ParentView3(/**/ /** @memo */ -style?: (instance: ArkParentView3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView3Options): ArkParentView3Component { +content?: () => void, initializers?: ParentView3Options): void { const updatedInitializers: ParentView3Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView3Component._instantiate(style, () => new ArkParentView3Component, content, updatedInitializers); + ArkParentView3Component._instantiate(style, () => new ArkParentView3Component, content, updatedInitializers); } /** @memo */ export function ParentView4(/**/ /** @memo */ -style?: (instance: ArkParentView4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView4Options): ArkParentView4Component { +content?: () => void, initializers?: ParentView4Options): void { const updatedInitializers: ParentView4Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView4Component._instantiate(style, () => new ArkParentView4Component, content, updatedInitializers); + ArkParentView4Component._instantiate(style, () => new ArkParentView4Component, content, updatedInitializers); } /** @memo */ export function ParentView5(/**/ /** @memo */ -style?: (instance: ArkParentView5Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ParentView5Options): ArkParentView5Component { +content?: () => void, initializers?: ParentView5Options): void { const updatedInitializers: ParentView5Options = { __backing_arr: initializers?.__backing_arr }; - return ArkParentView5Component._instantiate(style, () => new ArkParentView5Component, content, updatedInitializers); + ArkParentView5Component._instantiate(style, () => new ArkParentView5Component, content, updatedInitializers); } export interface ParentViewOptions { __backing_arr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/handleCustomBuilder.ts b/arkoala/ets-plugin/test/golden/koala/spec/handleCustomBuilder.ts index 9777a0058..36b6c4275 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/handleCustomBuilder.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/handleCustomBuilder.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; /** @memo */ function global() { @@ -20,40 +20,40 @@ class ArkIndexComponent extends ArkStructBase { } /** @memo */ inner(param: string) { - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: /* */ /** @memo */ (): void => global() }); }, undefined, 'Inner Builder Text'); - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: this.judge ? global : undefined }); }, undefined, 'Inner Builder Text2'); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkIndexComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IndexOptions) { - ArkColumn(undefined, () => { - ArkRow((instance: ArkRowComponent) => { - instance.bindMenu(/* */ + ArkColumn(__builder, () => { + ArkRow((__instance: ArkRowComponent) => { + __instance.bindMenu(/* */ /** @memo */ (): void => this.inner("111")); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.bindMenu(this.judge ? /* */ + ArkRow((__instance: ArkRowComponent) => { + __instance.bindMenu(this.judge ? /* */ /** @memo */ (): void => this.inner("111") : global); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkRow((__instance: ArkRowComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); return this.judge ? /* */ /** @memo */ @@ -62,8 +62,8 @@ class ArkIndexComponent extends ArkStructBase { (): void => global(); }); }, undefined); - ArkRow((instance: ArkRowComponent) => { - instance.onDragStart((event: DragEvent, extraParams: string) => { + ArkRow((__instance: ArkRowComponent) => { + __instance.onDragStart((event: DragEvent, extraParams: string) => { console.log('Text onDragStarts, ' + extraParams); return { builder: this.judge ? /* */ @@ -72,8 +72,8 @@ class ArkIndexComponent extends ArkStructBase { }; }); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.bindPopup(false, { + ArkText((__instance: ArkTextComponent) => { + __instance.bindPopup(false, { onStateChange: (e) => { }, builder: undefined }); @@ -85,13 +85,13 @@ export {}; /** @memo */ export function Index(/**/ /** @memo */ -style?: (instance: ArkIndexComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IndexOptions): ArkIndexComponent { +content?: () => void, initializers?: IndexOptions): void { const updatedInitializers: IndexOptions = { judge: initializers?.judge }; - return ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); + ArkIndexComponent._instantiate(style, () => new ArkIndexComponent, content, updatedInitializers); } export interface IndexOptions { judge?: boolean; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/id_if.ts b/arkoala/ets-plugin/test/golden/koala/spec/id_if.ts index ff89260c6..1c980e56f 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/id_if.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/id_if.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkDivider, ArkDividerComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ArkXComponent, ArkXComponentComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkDivider, ArkDividerComponent, ArkList, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, ArkXComponent, ArkXComponentComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkMyComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -31,62 +31,62 @@ class ArkMyComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: MyComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { if (this.pass) { if (this.count < 0) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id1'); }, undefined, 'count is negative'); } else if (this.count % 2 === 0) { - ArkDivider((instance: ArkDividerComponent) => { - instance.id('id2'); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.id('id2'); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id3'); }, undefined, 'even'); } else { - ArkDivider((instance: ArkDividerComponent) => { - instance.id('id4'); + ArkDivider((__instance: ArkDividerComponent) => { + __instance.id('id4'); }, undefined); - ArkColumn((instance: ArkColumnComponent) => { - instance.id('id10'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.id('id10'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32) .id('id5'); }, undefined, 'odd'); }); } } else { - ArkText((instance: ArkTextComponent) => { - instance.id('id6') + ArkText((__instance: ArkTextComponent) => { + __instance.id('id6') .fontSize(32); }, undefined, 'fail'); } if (this.pass) - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32).id('id7'); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32).id('id7'); }, undefined, 'odd2'); ArkList(undefined, () => { if (this.pass) { - ArkListItem((instance: ArkListItemComponent) => { - instance.id('id8'); + ArkListItem((__instance: ArkListItemComponent) => { + __instance.id('id8'); }, () => { - ArkRow((instance: ArkRowComponent) => { - instance.margin({ left: 10, right: 10 }).id('id11'); + ArkRow((__instance: ArkRowComponent) => { + __instance.margin({ left: 10, right: 10 }).id('id11'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20).margin({ left: 10 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20).margin({ left: 10 }); }, undefined); }); }); @@ -94,12 +94,12 @@ class ArkMyComponentComponent extends ArkStructBase { if (this.pass) { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar('pink') + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar('pink') .id('id9'); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width('100%').height('20').backgroundColor(Color.Pink); + ArkText((__instance: ArkTextComponent) => { + __instance.width('100%').height('20').backgroundColor(Color.Pink); }, undefined, '111'); }); } @@ -109,11 +109,11 @@ class ArkMyComponentComponent extends ArkStructBase { ArkText(undefined, undefined, '111'); }); - ArkXComponent((instance: ArkXComponentComponent) => { - instance.id('id12'); + ArkXComponent((__instance: ArkXComponentComponent) => { + __instance.id('id12'); }, undefined, { id: 'special', type: '' }); - ArkColumn((instance: ArkColumnComponent) => { - instance.id('id13'); + ArkColumn((__instance: ArkColumnComponent) => { + __instance.id('id13'); }, () => { ArkText(undefined, undefined, '11'); }); @@ -123,8 +123,9 @@ class ArkMyComponentComponent extends ArkStructBase { + __instance.id('id14'); + }, undefined); ArkText(undefined, undefined, '111'); } }); @@ -137,14 +138,14 @@ class ArkChildComponent extends ArkStructBase { content?: () => void, initializers?: ChildOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkChildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ChildOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, 'Child'); }); } @@ -153,24 +154,24 @@ export {}; /** @memo */ export function MyComponent(/**/ /** @memo */ -style?: (instance: ArkMyComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: MyComponentOptions): ArkMyComponentComponent { +content?: () => void, initializers?: MyComponentOptions): void { const updatedInitializers: MyComponentOptions = { pass: initializers?.pass, count: initializers?.count, controller: initializers?.controller }; - return ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); + ArkMyComponentComponent._instantiate(style, () => new ArkMyComponentComponent, content, updatedInitializers); } /** @memo */ export function Child(/**/ /** @memo */ -style?: (instance: ArkChildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ChildOptions): ArkChildComponent { +content?: () => void, initializers?: ChildOptions): void { const updatedInitializers: ChildOptions = {}; - return ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); + ArkChildComponent._instantiate(style, () => new ArkChildComponent, content, updatedInitializers); } export interface MyComponentOptions { pass?: boolean; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/if.ts b/arkoala/ets-plugin/test/golden/koala/spec/if.ts index 2ddb8cdf0..c2385ca4f 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/if.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/if.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -33,12 +33,12 @@ class ArkIFViewComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: IFViewOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { if (this.toggle1) { ArkText(undefined, undefined, 'toggle1'); } @@ -61,15 +61,15 @@ export {}; /** @memo */ export function IFView(/**/ /** @memo */ -style?: (instance: ArkIFViewComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: IFViewOptions): ArkIFViewComponent { +content?: () => void, initializers?: IFViewOptions): void { const updatedInitializers: IFViewOptions = { __backing_toggle1: initializers?.__backing_toggle1, __backing_toggle2: initializers?.__backing_toggle2, __backing_toggle3: initializers?.__backing_toggle3 }; - return ArkIFViewComponent._instantiate(style, () => new ArkIFViewComponent, content, updatedInitializers); + ArkIFViewComponent._instantiate(style, () => new ArkIFViewComponent, content, updatedInitializers); } export interface IFViewOptions { __backing_toggle1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/import@CustomDialog.ts b/arkoala/ets-plugin/test/golden/koala/spec/import@CustomDialog.ts index 80cf91f40..db7418307 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/import@CustomDialog.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/import@CustomDialog.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -56,16 +56,19 @@ class ArkCustomDialogUserComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogUserOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%').margin({ top: 5 }); + ArkColumn(__instance => { + { + __instance.width('100%').margin({ top: 5 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.dialogController.open(); }).backgroundColor(0x317aff); }, undefined, this.inputValue); @@ -76,15 +79,15 @@ export {}; /** @memo */ export function CustomDialogUser(/**/ /** @memo */ -style?: (instance: ArkCustomDialogUserComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomDialogUserOptions): ArkCustomDialogUserComponent { +content?: () => void, initializers?: CustomDialogUserOptions): void { const updatedInitializers: CustomDialogUserOptions = { __backing_textValue: initializers?.__backing_textValue, __backing_inputValue: initializers?.__backing_inputValue, dialogController: initializers?.dialogController }; - return ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); + ArkCustomDialogUserComponent._instantiate(style, () => new ArkCustomDialogUserComponent, content, updatedInitializers); } export interface CustomDialogUserOptions { __backing_textValue?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/import@Observed.ts b/arkoala/ets-plugin/test/golden/koala/spec/import@Observed.ts index 83fe8176f..6d0ce48cd 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/import@Observed.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/import@Observed.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkRowComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, objectLinkState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { observableProxy } from "@koalaui/common"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; @@ -30,16 +30,19 @@ class ArkViewAComponent extends ArkStructBase { this.__backing_a?.update(initializers?.a); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewAComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewAOptions) { - ArkRow((instance: ArkRowComponent) => { - instance.margin({ top: 10 }); + ArkRow(__instance => { + { + __instance.margin({ top: 10 }); + } + __builder?.(__instance); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.a.c += 1; }); }, undefined, 'ViewA' + JSON.stringify(this.label) + 'this.a.c=' + JSON.stringify(this.a.c)); @@ -61,33 +64,36 @@ class ArkViewBComponent extends ArkStructBase { this.__backing_arrA!.value = observableProxy(value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkViewBComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ViewBOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width('100%'); + ArkColumn(__instance => { + { + __instance.width('100%'); + } + __builder?.(__instance); }, () => { ForEach(this.arrA, (item) => { ViewA(undefined, undefined, { label: JSON.stringify(item.id), a: item } as ViewAOptions); }, (item) => item.id.toString()); ViewA(undefined, undefined, { label: JSON.stringify(this.arrA[0]), a: this.arrA[0] } as ViewAOptions); ViewA(undefined, undefined, { label: JSON.stringify(this.arrA[this.arrA.length - 1]), a: this.arrA[this.arrA.length - 1] } as ViewAOptions); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA = [new ClassA(0), new ClassA(0)]; }); }, undefined, 'ViewB: reset array'); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA.push(new ClassA(0)); }); }, undefined, 'ViewB: push'); - ArkButton((instance: ArkButtonComponent) => { - instance.margin({ top: 10 }) + ArkButton((__instance: ArkButtonComponent) => { + __instance.margin({ top: 10 }) .onClick(() => { this.arrA.shift(); }); @@ -99,26 +105,26 @@ export {}; /** @memo */ export function ViewA(/**/ /** @memo */ -style?: (instance: ArkViewAComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewAOptions): ArkViewAComponent { +content?: () => void, initializers?: ViewAOptions): void { const updatedInitializers: ViewAOptions = { label: initializers?.label, a: initializers?.a, __backing_a: initializers?.__backing_a }; - return ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); + ArkViewAComponent._instantiate(style, () => new ArkViewAComponent, content, updatedInitializers); } /** @memo */ export function ViewB(/**/ /** @memo */ -style?: (instance: ArkViewBComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ViewBOptions): ArkViewBComponent { +content?: () => void, initializers?: ViewBOptions): void { const updatedInitializers: ViewBOptions = { __backing_arrA: initializers?.__backing_arrA }; - return ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); + ArkViewBComponent._instantiate(style, () => new ArkViewBComponent, content, updatedInitializers); } export interface ViewAOptions { label?: string; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/importAllEts.ts b/arkoala/ets-plugin/test/golden/koala/spec/importAllEts.ts index d59f286a7..174ca3738 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/importAllEts.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/importAllEts.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllComponent.NamespaceComponent1({ __backing_NamespaceComponent1Link1: this.__backing_myState1, __backing_NamespaceComponent1Link2: this.__backing_myState2, @@ -90,16 +90,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/importEts.ts b/arkoala/ets-plugin/test/golden/koala/spec/importEts.ts index 576be0f22..a5dd98e4b 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/importEts.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/importEts.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -45,12 +45,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { LinkComponent2Ref({ __backing_LinkComponent2Link1: this.__backing_myState1, __backing_LinkComponent2Link2: this.__backing_myState2, @@ -61,8 +61,8 @@ class ArkImportTestComponent extends ArkStructBase { - instance.fontSize(20) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20) .fontColor(Color.Red); }, undefined, 'space'); LinkComponent1Ref({ @@ -118,16 +118,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/importExportEts.ts b/arkoala/ets-plugin/test/golden/koala/spec/importExportEts.ts index a21c358ee..4a5f24dc9 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/importExportEts.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/importExportEts.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllStarComponent.ExportComponent({ __backing_ExportComponent1Link1: this.__backing_myState1, __backing_ExportComponent1Link2: this.__backing_myState2, @@ -76,16 +76,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/importExportNest.ts b/arkoala/ets-plugin/test/golden/koala/spec/importExportNest.ts index a88f27966..442c1f611 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/importExportNest.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/importExportNest.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -82,21 +82,21 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.testText1); tExtend(20); ArkText(undefined, undefined, this.testText2); tStyles(); ArkButton(undefined, undefined, this.testText3); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.testText4); Base({ __backing_testStr: this.__backing_testState1, @@ -114,9 +114,9 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_testText1: initializers?.__backing_testText1, __backing_testText2: initializers?.__backing_testText2, @@ -128,7 +128,7 @@ content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent __backing_testState4: initializers?.__backing_testState4, __backing_testState5: initializers?.__backing_testState5 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_testText1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/importTs.ts b/arkoala/ets-plugin/test/golden/koala/spec/importTs.ts index 978addb7c..a3d9633c3 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/importTs.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/importTs.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -43,12 +43,12 @@ class ArkImportTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ImportTestOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { AllStarComponent.ExportComponent({ __backing_ExportComponent1Link1: this.__backing_myState1, __backing_ExportComponent1Link2: this.__backing_myState2, @@ -76,16 +76,16 @@ export {}; /** @memo */ export function ImportTest(/**/ /** @memo */ -style?: (instance: ArkImportTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ImportTestOptions): ArkImportTestComponent { +content?: () => void, initializers?: ImportTestOptions): void { const updatedInitializers: ImportTestOptions = { __backing_myState1: initializers?.__backing_myState1, __backing_myState2: initializers?.__backing_myState2, __backing_myState3: initializers?.__backing_myState3, __backing_myState4: initializers?.__backing_myState4 }; - return ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); + ArkImportTestComponent._instantiate(style, () => new ArkImportTestComponent, content, updatedInitializers); } export interface ImportTestOptions { __backing_myState1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/lazyforeach.ts b/arkoala/ets-plugin/test/golden/koala/spec/lazyforeach.ts index 88d2bbac4..c15b25583 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/lazyforeach.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/lazyforeach.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkGridItem, ArkLazyGrid, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LazyForEach, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkGridItem, ArkLazyGrid, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LazyForEach, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class BasicDataSource implements IDataSource { private listeners: DataChangeListener[] = []; @@ -79,12 +79,12 @@ class ArkTestComponent extends ArkStructBase { this.__backing_data = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkTestComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestOptions) { - ArkLazyGrid(undefined, () => { + ArkLazyGrid(__builder, () => { LazyForEach(this.data, (row) => { ArkGridItem(undefined, () => { ArkText(undefined, undefined, row); @@ -97,13 +97,13 @@ export {}; /** @memo */ export function Test(/**/ /** @memo */ -style?: (instance: ArkTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestOptions): ArkTestComponent { +content?: () => void, initializers?: TestOptions): void { const updatedInitializers: TestOptions = { data: initializers?.data }; - return ArkTestComponent._instantiate(style, () => new ArkTestComponent, content, updatedInitializers); + ArkTestComponent._instantiate(style, () => new ArkTestComponent, content, updatedInitializers); } export interface TestOptions { data?: MyDataSource; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/localStorage.ts b/arkoala/ets-plugin/test/golden/koala/spec/localStorage.ts index ae6270b38..f98a0d360 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/localStorage.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/localStorage.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -38,16 +38,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -59,14 +62,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/localStorageForBoth.ts b/arkoala/ets-plugin/test/golden/koala/spec/localStorageForBoth.ts index 0612524e6..57716196b 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/localStorageForBoth.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/localStorageForBoth.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -42,16 +42,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -63,14 +66,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/localStorageForRoute.ts b/arkoala/ets-plugin/test/golden/koala/spec/localStorageForRoute.ts index df9724d63..af72445a1 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/localStorageForRoute.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/localStorageForRoute.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; let route = 'pages/Index'; class ArkLocalStorageComponentComponent extends ArkStructBase { @@ -10,13 +10,16 @@ class ArkLocalStorageComponentComponent extends ArkStructBase void, initializers?: LocalStorageComponentOptions): void { } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, undefined); } } @@ -24,11 +27,11 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = {}; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { } diff --git a/arkoala/ets-plugin/test/golden/koala/spec/localStorageForStorage.ts b/arkoala/ets-plugin/test/golden/koala/spec/localStorageForStorage.ts index 70b8b6a68..548a958a4 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/localStorageForStorage.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/localStorageForStorage.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, StorageLinkState, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -40,16 +40,19 @@ class ArkLocalStorageComponentComponent extends ArkStructBase(this._entry_local_storage_, "storageObjectProp", new ClassA("x")).value); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkLocalStorageComponentComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LocalStorageComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(500); + ArkColumn(__instance => { + { + __instance.height(500); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { this.simpleVarName += 1; this.objectName.a = this.objectName.a === 'x' ? 'yex' : 'no'; }); @@ -61,14 +64,14 @@ export {}; /** @memo */ export function LocalStorageComponent(/**/ /** @memo */ -style?: (instance: ArkLocalStorageComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LocalStorageComponentOptions): ArkLocalStorageComponentComponent { +content?: () => void, initializers?: LocalStorageComponentOptions): void { const updatedInitializers: LocalStorageComponentOptions = { __backing_simpleVarName: initializers?.__backing_simpleVarName, __backing_objectName: initializers?.__backing_objectName }; - return ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); + ArkLocalStorageComponentComponent._instantiate(style, () => new ArkLocalStorageComponentComponent, content, updatedInitializers); } export interface LocalStorageComponentOptions { __backing_simpleVarName?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/longPressGesture.ts b/arkoala/ets-plugin/test/golden/koala/spec/longPressGesture.ts index 68a0d1c2b..52cd2f4d6 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/longPressGesture.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/longPressGesture.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,22 +17,25 @@ class ArkLongPressGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LongPressGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) - .gesture(LongPressGesture({ repeat: true }) - .onAction((event: GestureEvent) => { - if (event.repeat) { - this.count++; - } - }) - .onActionEnd(() => { - this.count = 0; - })); + ArkFlex(__instance => { + { + __instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) + .gesture(LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event.repeat) { + this.count++; + } + }) + .onActionEnd(() => { + this.count = 0; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'LongPress onAction:' + this.count); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -42,13 +45,13 @@ export {}; /** @memo */ export function LongPressGestureExample(/**/ /** @memo */ -style?: (instance: ArkLongPressGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LongPressGestureExampleOptions): ArkLongPressGestureExampleComponent { +content?: () => void, initializers?: LongPressGestureExampleOptions): void { const updatedInitializers: LongPressGestureExampleOptions = { __backing_count: initializers?.__backing_count }; - return ArkLongPressGestureExampleComponent._instantiate(style, () => new ArkLongPressGestureExampleComponent, content, updatedInitializers); + ArkLongPressGestureExampleComponent._instantiate(style, () => new ArkLongPressGestureExampleComponent, content, updatedInitializers); } export interface LongPressGestureExampleOptions { __backing_count?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/pageTransition.ts b/arkoala/ets-plugin/test/golden/koala/spec/pageTransition.ts index 24852fb32..3f7690039 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/pageTransition.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/pageTransition.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkNavigator, ArkNavigatorComponent, ArkPageTransitionEnter, ArkPageTransitionEnterComponent, ArkPageTransitionExit, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkNavigator, ArkNavigatorComponent, ArkPageTransitionEnter, ArkPageTransitionEnterComponent, ArkPageTransitionExit, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -33,35 +33,38 @@ class ArkPageTransitionExample1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PageTransitionExample1Options) { - ArkColumn((instance: ArkColumnComponent) => { - instance.scale({ x: this.scale2 }).opacity(this.opacity2); + ArkColumn(__instance => { + { + __instance.scale({ x: this.scale2 }).opacity(this.opacity2); + } + __builder?.(__instance); }, () => { - ArkNavigator((instance: ArkNavigatorComponent) => { - instance.onClick(() => { + ArkNavigator((__instance: ArkNavigatorComponent) => { + __instance.onClick(() => { this.active = true; }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width("100%").height("100%"); + ArkText((__instance: ArkTextComponent) => { + __instance.width("100%").height("100%"); }, undefined, 'page transition'); }, { target: 'pages/page1', type: NavigationType.Push }); }); } /** @memo */ pageTransition() { - ArkPageTransitionEnter((instance: ArkPageTransitionEnterComponent) => { - instance.onEnter((type: RouteType, progress: number) => { + ArkPageTransitionEnter((__instance: ArkPageTransitionEnterComponent) => { + __instance.onEnter((type: RouteType, progress: number) => { this.scale2 = 1; this.opacity2 = progress; }); }, undefined, { duration: 1200, curve: Curve.Linear }); - ArkPageTransitionExit((instance: ArkPageTransitionExitComponent) => { - instance.onExit((type: RouteType, progress: number) => { + ArkPageTransitionExit((__instance: ArkPageTransitionExitComponent) => { + __instance.onExit((type: RouteType, progress: number) => { this.scale2 = 1 - progress; this.opacity2 = 1; }); @@ -72,15 +75,15 @@ export {}; /** @memo */ export function PageTransitionExample1(/**/ /** @memo */ -style?: (instance: ArkPageTransitionExample1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PageTransitionExample1Options): ArkPageTransitionExample1Component { +content?: () => void, initializers?: PageTransitionExample1Options): void { const updatedInitializers: PageTransitionExample1Options = { __backing_scale2: initializers?.__backing_scale2, __backing_opacity2: initializers?.__backing_opacity2, __backing_active: initializers?.__backing_active }; - return ArkPageTransitionExample1Component._instantiate(style, () => new ArkPageTransitionExample1Component, content, updatedInitializers); + ArkPageTransitionExample1Component._instantiate(style, () => new ArkPageTransitionExample1Component, content, updatedInitializers); } export interface PageTransitionExample1Options { __backing_scale2?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/panGestrue.ts b/arkoala/ets-plugin/test/golden/koala/spec/panGestrue.ts index e3faf58e0..22aa5eeb6 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/panGestrue.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/panGestrue.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -25,25 +25,28 @@ class ArkPanGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PanGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) - .gesture(PanGesture({}) - .onActionStart((event: GestureEvent) => { - console.info('Pan start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.offsetX = event.offsetX; - this.offsetY = event.offsetY; - }) - .onActionEnd(() => { - console.info('Pan end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) + .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) + .gesture(PanGesture({}) + .onActionStart((event: GestureEvent) => { + console.info('Pan start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.offsetX = event.offsetX; + this.offsetY = event.offsetY; + }) + .onActionEnd(() => { + console.info('Pan end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'PanGesture offset X: ' + this.offsetX); ArkText(undefined, undefined, 'PanGesture offset Y: ' + this.offsetY); @@ -54,14 +57,14 @@ export {}; /** @memo */ export function PanGestureExample(/**/ /** @memo */ -style?: (instance: ArkPanGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PanGestureExampleOptions): ArkPanGestureExampleComponent { +content?: () => void, initializers?: PanGestureExampleOptions): void { const updatedInitializers: PanGestureExampleOptions = { __backing_offsetX: initializers?.__backing_offsetX, __backing_offsetY: initializers?.__backing_offsetY }; - return ArkPanGestureExampleComponent._instantiate(style, () => new ArkPanGestureExampleComponent, content, updatedInitializers); + ArkPanGestureExampleComponent._instantiate(style, () => new ArkPanGestureExampleComponent, content, updatedInitializers); } export interface PanGestureExampleOptions { __backing_offsetX?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/pinchGesture.ts b/arkoala/ets-plugin/test/golden/koala/spec/pinchGesture.ts index 61f842843..b1c766737 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/pinchGesture.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/pinchGesture.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,24 +17,27 @@ class ArkPinchGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: PinchGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .scale({ x: this.scale2, y: this.scale2, z: this.scale2 }) - .gesture(PinchGesture() - .onActionStart((event: GestureEvent) => { - console.info('Pinch start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.scale2 = event.scale; - }) - .onActionEnd(() => { - console.info('Pinch end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }).margin(80) + .scale({ x: this.scale2, y: this.scale2, z: this.scale2 }) + .gesture(PinchGesture() + .onActionStart((event: GestureEvent) => { + console.info('Pinch start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.scale2 = event.scale; + }) + .onActionEnd(() => { + console.info('Pinch end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'PinchGesture scale:' + this.scale2); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -44,13 +47,13 @@ export {}; /** @memo */ export function PinchGestureExample(/**/ /** @memo */ -style?: (instance: ArkPinchGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: PinchGestureExampleOptions): ArkPinchGestureExampleComponent { +content?: () => void, initializers?: PinchGestureExampleOptions): void { const updatedInitializers: PinchGestureExampleOptions = { __backing_scale2: initializers?.__backing_scale2 }; - return ArkPinchGestureExampleComponent._instantiate(style, () => new ArkPinchGestureExampleComponent, content, updatedInitializers); + ArkPinchGestureExampleComponent._instantiate(style, () => new ArkPinchGestureExampleComponent, content, updatedInitializers); } export interface PinchGestureExampleOptions { __backing_scale2?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/recycle.ts b/arkoala/ets-plugin/test/golden/koala/spec/recycle.ts index 48eed8b8f..546ed14aa 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/recycle.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/recycle.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkTabsComponent, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkListItem, ArkListItemComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkTabsComponent, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -25,20 +25,24 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(this.state_value) - .height(100); + ArkColumn(__instance => { + { + __instance.width(this.state_value) + .height(100); + } + __builder?.(__instance); }, () => { - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value); - ArkText((instance: ArkTextComponent) => { - instance.width(this.state_value) + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.state_value) .height(100); }, undefined, "aa"); }); @@ -111,79 +115,80 @@ class ArkchildComponent extends ArkStructBase { this.__backing_propvalue?.update(initializers?.propvalue); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, () => { - AnimationTest(undefined, undefined) - .border({ width: 3, color: Color.Red }) - .height(this.heightValue); - ArkText((instance: ArkTextComponent) => { - instance.width(this.propvalue) + ArkColumn(__builder, () => { + AnimationTest((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .height(this.heightValue); + }, undefined); + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.propvalue) .fontSize(this.reguar_value) .height(100) .fontColor(Color.Red) .border({ width: this.propvalue, color: Color.Red, radius: 100 }); }, undefined, "hello"); - ArkButton((instance: ArkButtonComponent) => { - instance.border({ width: this.reguar_value, color: Color.Red, radius: 100 }); + ArkButton((__instance: ArkButtonComponent) => { + __instance.border({ width: this.reguar_value, color: Color.Red, radius: 100 }); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(this.state_value) + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(this.state_value) .width(100); }, undefined, "hhhhhhhhhhhhh"); }); - ArkListItem((instance: ArkListItemComponent) => { - instance.width(this.width_value) + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'ListItem'); }, 'true'); - ArkListItem((instance: ArkListItemComponent) => { - instance.width(this.width_value) + ArkListItem((__instance: ArkListItemComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'true'); - ArkTabs((instance: ArkTabsComponent) => { - instance.width(this.width_value) + ArkTabs((__instance: ArkTabsComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar") .width(this.width_value) .height(100); }, () => { - ArkFlex((instance: ArkFlexComponent) => { - instance.width(this.width_value) + ArkFlex((__instance: ArkFlexComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.width(this.width_value) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'text1'); }); }); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar 2") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar 2") .width(this.width_value) .height(100); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, 'text2'); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.width(this.width_value) + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.width(this.width_value) .height(100); }, undefined); }, { barPosition: BarPosition.Start, index: 1, controller: this.controller }); @@ -205,14 +210,14 @@ class ArkNormalComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NormalComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.width(this.width_value) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.width(this.width_value) .height(100); }, undefined, "hello"); }); @@ -233,14 +238,14 @@ class ArkAnimationTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AnimationTestOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(this.width_value) .animation({ duration: 300 }); }, undefined, "hello"); @@ -251,21 +256,21 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_state_value: initializers?.__backing_state_value, __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { propvalue: initializers?.propvalue, __backing_propvalue: initializers?.__backing_propvalue, @@ -276,29 +281,29 @@ content?: () => void, initializers?: childOptions): ArkchildComponent { controller: initializers?.controller, __backing_heightValue: initializers?.__backing_heightValue }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } /** @memo */ export function NormalComponent(/**/ /** @memo */ -style?: (instance: ArkNormalComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NormalComponentOptions): ArkNormalComponentComponent { +content?: () => void, initializers?: NormalComponentOptions): void { const updatedInitializers: NormalComponentOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkNormalComponentComponent._instantiate(style, () => new ArkNormalComponentComponent, content, updatedInitializers); + ArkNormalComponentComponent._instantiate(style, () => new ArkNormalComponentComponent, content, updatedInitializers); } /** @memo */ export function AnimationTest(/**/ /** @memo */ -style?: (instance: ArkAnimationTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AnimationTestOptions): ArkAnimationTestComponent { +content?: () => void, initializers?: AnimationTestOptions): void { const updatedInitializers: AnimationTestOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkAnimationTestComponent._instantiate(style, () => new ArkAnimationTestComponent, content, updatedInitializers); + ArkAnimationTestComponent._instantiate(style, () => new ArkAnimationTestComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_state_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/recycle_extend_styles.ts b/arkoala/ets-plugin/test/golden/koala/spec/recycle_extend_styles.ts index e0bf56841..d89adcb42 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/recycle_extend_styles.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/recycle_extend_styles.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkCommonMethodInterface, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; function fancybut__Button(ButtonInstance: T, color: string | Color): T { @@ -21,17 +21,17 @@ class ArkExtendComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExtendComponentOptions) { - ArkColumn(undefined, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.__applyStyle(fancybut__Button, Color.Green); + ArkColumn(__builder, () => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.__applyStyle(fancybut__Button, Color.Green); }, undefined, "Fancy Button"); - ArkButton((instance: ArkButtonComponent) => { - instance.__applyStyle(fancybut__Button, Color.Green).height(100).width(this.width_value); + ArkButton((__instance: ArkButtonComponent) => { + __instance.__applyStyle(fancybut__Button, Color.Green).height(100).width(this.width_value); }, undefined, "Fancy Button"); }); } @@ -74,24 +74,24 @@ class ArkStylesComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: StylesComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .width(this.width_value) .height(100); }, undefined, "Fancy"); - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(this.componentFancy.bind(this)) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(this.componentFancy.bind(this)) .fontSize(this.size_value) .height(100); }, undefined, "Fancy"); - ArkButton((instance: ArkButtonComponent) => { - instance.enabled(this.enable) + ArkButton((__instance: ArkButtonComponent) => { + __instance.enabled(this.enable) .onClick(() => { this.enable = false; }).__applyStyle(this.componentFancy.bind(this)) @@ -105,8 +105,8 @@ class ArkStylesComponentComponent extends ArkStructBase { - ArkText((instance: ArkTextComponent) => { - instance.__applyStyle(globalFancy) + ArkText((__instance: ArkTextComponent) => { + __instance.__applyStyle(globalFancy) .fontSize(this.size_value) .height(100); }, undefined, "Fancy"); @@ -118,26 +118,26 @@ export {}; /** @memo */ export function ExtendComponent(/**/ /** @memo */ -style?: (instance: ArkExtendComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExtendComponentOptions): ArkExtendComponentComponent { +content?: () => void, initializers?: ExtendComponentOptions): void { const updatedInitializers: ExtendComponentOptions = { __backing_width_value: initializers?.__backing_width_value }; - return ArkExtendComponentComponent._instantiate(style, () => new ArkExtendComponentComponent, content, updatedInitializers); + ArkExtendComponentComponent._instantiate(style, () => new ArkExtendComponentComponent, content, updatedInitializers); } /** @memo */ export function StylesComponent(/**/ /** @memo */ -style?: (instance: ArkStylesComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: StylesComponentOptions): ArkStylesComponentComponent { +content?: () => void, initializers?: StylesComponentOptions): void { const updatedInitializers: StylesComponentOptions = { enable: initializers?.enable, __backing_width_value: initializers?.__backing_width_value, __backing_size_value: initializers?.__backing_size_value }; - return ArkStylesComponentComponent._instantiate(style, () => new ArkStylesComponentComponent, content, updatedInitializers); + ArkStylesComponentComponent._instantiate(style, () => new ArkStylesComponentComponent, content, updatedInitializers); } export interface ExtendComponentOptions { __backing_width_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/recycle_function_array.ts b/arkoala/ets-plugin/test/golden/koala/spec/recycle_function_array.ts index 1c594d845..81d90750e 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/recycle_function_array.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/recycle_function_array.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkCircle, ArkCircleComponent, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCircle, ArkCircleComponent, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,12 +17,12 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { child(undefined, undefined); }); } @@ -50,24 +50,24 @@ class ArkchildComponent extends ArkStructBase { this.__backing_reguar_value = value; } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, () => { - ArkCircle((instance: ArkCircleComponent) => { - instance.onClick(() => { + ArkColumn(__builder, () => { + ArkCircle((__instance: ArkCircleComponent) => { + __instance.onClick(() => { console.log("hello"); }) .strokeDashArray(["hello", this.reguar_value]) .height(100); }, undefined); - ArkCircle((instance: ArkCircleComponent) => { - instance.strokeDashArray([this.state_value]); + ArkCircle((__instance: ArkCircleComponent) => { + __instance.strokeDashArray([this.state_value]); }, undefined); - ArkText((instance: ArkTextComponent) => { - instance.onClick(() => { + ArkText((__instance: ArkTextComponent) => { + __instance.onClick(() => { console.log("hello"); }); }, undefined, "hello"); @@ -78,25 +78,25 @@ export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { __backing_state_value: initializers?.__backing_state_value, reguar_value: initializers?.reguar_value }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/recycle_gesture.ts b/arkoala/ets-plugin/test/golden/koala/spec/recycle_gesture.ts index e468ab782..16cc2f207 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/recycle_gesture.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/recycle_gesture.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; class ArkGestureTestComponent extends ArkStructBase { @@ -24,25 +24,28 @@ class ArkGestureTestComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: GestureTestOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(this.width_value).padding(60).border({ width: 1 }).margin(30) - .gesture(LongPressGesture({ repeat: true }) - .onAction((event: GestureEvent) => { - if (event.repeat) { - this.count++; - } - }) - .onActionEnd(() => { - this.count = 0; - })); + ArkFlex(__instance => { + { + __instance.height(100).width(this.width_value).padding(60).border({ width: 1 }).margin(30) + .gesture(LongPressGesture({ repeat: true }) + .onAction((event: GestureEvent) => { + if (event.repeat) { + this.count++; + } + }) + .onActionEnd(() => { + this.count = 0; + })); + } + __builder?.(__instance); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(this.width_value); }, undefined, 'LongPress onAction:' + this.count); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -52,14 +55,14 @@ export {}; /** @memo */ export function GestureTest(/**/ /** @memo */ -style?: (instance: ArkGestureTestComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: GestureTestOptions): ArkGestureTestComponent { +content?: () => void, initializers?: GestureTestOptions): void { const updatedInitializers: GestureTestOptions = { __backing_count: initializers?.__backing_count, __backing_width_value: initializers?.__backing_width_value }; - return ArkGestureTestComponent._instantiate(style, () => new ArkGestureTestComponent, content, updatedInitializers); + ArkGestureTestComponent._instantiate(style, () => new ArkGestureTestComponent, content, updatedInitializers); } export interface GestureTestOptions { __backing_count?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/recycle_reuseId.ts b/arkoala/ets-plugin/test/golden/koala/spec/recycle_reuseId.ts index 975d78fb2..d32e814f5 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/recycle_reuseId.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/recycle_reuseId.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, SyncedProperty, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, propState, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -26,26 +26,31 @@ class ArkHomeComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: HomeComponentOptions) { - ArkColumn(undefined, () => { - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value) - .reuseId("reuse_key"); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .reuseId(this.state_value); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .reuseId("reuse_key11111111111"); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .border({ width: 3, color: Color.Red }) - .width(this.state_value); - child(undefined, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions) - .reuseId(a); + ArkColumn(__builder, () => { + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value) + .reuseId("reuse_key"); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .reuseId(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.reuseId("reuse_key11111111111"); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.border({ width: 3, color: Color.Red }) + .width(this.state_value); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); + child((__instance: ArkCommonMethodComponent) => { + __instance.reuseId(a); + }, undefined, { propvalue: this.value, linkvalue: this.value } as childOptions); }); } } @@ -76,39 +81,39 @@ class ArkchildComponent extends ArkStructBase { this.__backing_propvalue?.update(initializers?.propvalue); } /** @memo */ - _build(/**/ + __build(/**/ /** @memo */ - builder: ((instance: ArkchildComponent) => void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: childOptions) { - ArkColumn(undefined, undefined); + ArkColumn(__builder, undefined); } } export {}; /** @memo */ export function HomeComponent(/**/ /** @memo */ -style?: (instance: ArkHomeComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: HomeComponentOptions): ArkHomeComponentComponent { +content?: () => void, initializers?: HomeComponentOptions): void { const updatedInitializers: HomeComponentOptions = { __backing_state_value: initializers?.__backing_state_value, __backing_value: initializers?.__backing_value }; - return ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); + ArkHomeComponentComponent._instantiate(style, () => new ArkHomeComponentComponent, content, updatedInitializers); } /** @memo */ export function child(/**/ /** @memo */ -style?: (instance: ArkchildComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: childOptions): ArkchildComponent { +content?: () => void, initializers?: childOptions): void { const updatedInitializers: childOptions = { propvalue: initializers?.propvalue, __backing_propvalue: initializers?.__backing_propvalue, __backing_linkvalue: initializers?.__backing_linkvalue }; - return ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); + ArkchildComponent._instantiate(style, () => new ArkchildComponent, content, updatedInitializers); } export interface HomeComponentOptions { __backing_state_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/rotationGesture.ts b/arkoala/ets-plugin/test/golden/koala/spec/rotationGesture.ts index 70e520afa..ad20a9d20 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/rotationGesture.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/rotationGesture.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,24 +17,27 @@ class ArkRotationGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: RotationGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100).width(200).padding(20).border({ width: 1 }) - .margin(80).rotate({ x: 1, y: 2, z: 3, angle: this.angle }) - .gesture(RotationGesture() - .onActionStart((event: GestureEvent) => { - console.log('Rotation start'); - }) - .onActionUpdate((event: GestureEvent) => { - this.angle = event.angle; - }) - .onActionEnd(() => { - console.log('Rotation end'); - })); + ArkFlex(__instance => { + { + __instance.height(100).width(200).padding(20).border({ width: 1 }) + .margin(80).rotate({ x: 1, y: 2, z: 3, angle: this.angle }) + .gesture(RotationGesture() + .onActionStart((event: GestureEvent) => { + console.log('Rotation start'); + }) + .onActionUpdate((event: GestureEvent) => { + this.angle = event.angle; + }) + .onActionEnd(() => { + console.log('Rotation end'); + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'RotationGesture angle:' + this.angle); }, { direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }); @@ -44,13 +47,13 @@ export {}; /** @memo */ export function RotationGestureExample(/**/ /** @memo */ -style?: (instance: ArkRotationGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: RotationGestureExampleOptions): ArkRotationGestureExampleComponent { +content?: () => void, initializers?: RotationGestureExampleOptions): void { const updatedInitializers: RotationGestureExampleOptions = { __backing_angle: initializers?.__backing_angle }; - return ArkRotationGestureExampleComponent._instantiate(style, () => new ArkRotationGestureExampleComponent, content, updatedInitializers); + ArkRotationGestureExampleComponent._instantiate(style, () => new ArkRotationGestureExampleComponent, content, updatedInitializers); } export interface RotationGestureExampleOptions { __backing_angle?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/swipeGesture.ts b/arkoala/ets-plugin/test/golden/koala/spec/swipeGesture.ts index 154099f29..2de2219be 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/swipeGesture.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/swipeGesture.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -25,20 +25,23 @@ class ArkSwipeGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: SwipeGestureExampleOptions) { - ArkColumn((instance: ArkColumnComponent) => { - instance.border({ width: 2 }) - .width(260).height(260) - .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) - .gesture(SwipeGesture({ fingers: 1, direction: SwipeDirection.Vertical }) - .onAction((event: GestureEvent) => { - this.speed = event.speed; - this.rotateAngle = event.angle; - })); + ArkColumn(__instance => { + { + __instance.border({ width: 2 }) + .width(260).height(260) + .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle }) + .gesture(SwipeGesture({ fingers: 1, direction: SwipeDirection.Vertical }) + .onAction((event: GestureEvent) => { + this.speed = event.speed; + this.rotateAngle = event.angle; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, "SwipGesture speed : " + this.speed); ArkText(undefined, undefined, "SwipGesture angle : " + this.rotateAngle); @@ -49,14 +52,14 @@ export {}; /** @memo */ export function SwipeGestureExample(/**/ /** @memo */ -style?: (instance: ArkSwipeGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: SwipeGestureExampleOptions): ArkSwipeGestureExampleComponent { +content?: () => void, initializers?: SwipeGestureExampleOptions): void { const updatedInitializers: SwipeGestureExampleOptions = { __backing_rotateAngle: initializers?.__backing_rotateAngle, __backing_speed: initializers?.__backing_speed }; - return ArkSwipeGestureExampleComponent._instantiate(style, () => new ArkSwipeGestureExampleComponent, content, updatedInitializers); + ArkSwipeGestureExampleComponent._instantiate(style, () => new ArkSwipeGestureExampleComponent, content, updatedInitializers); } export interface SwipeGestureExampleOptions { __backing_rotateAngle?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/tab.ts b/arkoala/ets-plugin/test/golden/koala/spec/tab.ts index c87d909a1..ae5c58341 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/tab.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/tab.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkColumnComponent, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkTabContent, ArkTabContentComponent, ArkTabs, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; class ArkTabSimpleComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); @@ -15,39 +15,39 @@ class ArkTabSimpleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TabSimpleOptions) { - ArkColumn(undefined, () => { + ArkColumn(__builder, () => { ArkTabs(undefined, () => { - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar") .height(100) .width(200); }, () => { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(100) + ArkFlex((__instance: ArkFlexComponent) => { + __instance.height(100) .width(200); }, () => { - ArkColumn((instance: ArkColumnComponent) => { - instance.height(100) + ArkColumn((__instance: ArkColumnComponent) => { + __instance.height(100) .width(200); }, () => { - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(200); }, undefined, 'text1'); - ArkText((instance: ArkTextComponent) => { - instance.height(100) + ArkText((__instance: ArkTextComponent) => { + __instance.height(100) .width(200); }, undefined, 'xxx'); }); }); }); - ArkTabContent((instance: ArkTabContentComponent) => { - instance.tabBar("TabBar 2") + ArkTabContent((__instance: ArkTabContentComponent) => { + __instance.tabBar("TabBar 2") .height(100) .width(200); }, () => { @@ -61,13 +61,13 @@ export {}; /** @memo */ export function TabSimple(/**/ /** @memo */ -style?: (instance: ArkTabSimpleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TabSimpleOptions): ArkTabSimpleComponent { +content?: () => void, initializers?: TabSimpleOptions): void { const updatedInitializers: TabSimpleOptions = { controller: initializers?.controller }; - return ArkTabSimpleComponent._instantiate(style, () => new ArkTabSimpleComponent, content, updatedInitializers); + ArkTabSimpleComponent._instantiate(style, () => new ArkTabSimpleComponent, content, updatedInitializers); } export interface TabSimpleOptions { controller?: TabsController; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/tapGesture.ts b/arkoala/ets-plugin/test/golden/koala/spec/tapGesture.ts index 2860a8194..7bf08865f 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/tapGesture.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/tapGesture.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { registerArkuiEntry } from "@koalaui/arkui/ohos.router"; import { observableProxy } from "@koalaui/common"; @@ -17,17 +17,20 @@ class ArkTapGestureExampleComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TapGestureExampleOptions) { - ArkFlex((instance: ArkFlexComponent) => { - instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) - .gesture(TapGesture({ count: 2 }) - .onAction(() => { - this.value = 'TapGesture onAction'; - })); + ArkFlex(__instance => { + { + __instance.height(200).width(300).padding(60).border({ width: 1 }).margin(30) + .gesture(TapGesture({ count: 2 }) + .onAction(() => { + this.value = 'TapGesture onAction'; + })); + } + __builder?.(__instance); }, () => { ArkText(undefined, undefined, 'Click twice'); ArkText(undefined, undefined, this.value); @@ -38,13 +41,13 @@ export {}; /** @memo */ export function TapGestureExample(/**/ /** @memo */ -style?: (instance: ArkTapGestureExampleComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TapGestureExampleOptions): ArkTapGestureExampleComponent { +content?: () => void, initializers?: TapGestureExampleOptions): void { const updatedInitializers: TapGestureExampleOptions = { __backing_value: initializers?.__backing_value }; - return ArkTapGestureExampleComponent._instantiate(style, () => new ArkTapGestureExampleComponent, content, updatedInitializers); + ArkTapGestureExampleComponent._instantiate(style, () => new ArkTapGestureExampleComponent, content, updatedInitializers); } export interface TapGestureExampleOptions { __backing_value?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/AMDComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/AMDComponent.ts index 9dc977ec8..9132dee10 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/AMDComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/AMDComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; class ArkAMDComponentComponent extends ArkStructBase { @@ -58,32 +58,32 @@ class ArkAMDComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: AMDComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink1: ' + JSON.stringify(this.AMDComponentLink1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink2: ' + JSON.stringify(this.AMDComponentLink2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink3: ' + JSON.stringify(this.AMDComponentLink3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'AMDComponentLink4: ' + JSON.stringify(this.AMDComponentLink4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -93,9 +93,9 @@ export {}; /** @memo */ export function AMDComponent(/**/ /** @memo */ -style?: (instance: ArkAMDComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: AMDComponentOptions): ArkAMDComponentComponent { +content?: () => void, initializers?: AMDComponentOptions): void { const updatedInitializers: AMDComponentOptions = { __backing_AMDComponentLink1: initializers?.__backing_AMDComponentLink1, __backing_AMDComponentLink2: initializers?.__backing_AMDComponentLink2, @@ -104,7 +104,7 @@ content?: () => void, initializers?: AMDComponentOptions): ArkAMDComponentCompon myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkAMDComponentComponent._instantiate(style, () => new ArkAMDComponentComponent, content, updatedInitializers); + ArkAMDComponentComponent._instantiate(style, () => new ArkAMDComponentComponent, content, updatedInitializers); } export interface AMDComponentOptions { __backing_AMDComponentLink1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/BaseComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/BaseComponent.ts index 99fd61c11..bf21bd47c 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/BaseComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/BaseComponent.ts @@ -1,10 +1,10 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; /** @memo */ function textExtend(fontsize: number) { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(fontsize); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(fontsize); }, undefined, 'Builder'); } class ArkBaseComponentComponent extends ArkStructBase { @@ -38,23 +38,23 @@ class ArkBaseComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: BaseComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'BaseComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testStr: ' + JSON.stringify(this.testStr)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testNum: ' + JSON.stringify(this.testNum)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'testObj: ' + JSON.stringify(this.testObj)); }); } @@ -64,15 +64,15 @@ export {}; /** @memo */ export function BaseComponent(/**/ /** @memo */ -style?: (instance: ArkBaseComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: BaseComponentOptions): ArkBaseComponentComponent { +content?: () => void, initializers?: BaseComponentOptions): void { const updatedInitializers: BaseComponentOptions = { __backing_testStr: initializers?.__backing_testStr, __backing_testNum: initializers?.__backing_testNum, __backing_testObj: initializers?.__backing_testObj }; - return ArkBaseComponentComponent._instantiate(style, () => new ArkBaseComponentComponent, content, updatedInitializers); + ArkBaseComponentComponent._instantiate(style, () => new ArkBaseComponentComponent, content, updatedInitializers); } export interface BaseComponentOptions { __backing_testStr?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DefaultComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DefaultComponent.ts index 1d85faa17..4991f5358 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DefaultComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DefaultComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; class ArkDefaultComponentComponent extends ArkStructBase { @@ -58,32 +58,32 @@ class ArkDefaultComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DefaultComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink1: ' + JSON.stringify(this.DefaultComponentLink1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink2: ' + JSON.stringify(this.DefaultComponentLink2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink3: ' + JSON.stringify(this.DefaultComponentLink3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DefaultComponentLink4: ' + JSON.stringify(this.DefaultComponentLink4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -93,9 +93,9 @@ export {}; /** @memo */ export function DefaultComponent(/**/ /** @memo */ -style?: (instance: ArkDefaultComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: DefaultComponentOptions): ArkDefaultComponentComponent { +content?: () => void, initializers?: DefaultComponentOptions): void { const updatedInitializers: DefaultComponentOptions = { __backing_DefaultComponentLink1: initializers?.__backing_DefaultComponentLink1, __backing_DefaultComponentLink2: initializers?.__backing_DefaultComponentLink2, @@ -104,7 +104,7 @@ content?: () => void, initializers?: DefaultComponentOptions): ArkDefaultCompone myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkDefaultComponentComponent._instantiate(style, () => new ArkDefaultComponentComponent, content, updatedInitializers); + ArkDefaultComponentComponent._instantiate(style, () => new ArkDefaultComponentComponent, content, updatedInitializers); } export interface DefaultComponentOptions { __backing_DefaultComponentLink1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DivideComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DivideComponent.ts index 8a55a23dd..025e02be2 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DivideComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/DivideComponent.ts @@ -1,10 +1,10 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; /** @memo */ function textStyles() { - ArkText((instance: ArkTextComponent) => { - instance.backgroundColor(Color.Red); + ArkText((__instance: ArkTextComponent) => { + __instance.backgroundColor(Color.Red); }, undefined, 'Builder'); } class ArkDivideComponentComponent extends ArkStructBase { @@ -30,17 +30,17 @@ class ArkDivideComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: DivideComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DivideComponent'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'DivideResult: ' + JSON.stringify(this.testNum1 / this.testNum2)); }); } @@ -50,14 +50,14 @@ export {}; /** @memo */ export function DivideComponent(/**/ /** @memo */ -style?: (instance: ArkDivideComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: DivideComponentOptions): ArkDivideComponentComponent { +content?: () => void, initializers?: DivideComponentOptions): void { const updatedInitializers: DivideComponentOptions = { __backing_testNum1: initializers?.__backing_testNum1, __backing_testNum2: initializers?.__backing_testNum2 }; - return ArkDivideComponentComponent._instantiate(style, () => new ArkDivideComponentComponent, content, updatedInitializers); + ArkDivideComponentComponent._instantiate(style, () => new ArkDivideComponentComponent, content, updatedInitializers); } export interface DivideComponentOptions { __backing_testNum1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/ExportComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/ExportComponent.ts index a9c1c6920..bad51a425 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/ExportComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/ExportComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; /* @@ -87,12 +87,12 @@ class ArkExportComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent1Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -175,12 +175,12 @@ class ArkExportComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent2Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -263,12 +263,12 @@ class ArkExportComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent3Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -351,12 +351,12 @@ export default class ArkExportComponent4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: ExportComponent4Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -373,9 +373,9 @@ export {}; /** @memo */ export function ExportComponent1(/**/ /** @memo */ -style?: (instance: ArkExportComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent1Options): ArkExportComponent1Component { +content?: () => void, initializers?: ExportComponent1Options): void { const updatedInitializers: ExportComponent1Options = { __backing_ExportComponent1Link1: initializers?.__backing_ExportComponent1Link1, __backing_ExportComponent1Link2: initializers?.__backing_ExportComponent1Link2, @@ -386,14 +386,14 @@ content?: () => void, initializers?: ExportComponent1Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent1Component._instantiate(style, () => new ArkExportComponent1Component, content, updatedInitializers); + ArkExportComponent1Component._instantiate(style, () => new ArkExportComponent1Component, content, updatedInitializers); } /** @memo */ export function ExportComponent2(/**/ /** @memo */ -style?: (instance: ArkExportComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent2Options): ArkExportComponent2Component { +content?: () => void, initializers?: ExportComponent2Options): void { const updatedInitializers: ExportComponent2Options = { __backing_ExportComponent2Link1: initializers?.__backing_ExportComponent2Link1, __backing_ExportComponent2Link2: initializers?.__backing_ExportComponent2Link2, @@ -404,14 +404,14 @@ content?: () => void, initializers?: ExportComponent2Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent2Component._instantiate(style, () => new ArkExportComponent2Component, content, updatedInitializers); + ArkExportComponent2Component._instantiate(style, () => new ArkExportComponent2Component, content, updatedInitializers); } /** @memo */ export function ExportComponent3(/**/ /** @memo */ -style?: (instance: ArkExportComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent3Options): ArkExportComponent3Component { +content?: () => void, initializers?: ExportComponent3Options): void { const updatedInitializers: ExportComponent3Options = { __backing_ExportComponent3Link1: initializers?.__backing_ExportComponent3Link1, __backing_ExportComponent3Link2: initializers?.__backing_ExportComponent3Link2, @@ -422,14 +422,14 @@ content?: () => void, initializers?: ExportComponent3Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent3Component._instantiate(style, () => new ArkExportComponent3Component, content, updatedInitializers); + ArkExportComponent3Component._instantiate(style, () => new ArkExportComponent3Component, content, updatedInitializers); } /** @memo */ export function ExportComponent4(/**/ /** @memo */ -style?: (instance: ArkExportComponent4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: ExportComponent4Options): ArkExportComponent4Component { +content?: () => void, initializers?: ExportComponent4Options): void { const updatedInitializers: ExportComponent4Options = { __backing_ExportComponent4Link1: initializers?.__backing_ExportComponent4Link1, __backing_ExportComponent4Link2: initializers?.__backing_ExportComponent4Link2, @@ -440,7 +440,7 @@ content?: () => void, initializers?: ExportComponent4Options): ArkExportComponen __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkExportComponent4Component._instantiate(style, () => new ArkExportComponent4Component, content, updatedInitializers); + ArkExportComponent4Component._instantiate(style, () => new ArkExportComponent4Component, content, updatedInitializers); } export interface ExportComponent1Options { __backing_ExportComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/LinkComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/LinkComponent.ts index 649116be8..d880bbdb8 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/LinkComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/LinkComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkRow, ArkStructBase, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, stateOf, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; /* @@ -87,12 +87,12 @@ class ArkLinkComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent1Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -175,12 +175,12 @@ class ArkLinkComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent2Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -263,12 +263,12 @@ class ArkLinkComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent3Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -351,12 +351,12 @@ class ArkLinkComponent4Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: LinkComponent4Options) { - ArkRow(undefined, () => { + ArkRow(__builder, () => { DefaultComponent({ __backing_DefaultComponentLink1: this.__backing_indexState1, __backing_DefaultComponentLink2: this.__backing_indexState2, @@ -374,9 +374,9 @@ export {}; /** @memo */ export function LinkComponent1(/**/ /** @memo */ -style?: (instance: ArkLinkComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent1Options): ArkLinkComponent1Component { +content?: () => void, initializers?: LinkComponent1Options): void { const updatedInitializers: LinkComponent1Options = { __backing_LinkComponent1Link1: initializers?.__backing_LinkComponent1Link1, __backing_LinkComponent1Link2: initializers?.__backing_LinkComponent1Link2, @@ -387,14 +387,14 @@ content?: () => void, initializers?: LinkComponent1Options): ArkLinkComponent1Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent1Component._instantiate(style, () => new ArkLinkComponent1Component, content, updatedInitializers); + ArkLinkComponent1Component._instantiate(style, () => new ArkLinkComponent1Component, content, updatedInitializers); } /** @memo */ export function LinkComponent2(/**/ /** @memo */ -style?: (instance: ArkLinkComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent2Options): ArkLinkComponent2Component { +content?: () => void, initializers?: LinkComponent2Options): void { const updatedInitializers: LinkComponent2Options = { __backing_LinkComponent2Link1: initializers?.__backing_LinkComponent2Link1, __backing_LinkComponent2Link2: initializers?.__backing_LinkComponent2Link2, @@ -405,14 +405,14 @@ content?: () => void, initializers?: LinkComponent2Options): ArkLinkComponent2Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent2Component._instantiate(style, () => new ArkLinkComponent2Component, content, updatedInitializers); + ArkLinkComponent2Component._instantiate(style, () => new ArkLinkComponent2Component, content, updatedInitializers); } /** @memo */ export function LinkComponent3(/**/ /** @memo */ -style?: (instance: ArkLinkComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent3Options): ArkLinkComponent3Component { +content?: () => void, initializers?: LinkComponent3Options): void { const updatedInitializers: LinkComponent3Options = { __backing_LinkComponent3Link1: initializers?.__backing_LinkComponent3Link1, __backing_LinkComponent3Link2: initializers?.__backing_LinkComponent3Link2, @@ -423,14 +423,14 @@ content?: () => void, initializers?: LinkComponent3Options): ArkLinkComponent3Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent3Component._instantiate(style, () => new ArkLinkComponent3Component, content, updatedInitializers); + ArkLinkComponent3Component._instantiate(style, () => new ArkLinkComponent3Component, content, updatedInitializers); } /** @memo */ export function LinkComponent4(/**/ /** @memo */ -style?: (instance: ArkLinkComponent4Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: LinkComponent4Options): ArkLinkComponent4Component { +content?: () => void, initializers?: LinkComponent4Options): void { const updatedInitializers: LinkComponent4Options = { __backing_LinkComponent3Link1: initializers?.__backing_LinkComponent3Link1, __backing_LinkComponent3Link2: initializers?.__backing_LinkComponent3Link2, @@ -441,7 +441,7 @@ content?: () => void, initializers?: LinkComponent4Options): ArkLinkComponent4Co __backing_indexState3: initializers?.__backing_indexState3, __backing_indexState4: initializers?.__backing_indexState4 }; - return ArkLinkComponent4Component._instantiate(style, () => new ArkLinkComponent4Component, content, updatedInitializers); + ArkLinkComponent4Component._instantiate(style, () => new ArkLinkComponent4Component, content, updatedInitializers); } export interface LinkComponent1Options { __backing_LinkComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/NamespaceComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/NamespaceComponent.ts index 89a4122bf..678f39c0a 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/NamespaceComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/NamespaceComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; class ArkNamespaceComponent1Component extends ArkStructBase { @@ -58,32 +58,32 @@ class ArkNamespaceComponent1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent1Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link1: ' + JSON.stringify(this.NamespaceComponent1Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link2: ' + JSON.stringify(this.NamespaceComponent1Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link3: ' + JSON.stringify(this.NamespaceComponent1Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent1Link4: ' + JSON.stringify(this.NamespaceComponent1Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -145,32 +145,32 @@ class ArkNamespaceComponent2Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent2Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link1: ' + JSON.stringify(this.NamespaceComponent2Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link2: ' + JSON.stringify(this.NamespaceComponent2Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link3: ' + JSON.stringify(this.NamespaceComponent2Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent2Link4: ' + JSON.stringify(this.NamespaceComponent2Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -232,32 +232,32 @@ class ArkNamespaceComponent3Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: NamespaceComponent3Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3'); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link1: ' + JSON.stringify(this.NamespaceComponent3Link1)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link2: ' + JSON.stringify(this.NamespaceComponent3Link2)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link3: ' + JSON.stringify(this.NamespaceComponent3Link3)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'NamespaceComponent3Link4: ' + JSON.stringify(this.NamespaceComponent3Link4)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar: ' + JSON.stringify(this.myVar)); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20); }, undefined, 'myVar2: ' + JSON.stringify(this.myVar2)); }); } @@ -268,9 +268,9 @@ export {}; /** @memo */ export function NamespaceComponent1(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent1Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent1Options): ArkNamespaceComponent1Component { +content?: () => void, initializers?: NamespaceComponent1Options): void { const updatedInitializers: NamespaceComponent1Options = { __backing_NamespaceComponent1Link1: initializers?.__backing_NamespaceComponent1Link1, __backing_NamespaceComponent1Link2: initializers?.__backing_NamespaceComponent1Link2, @@ -279,14 +279,14 @@ content?: () => void, initializers?: NamespaceComponent1Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent1Component._instantiate(style, () => new ArkNamespaceComponent1Component, content, updatedInitializers); + ArkNamespaceComponent1Component._instantiate(style, () => new ArkNamespaceComponent1Component, content, updatedInitializers); } /** @memo */ export function NamespaceComponent2(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent2Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent2Options): ArkNamespaceComponent2Component { +content?: () => void, initializers?: NamespaceComponent2Options): void { const updatedInitializers: NamespaceComponent2Options = { __backing_NamespaceComponent2Link1: initializers?.__backing_NamespaceComponent2Link1, __backing_NamespaceComponent2Link2: initializers?.__backing_NamespaceComponent2Link2, @@ -295,14 +295,14 @@ content?: () => void, initializers?: NamespaceComponent2Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent2Component._instantiate(style, () => new ArkNamespaceComponent2Component, content, updatedInitializers); + ArkNamespaceComponent2Component._instantiate(style, () => new ArkNamespaceComponent2Component, content, updatedInitializers); } /** @memo */ export function NamespaceComponent3(/**/ /** @memo */ -style?: (instance: ArkNamespaceComponent3Component) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: NamespaceComponent3Options): ArkNamespaceComponent3Component { +content?: () => void, initializers?: NamespaceComponent3Options): void { const updatedInitializers: NamespaceComponent3Options = { __backing_NamespaceComponent3Link1: initializers?.__backing_NamespaceComponent3Link1, __backing_NamespaceComponent3Link2: initializers?.__backing_NamespaceComponent3Link2, @@ -311,7 +311,7 @@ content?: () => void, initializers?: NamespaceComponent3Options): ArkNamespaceCo myVar: initializers?.myVar, myVar2: initializers?.myVar2 }; - return ArkNamespaceComponent3Component._instantiate(style, () => new ArkNamespaceComponent3Component, content, updatedInitializers); + ArkNamespaceComponent3Component._instantiate(style, () => new ArkNamespaceComponent3Component, content, updatedInitializers); } export interface NamespaceComponent1Options { __backing_NamespaceComponent1Link1?: MutableState; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/TestComponent.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/TestComponent.ts index d687c40e4..573392ba4 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/TestComponent.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/TestComponent.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkColumn, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkColumn, ArkCommonMethodComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; export class ArkTestComponentComponent extends ArkStructBase { private _entry_local_storage_ = new LocalStorage(); __initializeStruct(/**/ @@ -14,14 +14,14 @@ export class ArkTestComponentComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: TestComponentOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(32); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(32); }, undefined, this.content); }); } @@ -57,14 +57,14 @@ export class ArkCustomContainerExportComponent extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomContainerExportOptions) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(50); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(50); }, undefined, this.header); this.closer(); }); @@ -74,25 +74,25 @@ export {}; /** @memo */ export function TestComponent(/**/ /** @memo */ -style?: (instance: ArkTestComponentComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: TestComponentOptions): ArkTestComponentComponent { +content?: () => void, initializers?: TestComponentOptions): void { const updatedInitializers: TestComponentOptions = { content: initializers?.content }; - return ArkTestComponentComponent._instantiate(style, () => new ArkTestComponentComponent, content, updatedInitializers); + ArkTestComponentComponent._instantiate(style, () => new ArkTestComponentComponent, content, updatedInitializers); } /** @memo */ export function CustomContainerExport(/**/ /** @memo */ -style?: (instance: ArkCustomContainerExportComponent) => void, /**/ +style?: (__instance: ArkCommonMethodComponent) => void, /**/ /** @memo */ -content?: () => void, initializers?: CustomContainerExportOptions): ArkCustomContainerExportComponent { +content?: () => void, initializers?: CustomContainerExportOptions): void { const updatedInitializers: CustomContainerExportOptions = { header: initializers?.header, closer: initializers?.closer }; - return ArkCustomContainerExportComponent._instantiate(style, () => new ArkCustomContainerExportComponent, content, updatedInitializers); + ArkCustomContainerExportComponent._instantiate(style, () => new ArkCustomContainerExportComponent, content, updatedInitializers); } export interface TestComponentOptions { content?: string; diff --git a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/import@CustomDialog.ts b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/import@CustomDialog.ts index d2bdab620..03a30069b 100644 --- a/arkoala/ets-plugin/test/golden/koala/spec/test/pages/import@CustomDialog.ts +++ b/arkoala/ets-plugin/test/golden/koala/spec/test/pages/import@CustomDialog.ts @@ -1,4 +1,4 @@ -import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ArkTextInput, ArkTextInputComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, bindCustomDialog, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; +import { $r, $rawfile, AppStorage, ArkButton, ArkButtonComponent, ArkColumn, ArkCommonMethodComponent, ArkFlex, ArkFlexComponent, ArkPageTransitionEnterComponent, ArkPageTransitionExitComponent, ArkStructBase, ArkText, ArkTextComponent, ArkTextInput, ArkTextInputComponent, CanvasRenderingContext2D, CustomDialogController, DataChangeListener, Environment, ForEach, GestureGroup, IDataSource, LocalStorage, LongPressGesture, Observed, PanGesture, PanGestureOptions, PersistentStorage, PinchGesture, RenderingContextSettings, RotationGesture, Scroller, SubscribedAbstractProperty, SwipeGesture, SwiperController, TabsController, TapGesture, TextAreaController, VideoController, animateTo, bindCustomDialog, fp2px, getContext, getInspectorByKey, lpx2px, px2fp, px2lpx, px2vp, vp2px } from "@koalaui/arkui"; import { MutableState } from "@koalaui/runtime"; import { observableProxy } from "@koalaui/common"; export class ArkCustomDialogExample1Component extends ArkStructBase { @@ -54,35 +54,35 @@ export class ArkCustomDialogExample1Component extends ArkStructBase void) | undefined, /**/ + __builder: ((__instance: ArkCommonMethodComponent) => void) | undefined, /**/ /** @memo */ content?: () => void, initializers?: CustomDialogExample1Options) { - ArkColumn(undefined, () => { - ArkText((instance: ArkTextComponent) => { - instance.fontSize(20).margin({ top: 10, bottom: 10 }); + ArkColumn(__builder, () => { + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(20).margin({ top: 10, bottom: 10 }); }, undefined, 'Change text'); - ArkTextInput((instance: ArkTextInputComponent) => { - instance.height(60).width('90%') + ArkTextInput((__instance: ArkTextInputComponent) => { + __instance.height(60).width('90%') .onChange((value: string) => { this.textValue = value; }); }, undefined, { placeholder: '', text: this.textValue }); - ArkText((instance: ArkTextComponent) => { - instance.fontSize(16).margin({ bottom: 10 }); + ArkText((__instance: ArkTextComponent) => { + __instance.fontSize(16).margin({ bottom: 10 }); }, undefined, 'Whether to change a text?'); - ArkFlex((instance: ArkFlexComponent) => { - instance.margin({ bottom: 10 }); + ArkFlex((__instance: ArkFlexComponent) => { + __instance.margin({ bottom: 10 }); }, () => { - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.controller.close(); this.cancel(); }).backgroundColor(0xffffff).fontColor(Color.Black); }, undefined, 'cancel'); - ArkButton((instance: ArkButtonComponent) => { - instance.onClick(() => { + ArkButton((__instance: ArkButtonComponent) => { + __instance.onClick(() => { this.inputValue = this.textValue; this.controller.close(); this.confirm(); @@ -94,7 +94,7 @@ export class ArkCustomDialogExample1Component extends ArkStructBase new ArkCustomDialogExample1Component, undefined, updatedInitializers); + ArkCustomDialogExample1Component._instantiate(undefined, () => new ArkCustomDialogExample1Component, undefined, updatedInitializers); } export function CustomDialogExample1(initializer: Partial = {}) { return { build: bindCustomDialog(CustomDialogExample1Impl, initializer), buildOptions: initializer }; -- Gitee From 61e8ccc9c8f0f193fa67f12b4eb323a87245fe4c Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Wed, 29 Jan 2025 13:34:13 +0300 Subject: [PATCH 6/7] PR review changes Signed-off-by: Alexander Gorshenev --- arkoala/ets-plugin/src/StructTransformer.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index 0c9d48767..057147aed 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -636,7 +636,6 @@ export class StructTransformer extends AbstractVisitor { this.structOptions.createTypeReference(node), ) ], - //ts.factory.createTypeReferenceNode(className), Void(), ts.factory.createBlock( [ @@ -1005,7 +1004,7 @@ export class StructTransformer extends AbstractVisitor { ) } - addCastTpInitializer(node: ts.CallExpression, originalInitializer: ts.Expression): ts.Expression|undefined { + addCastToInitializer(node: ts.CallExpression, originalInitializer: ts.Expression): ts.Expression|undefined { if (!originalInitializer) return undefined if (isUndefined(originalInitializer)) return originalInitializer @@ -1018,7 +1017,7 @@ export class StructTransformer extends AbstractVisitor { } transformStructCall(node: ts.CallExpression): ts.CallExpression { - let initializer = this.addCastTpInitializer(node, node.arguments[1]) + let initializer = this.addCastToInitializer(node, node.arguments[1]) const newArguments = [ this.createInstanceLambda(node, commonMethodComponentId(this.importer)), -- Gitee From a456ec441421238bb9d2320c3c59f05093a37742 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Wed, 29 Jan 2025 16:33:37 +0300 Subject: [PATCH 7/7] PR review changes Signed-off-by: Alexander Gorshenev --- arkoala/ets-plugin/src/StructTransformer.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index 057147aed..765bca56b 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -87,15 +87,6 @@ import { } from './ApiUtils' import { StructOptions } from "./StructOptions" -function parameterNameIdentifier(name: ts.LeftHandSideExpression): ts.Identifier { - if (ts.isIdentifier(name)) { - const newName = styleInstanceId() - return newName - } else { - throw new Error("expected ETS name to be an Identifier, got: " + ts.SyntaxKind[name.kind]) - } -} - export class StructTransformer extends AbstractVisitor { private structOptions: StructOptions @@ -939,7 +930,7 @@ export class StructTransformer extends AbstractVisitor { return instanceArgument } - const parameterName = parameterNameIdentifier(node.expression) + const parameterName = styleInstanceId() const lambdaParameter = parameter( parameterName, -- Gitee