diff --git a/arkoala-arkts/arkui/src/ArkStructBase.ts b/arkoala-arkts/arkui/src/ArkStructBase.ts index 72dd3be5fa5f4889b47eac0a7643be1b12d42386..5c40d5e86a2d8b6032d5d44ef07202c6fcdc0db7 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 67e7cf8eb4e24270279177b56b15e809751a44fd..66d1dab29aaaf2678e26ac3e58dd255a873739b5 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 bd294465d7b594f10c1fb1ed51e8a7d237126f9d..83b6d0ebe6b0d2cfb948c0c3420208a4b6760240 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 534b2fa53b41a3cb2ffdae51c75d3ded155bd0bb..3d44f4375f50650ed104ba58deb3d39c9e99ff7b 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 94b161e2d79ace1b88690ad9ffdc5adc962e511f..379d6f305726d5a2c3eb3f145f70a887f756be45 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 91d51a3478dda2154d97a52f2c319fcbd04073eb..cc0a73558439130f55df395e842e1f3214609638 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 4c84ac8a6040ba79687f964b7e3cc59d67923f43..837b9c035abb0aab2eb848b91a829e9468328b2c 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 67bedc94bfd3748191b4add72b6a7f76a66266c1..26ab5f3ac997717f5052363ebae61751963029bd 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 c115d0069c7ff31f08a65f32d5e851184135e233..765bca56b3787e74b66cb4ad39284086bec0397f 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -22,11 +22,13 @@ import { adaptorClassName, adaptorComponentName, adaptorEtsName, - adaptorEtsParameterName, backingField, backingFieldName, + buildBuilderArgument, CallTable, collect, + commonMethodComponentId, + commonMethodComponentType, consumeVariableName, contextLocalStateOf, customDialogImplName, @@ -48,12 +50,14 @@ import { isState, isStructCall, LocalStoragePropertyName, + mangle, mangleIfBuild, NameTable, prependDoubleLineMemoComment, prependMemoComment, provideVariableName, RewriteNames, + styleInstanceId, throwError, voidLambdaType, WatchDecorator @@ -83,15 +87,6 @@ import { } from './ApiUtils' import { StructOptions } from "./StructOptions" -function parameterNameIdentifier(name: ts.LeftHandSideExpression): ts.Identifier { - if (ts.isIdentifier(name)) { - const newName = adaptorEtsParameterName(name) - 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 @@ -319,24 +314,89 @@ 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 + + // TODO: check this is a builtin component call!! + + const callExpression = singleStatement.expression + if (!callExpression.arguments?.[0]) return node + const firstArgument = callExpression.arguments[0] + + let newFirstArgument + if (isUndefined(firstArgument)) { + newFirstArgument = id(buildBuilderArgument()) + } else if (ts.isArrowFunction(firstArgument)) { + const firstArgumentBody = firstArgument.body + newFirstArgument = ts.factory.createArrowFunction( + 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.createCallChain( + id(buildBuilderArgument()), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + undefined, + [styleInstanceId()] + ) + ) + ], + true // multiline + ) + ) + } else { + return node + } + + return ts.factory.updateBlock( + node, + [ + ts.factory.updateExpressionStatement( + singleStatement, + ts.factory.updateCallExpression( + callExpression, + callExpression.expression, + callExpression.typeArguments, + [ + newFirstArgument, + ...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]) } - const className = adaptorClassName(node.name!) - const stateParameters = isMainBuild ? [ prependDoubleLineMemoComment( parameter( - "builder", + buildBuilderArgument(), orUndefined( ts.factory.createFunctionTypeNode( undefined, [ parameter( - id("instance"), - ts.factory.createTypeReferenceNode(className), + styleInstanceId(), + commonMethodComponentType(this.importer), ) ], Void() @@ -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) } @@ -510,7 +571,7 @@ export class StructTransformer extends AbstractVisitor { ) ) - const callInstantiate = ts.factory.createReturnStatement( + const callInstantiate = ts.factory.createExpressionStatement( ts.factory.createCallExpression( ts.factory.createPropertyAccessExpression( className, @@ -546,9 +607,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) @@ -566,7 +627,7 @@ export class StructTransformer extends AbstractVisitor { this.structOptions.createTypeReference(node), ) ], - ts.factory.createTypeReferenceNode(className), + Void(), ts.factory.createBlock( [ ...additionalStatements, @@ -869,7 +930,7 @@ export class StructTransformer extends AbstractVisitor { return instanceArgument } - const parameterName = parameterNameIdentifier(node.expression) + const parameterName = styleInstanceId() const lambdaParameter = parameter( parameterName, @@ -934,24 +995,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)) - }`) - } + addCastToInitializer(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.addCastToInitializer(node, node.arguments[1]) const newArguments = [ - undefinedValue(), + this.createInstanceLambda(node, commonMethodComponentId(this.importer)), undefinedValue(), initializer ].filter(isDefined) diff --git a/arkoala/ets-plugin/src/StyleTransformer.ts b/arkoala/ets-plugin/src/StyleTransformer.ts index 52e25b30034c75555df1fce87bc309bceb082548..169a8b0c69d2a436f89ba0876e5447f5d581db4a 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 80cddeed802d6512b14a8d21c17addd343d2b6e9..8204aab492eac2914ddba76d80ca5b762d6f0b82 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" @@ -135,7 +136,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 } @@ -184,12 +185,8 @@ 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 `__backing_${originalName}` + return mangle(`backing_${originalName}`) } export function backingFieldName(originalName: ts.Identifier | ts.PrivateIdentifier): ts.Identifier { @@ -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))) } @@ -560,3 +553,24 @@ 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") +} + +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)) +} diff --git a/arkoala/ets-plugin/test/ets/Rewrite.ets b/arkoala/ets-plugin/test/ets/Rewrite.ets index 0522741118e5e653976a860c40794c47ca11f2ed..bff0c025a65023128ce622ca5d3d183f4fbc000f 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() {} + } +} + diff --git a/arkoala/ets-plugin/test/golden/arkoala/ets/PropertyDeps.ts b/arkoala/ets-plugin/test/golden/arkoala/ets/PropertyDeps.ts index 17aba7ad869735bb9d7034e3ec0e67d48d3a3d1b..3740031b3cb509e67389b252169e6dc4c72a297f 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 9b00408c9110d11ffbe0cafe471013b57a453fa0..8b6b7380958e5e2c226808a0d5c44de19403182f 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 6c7b7164b850e9cf4d84f96054f2861cd51f631a..855bd3aa408b819634749cafbed8538ed15cd55c 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 35f95da96001b8d140eec21f2c5ca0d2697c2c64..be3830d50ea0ae93e7c81a6cbfa853099040d7b1 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 26f1c13e3c36942e31304ff0484c8ab4750ceb7d..930f8d9659d19fc0f854bae18dc3c559e35c91c1 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 14210bd5fa734250ec19d3de5e90e77dce1ff197..266abf2d4cd339da5e890e0b86c1d4218ec62b3f 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 b184d58d2f34aa4aee4fe16215e039618ce1ec4f..afe7e3402a218810e9d0e0cca8b8c18c53ea27c3 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 41e5444db284b169052c8fcafa29863d1643cb01..bee38fcbfde5df73abf695b411959ea43004d039 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 a17bed388accd5fb513119dbfbf57121cadb0c29..d13bb1641a8c1fb519a9b3cf7f150e1c5b8b132a 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 5404a845b940a7c8ef0f259a481cf8dca180042f..513cbccb48e4469f59c3e498790cf70fb75e3e6b 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 70c79ea973dc802b1260aebf5bff230565f2a64a..561e2ee3c72fc614f7220d12134bf7f20b8ec83c 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 2bb93bf2e03b01a1f6b46522cb88c784cc862f75..a7d656dfadacf6ea38ad2887ba7d21f0aa9ef0e6 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 5e6eafd2713029a7640c71bc35515868b204fe47..2f9b5d1ddc5449a52da07d51e92afa122919d55c 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 de73e5dfaa883f4123d19e5fbf41b07d2c797a96..df4a9205877729adbddf6518558c2dff58d73a55 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 e8958b42e03fe6308447fb1a7eab2a57c8176cfb..d4826f0be71d86cb64457afddaef832e581351c2 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 bc1c4f46ef0609c211a0054cd58613bfa77e33ab..0c8fc356ec442fd293e202bd7651efa360f84d2e 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 aba6a282e33c5121e8151de025b5a963b5079689..f5001d274382a13e613ef9a2e09dbc4981625bff 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 0e0cacaf93fc00d6e6da6d0a5eda2db99f1e1887..f212751bc873e44ed79b8f3906f95ceb5bc824f7 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 ca092138f3e3acd3f9eda269bd205ca0e8a5de82..aa01d3866da0701ae1977cd78ce43c4562844236 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 0ad86f07ed934e9844e92d211635920ef34edd6d..d297c662bead0c16076fa0cbd281d6dc583c3278 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 5c94beae97f2b22fabb115c026e97baae6f140cf..a924279538ce65ba33e2b437fd5a251ea7915098 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 e2a4ea3551b6d16aebedf4c466c7fb199c33bd95..ac6ae60c016c1b6c28f398e9f583dc8ffe137ebe 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 da7b42656ef59e18f35e31406a66a14e2c11914a..e831d70c6f8c03f1a78f657b31df3fcbd447e7c7 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 d2ca15cff0aac17a683ee9719db7e02037171ed1..7fc548269d37ecbc8f9542e44277a984ab7a4051 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 03725cdcaf26cc6b8aeca825e20093e9e476d9eb..315341422bc21a20caabad7313beae3e33279915 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 187d20b755c111aafbdc0366f18dfe9146fc8554..460474718ec5be4fa93d9a0b174bece571fd0bbd 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 ba832306a59da1509c48a443200898dcdfba77e9..637895cc1e99865a8d988e55582382cd189cc96f 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 e99722b374fc325f857560d5f68d3c9514c54b1a..5769b31f16949c4ce094cd9e58c3de2efad722ad 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 8d533405442bdea91367b3fb7d27dbadbb42c871..8f5374c8028cb3a8f27b489f9692baad9c056ef8 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 21d1a4b184fc9a893fa0c9f67b65393280e2396e..14fbb92cb35d3b76313b497bb772f88d8e8d39fe 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 995feef0d8b48d2af80c08e56456ddf92a1c3252..3da1c6dde86ad494aa64cc4f4138c3e2a89e4853 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 6d9d2e077e92942fe80918426c2473c7e3a9dfd4..8d8b770463d8c7e10e27c0fed2370d2df60d3850 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 8a5b0f8992226a73797f314057693f6d1589a24b..9a74805dca8e7e3a2f1ff8448201330eed3b2db0 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 7372aab9c27d38483b48bfd58d56b373c3655a38..244638f0880f1d810e3d5683007d013b41928fe9 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 3d34f7518177acaea5a676ee236a8d69e3342237..2a5495e083f3b6d89c8aacebfc98a7bb4b462776 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 2c669ae5b3c20fab2c8a3b3dfbd9778856b1bf6d..6032e72ab3537b1641ccde58837c2eb55ab781d0 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 9425890963ba3b81a3e9fa9b0ff04aa8e9915859..b347d26f024a6dcc89c7913a8e731cce232787f7 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 57fdb02cb5212015cc5800290427fbbcfec1f42c..6f9e5649b2ff5ae92622582ee4ad5258880846fa 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 7e030e5dd3ed837d5caa30b9ea58647c50ab8ed4..37828818a42939fa517570c94174385efda0943a 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 ad8a76a56823bb59942bd2f200ee9a7e43945a99..f33c972dbca354be292a30a2cd661aba63c4b193 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 ef66da9030cc99e1c5a625bbbf042f630de41494..6b1d0318b3f7bfb52e62b486aba3109c22dcd6e8 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 7ce3db6e4c1f99f38c4826b5d0b2217215ae6eea..0876d2b18c5c6f590565b92f6542dd123e54e965 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 cfc8f3625c28e884fc98d0eb18c6b0de6c0e8782..f87c5bb9500be22258fc015546bdc07a42340bc0 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 e29a76e4b5f76cca6b7d12fece79b9188d388d20..6bdaa9c32a832443c9910d88699fbfd936ee682f 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 b158bf54d718a94a0702e97987c20895ed7b7563..6d7848a61351d1b75c5153c984657eda583d50cf 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 de75f3a4f3804653a982d34e3f1a9941dbc33eda..16c162295bd7e1cf30864fc276065d59f1ecc5d0 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 c8cca8998d3b29ef2d1b197f0feaa0bacd4783fc..933c06ec0a9eeb8271607fc2fbe89b9e2064db02 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 3dd27356d1ddeb29f7be7ed372b151c60e66133c..a9f493540b8f0c7feb86a99873647b66823acdfa 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 d8c5c4cf3e71fe9ed0cc8a10c0ac819521688f31..a50b1a59863eec8ce28f7771ba242346c4055ee2 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 a4c6a850faf7daf9583a0423a3cd8ec9be3e15a9..a28e7cd1348388da9544df7b021e513604f1e940 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 d8051e03b315e9e0e7b5b603cc326f0428bfb956..4ccfe54563fb292a4243a94775085bb6eb626a7e 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 47717ddefd9bdaea73c5411336f0afdd4bc95189..abe11bf8c227a2a47034af6d1d84b4192e5f6cce 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 b64de7c218f5c85d54fe4c27fef69c98d2665914..9a01cdd81ab18f64e908a9b0ead01a66e3546fd1 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 4e7fddbb987d1c101191a701cae7d7f2b63f50f1..e905d404239bbee5e7b77e2322d6409aac83ba91 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 02a538360f9ee62bf98bba39e928aa16fe35dc95..cc6916921c6bc07166e9c069e82dd913e10b783c 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 43688fa33bc221de642fbe091378e61cb45f3563..9305184faf5a75430dd45b008899433add4b165d 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 eda442a612f52514cecdab4428279332fab9dc2f..538149cebcd92a5355aebc74ce8cef86ed6f6119 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 f63c38d182b5c6fd9c2ffe418f12129e7a1bb5a1..ed20a7c6cb2c6446ab5ed98158bd5d61a90061c5 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 5f7b4bb8267272eab4da397130364fd52f0ca67d..76f7480783cac81663d7650da2f2466b0690e206 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 3bbb754e13c5267f1e8553c75208ded36ad2f884..1433c653e7314a4330cfd85479bc08cf504d116b 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 9f31413c3383a0f192dd7ad6c329978481f7008c..10a1e0bfe398f740586e7e9d834cee4c2a24df52 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 0fb855312fe1dbfaad10cf882726f1eb86b4e11e..3f1dc0f1136de7b204b9968c309d4024ed732d48 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 ddb767569bf53bf2ed4a7f1a42fd41770c9c85d1..f0f83a8b8712a34fad830199652de5104c6c7003 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 8bcdfcde276721babc5c1cdbbd7ce9c18aac5b3d..a75bec4eae30f1cd7e1191f2540dc61fe69bdb33 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 518546e0b38b90341ca78801b5e037985091f473..e2f173a8001750e17299a982492c325636bc0886 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 415f7e3c4301ee6c98b15df0024ef3d7f63cda73..b1611183157f1980b95d57a88900192db0cab966 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 b4e91db51867e95cc6afc39477a00d34b8b5b38c..b837c566054c2acd06b24a43aa6f8697844115ba 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 66e5059b2011545495682fd240052cd30902d989..ae0f9a3268857dd998849276358fd2b9bb47606b 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 eaf7f3a3413da4056d2805b658d6fe469c51e2a0..3a0bb053b292e60f3f631ec71a8f21b3e96c8d3c 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 a6103cf2ccfc24a41c54a061bf07ec05d55171f8..9db49240887eb47025dd85efa14155964378a244 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 b4b056a536506dff273ae7a39c6a38fbbd702c9e..80b504078fb7460e40cdc36fabbbfd80f43992bf 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 39f299667b587f596c53556e96eebaea89010cc8..1d26891eea43414fe7d2d7ab86efa484eb88a9e8 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 85f1322e40d2462c79ec922d9a008c461339ab52..95152e8c1577702ec33bf912f66020a7c53a5f5c 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 114f8e7b54ef24f02ceaaf596440e66e71c628a9..48ed33138f23d3ef5e7e31e9dd9541ef1ea11e48 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 4937637a69299f64d4266e17464f5bb8aa924d7d..d1593b12dc163b5080344c56bc4ca121fa22c1bd 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 771ff1f585bff1bd0061c9524b8ea06c48b325e0..d4ff3f09d5eb20934a734477f7b812387f9920cd 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 d5a029200a75f67337d15a0de1e29d9067a30b9c..1eb4f0f688406d4d8e9dd1100c36dc9ccc8c0b7b 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 3ecdcf0759f55dc957ab61084fbefe0f12723c6d..e2af6038c6b6adf4f9f9460c007faff6eec198ec 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 140e17f20e6935c311765ce723bdd5354509476f..9ada71d5d6e0263955a6623bc4da059d35fa37ef 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 72670addd31b58852168be3271753bc6275ee261..cefb865799cc23c8372e54b6d19366a59fb797a0 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 9c2f1c1b5c50737c314b8cde91f51c98db14d005..b18de3e065996f1cbf21723f9c0ca4bc8f07604a 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 7e563d846162c3affc5f761d2ee6208739e8ddab..c95c6ecf22720f14080ed4528c35f7d0068921c5 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 e0cd18658dfa476760c9e3941fe4a4e9d27841c6..4cc2bc3c05cfed004a0d1b72fb745d8022ff1231 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 43051d0022b0f543b177ca17efedab77d83f1f45..ce44a95a0e23d8f3b8a1a006bddc557bcc670e2b 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 f6952dacb4c1af2fdd73f34699c4ed5fbc05cf00..1ace13e9196a1345f45af798342747aaf0a099de 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 4e6a475bb6b0394cf2b2e9872b0ef489202cf94e..039117e9ac248f334e5db34620a92376babe6864 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 9b661d6e445b2f0ac19694cf6e40e2e3ea68cf03..8a716ecd11e97c11ebd93a02bfa191c9028d38a3 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 1d30be1cf5820e751a08ae853d97a8692b56583e..c35fc4d693fc9a38c6ba5accac193ba65601f812 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 7d45ceab52125ddfc661c074036a523d26e4b06e..09b8ac1ac9b6a15040f6e09156ee5e15694307b6 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 d88e3a91b150bf546ccaf8a77330dd507cd77cf4..6c4ada021b6bbead1e3de3ac55b7dc9b18870c27 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 0714dfe50000d3b03a5ea8ac04d01556e14d938e..32f190e275573b59bfe082b2b1a999cf52d05c4f 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 0f0c99eeefe519645c564a7f9dd70cd2fc8db5f4..b2e7cd520ffc82cb36ccefba00e3e05f2a457e28 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 a38b65af2ff49d9f2fd90d359733f5c422d140c0..2bd8c1d493582665e352c6e23d986dd3d45a391c 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 78f4f2202069198af71b8af30f40ffb354257033..53422853e0432d65063d29d770e6a945b7c7c776 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 aee17092a120419adbea300e45903cb11fcc8b2e..6fef7ca78a82ccf4434c83ac9282c1eb00e0c685 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 76d73f1be3d1f95ad53297c1e9ba64ddcef4874c..b99555ebff0baa2dba8781a4f749e797e1d5610d 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 0772307eb29b28a4d9bd415811b341dc810edfbb..83383c978c514785690b37158b4e58e614d5098a 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 fd4f90f1ab81e143e33e86e0abe98ae27efb238c..17d15800a0c097de08649a8b39210dbea17484ba 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 97f499909e46ba0013570b8bc172892cad1af990..ee477bffba9d755827fb2a40401b67f51cb3ee88 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 97f499909e46ba0013570b8bc172892cad1af990..ee477bffba9d755827fb2a40401b67f51cb3ee88 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 09b146c20ede3ca25059d0670814c17d70c7697b..474d717bcffd105a53ce6ac51372ea6ad2e58f89 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 36832a6be1f7a81d4cb32cf2fecf6773502877eb..0cf7f6c95473fa354c8102428a8160d73684c7fd 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 57a7110e06dd62aeb32648a737eee421f5c2de7b..80f7579334302874d0fd5e92c47c6e5886eecbb9 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 5b21ba3734eff91454850ac0c897f951acf82f06..cbef9e8631811f5cf5a526113e5b11fc6c2af6e9 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 2509bef06180faafd93dee2263a79acba8ce0c1c..77942826181706e876503c8bf1c1c79075907c2a 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 d00ce52c69cae34f4ad23ba676cd20442f086b42..dd10d9098417282801644aded580fc1fbbdd43af 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 584c0b170da8bba5112cec0e0e9ae740ddb255ed..2e579335db1bd83f6759f856a354cd31cc75df1f 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 beb0c699c41c20f960dd33f102066ace9805f4e5..22ac6c543b72b4309bf3e446ea52a90b9576405f 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 97f499909e46ba0013570b8bc172892cad1af990..ee477bffba9d755827fb2a40401b67f51cb3ee88 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 307d2f34f8ff6160ccb0b37ceb7339e2362a0d6b..f483e4d024d190c10c680ada250dbdbe8564eede 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 9cf5d74acdf29324c142cc466ff1cdbc03ee3d4a..a766edfd613ce752fa1e18685a4b0caeec2896ee 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 7f58d385f3ad4a6f57a0cac27aa9f1ebddbadc71..17b1cf136b5b5304143fc6bcf526ccaa4c08eadd 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 67fa064bb81a9603c39eb96b5cdbdbb078439185..ca00d7015e4adeb18463be5970eb6ebd725842aa 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 e27d25c1b3fbc8276a366570a468557a9b347be1..d402e87c67e9789352155f3d55cd50ccac02443e 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 64d1c19cfe9e0df66e222de94a0d990f0a643ea0..2c7f4972fea297e82a432b053673c6f29b9a7da6 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 1725e3f3a6a68813a0a5c5403e0d2308498906a9..141632b838c0ee29a50d1e3cd4117912bd56ef58 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 2d471c90f84b789d4c8d49ac689cf6886d6c6219..60a5bc487cb8d3591ee24fc8f8ba5fda56d400ae 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 6a071cf0017ed0098b879d9bca29f1239f79990b..c02ce0eb140d2db8526302e5242ad2014afc73c2 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 3ada7f0f7994bb0bb1945c2f2640c6b6d3d4adc7..e3ef6c8384683dd6cb42e958accba85de406bd82 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 7ad185d91f4ab6b1e365f57e1c4d8a5cc97e9db6..0baf8cbfe2e07189a4ca444b4809094806ac1ac4 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 4cabafdddfe16472a4c2d501dcf96efdc728285e..be4ed0dce7da27ad07bc558fedc999a4d750a88c 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 8fc50345d4c3ea1830d6ddbc20b8d6827f44e16a..9a80d5e8dfb06c21f3871703a4947312bf7a4ba8 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 8e1b64021fa20668c9ece1fe78a052701aa79b91..9a8f0791ff2772909b1906a199038451a32263c0 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 e7028b2cd16eeaf3efc365aed930dfc3d3c2074a..99e534c742cf36f2ac6cbe65ad1133e665c24a6f 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 8e1b64021fa20668c9ece1fe78a052701aa79b91..9a8f0791ff2772909b1906a199038451a32263c0 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 a7e2f70cf8559aff874d1e1ba322346c8034e383..772561aaa45829d6831b0c8f7be279e6a88a8336 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 c091a4365661643ea6dbffc4cd7add7865c42b18..44495426259ce5d954cea4ed37fd0aef60eb20c1 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 5173d371cba84959d282817bf2f11dd0bb81cc14..f698ffd34d3c5c6fb95ec2bd8963ae72036f940e 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 59a4cd2a516869c00c3cd196eb47a407740ab084..9ae67b53ea8c0d653a53dc7aa0ac58ed05d89592 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 0c4d316efbcd20a2fb237b0c49e9f358a384e829..bd9264e93a3f9f302fe0b76f696ef287964f7b1d 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 d92e22606c5c2f736fa62be5a910ec18450b27ee..e962969d106489a346b5cafba0e2aea13e619032 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 a5e7d56b27b7b49f435a714ab89cd6908490bc72..15f705d3765cf9c9df0d65ef20cd48af173bca76 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 07b0266a06a47bc4e8743c32c92c3d1dc69a6d81..6366ffb74500d265cb8e97ee5cc51c2cf6ea7ada 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 6207de04569d474100ad603eb0736d7ef1155136..60987395012c5c092f60dcec781c177acaee7205 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 f467ba12186a46b4047534b3da4bb4edf11c4447..5780a004c0daf81617ab4b1f5f9a0c3585d6993d 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 82af899260d97a8552ac1ad209613235e47ecac4..dbe831e4516da10503aa024c3068fe09bdf71a73 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 eef0d26284bad4ccc059dd97323821283f1a6acd..c9e0529b317586a7af822356cbc919b8ed707507 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 13de98edfb5a1d4545ff599d3fc7663f730d30f0..310f53801b850aba0c0af752b48a9eaf23c14c81 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 de8292386b408884d3ebf90428395f149520dbd6..b4cc48178531c8f687459577f3de0bae38094e6b 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 5a63f8b0201e36a065312946defdc74333917ace..78cd1a247bc62aedd2e963356341ee40ba77bfec 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 faf62bd49c285affe01484104ab8f2693e3b5c69..481d198b49d6360b04b3f2882642411024a84d77 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 7188cd8c8615478685aad6ca9cf351b229ee72c7..739d698afd01edf365ff3f0a501f6a2a21dbcf03 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 43b7fb6b3659776af624f1d137c3aacdf13083d8..e902592be664f090906bfb9b333f3111b1e34cbc 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 3c254609c7cf49d3a413fe8fb9a6d250594df89f..92f1ec7438547860ba4116b2b97744fed4b5d31d 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 4099d3f0629d505d99ea9fd01f04f84c06ce0d24..6789f6911efaade7fd4b360c166cac6237e91fb5 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 c9ce07ff0ca0b926d44e7714eb39f42830cd8330..79479435441b3b2cdb8e48d3d008a3bb3480f1b3 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 75732964a9810cee83dced82ae70b0a8be7236fa..feedcfb75889ab28b042ef2679237c8c377711f2 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 725455df57dea4f0141ccfebc8acbfb05e61d132..a8726ddac7bf5f06243ea4684b27d9e2a77dbe1f 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 4c9bbb69674866fd12c4c1376a9306263474ddb3..94df568c5d8b2f5291abdd7b0febb01b33a7ae98 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 8508c3af7cf647080e5f6ebb46b26b75e5acdfe5..d580cb8e9d58a86855ce1710073c2bcb90dbb39f 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 72a04a8526013e1113dbe02154808ec97f92cc65..d3095acd6c30d6a326da28c21d8f2168cefe02b6 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 b5b8f2a3f47134406385a6f5f3059eefacd6cc2c..22be2c938c0036d1bcfc2964937b6122f2d35e43 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 8ce2b1e99e1596d8a00e52a2e7106902c5c266f3..fc97051bcb5cafe04fab514e4f0cd28871dff59b 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 036756acc345b59529c4d35ae00da7df2f3a06a4..e358a50ecd96c2b9d534887522180d6dc8ee6e5a 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 3968c7ada77d3f44ea408b72cf8f87b59adbeba2..3037d71f79e508c9b7f1115408bf345c5883d4e3 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 d0c507dc840e86b5c99fddc6f312a0e224527624..79fb337aaf4ac2e8e2e013faf65c5407232ea7d9 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 6f1672e6da55b2993ac41af1f1733cae90f60662..86aeed5e28d536fd9228918c3e180267ecad4d89 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 1046f503e3c5e6a9a355eb4e09951bca1396c8a0..0a892fdf0385a083b1fddea7c2e594c38d8cffb7 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 8254adc8d5e6a987dd1a822cfa7f5a4a9285cab9..7595007a0981830b3cb95d134abedab34b712fbe 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 ee397865fcea07b3a32b635c29c846b0f01136a4..50147adeff5f053b821819e116fb6c0f90474a53 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 6e3e14c00da004a15dc5950b27d5d39ab07e63b6..c752a4be5d0191ca0ebf5f217590bcc6c3d783bd 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 a82e004d73f4083089a5b79c33bd2190282db802..5573617f38c094d3b5c868ccc0a74dcf4ee6762d 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 c4a10074f7f40505c0adf17810d0a18690aae778..a9fb2d6ffbcf5a62109f3b7fa9f5679e5e9386ca 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 302292393e62ab9469f04d418db08af5f5ac2fc7..e58692b6fb80e46552f2ba9ee856a1a9711198d9 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 9fe652537713e39a1eb768cdd2494c7687825052..22f26f0d595b23e8bfe5a3d1eae956e8ff0fbc6d 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 c6e4e0e1b915de22d1df2c0bc5501c1645cc77e8..dd8e07ae1e4f253ba759b03e2d19abf711563c2b 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 620ea650471c35f699c256be0e2888ecf9e4f98e..54ea0577c92ab72c2e1149328b4f81ead7be67c0 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 e9f4a44553890ecf2883657ac1dff668c30c4b28..12223176275d95e2406f05fabbec704918aa6eec 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 2e1c13d9587d0250005406134aba4571dd5b4dce..87defb14faff0499abb5ffa75c72b7928b8222a2 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 02f6acefbb2135e31746697b51b7e33623d2b285..83e242ef6793b57ada9863ded4729d922d902902 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 4c79685f67757ad9dd0c8f7a0bb169b7da16072b..d7749bd3ad8486fc516b6951c365a0668c736751 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 ecb61aeac2e07362708c143600b5b35b2eccb74b..1f4a2d20a63e3df66546d8cec7d62e4d886dadbc 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 82ba90ad5b55eb7f60ad2bfb7fcf2213bbaa37e5..770a4cf40316bfa4096664fd4c32368e7b0309fb 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 e045bf354bd582ec507a4ec8fac45726e3a1aa73..d00ef32c695ae603c2646b308baf22d2dc356542 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 da4ba4270624ff4bf00e5eabf39c4ea9299c7bdf..a0ff453ab85982914b71f7d44848d81cecdeac2c 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 b25734bb2fccd556c081eee1a1b8e8452bdcec75..488a2cd88e76a187a1d93722f6997cceaa5de02c 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 5e2a33d2ef377516a951e28f32cf7d5017b166dc..c9a5b765b32a509b2a35537d6c6bf4ba5708e47e 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 b7b683c61ee15cc1b09e35c3d6e4ae54171f8c37..64d20e595ff439137b5960bfde8971421fcee8ba 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 a025253a93383d33cc934bda419c0a7842e12740..baa7da551a15ae5a95a5de4c6ea1a358a127217f 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 764e970bfe5a4e07c8c84a4c9125c61254c60b8b..86ee71ab6dbaa0d627c3d3641b7c6aa4aec9866c 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 1134d9738e4501454563593379cf3af7b9cacd70..4f429aab89b5b3669d9ac5cbfd5062840c36d581 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 7d8dcf2396713ea1b495012fe1cf4b840d4d4b7a..4b4d0fb2714f1bc0fbdf6d7c862d686caa94e7b3 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 7fe9d73505ea590ca4e24082fed0e5c0e741d199..e1b5803314aece031b2b069886801e6d6c7aa6d1 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 a0d1f7b709fa1ad239ab5a1ee7860a72f186a31f..5b23df24b239bc6246fa390a6447d17b2d8e05d4 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 f2de5563b1b8008dfc90a1edb311d5fcd6dc9ba0..c329f8c356fc03b7a33b48d5ecb13f75c1640072 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 381e9639452e436d20dff298168f5008e90365f8..7325b12e6cdf4b1420bb4ee27a1fe51013cc23ab 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 7964bda49d184710167b7809511a8677ab01b99f..f24a2526e8b02b2ba0b76b6c9aa93b4fba072b23 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 af59983ca76bac54cac429de395bab3da26fa36e..a91c846cef7b0632b36b6a6160ab0a2898f57cb1 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 aec5cf3387ae8192ce00e8108e464a50f2904b42..eec3b45b9f011bb1a6da6866c3240fa3331e9651 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 371a9ceecf1cc3f287d62a1e21cc23b2c183e667..f69dc79330f4a496eca8dded41e08d495cb4e954 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 9043c4edb4d438b622e788a5a023d40b7bbb3137..9cf83350892105b12c58cb6f97ee31f1a94c9c1c 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 9777a0058ac645d933af65bea3f99bef4c243a43..36b6c4275d512f95e55b95f7d31599caa183bd77 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 ff89260c652294ee1888a472ebbf3cd25fc1abff..1c980e56fa905894ad8a2fc1f3b955b809b3640d 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 2ddb8cdf0cc435de59e99dc187a103f027cea91f..c2385ca4fd4701bedaec0478ddcc1b7120438b48 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 80cf91f404abd9ffc275826bffdccce87467adc0..db74183075bd597094de3d2a40ad4d16c53e12a2 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 83fe8176f8857529005d0e8355ee0efd6b25ee02..6d0ce48cdeb5b99dc5f80fb52072f4d0a9b5040d 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 d59f286a7271e117bfe43c6babf35935b0fbc6c6..174ca3738da5bb1a1c445bd723c67ebb5d3c6f42 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 576be0f2237179c23d0a22bafcbfee0a437af4f0..a5dd98e4b5c556b31dfbfcd9b22ed51a2509d9f4 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 a21c358ee5e070bb63e61f36a00409c9ea9284db..4a5f24dc9fff944c0d142f15ab37f8a16a70977c 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 a88f27966a0c01e52b24b860a1964178763dad8e..442c1f6110e73b2a03c1737d56b6853cf6ecdd0c 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 978addb7c1104a9d34fbbeb66ba40bb3ff956eab..a3d9633c36c94e771cceb19fe3b651bf0eaaa706 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 88d2bbac4a806d7035568fb28467425e40b1ea36..c15b2558377cbd4210c58e3838f96f3371ea37e6 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 ae6270b387615a38230962262bc75ac8b7a8b497..f98a0d360a65680dfe5f2e5676640feed27fecde 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 0612524e6251bd7d61760973652d5550f1bb3aad..57716196b856dc4aa2934bec62e3e2272bdabb9f 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 df9724d6392790f30add673a079791555bb9a3d5..af72445a1fb15c569e7f08de70aa7973b2e16b5b 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 70b8b6a684fc770d5e53a9fbf7ee7c1ffdfd137a..548a958a4239e1871404a7e8bd783e7ea23b764a 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 68a0d1c2bccadfcce7d0ebf49a934dd6cd809875..52cd2f4d68947982f34b7b80537d36b1d6191d0d 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 24852fb32a264d600e322bd3636d5dce327c2782..3f76900396118c68e831cb4f20f8b597d778e3ec 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 e3faf58e0e6e3b6aee1c0db6f78f112c833099c6..22aa5eeb6895a987a7b81c41c90a5d20e0f0cdcf 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 61f8428436cb5abd671b7840b4be81ea5146c3d5..b1c7667375ffad3ece03e74c84e7d09e1b3bf66a 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 48eed8b8fc032718fee706dc6394b9a7a6e5a025..546ed14aa50bdba2cd7935ce9f510ee4a4bc5312 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 e0bf568411ea8160a78cac878050d2d54cb3521b..d89adcb421f4fb64198608072befdfd62bb41d0f 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 1c594d845a466271395d5e6f4cae89d442960459..81d90750ef6a9450311df383e4a3db959a494b73 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 e468ab782615068f49fa34dcb4c5c752d171fe5d..16cc2f207283800638e24bcd9f77fe5f3609b8dd 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 975d78fb28ab5d9e4d85d35072fbfa209300c85e..d32e814f5aea0b9db71e2f5d61a358195290620f 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 70e520afac6290c5b8f437656252f93d3fefbd52..ad20a9d20d234acd7f9e64afc49e06ec0da4f391 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 154099f29a30329be9bc35a4218707fd9a58df30..2de2219be7fc6d627a989f74a2b797605c7d2fa0 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 c87d909a13ef27ee8f5c5546ca52799728502a66..ae5c58341da617ac65214f204ca28cf853571694 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 2860a8194866273f19fae049fc298dac242a3920..7bf08865fb31b17a7ac6fa87c24e6dc8fe18cbe5 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 9dc977ec86f1ccc8a36e8f1eabcc70d5b8e4d8e9..9132dee10dc701c66c1f8e2140add684793eb1a5 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 99fd61c1192823cbbf8885330dbf12f0eec0fda7..bf21bd47ca022614758d2300551e96f7e0ee0848 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 1d85faa178ebfd25be35fec5cc2e1cd4390b57a4..4991f5358c306f73e5d51fa75dacb07939602b74 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 8a55a23dd4d9cd608c0c107f5daa4e0479932568..025e02be2cfb9d8e74003849fb39d6936388393a 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 a9c1c6920ebf75cdb362d52e94ebbf7ac6af9d5c..bad51a42520c56d1d294b683f179b21feac02c02 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 649116be8163ec3085806c36914d3e07113cd7f5..d880bbdb825526a6021c0157fede628268660d1c 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 89a4122bf2d4b8c04ff44258ec9d1aa436eba703..678f39c0a5bea87954d1ecf7be8ea2e6ff17fe43 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 d687c40e427bacb37105f8d23d0fe5a9dafbc31e..573392ba42856c2cd60a01c7bfb494b0b94b1199 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 d2bdab62036153d964dbdb7955b3cc5ae76c13bf..03a30069b99d1ae87be63215b5d8506bd67ac8c4 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 };