From 726194180b9c4fb2ed65396d92713db82c15a56b Mon Sep 17 00:00:00 2001 From: WendongPang Date: Wed, 13 Aug 2025 17:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=83=E5=B1=80=E7=BB=84=E4=BB=B6=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=BC=8F=E8=8A=82=E7=82=B9=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: WendongPang --- .../arkoala-arkts/arkui-ohos/src/FrameNode.ts | 30 +-- .../arkui-ohos/src/component/column.ts | 252 ++++++++++-------- .../arkui-ohos/src/component/columnSplit.ts | 2 +- .../arkui-ohos/src/component/component3d.ts | 2 +- .../arkui-ohos/src/component/containerSpan.ts | 2 +- .../arkui-ohos/src/component/counter.ts | 2 +- .../arkui-ohos/src/component/dataPanel.ts | 2 +- .../arkui-ohos/src/component/datePicker.ts | 2 +- .../arkui-ohos/src/component/divider.ts | 2 +- .../src/component/embeddedComponent.ts | 2 +- .../arkui-ohos/src/component/flex.ts | 2 +- .../arkui-ohos/src/component/folderStack.ts | 2 +- .../arkui-ohos/src/component/formComponent.ts | 2 +- .../arkui-ohos/src/component/gauge.ts | 2 +- .../arkui-ohos/src/component/grid.ts | 2 +- .../arkui-ohos/src/component/gridCol.ts | 2 +- .../arkui-ohos/src/component/gridItem.ts | 2 +- .../arkui-ohos/src/component/gridRow.ts | 2 +- .../arkui-ohos/src/component/hyperlink.ts | 2 +- .../arkui-ohos/src/component/image.ts | 2 +- .../arkui-ohos/src/component/imageAnimator.ts | 2 +- .../arkui-ohos/src/component/imageSpan.ts | 2 +- .../src/component/indicatorcomponent.ts | 2 +- .../src/component/lazyGridLayout.ts | 4 +- .../arkui-ohos/src/component/line.ts | 2 +- .../src/component/linearindicator.ts | 2 +- .../arkui-ohos/src/component/listItem.ts | 2 +- .../arkui-ohos/src/component/listItemGroup.ts | 2 +- .../src/component/loadingProgress.ts | 2 +- .../src/component/locationButton.ts | 2 +- .../arkui-ohos/src/component/marquee.ts | 2 +- .../arkui-ohos/src/component/menu.ts | 2 +- .../arkui-ohos/src/component/menuItem.ts | 2 +- .../src/component/navDestination.ts | 2 +- .../arkui-ohos/src/component/navRouter.ts | 2 +- .../arkui-ohos/src/component/navigator.ts | 2 +- .../arkui-ohos/src/component/panel.ts | 2 +- .../arkui-ohos/src/component/pasteButton.ts | 2 +- .../arkui-ohos/src/component/path.ts | 2 +- .../arkui-ohos/src/component/patternLock.ts | 2 +- .../src/component/pluginComponent.ts | 2 +- .../arkui-ohos/src/component/polygon.ts | 2 +- .../arkui-ohos/src/component/polyline.ts | 2 +- .../arkui-ohos/src/component/progress.ts | 2 +- .../arkui-ohos/src/component/qrcode.ts | 2 +- .../arkui-ohos/src/component/radio.ts | 2 +- .../arkui-ohos/src/component/rating.ts | 2 +- .../arkui-ohos/src/component/rect.ts | 2 +- .../arkui-ohos/src/component/refresh.ts | 2 +- .../src/component/relativeContainer.ts | 2 +- .../arkui-ohos/src/component/richEditor.ts | 2 +- .../arkui-ohos/src/component/richText.ts | 2 +- .../arkui-ohos/src/component/row.ts | 252 ++++++++++-------- .../arkui-ohos/src/component/rowSplit.ts | 2 +- .../arkui-ohos/src/component/saveButton.ts | 2 +- .../arkui-ohos/src/component/scroll.ts | 2 +- .../arkui-ohos/src/component/scrollBar.ts | 2 +- .../arkui-ohos/src/component/search.ts | 2 +- .../src/component/securityComponent.ts | 2 +- .../arkui-ohos/src/component/select.ts | 2 +- .../arkui-ohos/src/component/shape.ts | 2 +- .../arkui-ohos/src/component/sidebar.ts | 2 +- .../arkui-ohos/src/component/span.ts | 2 +- .../arkui-ohos/src/component/stack.ts | 2 +- .../src/handwritten/modifiers/ArkBlankNode.ts | 17 +- .../handwritten/modifiers/ArkColumnNode.ts | 34 ++- .../modifiers/ArkColumnSplitNode.ts | 83 +++--- .../handwritten/modifiers/ArkDividerNode.ts | 18 +- .../src/handwritten/modifiers/ArkFlexNode.ts | 19 +- .../handwritten/modifiers/ArkGridColNode.ts | 103 ++++--- .../handwritten/modifiers/ArkGridRowNode.ts | 93 ++++--- .../modifiers/ArkRelativeContainerNode.ts | 31 ++- .../src/handwritten/modifiers/ArkRowNode.ts | 118 ++++---- .../handwritten/modifiers/ArkRowSplitNode.ts | 73 ++--- .../src/handwritten/modifiers/ArkStackNode.ts | 93 ++++--- 75 files changed, 790 insertions(+), 550 deletions(-) diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/FrameNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/FrameNode.ts index 1ba033da174..14a5a2b2b90 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/FrameNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/FrameNode.ts @@ -1188,7 +1188,7 @@ export namespace typeNode { createXComponentNodeWithOptions, createXComponentNodeWithParameters, createSwiperNode } // @ts-ignore - function createColumnNode(context: UIContext, type: string): ColumnFrameNode { + export function createColumnNode(context: UIContext, type: string): ColumnFrameNode { return new ColumnFrameNode(context, 'Column', (node: FrameNode, type: ModifierType): ArkColumnNode => { let arknode = new ArkColumnNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1199,7 +1199,7 @@ export namespace typeNode { } // @ts-ignore - function createRowNode(context: UIContext, type: string): RowFrameNode { + export function createRowNode(context: UIContext, type: string): RowFrameNode { return new RowFrameNode(context, 'Row', (node: FrameNode, type: ModifierType): ArkRowNode => { let arknode = new ArkRowNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1210,7 +1210,7 @@ export namespace typeNode { } // @ts-ignore - function createStackNode(context: UIContext, type: string): StackFrameNode { + export function createStackNode(context: UIContext, type: string): StackFrameNode { return new StackFrameNode(context, 'Stack', (node: FrameNode, type: ModifierType): ArkStackNode => { let arknode = new ArkStackNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1221,7 +1221,7 @@ export namespace typeNode { } // @ts-ignore - function createFlexNode(context: UIContext, type: string): FlexFrameNode { + export function createFlexNode(context: UIContext, type: string): FlexFrameNode { return new FlexFrameNode(context, 'Flex', (node: FrameNode, type: ModifierType): ArkFlexNode => { let arknode = new ArkFlexNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1232,7 +1232,7 @@ export namespace typeNode { } // @ts-ignore - function createGridRowNode(context: UIContext, type: string): GridRowFrameNode { + export function createGridRowNode(context: UIContext, type: string): GridRowFrameNode { return new GridRowFrameNode(context, 'GridRow', (node: FrameNode, type: ModifierType): ArkGridRowNode => { let arknode = new ArkGridRowNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1243,7 +1243,7 @@ export namespace typeNode { } // @ts-ignore - function createGridColNode(context: UIContext, type: string): GridColFrameNode { + export function createGridColNode(context: UIContext, type: string): GridColFrameNode { return new GridColFrameNode(context, 'GridCol', (node: FrameNode, type: ModifierType): ArkGridColNode => { let arknode = new ArkGridColNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1254,7 +1254,7 @@ export namespace typeNode { } // @ts-ignore - function createDividerNode(context: UIContext, type: string): DividerFrameNode { + export function createDividerNode(context: UIContext, type: string): DividerFrameNode { return new DividerFrameNode(context, 'Divider', (node: FrameNode, type: ModifierType): ArkDividerNode => { let arknode = new ArkDividerNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1265,7 +1265,7 @@ export namespace typeNode { } // @ts-ignore - function createBlankNode(context: UIContext, type: string): BlankFrameNode { + export function createBlankNode(context: UIContext, type: string): BlankFrameNode { return new BlankFrameNode(context, 'Blank', (node: FrameNode, type: ModifierType): ArkBlankNode => { let arknode = new ArkBlankNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1276,7 +1276,7 @@ export namespace typeNode { } // @ts-ignore - function createRelativeContainerNode(context: UIContext, type: string): RelativeContainerFrameNode { + export function createRelativeContainerNode(context: UIContext, type: string): RelativeContainerFrameNode { return new RelativeContainerFrameNode(context, 'RelativeContainer', (node: FrameNode, type: ModifierType): ArkRelativeContainerNode => { let arknode = new ArkRelativeContainerNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1287,7 +1287,7 @@ export namespace typeNode { } // @ts-ignore - function createListNode(context: UIContext, type: string): ListFrameNode { + export function createListNode(context: UIContext, type: string): ListFrameNode { return new ListFrameNode(context, 'List', (node: FrameNode, type: ModifierType): ArkListNode => { let arknode = new ArkListNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1298,7 +1298,7 @@ export namespace typeNode { } // @ts-ignore - function createSearchNode(context: UIContext, type: string): SearchFrameNode { + export function createSearchNode(context: UIContext, type: string): SearchFrameNode { return new SearchFrameNode(context, 'Search', (node: FrameNode, type: ModifierType): ArkSearchNode => { let arknode = new ArkSearchNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1309,7 +1309,7 @@ export namespace typeNode { } // @ts-ignore - function createSwiperNode(context: UIContext, type: string): SwiperFrameNode { + export function createSwiperNode(context: UIContext, type: string): SwiperFrameNode { return new SwiperFrameNode(context, 'Swiper', (node: FrameNode, type: ModifierType): ArkSwiperNode => { let arknode = new ArkSwiperNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1320,7 +1320,7 @@ export namespace typeNode { } // @ts-ignore - function createTextAreaNode(context: UIContext, type: string): TextAreaFrameNode { + export function createTextAreaNode(context: UIContext, type: string): TextAreaFrameNode { return new TextAreaFrameNode(context, 'TextArea', (node: FrameNode, type: ModifierType): ArkTextAreaNode => { let arknode = new ArkTextAreaNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1331,7 +1331,7 @@ export namespace typeNode { } // @ts-ignore - function createTextInputNode(context: UIContext, type: string): TextInputFrameNode { + export function createTextInputNode(context: UIContext, type: string): TextInputFrameNode { return new TextInputFrameNode(context, 'TextInput', (node: FrameNode, type: ModifierType): ArkTextInputNode => { let arknode = new ArkTextInputNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); @@ -1342,7 +1342,7 @@ export namespace typeNode { } // @ts-ignore - function createTextNode(context: UIContext, type: 'Text'): TextFrameNode { + export function createTextNode(context: UIContext, type: 'Text'): TextFrameNode { return new TextFrameNode(context, 'Text', (node: FrameNode, type: ModifierType): ArkTextNode => { let arknode = new ArkTextNode(); const retval = ArkUIGeneratedNativeModule._FrameNode_getFrameNodePtr(toPeerPtr(node)); diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/column.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/column.ts index 5490745edc9..bf754bf5893 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/column.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/column.ts @@ -16,125 +16,144 @@ // WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! -import { int32, int64, float32 } from "@koalaui/common" -import { nullptr, KPointer, KInt, KBoolean, KStringPtr, runtimeType, RuntimeType, MaterializedBase, toPeerPtr, wrapCallback, NativeBuffer } from "@koalaui/interop" -import { Serializer } from "./peers/Serializer" -import { ComponentBase } from "./../ComponentBase" -import { PeerNode } from "./../PeerNode" -import { ArkUIGeneratedNativeModule, TypeChecker } from "#components" -import { ArkCommonMethodPeer, CommonMethod, PointLightStyle, ArkCommonMethodComponent, ArkCommonMethodStyle, AttributeModifier } from './common'; -import { HorizontalAlign, FlexAlign } from "./enums" -import { CallbackKind } from "./peers/CallbackKind" -import { CallbackTransformer } from "./peers/CallbackTransformer" -import { NodeAttach, remember } from "@koalaui/runtime" -import { Resource } from "global.resource" +import { int32, int64, float32 } from '@koalaui/common'; +import { nullptr, KPointer, KInt, KBoolean, KStringPtr, runtimeType, RuntimeType, MaterializedBase, toPeerPtr, + wrapCallback, NativeBuffer } from '@koalaui/interop'; +import { Serializer } from './peers/Serializer'; +import { ComponentBase } from './../ComponentBase'; +import { PeerNode } from './../PeerNode'; +import { ArkUIGeneratedNativeModule, TypeChecker } from '#components'; +import { ArkCommonMethodPeer, CommonMethod, PointLightStyle, ArkCommonMethodComponent, ArkCommonMethodStyle, + AttributeModifier } from './common'; +import { HorizontalAlign, FlexAlign } from './enums'; +import { CallbackKind } from './peers/CallbackKind'; +import { CallbackTransformer } from './peers/CallbackTransformer'; +import { NodeAttach, remember } from '@koalaui/runtime'; +import { Resource } from 'global.resource'; import { ArkColumnNode } from '../handwritten/modifiers/ArkColumnNode'; -import { ColumnModifier } from '../ColumnModifier' +import { ColumnModifier } from '../ColumnModifier'; import { hookColumnAttributeModifier } from '../handwritten' export class ArkColumnPeer extends ArkCommonMethodPeer { _attributeSet?:ColumnModifier; constructor(peerPtr: KPointer, id: int32, name: string = "", flags: int32 = 0) { - super(peerPtr, id, name, flags) + super(peerPtr, id, name, flags); } + public static create(component: ComponentBase | undefined, flags: int32 = 0): ArkColumnPeer { - const peerId = PeerNode.nextId() - const _peerPtr = ArkUIGeneratedNativeModule._Column_construct(peerId, flags) - const _peer = new ArkColumnPeer(_peerPtr, peerId, "Column", flags) - component?.setPeer(_peer) - return _peer + const peerId = PeerNode.nextId(); + const _peerPtr = ArkUIGeneratedNativeModule._Column_construct(peerId, flags); + const _peer = new ArkColumnPeer(_peerPtr, peerId, "Column", flags); + component?.setPeer(_peer); + return _peer; } + setColumnOptions0Attribute(options?: ColumnOptions): void { - const thisSerializer : Serializer = Serializer.hold() - let options_type : int32 = RuntimeType.UNDEFINED - options_type = runtimeType(options) - thisSerializer.writeInt8(options_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let options_type : int32 = RuntimeType.UNDEFINED; + options_type = runtimeType(options); + thisSerializer.writeInt8(options_type as int32); if ((RuntimeType.UNDEFINED) != (options_type)) { - const options_value = options! - thisSerializer.writeColumnOptions(options_value) + const options_value = options!; + thisSerializer.writeColumnOptions(options_value); } - ArkUIGeneratedNativeModule._ColumnInterface_setColumnOptions0(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._ColumnInterface_setColumnOptions0(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + setColumnOptions1Attribute(options?: ColumnOptions | ColumnOptionsV2): void { - const thisSerializer : Serializer = Serializer.hold() - let options_type : int32 = RuntimeType.UNDEFINED - options_type = runtimeType(options) - thisSerializer.writeInt8(options_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let options_type : int32 = RuntimeType.UNDEFINED; + options_type = runtimeType(options); + thisSerializer.writeInt8(options_type as int32); if ((RuntimeType.UNDEFINED) != (options_type)) { - const options_value = options! - let options_value_type : int32 = RuntimeType.UNDEFINED - options_value_type = runtimeType(options_value) + const options_value = options!; + let options_value_type : int32 = RuntimeType.UNDEFINED; + options_value_type = runtimeType(options_value); if (TypeChecker.isColumnOptions(options_value, false)) { - thisSerializer.writeInt8(0 as int32) - const options_value_0 = options_value as ColumnOptions - thisSerializer.writeColumnOptions(options_value_0) + thisSerializer.writeInt8(0 as int32); + const options_value_0 = options_value as ColumnOptions; + thisSerializer.writeColumnOptions(options_value_0); } else if (TypeChecker.isColumnOptionsV2(options_value, false)) { - thisSerializer.writeInt8(1 as int32) - const options_value_1 = options_value as ColumnOptionsV2 - thisSerializer.writeColumnOptionsV2(options_value_1) + thisSerializer.writeInt8(1 as int32); + const options_value_1 = options_value as ColumnOptionsV2; + thisSerializer.writeColumnOptionsV2(options_value_1); } } - ArkUIGeneratedNativeModule._ColumnInterface_setColumnOptions1(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._ColumnInterface_setColumnOptions1(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + alignItemsAttribute(value: HorizontalAlign | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = (value as HorizontalAlign) - thisSerializer.writeInt32(TypeChecker.HorizontalAlign_ToNumeric(value_value)) + const value_value = (value as HorizontalAlign); + thisSerializer.writeInt32(TypeChecker.HorizontalAlign_ToNumeric(value_value)); } - ArkUIGeneratedNativeModule._ColumnAttribute_alignItems(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._ColumnAttribute_alignItems(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + justifyContentAttribute(value: FlexAlign | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = (value as FlexAlign) - thisSerializer.writeInt32(TypeChecker.FlexAlign_ToNumeric(value_value)) + const value_value = (value as FlexAlign); + thisSerializer.writeInt32(TypeChecker.FlexAlign_ToNumeric(value_value)); } - ArkUIGeneratedNativeModule._ColumnAttribute_justifyContent(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._ColumnAttribute_justifyContent(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + pointLightAttribute(value: PointLightStyle | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = value! - thisSerializer.writePointLightStyle(value_value) + const value_value = value!; + thisSerializer.writePointLightStyle(value_value); } - ArkUIGeneratedNativeModule._ColumnAttribute_pointLight(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._ColumnAttribute_pointLight(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + reverseAttribute(value: boolean | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = value! - thisSerializer.writeBoolean(value_value) + const value_value = value!; + thisSerializer.writeBoolean(value_value); } - ArkUIGeneratedNativeModule._ColumnAttribute_reverse(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._ColumnAttribute_reverse(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } } + export type SpaceType = string | number | Resource; + export interface ColumnOptions { space?: string | number; } + export interface ColumnOptionsV2 { stub: string; } + export interface ColumnAttribute extends CommonMethod { alignItems(value: HorizontalAlign | undefined): this {return this;} justifyContent(value: FlexAlign | undefined): this {return this;} @@ -142,88 +161,97 @@ export interface ColumnAttribute extends CommonMethod { reverse(value: boolean | undefined): this {return this;} attributeModifier(value: AttributeModifier | AttributeModifier| undefined): this { return this;} } + export class ArkColumnStyle extends ArkCommonMethodStyle implements ColumnAttribute { - alignItems_value?: HorizontalAlign | undefined - justifyContent_value?: FlexAlign | undefined - pointLight_value?: PointLightStyle | undefined - reverse_value?: boolean | undefined + alignItems_value?: HorizontalAlign | undefined; + justifyContent_value?: FlexAlign | undefined; + pointLight_value?: PointLightStyle | undefined; + reverse_value?: boolean | undefined; public alignItems(value: HorizontalAlign | undefined): this { - return this + return this; } public justifyContent(value: FlexAlign | undefined): this { - return this + return this; } public pointLight(value: PointLightStyle | undefined): this { - return this + return this; } public reverse(value: boolean | undefined): this { - return this + return this; } } + export class ArkColumnComponent extends ArkCommonMethodComponent implements ColumnAttribute { + getPeer(): ArkColumnPeer { - return (this.peer as ArkColumnPeer) + return (this.peer as ArkColumnPeer); } + public setColumnOptions(options?: ColumnOptions | ColumnOptions | ColumnOptionsV2): this { if (this.checkPriority("setColumnOptions")) { - const options_type = runtimeType(options) + const options_type = runtimeType(options); if ((RuntimeType.OBJECT == options_type) || (RuntimeType.UNDEFINED == options_type)) { - const options_casted = options as (ColumnOptions | undefined) - this.getPeer()?.setColumnOptions0Attribute(options_casted) - return this + const options_casted = options as (ColumnOptions | undefined); + this.getPeer()?.setColumnOptions0Attribute(options_casted); + return this; } if ((RuntimeType.OBJECT == options_type) || (RuntimeType.OBJECT == options_type) || (RuntimeType.UNDEFINED == options_type)) { - const options_casted = options as (ColumnOptions | ColumnOptionsV2 | undefined) - this.getPeer()?.setColumnOptions1Attribute(options_casted) - return this + const options_casted = options as (ColumnOptions | ColumnOptionsV2 | undefined); + this.getPeer()?.setColumnOptions1Attribute(options_casted); + return this; } - throw new Error("Can not select appropriate overload") + throw new Error("Can not select appropriate overload"); } - return this + return this; } + public alignItems(value: HorizontalAlign | undefined): this { if (this.checkPriority("alignItems")) { - const value_casted = value as (HorizontalAlign | undefined) - this.getPeer()?.alignItemsAttribute(value_casted) - return this + const value_casted = value as (HorizontalAlign | undefined); + this.getPeer()?.alignItemsAttribute(value_casted); + return this; } - return this + return this; } + public justifyContent(value: FlexAlign | undefined): this { if (this.checkPriority("justifyContent")) { - const value_casted = value as (FlexAlign | undefined) - this.getPeer()?.justifyContentAttribute(value_casted) - return this + const value_casted = value as (FlexAlign | undefined); + this.getPeer()?.justifyContentAttribute(value_casted); + return this; } - return this + return this; } + public pointLight(value: PointLightStyle | undefined): this { if (this.checkPriority("pointLight")) { - const value_casted = value as (PointLightStyle | undefined) - this.getPeer()?.pointLightAttribute(value_casted) - return this + const value_casted = value as (PointLightStyle | undefined); + this.getPeer()?.pointLightAttribute(value_casted); + return this; } - return this + return this; } + public reverse(value: boolean | undefined): this { if (this.checkPriority("reverse")) { - const value_casted = value as (boolean | undefined) - this.getPeer()?.reverseAttribute(value_casted) - return this + const value_casted = value as (boolean | undefined); + this.getPeer()?.reverseAttribute(value_casted); + return this; } - return this + return this; } public attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this { - hookColumnAttributeModifier(this, modifier) - return this + hookColumnAttributeModifier(this, modifier); + return this; } public applyAttributesFinish(): void { // we call this function outside of class, so need to make it public - super.applyAttributesFinish() + super.applyAttributesFinish(); } } + /** @memo */ export function Column( /** @memo */ @@ -241,4 +269,4 @@ export function Column( content_?.() receiver.applyAttributesFinish() }) -} +} \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/columnSplit.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/columnSplit.ts index ae4eee614cc..f73bb1fc1fb 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/columnSplit.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/columnSplit.ts @@ -86,7 +86,7 @@ export class ArkColumnSplitStyle extends ArkCommonMethodStyle implements ColumnS } public divider(value: ColumnSplitDividerStyle | undefined): this { return this - } + } } export class ArkColumnSplitComponent extends ArkCommonMethodComponent implements ColumnSplitAttribute { getPeer(): ArkColumnSplitPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/component3d.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/component3d.ts index 83814474e7c..20606d2de76 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/component3d.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/component3d.ts @@ -238,7 +238,7 @@ export class ArkComponent3DStyle extends ArkCommonMethodStyle implements Compone } public customRender(uri: ResourceStr | undefined, selfRenderUpdate: boolean | undefined): this { return this - } + } } export class ArkComponent3DComponent extends ArkCommonMethodComponent implements Component3DAttribute { getPeer(): ArkComponent3DPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/containerSpan.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/containerSpan.ts index 330f825293b..8f4bf7db8fb 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/containerSpan.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/containerSpan.ts @@ -62,7 +62,7 @@ export class ArkContainerSpanStyle implements ContainerSpanAttribute { textBackgroundStyle_value?: TextBackgroundStyle | undefined public textBackgroundStyle(value: TextBackgroundStyle | undefined): this { return this - } + } } export class ArkContainerSpanComponent extends ComponentBase implements ContainerSpanAttribute { getPeer(): ArkContainerSpanPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/counter.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/counter.ts index cf59dea610b..24385e6ad29 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/counter.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/counter.ts @@ -114,7 +114,7 @@ export class ArkCounterStyle extends ArkCommonMethodStyle implements CounterAttr } public enableInc(value: boolean | undefined): this { return this - } + } } export class ArkCounterComponent extends ArkCommonMethodComponent implements CounterAttribute { getPeer(): ArkCounterPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/dataPanel.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/dataPanel.ts index 303e9ef62fd..3f7a536e89d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/dataPanel.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/dataPanel.ts @@ -268,7 +268,7 @@ export class ArkDataPanelStyle extends ArkCommonMethodStyle implements DataPanel } public contentModifier(value: ContentModifier | undefined): this { return this - } + } } export class ArkDataPanelComponent extends ArkCommonMethodComponent implements DataPanelAttribute { getPeer(): ArkDataPanelPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/datePicker.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/datePicker.ts index 5274ede3314..ff2a07e6ebb 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/datePicker.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/datePicker.ts @@ -303,7 +303,7 @@ export class ArkDatePickerStyle extends ArkCommonMethodStyle implements DatePick } public _onChangeEvent_selected(callback: ((parameter: Date) => void)): void { throw new Error("Unimplmented") - } + } } export interface LunarSwitchStyle { selectedColor?: ResourceColor; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/divider.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/divider.ts index 9184ab4ecb3..beccc1e9d3d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/divider.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/divider.ts @@ -150,7 +150,7 @@ export class ArkDividerStyle extends ArkCommonMethodStyle implements DividerAttr } public lineCap(value: LineCapStyle | undefined): this { return this - } + } } export class ArkDividerComponent extends ArkCommonMethodComponent implements DividerAttribute { getPeer(): ArkDividerPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/embeddedComponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/embeddedComponent.ts index 23227c82aa0..4262571d338 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/embeddedComponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/embeddedComponent.ts @@ -90,7 +90,7 @@ export class ArkEmbeddedComponentStyle extends ArkCommonMethodStyle implements E } public onError(value: ErrorCallback | undefined): this { return this - } + } } export type Callback_TerminationInfo_Void = (parameter: TerminationInfo) => void; export class ArkEmbeddedComponentComponent extends ArkCommonMethodComponent implements EmbeddedComponentAttribute { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flex.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flex.ts index e8207dade7c..43d75c6b5e7 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flex.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flex.ts @@ -85,7 +85,7 @@ export class ArkFlexStyle extends ArkCommonMethodStyle implements FlexAttribute pointLight_value?: PointLightStyle | undefined public pointLight(value: PointLightStyle | undefined): this { return this - } + } } export class ArkFlexComponent extends ArkCommonMethodComponent implements FlexAttribute { getPeer(): ArkFlexPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/folderStack.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/folderStack.ts index 2b8bd6a1232..77d71a08f2f 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/folderStack.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/folderStack.ts @@ -149,7 +149,7 @@ export class ArkFolderStackStyle extends ArkCommonMethodStyle implements FolderS } public autoHalfFold(value: boolean | undefined): this { return this - } + } } export interface HoverEventParam { foldStatus: FoldStatus; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formComponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formComponent.ts index 2172485a703..b84d5db36eb 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formComponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formComponent.ts @@ -268,7 +268,7 @@ export class ArkFormComponentStyle extends ArkCommonMethodStyle implements FormC } public onLoad(value: (() => void) | undefined): this { return this - } + } } export class ArkFormComponentComponent extends ArkCommonMethodComponent implements FormComponentAttribute { getPeer(): ArkFormComponentPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gauge.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gauge.ts index 2129decd261..fce32d3fa90 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gauge.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gauge.ts @@ -319,7 +319,7 @@ export class ArkGaugeStyle extends ArkCommonMethodStyle implements GaugeAttribut } public contentModifier(value: ContentModifier | undefined): this { return this - } + } } export class ArkGaugeComponent extends ArkCommonMethodComponent implements GaugeAttribute { getPeer(): ArkGaugePeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/grid.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/grid.ts index 18978ba8772..69c0b3be288 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/grid.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/grid.ts @@ -772,7 +772,7 @@ export class ArkGridStyle extends ArkScrollableCommonMethodStyle implements Grid } public edgeEffect(value: EdgeEffect | undefined, options?: EdgeEffectOptions | undefined): this { return this - } + } } export class ArkGridComponent extends ArkScrollableCommonMethodComponent implements GridAttribute { getPeer(): ArkGridPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridCol.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridCol.ts index 870068aabdf..d6843db2313 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridCol.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridCol.ts @@ -153,7 +153,7 @@ export class ArkGridColStyle extends ArkCommonMethodStyle implements GridColAttr } public order(value: number | GridColColumnOption | undefined): this { return this - } + } } export class ArkGridColComponent extends ArkCommonMethodComponent implements GridColAttribute { getPeer(): ArkGridColPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridItem.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridItem.ts index 760dabd333d..4a051f6538c 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridItem.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridItem.ts @@ -210,7 +210,7 @@ export class ArkGridItemStyle extends ArkCommonMethodStyle implements GridItemAt } public _onChangeEvent_selected(callback: ((select: boolean | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkGridItemComponent extends ArkCommonMethodComponent implements GridItemAttribute { getPeer(): ArkGridItemPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridRow.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridRow.ts index cd1a4f8d585..895938dddf2 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridRow.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridRow.ts @@ -135,7 +135,7 @@ export class ArkGridRowStyle extends ArkCommonMethodStyle implements GridRowAttr } public alignItems(value: ItemAlign | undefined): this { return this - } + } } export class ArkGridRowComponent extends ArkCommonMethodComponent implements GridRowAttribute { getPeer(): ArkGridRowPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/hyperlink.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/hyperlink.ts index 9fe075bc132..1c4ee0e0985 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/hyperlink.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/hyperlink.ts @@ -117,7 +117,7 @@ export class ArkHyperlinkStyle extends ArkCommonMethodStyle implements Hyperlink color_value?: Color | number | string | Resource | undefined public color(value: Color | number | string | Resource | undefined): this { return this - } + } } export class ArkHyperlinkComponent extends ArkCommonMethodComponent implements HyperlinkAttribute { getPeer(): ArkHyperlinkPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/image.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/image.ts index 1f831174d82..6c322f6e99b 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/image.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/image.ts @@ -739,7 +739,7 @@ export class ArkImageStyle extends ArkCommonMethodStyle implements ImageAttribut } public orientation(value: ImageRotateOrientation | undefined): this { return this - } + } } export type ImageErrorCallback = (error: ImageError) => void; export interface ImageError { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageAnimator.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageAnimator.ts index 871b972aabb..719ef94aba3 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageAnimator.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageAnimator.ts @@ -298,7 +298,7 @@ export class ArkImageAnimatorStyle extends ArkCommonMethodStyle implements Image } public onFinish(value: (() => void) | undefined): this { return this - } + } } export class ArkImageAnimatorComponent extends ArkCommonMethodComponent implements ImageAnimatorAttribute { getPeer(): ArkImageAnimatorPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageSpan.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageSpan.ts index eaed3d81c0e..a84d3ae6c70 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageSpan.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/imageSpan.ts @@ -186,7 +186,7 @@ export class ArkImageSpanStyle extends ArkBaseSpanStyle implements ImageSpanAttr } public alt(value: PixelMap | undefined): this { return this - } + } } export type ImageCompleteCallback = (result: ImageLoadResult) => void; export interface ImageLoadResult { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/indicatorcomponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/indicatorcomponent.ts index 59daffadc75..556425637b8 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/indicatorcomponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/indicatorcomponent.ts @@ -226,7 +226,7 @@ export class ArkIndicatorComponentStyle extends ArkCommonMethodStyle implements } public onChange(value: ((index: number) => void) | undefined): this { return this - } + } } export class ArkIndicatorComponentComponent extends ArkCommonMethodComponent implements IndicatorComponentAttribute { getPeer(): ArkIndicatorComponentPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/lazyGridLayout.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/lazyGridLayout.ts index e8112da9a4c..9eb140a4c5d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/lazyGridLayout.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/lazyGridLayout.ts @@ -104,7 +104,7 @@ export class ArkLazyGridLayoutStyle extends ArkCommonMethodStyle implements Lazy } public columnsGap(value: LengthMetrics | undefined): this { return this - } + } } export interface LazyVGridLayoutAttribute extends LazyGridLayoutAttribute { columnsTemplate(value: string | undefined): this @@ -113,7 +113,7 @@ export class ArkLazyVGridLayoutStyle extends ArkLazyGridLayoutStyle implements L columnsTemplate_value?: string | undefined public columnsTemplate(value: string | undefined): this { return this - } + } } export class ArkLazyGridLayoutComponent extends ArkCommonMethodComponent implements LazyGridLayoutAttribute { getPeer(): ArkLazyGridLayoutPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/line.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/line.ts index 228e1d7aae3..ed7ca368baf 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/line.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/line.ts @@ -106,7 +106,7 @@ export class ArkLineStyle extends ArkCommonShapeMethodStyle implements LineAttri } public endPoint(value: ShapePoint | undefined): this { return this - } + } } export class ArkLineComponent extends ArkCommonShapeMethodComponent implements LineAttribute { getPeer(): ArkLinePeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/linearindicator.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/linearindicator.ts index 79e8c5318f4..8d71df96fa9 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/linearindicator.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/linearindicator.ts @@ -190,7 +190,7 @@ export class ArkLinearIndicatorStyle extends ArkCommonMethodStyle implements Lin } public onChange(value: OnLinearIndicatorChangeCallback | undefined): this { return this - } + } } export type OnLinearIndicatorChangeCallback = (index: number, progress: number) => void; export class ArkLinearIndicatorComponent extends ArkCommonMethodComponent implements LinearIndicatorAttribute { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItem.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItem.ts index 3c965ef445c..a84e47ceb0d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItem.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItem.ts @@ -244,7 +244,7 @@ export class ArkListItemStyle extends ArkCommonMethodStyle implements ListItemAt } public _onChangeEvent_selected(callback: ((select: boolean | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkListItemComponent extends ArkCommonMethodComponent implements ListItemAttribute { getPeer(): ArkListItemPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItemGroup.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItemGroup.ts index f28bffffa52..960f1dde9ce 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItemGroup.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/listItemGroup.ts @@ -103,7 +103,7 @@ export class ArkListItemGroupStyle extends ArkCommonMethodStyle implements ListI } public childrenMainSize(value: ChildrenMainSize | undefined): this { return this - } + } } export class ArkListItemGroupComponent extends ArkCommonMethodComponent implements ListItemGroupAttribute { getPeer(): ArkListItemGroupPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/loadingProgress.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/loadingProgress.ts index 490e61e216a..c11ad031584 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/loadingProgress.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/loadingProgress.ts @@ -129,7 +129,7 @@ export class ArkLoadingProgressStyle extends ArkCommonMethodStyle implements Loa } public contentModifier(value: ContentModifier | undefined): this { return this - } + } } export interface LoadingProgressConfiguration extends CommonConfiguration { enableLoading: boolean; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/locationButton.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/locationButton.ts index 3e40fe6cac9..9631d18e040 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/locationButton.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/locationButton.ts @@ -97,7 +97,7 @@ export class ArkLocationButtonStyle extends ArkSecurityComponentMethodStyle impl onClick_value?: LocationButtonCallback | undefined public onClick(value: LocationButtonCallback | undefined): this { return this - } + } } export class ArkLocationButtonComponent extends ArkSecurityComponentMethodComponent implements LocationButtonAttribute { getPeer(): ArkLocationButtonPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/marquee.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/marquee.ts index ebb2b26e1ee..0ba1c5fdef6 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/marquee.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/marquee.ts @@ -275,7 +275,7 @@ export class ArkMarqueeStyle extends ArkCommonMethodStyle implements MarqueeAttr } public onFinish(value: (() => void) | undefined): this { return this - } + } } export class ArkMarqueeComponent extends ArkCommonMethodComponent implements MarqueeAttribute { getPeer(): ArkMarqueePeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menu.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menu.ts index ed2f278949e..3cf18b24788 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menu.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menu.ts @@ -204,7 +204,7 @@ export class ArkMenuStyle extends ArkCommonMethodStyle implements MenuAttribute } public subMenuExpandingMode(value: SubMenuExpandingMode | undefined): this { return this - } + } } export class ArkMenuComponent extends ArkCommonMethodComponent implements MenuAttribute { getPeer(): ArkMenuPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItem.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItem.ts index 97d70cb11f7..9002f66931f 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItem.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItem.ts @@ -279,7 +279,7 @@ export class ArkMenuItemStyle extends ArkCommonMethodStyle implements MenuItemAt } public _onChangeEvent_selected(callback: ((select: boolean | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkMenuItemComponent extends ArkCommonMethodComponent implements MenuItemAttribute { getPeer(): ArkMenuItemPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navDestination.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navDestination.ts index 24ddddc57b9..68f9136bf25 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navDestination.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navDestination.ts @@ -957,7 +957,7 @@ export class ArkNavDestinationStyle extends ArkCommonMethodStyle implements NavD } public enableStatusBar(enabled: boolean | undefined, animated?: boolean): this { return this - } + } } export type NavDestinationTransitionDelegate = (operation: NavigationOperation, isEnter: boolean) => Array | undefined; export type Callback_NavDestinationContext_Void = (parameter: NavDestinationContext) => void; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navRouter.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navRouter.ts index a948586fee8..9429ca47635 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navRouter.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navRouter.ts @@ -94,7 +94,7 @@ export class ArkNavRouterStyle extends ArkCommonMethodStyle implements NavRouter } public mode(value: NavRouteMode | undefined): this { return this - } + } } export class ArkNavRouterComponent extends ArkCommonMethodComponent implements NavRouterAttribute { getPeer(): ArkNavRouterPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigator.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigator.ts index 1f486023e25..b29f5be4ea8 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigator.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigator.ts @@ -145,7 +145,7 @@ export class ArkNavigatorStyle extends ArkCommonMethodStyle implements Navigator } public params(value: Object | undefined): this { return this - } + } } export class ArkNavigatorComponent extends ArkCommonMethodComponent implements NavigatorAttribute { getPeer(): ArkNavigatorPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/panel.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/panel.ts index 3ebd7e1f269..c20ed9bdaea 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/panel.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/panel.ts @@ -350,7 +350,7 @@ export class ArkPanelStyle extends ArkCommonMethodStyle implements PanelAttribut } public _onChangeEvent_mode(callback: ((mode: PanelMode | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkPanelComponent extends ArkCommonMethodComponent implements PanelAttribute { getPeer(): ArkPanelPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pasteButton.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pasteButton.ts index 1d8c4d682ac..2c817a79cd6 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pasteButton.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pasteButton.ts @@ -86,7 +86,7 @@ export class ArkPasteButtonStyle extends ArkSecurityComponentMethodStyle impleme onClick_value?: PasteButtonCallback | undefined public onClick(value: PasteButtonCallback | undefined): this { return this - } + } } export class ArkPasteButtonComponent extends ArkSecurityComponentMethodComponent implements PasteButtonAttribute { getPeer(): ArkPasteButtonPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/path.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/path.ts index 1bea5c15c30..cf9f8131a3f 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/path.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/path.ts @@ -79,7 +79,7 @@ export class ArkPathStyle extends ArkCommonShapeMethodStyle implements PathAttri commands_value?: string | undefined public commands(value: string | undefined): this { return this - } + } } export class ArkPathComponent extends ArkCommonShapeMethodComponent implements PathAttribute { getPeer(): ArkPathPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/patternLock.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/patternLock.ts index 75810ebaf14..0869b9b2108 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/patternLock.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/patternLock.ts @@ -448,7 +448,7 @@ export class ArkPatternLockStyle extends ArkCommonMethodStyle implements Pattern } public skipUnselectedPoint(value: boolean | undefined): this { return this - } + } } export class ArkPatternLockComponent extends ArkCommonMethodComponent implements PatternLockAttribute { getPeer(): ArkPatternLockPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pluginComponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pluginComponent.ts index 7d434e5d4a5..6f96e8efa89 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pluginComponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/pluginComponent.ts @@ -96,7 +96,7 @@ export class ArkPluginComponentStyle extends ArkCommonMethodStyle implements Plu } public onError(value: PluginErrorCallback | undefined): this { return this - } + } } export class ArkPluginComponentComponent extends ArkCommonMethodComponent implements PluginComponentAttribute { getPeer(): ArkPluginComponentPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polygon.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polygon.ts index da585e59662..42ab378891b 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polygon.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polygon.ts @@ -88,7 +88,7 @@ export class ArkPolygonStyle extends ArkCommonShapeMethodStyle implements Polygo points_value?: Array | undefined public points(value: Array | undefined): this { return this - } + } } export class ArkPolygonComponent extends ArkCommonShapeMethodComponent implements PolygonAttribute { getPeer(): ArkPolygonPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polyline.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polyline.ts index 6505bd7c4c6..45263e044d6 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polyline.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/polyline.ts @@ -88,7 +88,7 @@ export class ArkPolylineStyle extends ArkCommonShapeMethodStyle implements Polyl points_value?: Array | undefined public points(value: Array | undefined): this { return this - } + } } export class ArkPolylineComponent extends ArkCommonShapeMethodComponent implements PolylineAttribute { getPeer(): ArkPolylinePeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/progress.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/progress.ts index f4eeb646a61..bd841dbb2f2 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/progress.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/progress.ts @@ -264,7 +264,7 @@ export class ArkProgressStyle extends ArkCommonMethodStyle implements ProgressAt } public contentModifier(value: ContentModifier | undefined): this { return this - } + } } export interface ProgressConfiguration extends CommonConfiguration { value: number; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/qrcode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/qrcode.ts index 313e906459a..98cfc1bc2e5 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/qrcode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/qrcode.ts @@ -152,7 +152,7 @@ export class ArkQRCodeStyle extends ArkCommonMethodStyle implements QRCodeAttrib } public contentOpacity(value: number | Resource | undefined): this { return this - } + } } export class ArkQRCodeComponent extends ArkCommonMethodComponent implements QRCodeAttribute { getPeer(): ArkQRCodePeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/radio.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/radio.ts index b18d0c22556..4a9f7ed2744 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/radio.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/radio.ts @@ -183,7 +183,7 @@ export class ArkRadioStyle extends ArkCommonMethodStyle implements RadioAttribut } public _onChangeEvent_checked(callback: ((select: boolean | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export interface RadioConfiguration extends CommonConfiguration { value: string; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rating.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rating.ts index 1bad8b8e86c..3ae94205739 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rating.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rating.ts @@ -229,7 +229,7 @@ export class ArkRatingStyle extends ArkCommonMethodStyle implements RatingAttrib } public _onChangeEvent_rating(callback: ((index: number) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkRatingComponent extends ArkCommonMethodComponent implements RatingAttribute { getPeer(): ArkRatingPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rect.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rect.ts index 9cf2b403e1e..8b4e3b9c3b8 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rect.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rect.ts @@ -174,7 +174,7 @@ export class ArkRectStyle extends ArkCommonShapeMethodStyle implements RectAttri } public radius(value: Length | Array | undefined): this { return this - } + } } export class ArkRectComponent extends ArkCommonShapeMethodComponent implements RectAttribute { getPeer(): ArkRectPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/refresh.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/refresh.ts index ea1609e2034..8187a4a7eb3 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/refresh.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/refresh.ts @@ -186,7 +186,7 @@ export class ArkRefreshStyle extends ArkCommonMethodStyle implements RefreshAttr } public _onChangeEvent_refreshing(callback: ((isVisible: boolean) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkRefreshComponent extends ArkCommonMethodComponent implements RefreshAttribute { getPeer(): ArkRefreshPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/relativeContainer.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/relativeContainer.ts index 9b4aa8a031b..18e17347279 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/relativeContainer.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/relativeContainer.ts @@ -136,7 +136,7 @@ export class ArkRelativeContainerStyle extends ArkCommonMethodStyle implements R } public barrier(value: Array | undefined | Array | undefined): this { return this - } + } } export class ArkRelativeContainerComponent extends ArkCommonMethodComponent implements RelativeContainerAttribute { getPeer(): ArkRelativeContainerPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richEditor.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richEditor.ts index 369996ccccd..3282bcec3dd 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richEditor.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richEditor.ts @@ -1099,7 +1099,7 @@ export class ArkRichEditorStyle extends ArkCommonMethodStyle implements RichEdit } public placeholder(value: ResourceStr | undefined, style?: PlaceholderStyle): this { return this - } + } } export interface CutEvent { preventDefault?: (() => void); diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richText.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richText.ts index 862b3cde285..4aa2007307f 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richText.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/richText.ts @@ -79,7 +79,7 @@ export class ArkRichTextStyle extends ArkCommonMethodStyle implements RichTextAt } public onComplete(value: (() => void) | undefined): this { return this - } + } } export class ArkRichTextComponent extends ArkCommonMethodComponent implements RichTextAttribute { getPeer(): ArkRichTextPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/row.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/row.ts index b81b740ea04..fa3a3d64d5e 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/row.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/row.ts @@ -16,204 +16,230 @@ // WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! -import { int32, int64, float32 } from "@koalaui/common" -import { nullptr, KPointer, KInt, KBoolean, KStringPtr, runtimeType, RuntimeType, MaterializedBase, toPeerPtr, wrapCallback, NativeBuffer } from "@koalaui/interop" -import { Serializer } from "./peers/Serializer" -import { ComponentBase } from "./../ComponentBase" -import { PeerNode } from "./../PeerNode" -import { ArkUIGeneratedNativeModule, TypeChecker } from "#components" +import { int32, int64, float32 } from '@koalaui/common'; +import { nullptr, KPointer, KInt, KBoolean, KStringPtr, runtimeType, RuntimeType, MaterializedBase, toPeerPtr, wrapCallback, NativeBuffer } from '@koalaui/interop'; +import { Serializer } from './peers/Serializer'; +import { ComponentBase } from './../ComponentBase'; +import { PeerNode } from './../PeerNode'; +import { ArkUIGeneratedNativeModule, TypeChecker } from '#components'; import { ArkCommonMethodPeer, CommonMethod, PointLightStyle, ArkCommonMethodComponent, ArkCommonMethodStyle, AttributeModifier } from './common'; -import { VerticalAlign, FlexAlign } from "./enums" -import { CallbackKind } from "./peers/CallbackKind" -import { CallbackTransformer } from "./peers/CallbackTransformer" -import { NodeAttach, remember } from "@koalaui/runtime" +import { VerticalAlign, FlexAlign } from './enums'; +import { CallbackKind } from './peers/CallbackKind'; +import { CallbackTransformer } from './peers/CallbackTransformer'; +import { NodeAttach, remember } from '@koalaui/runtime'; import { ArkRowNode } from '../handwritten/modifiers/ArkRowNode'; -import { ArkRowAttributeSet, RowModifier } from '../RowModifier'; +import { RowModifier } from '../RowModifier'; export class ArkRowPeer extends ArkCommonMethodPeer { + _attributeSet?:RowModifier; constructor(peerPtr: KPointer, id: int32, name: string = "", flags: int32 = 0) { - super(peerPtr, id, name, flags) + super(peerPtr, id, name, flags); } + public static create(component: ComponentBase | undefined, flags: int32 = 0): ArkRowPeer { - const peerId = PeerNode.nextId() - const _peerPtr = ArkUIGeneratedNativeModule._Row_construct(peerId, flags) - const _peer = new ArkRowPeer(_peerPtr, peerId, "Row", flags) - component?.setPeer(_peer) - return _peer + const peerId = PeerNode.nextId(); + const _peerPtr = ArkUIGeneratedNativeModule._Row_construct(peerId, flags); + const _peer = new ArkRowPeer(_peerPtr, peerId, "Row", flags); + component?.setPeer(_peer); + return _peer; } + setRowOptions0Attribute(options?: RowOptions): void { - const thisSerializer : Serializer = Serializer.hold() - let options_type : int32 = RuntimeType.UNDEFINED - options_type = runtimeType(options) - thisSerializer.writeInt8(options_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let options_type : int32 = RuntimeType.UNDEFINED; + options_type = runtimeType(options); + thisSerializer.writeInt8(options_type as int32); if ((RuntimeType.UNDEFINED) != (options_type)) { - const options_value = options! - thisSerializer.writeRowOptions(options_value) + const options_value = options!; + thisSerializer.writeRowOptions(options_value); } - ArkUIGeneratedNativeModule._RowInterface_setRowOptions0(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._RowInterface_setRowOptions0(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + setRowOptions1Attribute(options?: RowOptions | RowOptionsV2): void { - const thisSerializer : Serializer = Serializer.hold() - let options_type : int32 = RuntimeType.UNDEFINED - options_type = runtimeType(options) - thisSerializer.writeInt8(options_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let options_type : int32 = RuntimeType.UNDEFINED; + options_type = runtimeType(options); + thisSerializer.writeInt8(options_type as int32); if ((RuntimeType.UNDEFINED) != (options_type)) { - const options_value = options! - let options_value_type : int32 = RuntimeType.UNDEFINED - options_value_type = runtimeType(options_value) + const options_value = options!; + let options_value_type : int32 = RuntimeType.UNDEFINED; + options_value_type = runtimeType(options_value); if (TypeChecker.isRowOptions(options_value, false)) { - thisSerializer.writeInt8(0 as int32) - const options_value_0 = options_value as RowOptions - thisSerializer.writeRowOptions(options_value_0) + thisSerializer.writeInt8(0 as int32); + const options_value_0 = options_value as RowOptions; + thisSerializer.writeRowOptions(options_value_0); } else if (TypeChecker.isRowOptionsV2(options_value, false)) { - thisSerializer.writeInt8(1 as int32) - const options_value_1 = options_value as RowOptionsV2 - thisSerializer.writeRowOptionsV2(options_value_1) + thisSerializer.writeInt8(1 as int32); + const options_value_1 = options_value as RowOptionsV2; + thisSerializer.writeRowOptionsV2(options_value_1); } } - ArkUIGeneratedNativeModule._RowInterface_setRowOptions1(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._RowInterface_setRowOptions1(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + alignItemsAttribute(value: VerticalAlign | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = (value as VerticalAlign) - thisSerializer.writeInt32(TypeChecker.VerticalAlign_ToNumeric(value_value)) + const value_value = (value as VerticalAlign); + thisSerializer.writeInt32(TypeChecker.VerticalAlign_ToNumeric(value_value)); } - ArkUIGeneratedNativeModule._RowAttribute_alignItems(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._RowAttribute_alignItems(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + justifyContentAttribute(value: FlexAlign | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = (value as FlexAlign) - thisSerializer.writeInt32(TypeChecker.FlexAlign_ToNumeric(value_value)) + const value_value = (value as FlexAlign); + thisSerializer.writeInt32(TypeChecker.FlexAlign_ToNumeric(value_value)); } - ArkUIGeneratedNativeModule._RowAttribute_justifyContent(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._RowAttribute_justifyContent(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + pointLightAttribute(value: PointLightStyle | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = value! - thisSerializer.writePointLightStyle(value_value) + const value_value = value!; + thisSerializer.writePointLightStyle(value_value); } - ArkUIGeneratedNativeModule._RowAttribute_pointLight(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._RowAttribute_pointLight(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } + reverseAttribute(value: boolean | undefined): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) + const thisSerializer : Serializer = Serializer.hold(); + let value_type : int32 = RuntimeType.UNDEFINED; + value_type = runtimeType(value); + thisSerializer.writeInt8(value_type as int32); if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = value! - thisSerializer.writeBoolean(value_value) + const value_value = value!; + thisSerializer.writeBoolean(value_value); } - ArkUIGeneratedNativeModule._RowAttribute_reverse(this.peer.ptr, thisSerializer.asBuffer(), thisSerializer.length()) - thisSerializer.release() + ArkUIGeneratedNativeModule._RowAttribute_reverse(this.peer.ptr, thisSerializer.asBuffer(), + thisSerializer.length()); + thisSerializer.release(); } } + export interface RowOptions { space?: string | number; } + export interface RowOptionsV2 { stub: string; } + export interface RowAttribute extends CommonMethod { - alignItems(value: VerticalAlign | undefined): this - justifyContent(value: FlexAlign | undefined): this - pointLight(value: PointLightStyle | undefined): this - reverse(value: boolean | undefined): this + alignItems(value: VerticalAlign | undefined): this {return this;} + justifyContent(value: FlexAlign | undefined): this {return this;} + pointLight(value: PointLightStyle | undefined): this {return this;} + reverse(value: boolean | undefined): this {return this;} } + export class ArkRowStyle extends ArkCommonMethodStyle implements RowAttribute { - alignItems_value?: VerticalAlign | undefined - justifyContent_value?: FlexAlign | undefined - pointLight_value?: PointLightStyle | undefined - reverse_value?: boolean | undefined + alignItems_value?: VerticalAlign | undefined; + justifyContent_value?: FlexAlign | undefined; + pointLight_value?: PointLightStyle | undefined; + reverse_value?: boolean | undefined; public alignItems(value: VerticalAlign | undefined): this { - return this + return this; } public justifyContent(value: FlexAlign | undefined): this { - return this + return this; } public pointLight(value: PointLightStyle | undefined): this { - return this + return this; } public reverse(value: boolean | undefined): this { - return this - } + return this; + } } + export class ArkRowComponent extends ArkCommonMethodComponent implements RowAttribute { + getPeer(): ArkRowPeer { - return (this.peer as ArkRowPeer) + return (this.peer as ArkRowPeer); } + public setRowOptions(options?: RowOptions | RowOptions | RowOptionsV2): this { if (this.checkPriority("setRowOptions")) { - const options_type = runtimeType(options) + const options_type = runtimeType(options); if ((RuntimeType.OBJECT == options_type) || (RuntimeType.UNDEFINED == options_type)) { - const options_casted = options as (RowOptions | undefined) - this.getPeer()?.setRowOptions0Attribute(options_casted) - return this + const options_casted = options as (RowOptions | undefined); + this.getPeer()?.setRowOptions0Attribute(options_casted); + return this; } if ((RuntimeType.OBJECT == options_type) || (RuntimeType.OBJECT == options_type) || (RuntimeType.UNDEFINED == options_type)) { - const options_casted = options as (RowOptions | RowOptionsV2 | undefined) - this.getPeer()?.setRowOptions1Attribute(options_casted) - return this + const options_casted = options as (RowOptions | RowOptionsV2 | undefined); + this.getPeer()?.setRowOptions1Attribute(options_casted); + return this; } - throw new Error("Can not select appropriate overload") + throw new Error("Can not select appropriate overload"); } - return this + return this; } + public alignItems(value: VerticalAlign | undefined): this { if (this.checkPriority("alignItems")) { - const value_casted = value as (VerticalAlign | undefined) - this.getPeer()?.alignItemsAttribute(value_casted) - return this + const value_casted = value as (VerticalAlign | undefined); + this.getPeer()?.alignItemsAttribute(value_casted); + return this; } - return this + return this; } + public justifyContent(value: FlexAlign | undefined): this { if (this.checkPriority("justifyContent")) { - const value_casted = value as (FlexAlign | undefined) - this.getPeer()?.justifyContentAttribute(value_casted) - return this + const value_casted = value as (FlexAlign | undefined); + this.getPeer()?.justifyContentAttribute(value_casted); + return this; } - return this + return this; } + public pointLight(value: PointLightStyle | undefined): this { if (this.checkPriority("pointLight")) { - const value_casted = value as (PointLightStyle | undefined) - this.getPeer()?.pointLightAttribute(value_casted) - return this + const value_casted = value as (PointLightStyle | undefined); + this.getPeer()?.pointLightAttribute(value_casted); + return this; } - return this + return this; } + public reverse(value: boolean | undefined): this { if (this.checkPriority("reverse")) { - const value_casted = value as (boolean | undefined) - this.getPeer()?.reverseAttribute(value_casted) - return this + const value_casted = value as (boolean | undefined); + this.getPeer()?.reverseAttribute(value_casted); + return this; } - return this + return this; } - + public applyAttributesFinish(): void { // we call this function outside of class, so need to make it public - super.applyAttributesFinish() + super.applyAttributesFinish(); } } + /** @memo */ export function Row( /** @memo */ diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rowSplit.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rowSplit.ts index 95922de517c..3e7a4a983b9 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rowSplit.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rowSplit.ts @@ -64,7 +64,7 @@ export class ArkRowSplitStyle extends ArkCommonMethodStyle implements RowSplitAt resizeable_value?: boolean | undefined public resizeable(value: boolean | undefined): this { return this - } + } } export class ArkRowSplitComponent extends ArkCommonMethodComponent implements RowSplitAttribute { getPeer(): ArkRowSplitPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/saveButton.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/saveButton.ts index b29592a83ba..ea371a1bdf5 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/saveButton.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/saveButton.ts @@ -100,7 +100,7 @@ export class ArkSaveButtonStyle extends ArkSecurityComponentMethodStyle implemen onClick_value?: SaveButtonCallback | undefined public onClick(value: SaveButtonCallback | undefined): this { return this - } + } } export class ArkSaveButtonComponent extends ArkSecurityComponentMethodComponent implements SaveButtonAttribute { getPeer(): ArkSaveButtonPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scroll.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scroll.ts index bf25126cde1..721972c3c7d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scroll.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scroll.ts @@ -693,7 +693,7 @@ export class ArkScrollStyle extends ArkScrollableCommonMethodStyle implements Sc } public edgeEffect(edgeEffect: EdgeEffect | undefined, options?: EdgeEffectOptions | undefined): this { return this - } + } } export type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState) => void; export type ScrollOnWillScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => OffsetResult; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scrollBar.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scrollBar.ts index c700994d6af..8d7afabff2d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scrollBar.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/scrollBar.ts @@ -78,7 +78,7 @@ export class ArkScrollBarStyle extends ArkCommonMethodStyle implements ScrollBar enableNestedScroll_value?: boolean | undefined public enableNestedScroll(value: boolean | undefined): this { return this - } + } } export class ArkScrollBarComponent extends ArkCommonMethodComponent implements ScrollBarAttribute { getPeer(): ArkScrollBarPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/search.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/search.ts index 36a10a87ed0..5cd50f03cfd 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/search.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/search.ts @@ -1129,7 +1129,7 @@ export class ArkSearchStyle extends ArkCommonMethodStyle implements SearchAttrib } public _onChangeEvent_value(callback: ((breakpoints: string) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkSearchComponent extends ArkCommonMethodComponent implements SearchAttribute { getPeer(): ArkSearchPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/securityComponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/securityComponent.ts index a63c0cac097..1de1752de4a 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/securityComponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/securityComponent.ts @@ -890,7 +890,7 @@ export class ArkSecurityComponentMethodStyle implements SecurityComponentMethod } public chainMode(direction: Axis | undefined, style: ChainStyle | undefined): this { return this - } + } } export class ArkSecurityComponentMethodComponent extends ComponentBase implements SecurityComponentMethod { getPeer(): ArkSecurityComponentMethodPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/select.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/select.ts index 1cb6534932f..e7cecfd8c5b 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/select.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/select.ts @@ -1381,7 +1381,7 @@ export class ArkSelectStyle extends ArkCommonMethodStyle implements SelectAttrib } public _onChangeEvent_value(callback: ((value: ResourceStr | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkSelectComponent extends ArkCommonMethodComponent implements SelectAttribute { getPeer(): ArkSelectPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/shape.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/shape.ts index 553a63abda7..81a08af682b 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/shape.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/shape.ts @@ -392,7 +392,7 @@ export class ArkShapeStyle extends ArkCommonMethodStyle implements ShapeAttribut } public mesh(value: Array | undefined, column: number | undefined, row: number | undefined): this { return this - } + } } export class ArkShapeComponent extends ArkCommonMethodComponent implements ShapeAttribute { getPeer(): ArkShapePeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/sidebar.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/sidebar.ts index 408be4f2577..c9362b8806f 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/sidebar.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/sidebar.ts @@ -327,7 +327,7 @@ export class ArkSideBarContainerStyle extends ArkCommonMethodStyle implements Si } public _onChangeEvent_showSideBar(callback: ((select: boolean | undefined) => void)): void { throw new Error("Unimplmented") - } + } } export class ArkSideBarContainerComponent extends ArkCommonMethodComponent implements SideBarContainerAttribute { getPeer(): ArkSideBarContainerPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/span.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/span.ts index ffca634c018..275d8368878 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/span.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/span.ts @@ -335,7 +335,7 @@ export class ArkBaseSpanStyle extends ArkCommonMethodStyle implements BaseSpan { } public baselineOffset(value: LengthMetrics | undefined): this { return this - } + } } export type SpanInterface = (value: string | Resource) => SpanAttribute; export interface SpanAttribute extends BaseSpan { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stack.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stack.ts index 21ebd1bebbb..b468bfeafa7 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stack.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stack.ts @@ -94,7 +94,7 @@ export class ArkStackStyle extends ArkCommonMethodStyle implements StackAttribut } public pointLight(value: PointLightStyle | undefined): this { return this - } + } } export class ArkStackComponent extends ArkCommonMethodComponent implements StackAttribute { getPeer(): ArkStackPeer { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkBlankNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkBlankNode.ts index b28769116d9..7463bd07835 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkBlankNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkBlankNode.ts @@ -20,7 +20,20 @@ import { BlankAttribute, ArkBlankPeer, ResourceColor } from '../../component'; export class ArkBlankNode extends ArkBaseNode implements BlankAttribute { constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('blank constructParam enter'); + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let min_casted: number | string | undefined = undefined; + if (param.length === 1) { + min_casted = param[0] as (number | string | undefined); + } + this.getPeer()?.setBlankOptionsAttribute(min_casted); + return this; + } + + initialize(min?: number | string): this { + const min_casted = min as (number | string | undefined); + this.getPeer()?.setBlankOptionsAttribute(min_casted); return this; } @@ -29,6 +42,8 @@ export class ArkBlankNode extends ArkBaseNode implements BlankAttribute { } color(value: ResourceColor | undefined): this { + const value_casted = value as (ResourceColor | undefined); + this.getPeer()?.colorAttribute(value_casted); return this; } } \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnNode.ts index ebdd669123f..97b4a350c37 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnNode.ts @@ -13,34 +13,60 @@ * limitations under the License. */ -import { InteropNativeModule } from '@koalaui/interop'; -import { ColumnAttribute, HorizontalAlign, FlexAlign, PointLightStyle, ArkColumnPeer } from '../../component'; +import { InteropNativeModule, runtimeType, RuntimeType } from '@koalaui/interop'; +import { ColumnAttribute, HorizontalAlign, FlexAlign, PointLightStyle, ArkColumnPeer, ColumnOptions, + ColumnOptionsV2 } from '../../component'; import { ArkBaseNode } from './ArkBaseNode'; export class ArkColumnNode extends ArkBaseNode implements ColumnAttribute { constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('column constructParam enter'); + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let options_casted: ColumnOptions | ColumnOptionsV2 | undefined = undefined; + if (param.length === 1) { + options_casted = param[0] as (ColumnOptions | ColumnOptionsV2 | undefined); + } + this.getPeer()?.setColumnOptions1Attribute(options_casted); return this; } + initialize(options?: ColumnOptions | ColumnOptionsV2): this { + const options_type = runtimeType(options) + if ((RuntimeType.OBJECT == options_type) || (RuntimeType.UNDEFINED == options_type)) { + const options_casted = options as (ColumnOptions | ColumnOptionsV2 | undefined); + this.getPeer()?.setColumnOptions1Attribute(options_casted); + return this; + } + throw new Error("Can not select appropriate overload"); + } + getPeer() : ArkColumnPeer { - return this.peer as ArkColumnPeer + return this.peer as ArkColumnPeer; } alignItems(value: HorizontalAlign | undefined): this { + const value_casted = value as (HorizontalAlign | undefined); + this.getPeer()?.alignItemsAttribute(value_casted); return this; } justifyContent(value: FlexAlign | undefined): this { + const value_casted = value as (FlexAlign | undefined); + this.getPeer()?.justifyContentAttribute(value_casted); return this; } pointLight(value: PointLightStyle | undefined): this { + const value_casted = value as (PointLightStyle | undefined); + this.getPeer()?.pointLightAttribute(value_casted); return this; } reverse(value: boolean | undefined): this { + const value_casted = value as (boolean | undefined); + this.getPeer()?.reverseAttribute(value_casted); return this; } } \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnSplitNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnSplitNode.ts index b0b553bd8e0..4b34d9ae764 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnSplitNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkColumnSplitNode.ts @@ -1,38 +1,45 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { InteropNativeModule } from '@koalaui/interop'; -import { ColumnSplitAttribute, ArkColumnSplitPeer, ColumnSplitDividerStyle } from '../../component'; -import { ArkBaseNode } from './ArkBaseNode'; - -export class ArkColumnSplitNode extends ArkBaseNode implements ColumnSplitAttribute { - - constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('columnsplit constructParam enter'); - return this; - } - - getPeer(): ArkColumnSplitPeer { - return this.peer as ArkColumnSplitPeer; - } - - resizeable(value: boolean | undefined): this { - return this; - } - - divider(value: ColumnSplitDividerStyle | undefined): this { - return this; - } -} \ No newline at end of file +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InteropNativeModule } from '@koalaui/interop'; +import { ColumnSplitAttribute, ArkColumnSplitPeer, ColumnSplitDividerStyle } from '../../component'; +import { ArkBaseNode } from './ArkBaseNode'; + +export class ArkColumnSplitNode extends ArkBaseNode implements ColumnSplitAttribute { + + constructParam(...param: Object[]): this { + if (param.length > 0) { + throw new Error('more than 0 parameters'); + } + this.getPeer()?.setColumnSplitOptionsAttribute(); + return this; + } + + getPeer(): ArkColumnSplitPeer { + return this.peer as ArkColumnSplitPeer; + } + + resizeable(value: boolean | undefined): this { + const value_casted = value as (boolean | undefined); + this.getPeer()?.resizeableAttribute(value_casted); + return this; + } + + divider(value: ColumnSplitDividerStyle | undefined): this { + const value_casted = value as (ColumnSplitDividerStyle | undefined); + this.getPeer()?.dividerAttribute(value_casted); + return this; + } +} \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkDividerNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkDividerNode.ts index 0aa5e42596a..0639804c90e 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkDividerNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkDividerNode.ts @@ -20,7 +20,10 @@ import { DividerAttribute, ArkDividerPeer, LineCapStyle, ResourceColor } from '. export class ArkDividerNode extends ArkBaseNode implements DividerAttribute { constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('column constructParam enter'); + if (param.length > 0) { + throw new Error('more than 0 parameters'); + } + this.getPeer()?.setDividerOptionsAttribute(); return this; } @@ -29,18 +32,31 @@ export class ArkDividerNode extends ArkBaseNode implements DividerAttribute { } vertical(value: boolean | undefined): this { + const value_casted = value as (boolean | undefined); + this.getPeer()?.verticalAttribute(value_casted); + return this; + } + + initialize(): this { + this.getPeer()?.setDividerOptionsAttribute(); return this; } color(value: ResourceColor | undefined): this { + const value_casted = value as (ResourceColor | undefined); + this.getPeer()?.colorAttribute(value_casted); return this; } strokeWidth(value: string | number | undefined): this { + const value_casted = value as (number | string | undefined); + this.getPeer()?.strokeWidthAttribute(value_casted); return this; } lineCap(value: LineCapStyle | undefined): this { + const value_casted = value as (LineCapStyle | undefined); + this.getPeer()?.lineCapAttribute(value_casted); return this; } } \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkFlexNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkFlexNode.ts index b6af5cd4cb4..c427d0c73b3 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkFlexNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkFlexNode.ts @@ -15,13 +15,26 @@ import { InteropNativeModule } from '@koalaui/interop'; import { ArkBaseNode } from './ArkBaseNode'; -import { FlexAttribute, ArkFlexPeer, PointLightStyle } from '../../component'; +import { FlexAttribute, ArkFlexPeer, PointLightStyle, FlexOptions } from '../../component'; /** @memo:stable */ export class ArkFlexNode extends ArkBaseNode implements FlexAttribute { constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('flex constructParam enter'); + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let value_casted: FlexOptions | undefined = undefined; + if (param.length === 1) { + value_casted = param[0] as (FlexOptions | undefined); + } + this.getPeer()?.setFlexOptionsAttribute(value_casted); + return this; + } + + initialize(value?: FlexOptions): this { + const value_casted = value as (FlexOptions | undefined); + this.getPeer()?.setFlexOptionsAttribute(value_casted); return this; } @@ -30,6 +43,8 @@ export class ArkFlexNode extends ArkBaseNode implements FlexAttribute { } pointLight(value: PointLightStyle | undefined): this { + const value_casted = value as (PointLightStyle | undefined); + this.getPeer()?.pointLightAttribute(value_casted); return this; } } \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridColNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridColNode.ts index f7399954264..3356e8a6fca 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridColNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridColNode.ts @@ -1,42 +1,61 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { InteropNativeModule } from '@koalaui/interop'; -import { ArkBaseNode } from './ArkBaseNode'; -import { GridColAttribute, ArkGridColPeer, GridColColumnOption } from '../../component'; - -export class ArkGridColNode extends ArkBaseNode implements GridColAttribute { - - constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('gridcol constructParam enter'); - return this; - } - - getPeer(): ArkGridColPeer { - return this.peer as ArkGridColPeer; - } - - span(value: number | GridColColumnOption | undefined): this { - return this; - } - - gridColOffset(value: number | GridColColumnOption | undefined): this { - return this; - } - - order(value: number | GridColColumnOption | undefined): this { - return this; - } -} \ No newline at end of file +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InteropNativeModule } from '@koalaui/interop'; +import { ArkBaseNode } from './ArkBaseNode'; +import { GridColAttribute, ArkGridColPeer, GridColColumnOption, GridColOptions } from '../../component'; + +export class ArkGridColNode extends ArkBaseNode implements GridColAttribute { + + constructParam(...param: Object[]): this { + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let option_casted: GridColOptions | undefined = undefined; + if (param.length === 1) { + option_casted = param[0] as (GridColOptions | undefined); + } + this.getPeer()?.setGridColOptionsAttribute(option_casted); + return this; + } + + initialize(option?: GridColOptions): this { + const option_casted = option as (GridColOptions | undefined); + this.getPeer()?.setGridColOptionsAttribute(option_casted); + return this; + } + + getPeer(): ArkGridColPeer { + return this.peer as ArkGridColPeer; + } + + span(value: number | GridColColumnOption | undefined): this { + const value_casted = value as (number | GridColColumnOption | undefined); + this.getPeer()?.spanAttribute(value_casted); + return this; + } + + gridColOffset(value: number | GridColColumnOption | undefined): this { + const value_casted = value as (number | GridColColumnOption | undefined); + this.getPeer()?.gridColOffsetAttribute(value_casted); + return this; + } + + order(value: number | GridColColumnOption | undefined): this { + const value_casted = value as (number | GridColColumnOption | undefined); + this.getPeer()?.orderAttribute(value_casted); + return this; + } +} diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridRowNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridRowNode.ts index 3129f3a9ee9..8ca6cb17021 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridRowNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkGridRowNode.ts @@ -1,38 +1,55 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { InteropNativeModule } from '@koalaui/interop'; -import { ArkBaseNode } from './ArkBaseNode'; -import { GridRowAttribute, ArkGridRowPeer, ItemAlign } from '../../component'; - -export class ArkGridRowNode extends ArkBaseNode implements GridRowAttribute { - - constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('gridrow constructParam enter'); - return this; - } - - getPeer(): ArkGridRowPeer { - return this.peer as ArkGridRowPeer; - } - - onBreakpointChange(value: ((breakpoints: string) => void) | undefined): this { - return this; - } - - alignItems(value: ItemAlign | undefined): this { - return this; - } -} \ No newline at end of file +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InteropNativeModule } from '@koalaui/interop'; +import { ArkBaseNode } from './ArkBaseNode'; +import { GridRowAttribute, ArkGridRowPeer, ItemAlign, GridRowOptions } from '../../component'; + +export class ArkGridRowNode extends ArkBaseNode implements GridRowAttribute { + + constructParam(...param: Object[]): this { + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let option_casted: GridRowOptions | undefined = undefined; + if (param.length === 1) { + option_casted = param[0] as (GridRowOptions | undefined); + } + this.getPeer()?.setGridRowOptionsAttribute(option_casted); + return this; + } + + initialize(option?: GridRowOptions): this { + const option_casted = option as (GridRowOptions | undefined); + this.getPeer()?.setGridRowOptionsAttribute(option_casted); + return this; + } + + getPeer(): ArkGridRowPeer { + return this.peer as ArkGridRowPeer; + } + + onBreakpointChange(value: ((breakpoints: string) => void) | undefined): this { + const value_casted = value as (((breakpoints: string) => void) | undefined); + this.getPeer()?.onBreakpointChangeAttribute(value_casted); + return this; + } + + alignItems(value: ItemAlign | undefined): this { + const value_casted = value as (ItemAlign | undefined); + this.getPeer()?.alignItemsAttribute(value_casted); + return this; + } +} diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRelativeContainerNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRelativeContainerNode.ts index 400c0f1174c..256286b083f 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRelativeContainerNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRelativeContainerNode.ts @@ -13,15 +13,25 @@ * limitations under the License. */ -import { InteropNativeModule } from '@koalaui/interop'; +import { InteropNativeModule, runtimeType, RuntimeType } from '@koalaui/interop'; import { ArkBaseNode } from './ArkBaseNode'; -import { RelativeContainerAttribute, ArkRelativeContainerPeer, GuideLineStyle, BarrierStyle, LocalizedBarrierStyle } from '../../component'; +import { TypeChecker } from "#components" +import { RelativeContainerAttribute, ArkRelativeContainerPeer, GuideLineStyle, BarrierStyle, + LocalizedBarrierStyle } from '../../component'; /** @memo:stable */ export class ArkRelativeContainerNode extends ArkBaseNode implements RelativeContainerAttribute { constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('flex constructParam enter'); + if (param.length > 0) { + throw new Error('more than 0 parameters'); + } + this.getPeer()?.setRelativeContainerOptionsAttribute(); + return this; + } + + initialize(): this { + this.getPeer()?.setRelativeContainerOptionsAttribute(); return this; } @@ -30,10 +40,23 @@ export class ArkRelativeContainerNode extends ArkBaseNode implements RelativeCon } guideLine(value: Array | undefined): this { + const value_casted = value as (Array | undefined); + this.getPeer()?.guideLineAttribute(value_casted); return this; } barrier(value: Array | undefined | Array | undefined): this { - return this; + const value_type = runtimeType(value); + if ((RuntimeType.OBJECT == value_type && TypeChecker.isArray_BarrierStyle(value)) || (RuntimeType.UNDEFINED == value_type)) { + const value_casted = value as (Array | undefined); + this.getPeer()?.barrier0Attribute(value_casted); + return this; + } + if ((RuntimeType.OBJECT == value_type && TypeChecker.isArray_LocalizedBarrierStyle(value)) || (RuntimeType.UNDEFINED == value_type)) { + const value_casted = value as (Array | undefined); + this.getPeer()?.barrier1Attribute(value_casted); + return this; + } + throw new Error("Can not select appropriate overload"); } } \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowNode.ts index eec7be60bef..e2a61530794 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowNode.ts @@ -1,46 +1,72 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { InteropNativeModule } from '@koalaui/interop'; -import { ArkBaseNode } from './ArkBaseNode'; -import { RowAttribute, ArkRowPeer, VerticalAlign, FlexAlign, PointLightStyle } from '../../component'; - -export class ArkRowNode extends ArkBaseNode implements RowAttribute { - - constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('row constructParam enter'); - return this; - } - - getPeer(): ArkRowPeer { - return this.peer as ArkRowPeer; - } - - alignItems(value: VerticalAlign | undefined): this { - return this; - } - - justifyContent(value: FlexAlign | undefined): this { - return this; - } - - pointLight(value: PointLightStyle | undefined): this { - return this; - } - - reverse(value: boolean | undefined): this { - return this; - } -} \ No newline at end of file +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InteropNativeModule, runtimeType, RuntimeType } from '@koalaui/interop'; +import { ArkBaseNode } from './ArkBaseNode'; +import { RowAttribute, ArkRowPeer, VerticalAlign, FlexAlign, PointLightStyle, RowOptions, + RowOptionsV2 } from '../../component'; + +export class ArkRowNode extends ArkBaseNode implements RowAttribute { + + constructParam(...param: Object[]): this { + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let options_casted: RowOptions | RowOptionsV2 | undefined = undefined; + if (param.length === 1) { + options_casted = param[0] as (RowOptions | RowOptionsV2 | undefined); + } + this.getPeer()?.setRowOptions1Attribute(options_casted); + return this; + } + + initialize(options?: RowOptions | RowOptionsV2): this { + const options_type = runtimeType(options); + if ((RuntimeType.OBJECT == options_type) || (RuntimeType.UNDEFINED == options_type)) { + const options_casted = options as (RowOptions | RowOptionsV2 | undefined); + this.getPeer()?.setRowOptions1Attribute(options_casted); + return this; + } + throw new Error("Can not select appropriate overload"); + } + + getPeer(): ArkRowPeer { + return this.peer as ArkRowPeer; + } + + alignItems(value: VerticalAlign | undefined): this { + const value_casted = value as (VerticalAlign | undefined); + this.getPeer()?.alignItemsAttribute(value_casted); + return this; + } + + justifyContent(value: FlexAlign | undefined): this { + const value_casted = value as (FlexAlign | undefined); + this.getPeer()?.justifyContentAttribute(value_casted); + return this; + } + + pointLight(value: PointLightStyle | undefined): this { + const value_casted = value as (PointLightStyle | undefined); + this.getPeer()?.pointLightAttribute(value_casted); + return this; + } + + reverse(value: boolean | undefined): this { + const value_casted = value as (boolean | undefined); + this.getPeer()?.reverseAttribute(value_casted); + return this; + } +} diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowSplitNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowSplitNode.ts index 0c4a337d726..785f980abd2 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowSplitNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkRowSplitNode.ts @@ -1,34 +1,39 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { InteropNativeModule } from '@koalaui/interop'; -import { ArkBaseNode } from './ArkBaseNode'; -import { RowSplitAttribute, ArkRowSplitPeer } from '../../component'; - -export class ArkRowSplitNode extends ArkBaseNode implements RowSplitAttribute { - - constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('rowsplit contructParam enter'); - return this; - } - - getPeer(): ArkRowSplitPeer { - return this.peer as ArkRowSplitPeer; - } - - resizeable(value: boolean | undefined): this { - return this; - } -} \ No newline at end of file +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InteropNativeModule } from '@koalaui/interop'; +import { ArkBaseNode } from './ArkBaseNode'; +import { RowSplitAttribute, ArkRowSplitPeer } from '../../component'; + +export class ArkRowSplitNode extends ArkBaseNode implements RowSplitAttribute { + + constructParam(...param: Object[]): this { + if (param.length > 0) { + throw new Error('more than 0 parameters'); + } + this.getPeer()?.setRowSplitOptionsAttribute(); + return this; + } + + getPeer(): ArkRowSplitPeer { + return this.peer as ArkRowSplitPeer; + } + + resizeable(value: boolean | undefined): this { + const value_casted = value as (boolean | undefined); + this.getPeer()?.resizeableAttribute(value_casted); + return this; + } +} diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkStackNode.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkStackNode.ts index 0153466f0cb..42b1d7b2951 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkStackNode.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/modifiers/ArkStackNode.ts @@ -1,38 +1,55 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { InteropNativeModule } from '@koalaui/interop'; -import { ArkBaseNode } from './ArkBaseNode'; -import { StackAttribute, ArkStackPeer, Alignment, PointLightStyle } from '../../component'; - -export class ArkStackNode extends ArkBaseNode implements StackAttribute { - - constructParam(...param: Object[]): this { - InteropNativeModule._NativeLog('stack constructParam enter'); - return this; - } - - getPeer(): ArkStackPeer { - return this.peer as ArkStackPeer; - } - - alignContent(value: Alignment | undefined): this { - return this; - } - - pointLight(value: PointLightStyle | undefined): this { - return this; - } -} \ No newline at end of file +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InteropNativeModule } from '@koalaui/interop'; +import { ArkBaseNode } from './ArkBaseNode'; +import { StackAttribute, ArkStackPeer, Alignment, PointLightStyle, StackOptions } from '../../component'; + +export class ArkStackNode extends ArkBaseNode implements StackAttribute { + + constructParam(...param: Object[]): this { + if (param.length > 1) { + throw new Error('more than 1 parameters'); + } + let options_casted: StackOptions | undefined = undefined; + if (param.length === 1) { + options_casted = param[0] as (StackOptions | undefined); + } + this.getPeer()?.setStackOptionsAttribute(options_casted); + return this; + } + + initialize(options?: StackOptions): this { + const options_casted = options as (StackOptions | undefined); + this.getPeer()?.setStackOptionsAttribute(options_casted); + return this; + } + + getPeer(): ArkStackPeer { + return this.peer as ArkStackPeer; + } + + alignContent(value: Alignment | undefined): this { + const value_casted = value as (Alignment | undefined); + this.getPeer()?.alignContentAttribute(value_casted); + return this; + } + + pointLight(value: PointLightStyle | undefined): this { + const value_casted = value as (PointLightStyle | undefined); + this.getPeer()?.pointLightAttribute(value_casted); + return this; + } +} -- Gitee