diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/alphabetIndexer.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/alphabetIndexer.ts index 419dab90ced4c2dfbc4e8e4d8ee5127af97c269f..ef3e9cd51401038ba570c05addb847c9d592ad21 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/alphabetIndexer.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/alphabetIndexer.ts @@ -604,6 +604,9 @@ export type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array export type Callback_Number_Void = (index: number) => void; export type Callback_Opt_Number_Void = (selected: number | undefined) => void; export interface AlphabetIndexerAttribute extends CommonMethod { + setAlphabetIndexerOptions(options: AlphabetIndexerOptions): this { + return this + } onSelected(value: ((index: number) => void) | undefined): this color(value: ResourceColor | undefined): this selectedColor(value: ResourceColor | undefined): this @@ -660,6 +663,9 @@ export class ArkAlphabetIndexerStyle extends ArkCommonMethodStyle implements Alp popupBackgroundBlurStyle_value?: BlurStyle | undefined popupTitleBackground_value?: ResourceColor | undefined enableHapticFeedback_value?: boolean | undefined + public setAlphabetIndexerOptions(options: AlphabetIndexerOptions): this { + return this + } public onSelected(value: ((index: number) => void) | undefined): this { return this } @@ -1005,10 +1011,9 @@ export class ArkAlphabetIndexerComponent extends ArkCommonMethodComponent implem } } /** @memo */ -export function AlphabetIndexer( +export function AlphabetIndexerImpl( /** @memo */ style: ((attributes: AlphabetIndexerAttribute) => void) | undefined, - options: AlphabetIndexerOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1016,9 +1021,7 @@ export function AlphabetIndexer( return new ArkAlphabetIndexerComponent() }) NodeAttach((): ArkAlphabetIndexerPeer => ArkAlphabetIndexerPeer.create(receiver), (_: ArkAlphabetIndexerPeer) => { - receiver.setAlphabetIndexerOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/animator.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/animator.ts index 9ad31f2fbfd8422521f2d77e9a0af95082b427e5..dd0cb719e68a32bdfbca6fee6b9fd6b871aaacd4 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/animator.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/animator.ts @@ -322,6 +322,9 @@ export class ArkAnimatorPeer extends ArkCommonMethodPeer { } export type AnimatorInterface = (value: string) => AnimatorAttribute; export interface AnimatorAttribute extends CommonMethod { + setAnimatorOptions(value: string): this { + return this + } state(value: AnimationStatus | undefined): this duration(value: number | undefined): this curve(value: Curve | undefined): this @@ -352,6 +355,9 @@ export class ArkAnimatorStyle extends ArkCommonMethodStyle implements AnimatorAt onCancel_value?: (() => void) | undefined onFinish_value?: (() => void) | undefined onFrame_value?: ((index: number) => void) | undefined + public setAnimatorOptions(value: string): this { + return this + } public state(value: AnimationStatus | undefined): this { return this } @@ -525,10 +531,9 @@ export class ArkAnimatorComponent extends ArkCommonMethodComponent implements An } } /** @memo */ -export function Animator( +export function AnimatorImpl( /** @memo */ style: ((attributes: AnimatorAttribute) => void) | undefined, - value: string, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -536,9 +541,7 @@ export function Animator( return new ArkAnimatorComponent() }) NodeAttach((): ArkAnimatorPeer => ArkAnimatorPeer.create(receiver), (_: ArkAnimatorPeer) => { - receiver.setAnimatorOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/badge.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/badge.ts index 65055b8df7018f9dbf57e02b0d4fa333925ccc28..a3cf793ce14c6aa19c42b6adb74d27a27ea855c9 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/badge.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/badge.ts @@ -81,8 +81,14 @@ export interface BadgeParamWithString extends BadgeParam { value: string; } export interface BadgeAttribute extends CommonMethod { + setBadgeOptions(value: BadgeParamWithNumber | BadgeParamWithString): this { + return this + } } export class ArkBadgeStyle extends ArkCommonMethodStyle implements BadgeAttribute { + public setBadgeOptions(value: BadgeParamWithNumber | BadgeParamWithString): this { + return this + } } export class ArkBadgeComponent extends ArkCommonMethodComponent implements BadgeAttribute { getPeer(): ArkBadgePeer { @@ -111,10 +117,9 @@ export class ArkBadgeComponent extends ArkCommonMethodComponent implements Badge } } /** @memo */ -export function Badge( +export function BadgeImpl( /** @memo */ style: ((attributes: BadgeAttribute) => void) | undefined, - value: BadgeParamWithNumber | BadgeParamWithString, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -122,9 +127,7 @@ export function Badge( return new ArkBadgeComponent() }) NodeAttach((): ArkBadgePeer => ArkBadgePeer.create(receiver), (_: ArkBadgePeer) => { - receiver.setBadgeOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/blank.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/blank.ts index 6883f58cd76aea9248aed56bb1f2d6cd8d9e5370..18199deb29a24951a65d61a530e7a59d842201b6 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/blank.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/blank.ts @@ -101,10 +101,16 @@ export class ArkBlankPeer extends ArkCommonMethodPeer { } } export interface BlankAttribute extends CommonMethod { + setBlankOptions(min?: number | string): this { + return this + } color(value: ResourceColor | undefined): this } export class ArkBlankStyle extends ArkCommonMethodStyle implements BlankAttribute { color_value?: ResourceColor | undefined + public setBlankOptions(min?: number | string): this { + return this + } public color(value: ResourceColor | undefined): this { return this } @@ -135,10 +141,9 @@ export class ArkBlankComponent extends ArkCommonMethodComponent implements Blank } } /** @memo */ -export function Blank( +export function BlankImpl( /** @memo */ style: ((attributes: BlankAttribute) => void) | undefined, - min?: number | string, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -146,9 +151,7 @@ export function Blank( return new ArkBlankComponent() }) NodeAttach((): ArkBlankPeer => ArkBlankPeer.create(receiver), (_: ArkBlankPeer) => { - receiver.setBlankOptions(min) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/button.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/button.ts index 64a93d863bd138ca5bad2c155a9dba4d8d1f3db8..150000861699911ed90f8f9296e2bdef538ccec8 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/button.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/button.ts @@ -359,6 +359,9 @@ export interface ButtonLabelStyle { } export interface ButtonAttribute extends CommonMethod { + setButtonOptions(label?: ButtonOptions | ResourceStr, options?: ButtonOptions): this { + return this + } type(value: ButtonType | undefined): this {return this;} stateEffect(value: boolean | undefined): this { return this;} buttonStyle(value: ButtonStyleMode | undefined): this { return this;} @@ -391,6 +394,9 @@ export class ArkButtonStyle extends ArkCommonMethodStyle implements ButtonAttrib labelStyle_value?: ButtonLabelStyle | undefined minFontScale_value?: number | Resource | undefined maxFontScale_value?: number | Resource | undefined + public setButtonOptions(label?: ButtonOptions | ResourceStr, options?: ButtonOptions): this { + return this + } public type(value: ButtonType | undefined): this { return this } @@ -583,10 +589,9 @@ export class ArkButtonComponent extends ArkCommonMethodComponent implements Butt } } /** @memo */ -export function Button( +export function ButtonImpl( /** @memo */ style: ((attributes: ButtonAttribute) => void) | undefined, - label?: ButtonOptions | ResourceStr, options?: ButtonOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -594,9 +599,7 @@ export function Button( return new ArkButtonComponent() }) NodeAttach((): ArkButtonPeer => ArkButtonPeer.create(receiver), (_: ArkButtonPeer) => { - receiver.setButtonOptions(label,options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } \ No newline at end of file diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendar.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendar.ts index 26986a7dea89ed1f7522f6a2d3e4a82e26aff8af..9b5b630ad6d11ed7cc4ed41bd40cf65e8fedf3cf 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendar.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendar.ts @@ -370,6 +370,9 @@ export type CalendarInterface = (value: Type_CalendarInterface_callable0_value) export type Callback_CalendarSelectedDate_Void = (event: CalendarSelectedDate) => void; export type Callback_CalendarRequestedData_Void = (event: CalendarRequestedData) => void; export interface CalendarAttribute { + setCalendarOptions(value: Type_CalendarInterface_callable0_value): this { + return this + } showLunar(value: boolean | undefined): this showHoliday(value: boolean | undefined): this needSlide(value: boolean | undefined): this @@ -398,6 +401,9 @@ export class ArkCalendarStyle implements CalendarAttribute { workStateStyle_value?: WorkStateStyle | undefined onSelectChange_value?: ((event: CalendarSelectedDate) => void) | undefined onRequestData_value?: ((event: CalendarRequestedData) => void) | undefined + public setCalendarOptions(value: Type_CalendarInterface_callable0_value): this { + return this + } public showLunar(value: boolean | undefined): this { return this } @@ -560,10 +566,9 @@ export class ArkCalendarComponent extends ComponentBase implements CalendarAttri } } /** @memo */ -export function Calendar( +export function CalendarImpl( /** @memo */ style: ((attributes: CalendarAttribute) => void) | undefined, - value: Type_CalendarInterface_callable0_value, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -571,9 +576,7 @@ export function Calendar( return new ArkCalendarComponent() }) NodeAttach((): ArkCalendarPeer => ArkCalendarPeer.create(receiver), (_: ArkCalendarPeer) => { - receiver.setCalendarOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendarPicker.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendarPicker.ts index f91a55efcaa8658fc4f077086aa5d8256b12c143..0b49e876b085c2480200ea61a953d677cb2e6e09 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendarPicker.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/calendarPicker.ts @@ -185,6 +185,9 @@ export interface CalendarOptions { export type CalendarPickerInterface = (options?: CalendarOptions) => CalendarPickerAttribute; export type Callback_Date_Void = (parameter: Date) => void; export interface CalendarPickerAttribute extends CommonMethod { + setCalendarPickerOptions(options?: CalendarOptions): this { + return this + } textStyle(value: PickerTextStyle | undefined): this onChange(value: ((parameter: Date) => void) | undefined): this markToday(value: boolean | undefined): this @@ -194,6 +197,9 @@ export class ArkCalendarPickerStyle extends ArkCommonMethodStyle implements Cale textStyle_value?: PickerTextStyle | undefined onChange_value?: ((parameter: Date) => void) | undefined markToday_value?: boolean | undefined + public setCalendarPickerOptions(options?: CalendarOptions): this { + return this + } public textStyle(value: PickerTextStyle | undefined): this { return this } @@ -295,10 +301,9 @@ export class ArkCalendarPickerComponent extends ArkCommonMethodComponent impleme } } /** @memo */ -export function CalendarPicker( +export function CalendarPickerImpl( /** @memo */ style: ((attributes: CalendarPickerAttribute) => void) | undefined, - options?: CalendarOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -306,9 +311,7 @@ export function CalendarPicker( return new ArkCalendarPickerComponent() }) NodeAttach((): ArkCalendarPickerPeer => ArkCalendarPickerPeer.create(receiver), (_: ArkCalendarPickerPeer) => { - receiver.setCalendarPickerOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/canvas.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/canvas.ts index 25b535cab893c5d510cab35e44f8d94d57c3ae10..75b5767d416d48e2e4500e2b677d26e60d4d62d4 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/canvas.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/canvas.ts @@ -577,12 +577,18 @@ export interface TextMetrics { height: number; } export interface CanvasAttribute extends CommonMethod { + setCanvasOptions(context?: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions?: ImageAIOptions): this { + return this + } onReady(value: VoidCallback | undefined): this enableAnalyzer(value: boolean | undefined): this } export class ArkCanvasStyle extends ArkCommonMethodStyle implements CanvasAttribute { onReady_value?: VoidCallback | undefined enableAnalyzer_value?: boolean | undefined + public setCanvasOptions(context?: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions?: ImageAIOptions): this { + return this + } public onReady(value: VoidCallback | undefined): this { return this } @@ -635,10 +641,9 @@ export class ArkCanvasComponent extends ArkCommonMethodComponent implements Canv } } /** @memo */ -export function Canvas( +export function CanvasImpl( /** @memo */ style: ((attributes: CanvasAttribute) => void) | undefined, - context?: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions?: ImageAIOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -646,10 +651,8 @@ export function Canvas( return new ArkCanvasComponent() }) NodeAttach((): ArkCanvasPeer => ArkCanvasPeer.create(receiver), (_: ArkCanvasPeer) => { - receiver.setCanvasOptions(context,imageAIOptions) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class Path2DInternal { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkbox.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkbox.ts index 92d8f579022083aef9c91b167e95c7266751d0e8..67764a815d6c3a6fd4c3f33ca7db7a69132dcd79 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkbox.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkbox.ts @@ -328,6 +328,9 @@ export type CheckboxInterface = (options?: CheckboxOptions) => CheckboxAttribute export type OnCheckboxChangeCallback = (value: boolean) => void; export type Callback_Opt_Boolean_Void = (select: boolean | undefined) => void; export interface CheckboxAttribute extends CommonMethod { + setCheckboxOptions(options?: CheckboxOptions): this { + return this + } select(value: boolean | Bindable | undefined): this selectedColor(value: ResourceColor | undefined): this shape(value: CheckBoxShape | undefined): this @@ -345,6 +348,9 @@ export class ArkCheckboxStyle extends ArkCommonMethodStyle implements CheckboxAt mark_value?: MarkStyle | undefined onChange_value?: OnCheckboxChangeCallback | undefined contentModifier_value?: ContentModifier | undefined + public setCheckboxOptions(options?: CheckboxOptions): this { + return this + } public select(value: boolean | Bindable | undefined): this { return this } @@ -500,10 +506,9 @@ export class ArkCheckboxComponent extends ArkCommonMethodComponent implements Ch } } /** @memo */ -export function Checkbox( +export function CheckboxImpl( /** @memo */ style: ((attributes: CheckboxAttribute) => void) | undefined, - options?: CheckboxOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -511,9 +516,7 @@ export function Checkbox( return new ArkCheckboxComponent() }) NodeAttach((): ArkCheckboxPeer => ArkCheckboxPeer.create(receiver), (_: ArkCheckboxPeer) => { - receiver.setCheckboxOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkboxgroup.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkboxgroup.ts index 9b19a8226ceccc2d9026b2fd47c4b9d8250e19f5..57079d82c56112c99ac35b9bc895fbd3ebbab838 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkboxgroup.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/checkboxgroup.ts @@ -308,6 +308,9 @@ export interface CheckboxGroupResult { export type CheckboxGroupInterface = (options?: CheckboxGroupOptions) => CheckboxGroupAttribute; export type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => void; export interface CheckboxGroupAttribute extends CommonMethod { + setCheckboxGroupOptions(options?: CheckboxGroupOptions): this { + return this + } selectAll(value: boolean | Bindable | undefined): this selectedColor(value: ResourceColor | undefined): this unselectedColor(value: ResourceColor | undefined): this @@ -323,6 +326,9 @@ export class ArkCheckboxGroupStyle extends ArkCommonMethodStyle implements Check mark_value?: MarkStyle | undefined onChange_value?: OnCheckboxGroupChangeCallback | undefined checkboxShape_value?: CheckBoxShape | undefined + public setCheckboxGroupOptions(options?: CheckboxGroupOptions): this { + return this + } public selectAll(value: boolean | Bindable | undefined): this { return this } @@ -469,10 +475,9 @@ export class ArkCheckboxGroupComponent extends ArkCommonMethodComponent implemen } } /** @memo */ -export function CheckboxGroup( +export function CheckboxGroupImpl( /** @memo */ style: ((attributes: CheckboxGroupAttribute) => void) | undefined, - options?: CheckboxGroupOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -480,9 +485,7 @@ export function CheckboxGroup( return new ArkCheckboxGroupComponent() }) NodeAttach((): ArkCheckboxGroupPeer => ArkCheckboxGroupPeer.create(receiver), (_: ArkCheckboxGroupPeer) => { - receiver.setCheckboxGroupOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/circle.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/circle.ts index 9b312cb21642f44584c1a5e821509af242163b5e..59d429e06fdd3ef2d09515776ad172c32cc36f1d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/circle.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/circle.ts @@ -58,9 +58,15 @@ export interface CircleOptions { } export type CircleInterface = (value?: CircleOptions) => CircleAttribute; export interface CircleAttribute extends CommonShapeMethod { + setCircleOptions(value?: CircleOptions): this { + return this + } attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this { return this; } } export class ArkCircleStyle extends ArkCommonShapeMethodStyle implements CircleAttribute { + public setCircleOptions(value?: CircleOptions): this { + return this + } } export class ArkCircleComponent extends ArkCommonShapeMethodComponent implements CircleAttribute { getPeer(): ArkCirclePeer { @@ -84,10 +90,9 @@ export class ArkCircleComponent extends ArkCommonShapeMethodComponent implements } } /** @memo */ -export function Circle( +export function CircleImpl( /** @memo */ style: ((attributes: CircleAttribute) => void) | undefined, - value?: CircleOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -95,9 +100,7 @@ export function Circle( return new ArkCircleComponent() }) NodeAttach((): ArkCirclePeer => ArkCirclePeer.create(receiver), (_: ArkCirclePeer) => { - receiver.setCircleOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 876662bcb736fb0667a13ccf857138871a817fcd..35d59d974fafbea1e94fabdf274da7fee3f24fe5 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 @@ -156,6 +156,9 @@ export interface ColumnOptionsV2 { } export interface ColumnAttribute extends CommonMethod { + setColumnOptions(options?: ColumnOptions | ColumnOptions | ColumnOptionsV2): this { + return this + } alignItems(value: HorizontalAlign | undefined): this {return this;} justifyContent(value: FlexAlign | undefined): this {return this;} pointLight(value: PointLightStyle | undefined): this {return this;} @@ -168,6 +171,9 @@ export class ArkColumnStyle extends ArkCommonMethodStyle implements ColumnAttrib justifyContent_value?: FlexAlign | undefined; pointLight_value?: PointLightStyle | undefined; reverse_value?: boolean | undefined; + public setColumnOptions(options?: ColumnOptions | ColumnOptions | ColumnOptionsV2): this { + return this + } public alignItems(value: HorizontalAlign | undefined): this { return this; } @@ -254,10 +260,9 @@ export class ArkColumnComponent extends ArkCommonMethodComponent implements Colu } /** @memo */ -export function Column( +export function ColumnImpl( /** @memo */ style: ((attributes: ColumnAttribute) => void) | undefined, - options?: ColumnOptions | ColumnOptions | ColumnOptionsV2, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -265,9 +270,7 @@ export function Column( return new ArkColumnComponent() }) NodeAttach((): ArkColumnPeer => ArkColumnPeer.create(receiver), (_: ArkColumnPeer) => { - receiver.setColumnOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 28364b1a1c6c7823c5cb214c7d39fd47eca57011..b8eb1ae7719b22b210003f0bea528e772b292956 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 @@ -75,12 +75,18 @@ export interface ColumnSplitDividerStyle { endMargin?: Dimension; } export interface ColumnSplitAttribute extends CommonMethod { + setColumnSplitOptions(): this { + return this + } resizeable(value: boolean | undefined): this divider(value: ColumnSplitDividerStyle | null | undefined): this } export class ArkColumnSplitStyle extends ArkCommonMethodStyle implements ColumnSplitAttribute { resizeable_value?: boolean | undefined divider_value?: ColumnSplitDividerStyle | null | undefined + public setColumnSplitOptions(): this { + return this + } public resizeable(value: boolean | undefined): this { return this } @@ -122,10 +128,9 @@ export class ArkColumnSplitComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function ColumnSplit( +export function ColumnSplitImpl( /** @memo */ style: ((attributes: ColumnSplitAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -133,9 +138,7 @@ export function ColumnSplit( return new ArkColumnSplitComponent() }) NodeAttach((): ArkColumnSplitPeer => ArkColumnSplitPeer.create(receiver), (_: ArkColumnSplitPeer) => { - receiver.setColumnSplitOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/common.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/common.ts index 6a6f2129fc433d89e40cd516c4bdade7637a0f23..c4534f137e76fe8122a23092d7721837e1ac5e82 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/common.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/common.ts @@ -8219,6 +8219,7 @@ export interface CommonMethod { onVisibleAreaChange(ratios: Array | undefined, event: VisibleAreaChangeCallback | undefined): this {return this;} onVisibleAreaApproximateChange(options: VisibleAreaEventOptions | undefined, event: VisibleAreaChangeCallback | undefined): this {return this;} keyboardShortcut(value: string | FunctionKey | undefined, keys: Array | undefined, action?: (() => void)): this {return this;} + applyAttributesFinish(): void {} } export class ArkCommonMethodStyle implements CommonMethod { width_value?: Length | undefined 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 83814474e7cdf0e4a59fd39668f8c58aea576809..ea85e6bfb019192d1d4402ba0195530b1223c743 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 @@ -203,6 +203,9 @@ export interface SceneOptions { } export type Component3DInterface = (sceneOptions?: SceneOptions) => Component3DAttribute; export interface Component3DAttribute extends CommonMethod { + setComponent3DOptions(sceneOptions?: SceneOptions): this { + return this + } environment(value: ResourceStr | undefined): this shader(value: ResourceStr | undefined): this shaderImageTexture(value: ResourceStr | undefined): this @@ -218,6 +221,9 @@ export class ArkComponent3DStyle extends ArkCommonMethodStyle implements Compone shaderInputBuffer_value?: Array | undefined renderWidth_value?: Dimension | undefined renderHeight_value?: Dimension | undefined + public setComponent3DOptions(sceneOptions?: SceneOptions): this { + return this + } public environment(value: ResourceStr | undefined): this { return this } @@ -316,10 +322,9 @@ export class ArkComponent3DComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function Component3D( +export function Component3DImpl( /** @memo */ style: ((attributes: Component3DAttribute) => void) | undefined, - sceneOptions?: SceneOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -327,9 +332,7 @@ export function Component3D( return new ArkComponent3DComponent() }) NodeAttach((): ArkComponent3DPeer => ArkComponent3DPeer.create(receiver), (_: ArkComponent3DPeer) => { - receiver.setComponent3DOptions(sceneOptions) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 330f825293be67d98c978bb4edaf4e72d42e1579..9a7cf9b409cfbe76e1bb691797e8d697d5c9ea8c 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 @@ -56,10 +56,16 @@ export class ArkContainerSpanPeer extends PeerNode { } export type ContainerSpanInterface = () => ContainerSpanAttribute; export interface ContainerSpanAttribute { + setContainerSpanOptions(): this { + return this + } textBackgroundStyle(value: TextBackgroundStyle | undefined): this } export class ArkContainerSpanStyle implements ContainerSpanAttribute { textBackgroundStyle_value?: TextBackgroundStyle | undefined + public setContainerSpanOptions(): this { + return this + } public textBackgroundStyle(value: TextBackgroundStyle | undefined): this { return this } @@ -90,10 +96,9 @@ export class ArkContainerSpanComponent extends ComponentBase implements Containe } } /** @memo */ -export function ContainerSpan( +export function ContainerSpanImpl( /** @memo */ style: ((attributes: ContainerSpanAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -101,9 +106,7 @@ export function ContainerSpan( return new ArkContainerSpanComponent() }) NodeAttach((): ArkContainerSpanPeer => ArkContainerSpanPeer.create(receiver), (_: ArkContainerSpanPeer) => { - receiver.setContainerSpanOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/contentSlot.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/contentSlot.ts index 55d6fa4bd6d550500b2abd5a8227a8375c0fab0c..19b5bf798e068f5e098ab82d7d3dac957f5cf392 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/contentSlot.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/contentSlot.ts @@ -20,7 +20,11 @@ import { int32, int64, float32 } from "@koalaui/common" import { KInt, KPointer, KBoolean, NativeBuffer, KStringPtr, wrapCallback } from "@koalaui/interop" import { NodeAttach, remember } from "@koalaui/runtime" import { Content } from "../Content" +import { ArkCommonMethodPeer, CommonMethod, ArkCommonMethodComponent, ArkCommonMethodStyle, AttributeModifier } from './common'; -export interface ContentSlotAttribute { +export interface ContentSlotAttribute extends CommonMethod { + setContentSlotOptions(content?: Content): this { + return this + } } export type ContentSlotInterface = (content: Content) => ContentSlotAttribute; 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 cf59dea610bfb8ec08e294d14204869640f5f1aa..44fd8cf1d72071f3b6d18119c5a6dc034696774a 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 @@ -93,6 +93,9 @@ export class ArkCounterPeer extends ArkCommonMethodPeer { } export type CounterInterface = () => CounterAttribute; export interface CounterAttribute extends CommonMethod { + setCounterOptions(): this { + return this + } onInc(value: VoidCallback | undefined): this onDec(value: VoidCallback | undefined): this enableDec(value: boolean | undefined): this @@ -103,6 +106,9 @@ export class ArkCounterStyle extends ArkCommonMethodStyle implements CounterAttr onDec_value?: VoidCallback | undefined enableDec_value?: boolean | undefined enableInc_value?: boolean | undefined + public setCounterOptions(): this { + return this + } public onInc(value: VoidCallback | undefined): this { return this } @@ -166,10 +172,9 @@ export class ArkCounterComponent extends ArkCommonMethodComponent implements Cou } } /** @memo */ -export function Counter( +export function CounterImpl( /** @memo */ style: ((attributes: CounterAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -177,9 +182,7 @@ export function Counter( return new ArkCounterComponent() }) NodeAttach((): ArkCounterPeer => ArkCounterPeer.create(receiver), (_: ArkCounterPeer) => { - receiver.setCounterOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 303e9ef62fdbacb1470f0c14b383743ff8562b12..08fb4683f42408277efc478d1ea35640532274ff 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 @@ -237,6 +237,9 @@ export interface DataPanelConfiguration extends CommonConfiguration { maxValue: number; } export interface DataPanelAttribute extends CommonMethod { + setDataPanelOptions(options: DataPanelOptions): this { + return this + } closeEffect(value: boolean | undefined): this valueColors(value: Array | undefined): this trackBackgroundColor(value: ResourceColor | undefined): this @@ -251,6 +254,9 @@ export class ArkDataPanelStyle extends ArkCommonMethodStyle implements DataPanel strokeWidth_value?: Length | undefined trackShadow_value?: DataPanelShadowOptions | undefined contentModifier_value?: ContentModifier | undefined + public setDataPanelOptions(options: DataPanelOptions): this { + return this + } public closeEffect(value: boolean | undefined): this { return this } @@ -337,10 +343,9 @@ export class ArkDataPanelComponent extends ArkCommonMethodComponent implements D } } /** @memo */ -export function DataPanel( +export function DataPanelImpl( /** @memo */ style: ((attributes: DataPanelAttribute) => void) | undefined, - options: DataPanelOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -348,9 +353,7 @@ export function DataPanel( return new ArkDataPanelComponent() }) NodeAttach((): ArkDataPanelPeer => ArkDataPanelPeer.create(receiver), (_: ArkDataPanelPeer) => { - receiver.setDataPanelOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 5274ede3314ab64052778b8a14cd9ed27d3a104f..4e74c99b6905f4d8570d2934d272cedd3c5c177e 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 @@ -258,6 +258,9 @@ export interface DatePickerOptions { export type DatePickerInterface = (options?: DatePickerOptions) => DatePickerAttribute; export type Callback_DatePickerResult_Void = (value: DatePickerResult) => void; export interface DatePickerAttribute extends CommonMethod { + setDatePickerOptions(options?: DatePickerOptions): this { + return this + } lunar(value: boolean | undefined): this disappearTextStyle(value: PickerTextStyle | undefined): this textStyle(value: PickerTextStyle | undefined): this @@ -277,6 +280,9 @@ export class ArkDatePickerStyle extends ArkCommonMethodStyle implements DatePick onDateChange_value?: ((parameter: Date) => void) | undefined digitalCrownSensitivity_value?: CrownSensitivity | undefined enableHapticFeedback_value?: boolean | undefined + public setDatePickerOptions(options?: DatePickerOptions): this { + return this + } public lunar(value: boolean | undefined): this { return this } @@ -492,10 +498,9 @@ export class ArkDatePickerComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function DatePicker( +export function DatePickerImpl( /** @memo */ style: ((attributes: DatePickerAttribute) => void) | undefined, - options?: DatePickerOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -503,9 +508,7 @@ export function DatePicker( return new ArkDatePickerComponent() }) NodeAttach((): ArkDatePickerPeer => ArkDatePickerPeer.create(receiver), (_: ArkDatePickerPeer) => { - receiver.setDatePickerOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 9184ab4ecb3ead64d9a975c821f9f27943ddfa37..9c55e08a36822c33ff6ab2b521bc75fffce5a84e 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 @@ -129,6 +129,9 @@ export class ArkDividerPeer extends ArkCommonMethodPeer { } export type DividerInterface = () => DividerAttribute; export interface DividerAttribute extends CommonMethod { + setDividerOptions(): this { + return this + } vertical(value: boolean | undefined): this color(value: ResourceColor | undefined): this strokeWidth(value: number | string | undefined): this @@ -139,6 +142,9 @@ export class ArkDividerStyle extends ArkCommonMethodStyle implements DividerAttr color_value?: ResourceColor | undefined strokeWidth_value?: number | string | undefined lineCap_value?: LineCapStyle | undefined + public setDividerOptions(): this { + return this + } public vertical(value: boolean | undefined): this { return this } @@ -202,10 +208,9 @@ export class ArkDividerComponent extends ArkCommonMethodComponent implements Div } } /** @memo */ -export function Divider( +export function DividerImpl( /** @memo */ style: ((attributes: DividerAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -213,9 +218,7 @@ export function Divider( return new ArkDividerComponent() }) NodeAttach((): ArkDividerPeer => ArkDividerPeer.create(receiver), (_: ArkDividerPeer) => { - receiver.setDividerOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/effectComponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/effectComponent.ts index dc122369b1ebe5d8b001172e43a6de0f8e2d5ca5..32ca852c54c77097e0f44283dabc218fcdfb3ac2 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/effectComponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/effectComponent.ts @@ -44,8 +44,14 @@ export class ArkEffectComponentPeer extends ArkCommonMethodPeer { } export type EffectComponentInterface = () => EffectComponentAttribute; export interface EffectComponentAttribute extends CommonMethod { + setEffectComponentOptions(): this { + return this + } } export class ArkEffectComponentStyle extends ArkCommonMethodStyle implements EffectComponentAttribute { + public setEffectComponentOptions(): this { + return this + } } export class ArkEffectComponentComponent extends ArkCommonMethodComponent implements EffectComponentAttribute { getPeer(): ArkEffectComponentPeer { @@ -65,10 +71,9 @@ export class ArkEffectComponentComponent extends ArkCommonMethodComponent implem } } /** @memo */ -export function EffectComponent( +export function EffectComponentImpl( /** @memo */ style: ((attributes: EffectComponentAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -76,9 +81,7 @@ export function EffectComponent( return new ArkEffectComponentComponent() }) NodeAttach((): ArkEffectComponentPeer => ArkEffectComponentPeer.create(receiver), (_: ArkEffectComponentPeer) => { - receiver.setEffectComponentOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/ellipse.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/ellipse.ts index 03defc6ef1e86c73f495a00ad8e274014bea4ab7..086ed80064c325dbb074f8c54a819aaec1d269ef 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/ellipse.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/ellipse.ts @@ -58,9 +58,15 @@ export interface EllipseOptions { } export type EllipseInterface = (options?: EllipseOptions) => EllipseAttribute; export interface EllipseAttribute extends CommonShapeMethod { + setEllipseOptions(options?: EllipseOptions): this { + return this + } attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this { return this; } } export class ArkEllipseStyle extends ArkCommonShapeMethodStyle implements EllipseAttribute { + public setEllipseOptions(options?: EllipseOptions): this { + return this + } } export class ArkEllipseComponent extends ArkCommonShapeMethodComponent implements EllipseAttribute { getPeer(): ArkEllipsePeer { @@ -85,10 +91,9 @@ export class ArkEllipseComponent extends ArkCommonShapeMethodComponent implement } } /** @memo */ -export function Ellipse( +export function EllipseImpl( /** @memo */ style: ((attributes: EllipseAttribute) => void) | undefined, - options?: EllipseOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -96,9 +101,7 @@ export function Ellipse( return new ArkEllipseComponent() }) NodeAttach((): ArkEllipsePeer => ArkEllipsePeer.create(receiver), (_: ArkEllipsePeer) => { - receiver.setEllipseOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 23227c82aa0d731c277d2a2cc88e5e8511b8e9aa..31e88289cf616f20a665a218a54007ae5c5a0d8a 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 @@ -79,12 +79,18 @@ export interface TerminationInfo { want?: Want; } export interface EmbeddedComponentAttribute extends CommonMethod { + setEmbeddedComponentOptions(loader: Want, type: EmbeddedType): this { + return this + } onTerminated(value: ((parameter: TerminationInfo) => void) | undefined): this onError(value: ErrorCallback | undefined): this } export class ArkEmbeddedComponentStyle extends ArkCommonMethodStyle implements EmbeddedComponentAttribute { onTerminated_value?: ((parameter: TerminationInfo) => void) | undefined onError_value?: ErrorCallback | undefined + public setEmbeddedComponentOptions(loader: Want, type: EmbeddedType): this { + return this + } public onTerminated(value: ((parameter: TerminationInfo) => void) | undefined): this { return this } @@ -129,10 +135,9 @@ export class ArkEmbeddedComponentComponent extends ArkCommonMethodComponent impl } } /** @memo */ -export function EmbeddedComponent( +export function EmbeddedComponentImpl( /** @memo */ style: ((attributes: EmbeddedComponentAttribute) => void) | undefined, - loader: Want, type: EmbeddedType, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -140,9 +145,7 @@ export function EmbeddedComponent( return new ArkEmbeddedComponentComponent() }) NodeAttach((): ArkEmbeddedComponentPeer => ArkEmbeddedComponentPeer.create(receiver), (_: ArkEmbeddedComponentPeer) => { - receiver.setEmbeddedComponentOptions(loader,type) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 43d75c6b5e796fd429304aa0fa577e01a8f9d0cd..fae0b93991a238ca29e1953a14250d5ce8aa56c9 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 @@ -79,10 +79,16 @@ export interface FlexSpaceOptions { } export type FlexInterface = (value?: FlexOptions) => FlexAttribute; export interface FlexAttribute extends CommonMethod { + setFlexOptions(value?: FlexOptions): this { + return this + } pointLight(value: PointLightStyle | undefined): this } export class ArkFlexStyle extends ArkCommonMethodStyle implements FlexAttribute { pointLight_value?: PointLightStyle | undefined + public setFlexOptions(value?: FlexOptions): this { + return this + } public pointLight(value: PointLightStyle | undefined): this { return this } @@ -114,10 +120,9 @@ export class ArkFlexComponent extends ArkCommonMethodComponent implements FlexAt } } /** @memo */ -export function Flex( +export function FlexImpl( /** @memo */ style: ((attributes: FlexAttribute) => void) | undefined, - value?: FlexOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -125,9 +130,7 @@ export function Flex( return new ArkFlexComponent() }) NodeAttach((): ArkFlexPeer => ArkFlexPeer.create(receiver), (_: ArkFlexPeer) => { - receiver.setFlexOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flowItem.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flowItem.ts index e7121c0d73833d021486469f8737375e03eeab27..775c93c7ebd32a0215f612630210c12985997a05 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flowItem.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/flowItem.ts @@ -44,8 +44,14 @@ export class ArkFlowItemPeer extends ArkCommonMethodPeer { } export type FlowItemInterface = () => FlowItemAttribute; export interface FlowItemAttribute extends CommonMethod { + setFlowItemOptions(): this { + return this + } } export class ArkFlowItemStyle extends ArkCommonMethodStyle implements FlowItemAttribute { + public setFlowItemOptions(): this { + return this + } } export class ArkFlowItemComponent extends ArkCommonMethodComponent implements FlowItemAttribute { getPeer(): ArkFlowItemPeer { @@ -65,10 +71,9 @@ export class ArkFlowItemComponent extends ArkCommonMethodComponent implements Fl } } /** @memo */ -export function FlowItem( +export function FlowItemImpl( /** @memo */ style: ((attributes: FlowItemAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -76,9 +81,7 @@ export function FlowItem( return new ArkFlowItemComponent() }) NodeAttach((): ArkFlowItemPeer => ArkFlowItemPeer.create(receiver), (_: ArkFlowItemPeer) => { - receiver.setFlowItemOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 2b8bd6a123235a37a5bdda35906cc9bb94bf46a3..f04a5943b1bad4ec39d23864d84a84e0e34f6e40 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 @@ -123,6 +123,9 @@ export interface OnFoldStatusChangeInfo { export type OnFoldStatusChangeCallback = (event: OnFoldStatusChangeInfo) => void; export type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; export interface FolderStackAttribute extends CommonMethod { + setFolderStackOptions(options?: FolderStackOptions): this { + return this + } alignContent(value: Alignment | undefined): this onFolderStateChange(value: OnFoldStatusChangeCallback | undefined): this onHoverStatusChange(value: OnHoverStatusChangeCallback | undefined): this @@ -135,6 +138,9 @@ export class ArkFolderStackStyle extends ArkCommonMethodStyle implements FolderS onHoverStatusChange_value?: OnHoverStatusChangeCallback | undefined enableAnimation_value?: boolean | undefined autoHalfFold_value?: boolean | undefined + public setFolderStackOptions(options?: FolderStackOptions): this { + return this + } public alignContent(value: Alignment | undefined): this { return this } @@ -216,10 +222,9 @@ export class ArkFolderStackComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function FolderStack( +export function FolderStackImpl( /** @memo */ style: ((attributes: FolderStackAttribute) => void) | undefined, - options?: FolderStackOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -227,9 +232,7 @@ export function FolderStack( return new ArkFolderStackComponent() }) NodeAttach((): ArkFolderStackPeer => ArkFolderStackPeer.create(receiver), (_: ArkFolderStackPeer) => { - receiver.setFolderStackOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 2172485a7036bcda1d8c6c593d5f322082e6016e..ac0448f76adf620880d8217aa6f1f0aa6caedcb4 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 @@ -217,6 +217,9 @@ export interface Literal_Number_errcode_String_msg { export type Callback_Literal_Number_errcode_String_msg_Void = (info: Literal_Number_errcode_String_msg) => void; export type Callback_Any_Void = (info: object) => void; export interface FormComponentAttribute extends CommonMethod { + setFormComponentOptions(value: FormInfo): this { + return this + } size(value: SizeOptions | undefined): this moduleName(value: string | undefined): this dimension(value: FormDimension | undefined): this @@ -239,6 +242,9 @@ export class ArkFormComponentStyle extends ArkCommonMethodStyle implements FormC onRouter_value?: ((info: object) => void) | undefined onUninstall_value?: ((parameter: FormCallbackInfo) => void) | undefined onLoad_value?: (() => void) | undefined + public setFormComponentOptions(value: FormInfo): this { + return this + } public size(value: SizeOptions | undefined): this { return this } @@ -369,10 +375,9 @@ export class ArkFormComponentComponent extends ArkCommonMethodComponent implemen } } /** @memo */ -export function FormComponent( +export function FormComponentImpl( /** @memo */ style: ((attributes: FormComponentAttribute) => void) | undefined, - value: FormInfo, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -380,9 +385,7 @@ export function FormComponent( return new ArkFormComponentComponent() }) NodeAttach((): ArkFormComponentPeer => ArkFormComponentPeer.create(receiver), (_: ArkFormComponentPeer) => { - receiver.setFormComponentOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formLink.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formLink.ts index 281a335e11111a72f7e720f105cafcd0ef61194e..06bf36ead8985a495924a43c9c2f42a0b8ca0bcd 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formLink.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/formLink.ts @@ -55,8 +55,14 @@ export interface FormLinkOptions { } export type FormLinkInterface = (options: FormLinkOptions) => FormLinkAttribute; export interface FormLinkAttribute extends CommonMethod { + setFormLinkOptions(options: FormLinkOptions): this { + return this + } } export class ArkFormLinkStyle extends ArkCommonMethodStyle implements FormLinkAttribute { + public setFormLinkOptions(options: FormLinkOptions): this { + return this + } } export class ArkFormLinkComponent extends ArkCommonMethodComponent implements FormLinkAttribute { getPeer(): ArkFormLinkPeer { @@ -77,10 +83,9 @@ export class ArkFormLinkComponent extends ArkCommonMethodComponent implements Fo } } /** @memo */ -export function FormLink( +export function FormLinkImpl( /** @memo */ style: ((attributes: FormLinkAttribute) => void) | undefined, - options: FormLinkOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -88,9 +93,7 @@ export function FormLink( return new ArkFormLinkComponent() }) NodeAttach((): ArkFormLinkPeer => ArkFormLinkPeer.create(receiver), (_: ArkFormLinkPeer) => { - receiver.setFormLinkOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 2129decd2616b9c93178c71321911c13f0c278a3..221592a05a0fa114d16c6b2d6ead8f4cb904ccc8 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 @@ -268,6 +268,9 @@ export type Tuple_Union_ResourceColor_LinearGradient_Number = [ number ] export interface GaugeAttribute extends CommonMethod { + setGaugeOptions(options: GaugeOptions): this { + return this + } value(value: number | undefined): this startAngle(value: number | undefined): this endAngle(value: number | undefined): this @@ -290,6 +293,9 @@ export class ArkGaugeStyle extends ArkCommonMethodStyle implements GaugeAttribut indicator_value?: GaugeIndicatorOptions | undefined privacySensitive_value?: boolean | undefined contentModifier_value?: ContentModifier | undefined + public setGaugeOptions(options: GaugeOptions): this { + return this + } public value(value: number | undefined): this { return this } @@ -420,10 +426,9 @@ export class ArkGaugeComponent extends ArkCommonMethodComponent implements Gauge } } /** @memo */ -export function Gauge( +export function GaugeImpl( /** @memo */ style: ((attributes: GaugeAttribute) => void) | undefined, - options: GaugeOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -431,9 +436,7 @@ export function Gauge( return new ArkGaugeComponent() }) NodeAttach((): ArkGaugePeer => ArkGaugePeer.create(receiver), (_: ArkGaugePeer) => { - receiver.setGaugeOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 46b0901c88199fa05023e3a45f095ec0f1a0cd53..f5338786250d705e5d5f75dfa4d64e6be4b69ca6 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 @@ -593,6 +593,9 @@ export interface Literal_Number_offsetRemain { } export type Callback_Number_ScrollState_Literal_Number_offsetRemain = (offset: number, state: ScrollState) => Literal_Number_offsetRemain; export interface GridAttribute extends ScrollableCommonMethod { + setGridOptions(scroller?: Scroller, layoutOptions?: GridLayoutOptions): this { + return this + } columnsTemplate(value: string | undefined): this rowsTemplate(value: string | undefined): this columnsGap(value: Length | undefined): this @@ -665,6 +668,9 @@ export class ArkGridStyle extends ArkScrollableCommonMethodStyle implements Grid onScrollFrameBegin_value?: OnScrollFrameBeginCallback | undefined onWillScroll_value?: OnWillScrollCallback | undefined onDidScroll_value?: OnScrollCallback | undefined + public setGridOptions(scroller?: Scroller, layoutOptions?: GridLayoutOptions): this { + return this + } public columnsTemplate(value: string | undefined): this { return this } @@ -1094,10 +1100,9 @@ export class ArkGridComponent extends ArkScrollableCommonMethodComponent impleme } } /** @memo */ -export function Grid( +export function GridImpl( /** @memo */ style: ((attributes: GridAttribute) => void) | undefined, - scroller?: Scroller, layoutOptions?: GridLayoutOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1105,9 +1110,7 @@ export function Grid( return new ArkGridComponent() }) NodeAttach((): ArkGridPeer => ArkGridPeer.create(receiver), (_: ArkGridPeer) => { - receiver.setGridOptions(scroller,layoutOptions) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 870068aabdf1619067b0775373493ab6548ae49d..8ee285b018945bce48ea9fc5c201d944bd1054a1 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 @@ -137,6 +137,9 @@ export interface GridColOptions { } export type GridColInterface = (option?: GridColOptions) => GridColAttribute; export interface GridColAttribute extends CommonMethod { + setGridColOptions(option?: GridColOptions): this { + return this + } span(value: number | GridColColumnOption | undefined): this gridColOffset(value: number | GridColColumnOption | undefined): this order(value: number | GridColColumnOption | undefined): this @@ -145,6 +148,9 @@ export class ArkGridColStyle extends ArkCommonMethodStyle implements GridColAttr span_value?: number | GridColColumnOption | undefined gridColOffset_value?: number | GridColColumnOption | undefined order_value?: number | GridColColumnOption | undefined + public setGridColOptions(option?: GridColOptions): this { + return this + } public span(value: number | GridColColumnOption | undefined): this { return this } @@ -198,10 +204,9 @@ export class ArkGridColComponent extends ArkCommonMethodComponent implements Gri } } /** @memo */ -export function GridCol( +export function GridColImpl( /** @memo */ style: ((attributes: GridColAttribute) => void) | undefined, - option?: GridColOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -209,9 +214,7 @@ export function GridCol( return new ArkGridColComponent() }) NodeAttach((): ArkGridColPeer => ArkGridColPeer.create(receiver), (_: ArkGridColPeer) => { - receiver.setGridColOptions(option) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridContainer.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridContainer.ts index da13e690974329ff5afce6fda7a048afab161eee..732de654b5ef4446c4afb435602aba7b97e25b24 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridContainer.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/gridContainer.ts @@ -68,8 +68,14 @@ export interface GridContainerOptions { } export type GridContainerInterface = (value?: GridContainerOptions) => GridContainerAttribute; export interface GridContainerAttribute extends ColumnAttribute { + setGridContainerOptions(value?: GridContainerOptions): this { + return this + } } export class ArkGridContainerStyle extends ArkColumnStyle implements GridContainerAttribute { + public setGridContainerOptions(value?: GridContainerOptions): this { + return this + } } export class ArkGridContainerComponent extends ArkColumnComponent implements GridContainerAttribute { getPeer(): ArkGridContainerPeer { @@ -90,10 +96,9 @@ export class ArkGridContainerComponent extends ArkColumnComponent implements Gri } } /** @memo */ -export function GridContainer( +export function GridContainerImpl( /** @memo */ style: ((attributes: GridContainerAttribute) => void) | undefined, - value?: GridContainerOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -101,9 +106,7 @@ export function GridContainer( return new ArkGridContainerComponent() }) NodeAttach((): ArkGridContainerPeer => ArkGridContainerPeer.create(receiver), (_: ArkGridContainerPeer) => { - receiver.setGridContainerOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 94526d096623e965e80fa200eb9a418198e6e645..c94159df05d8b3586118c781512599396376c0b4 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 @@ -165,6 +165,9 @@ export interface GridItemOptions { } export type GridItemInterface = (value?: GridItemOptions) => GridItemAttribute; export interface GridItemAttribute extends CommonMethod { + setGridItemOptions(value?: GridItemOptions): this { + return this + } rowStart(value: number | undefined): this rowEnd(value: number | undefined): this columnStart(value: number | undefined): this @@ -184,6 +187,9 @@ export class ArkGridItemStyle extends ArkCommonMethodStyle implements GridItemAt selectable_value?: boolean | undefined selected_value?: boolean | Bindable | undefined onSelect_value?: ((isVisible: boolean) => void) | undefined + public setGridItemOptions(value?: GridItemOptions): this { + return this + } public rowStart(value: number | undefined): this { return this } @@ -307,10 +313,9 @@ export class ArkGridItemComponent extends ArkCommonMethodComponent implements Gr } } /** @memo */ -export function GridItem( +export function GridItemImpl( /** @memo */ style: ((attributes: GridItemAttribute) => void) | undefined, - value?: GridItemOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -318,9 +323,7 @@ export function GridItem( return new ArkGridItemComponent() }) NodeAttach((): ArkGridItemPeer => ArkGridItemPeer.create(receiver), (_: ArkGridItemPeer) => { - receiver.setGridItemOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 cd1a4f8d5855d7b87956ad16df48c7acd53b73a0..3c6f1a352ec12136f38451f29e80d625c3642794 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 @@ -124,12 +124,18 @@ export interface GridRowOptions { } export type GridRowInterface = (option?: GridRowOptions) => GridRowAttribute; export interface GridRowAttribute extends CommonMethod { + setGridRowOptions(option?: GridRowOptions): this { + return this + } onBreakpointChange(value: ((breakpoints: string) => void) | undefined): this alignItems(value: ItemAlign | undefined): this } export class ArkGridRowStyle extends ArkCommonMethodStyle implements GridRowAttribute { onBreakpointChange_value?: ((breakpoints: string) => void) | undefined alignItems_value?: ItemAlign | undefined + public setGridRowOptions(option?: GridRowOptions): this { + return this + } public onBreakpointChange(value: ((breakpoints: string) => void) | undefined): this { return this } @@ -172,10 +178,9 @@ export class ArkGridRowComponent extends ArkCommonMethodComponent implements Gri } } /** @memo */ -export function GridRow( +export function GridRowImpl( /** @memo */ style: ((attributes: GridRowAttribute) => void) | undefined, - option?: GridRowOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -183,9 +188,7 @@ export function GridRow( return new ArkGridRowComponent() }) NodeAttach((): ArkGridRowPeer => ArkGridRowPeer.create(receiver), (_: ArkGridRowPeer) => { - receiver.setGridRowOptions(option) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 9fe075bc1321edc76541f869547e79a79f08b837..6eb64142ef5019caa1e37345f29603ecafbdef2a 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 @@ -111,10 +111,16 @@ export class ArkHyperlinkPeer extends ArkCommonMethodPeer { } export type HyperlinkInterface = (address: string | Resource, content?: string | Resource) => HyperlinkAttribute; export interface HyperlinkAttribute extends CommonMethod { + setHyperlinkOptions(address: string | Resource, content?: string | Resource): this { + return this + } color(value: Color | number | string | Resource | undefined): this } export class ArkHyperlinkStyle extends ArkCommonMethodStyle implements HyperlinkAttribute { color_value?: Color | number | string | Resource | undefined + public setHyperlinkOptions(address: string | Resource, content?: string | Resource): this { + return this + } public color(value: Color | number | string | Resource | undefined): this { return this } @@ -147,10 +153,9 @@ export class ArkHyperlinkComponent extends ArkCommonMethodComponent implements H } } /** @memo */ -export function Hyperlink( +export function HyperlinkImpl( /** @memo */ style: ((attributes: HyperlinkAttribute) => void) | undefined, - address: string | Resource, content?: string | Resource, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -158,9 +163,7 @@ export function Hyperlink( return new ArkHyperlinkComponent() }) NodeAttach((): ArkHyperlinkPeer => ArkHyperlinkPeer.create(receiver), (_: ArkHyperlinkPeer) => { - receiver.setHyperlinkOptions(address,content) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 1f831174d828058436453906cfabacc085d95422..ee642edb916ef900518edfd63b3c56e2815eedd8 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 @@ -603,6 +603,9 @@ export interface ImageCompleteEvent { } export type ImageOnCompleteCallback = (event?: ImageCompleteEvent) => void; export interface ImageAttribute extends CommonMethod { + setImageOptions(src: PixelMap | ResourceStr | DrawableDescriptor | PixelMap | ResourceStr | DrawableDescriptor | ImageContent, imageAIOptions?: ImageAIOptions): this { + return this + } alt(value: string | Resource | PixelMap | undefined): this matchTextDirection(value: boolean | undefined): this fitOriginalSize(value: boolean | undefined): this @@ -659,6 +662,9 @@ export class ArkImageStyle extends ArkCommonMethodStyle implements ImageAttribut privacySensitive_value?: boolean | undefined enhancedImageQuality_value?: ResolutionQuality | undefined orientation_value?: ImageRotateOrientation | undefined + public setImageOptions(src: PixelMap | ResourceStr | DrawableDescriptor | PixelMap | ResourceStr | DrawableDescriptor | ImageContent, imageAIOptions?: ImageAIOptions): this { + return this + } public alt(value: string | Resource | PixelMap | undefined): this { return this } @@ -990,10 +996,9 @@ export class ArkImageComponent extends ArkCommonMethodComponent implements Image export type ImageInterface = (...param: Object[]) => ArkImageNode /** @memo */ -export function Image( +export function ImageImpl( /** @memo */ style: ((attributes: ImageAttribute) => void) | undefined, - src: PixelMap | ResourceStr | DrawableDescriptor | PixelMap | ResourceStr | DrawableDescriptor | ImageContent, imageAIOptions?: ImageAIOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1001,9 +1006,7 @@ export function Image( return new ArkImageComponent() }) NodeAttach((): ArkImagePeer => ArkImagePeer.create(receiver), (_: ArkImagePeer) => { - receiver.setImageOptions(src,imageAIOptions) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 871b972aabb9906ae79ab4e88174f2e782ecfae3..ee4c631dcefd8527311b59848e8e80a7d481c7d4 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 @@ -227,6 +227,9 @@ export interface ImageFrameInfo { duration?: number; } export interface ImageAnimatorAttribute extends CommonMethod { + setImageAnimatorOptions(): this { + return this + } images(value: Array | undefined): this state(value: AnimationStatus | undefined): this duration(value: number | undefined): this @@ -257,6 +260,9 @@ export class ArkImageAnimatorStyle extends ArkCommonMethodStyle implements Image onRepeat_value?: (() => void) | undefined onCancel_value?: (() => void) | undefined onFinish_value?: (() => void) | undefined + public setImageAnimatorOptions(): this { + return this + } public images(value: Array | undefined): this { return this } @@ -430,10 +436,9 @@ export class ArkImageAnimatorComponent extends ArkCommonMethodComponent implemen } } /** @memo */ -export function ImageAnimator( +export function ImageAnimatorImpl( /** @memo */ style: ((attributes: ImageAnimatorAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -441,9 +446,7 @@ export function ImageAnimator( return new ArkImageAnimatorComponent() }) NodeAttach((): ArkImageAnimatorPeer => ArkImageAnimatorPeer.create(receiver), (_: ArkImageAnimatorPeer) => { - receiver.setImageAnimatorOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 eaed3d81c0e4355ca97c190bb7d421e44e50585a..2a44c09bbfe6ab8be1998f1ce97b44b28408541f 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 @@ -155,6 +155,9 @@ export class ArkImageSpanPeer extends ArkBaseSpanPeer { } export type ImageSpanInterface = (value: ResourceStr | PixelMap) => ImageSpanAttribute; export interface ImageSpanAttribute extends BaseSpan { + setImageSpanOptions(value: ResourceStr | PixelMap): this { + return this + } verticalAlign(value: ImageSpanAlignment | undefined): this colorFilter(value: ColorFilter | drawing.ColorFilter | undefined): this objectFit(value: ImageFit | undefined): this @@ -169,6 +172,9 @@ export class ArkImageSpanStyle extends ArkBaseSpanStyle implements ImageSpanAttr onComplete_value?: ImageCompleteCallback | undefined onError_value?: ImageErrorCallback | undefined alt_value?: PixelMap | undefined + public setImageSpanOptions(value: ResourceStr | PixelMap): this { + return this + } public verticalAlign(value: ImageSpanAlignment | undefined): this { return this } @@ -264,10 +270,9 @@ export class ArkImageSpanComponent extends ArkBaseSpanComponent implements Image } } /** @memo */ -export function ImageSpan( +export function ImageSpanImpl( /** @memo */ style: ((attributes: ImageSpanAttribute) => void) | undefined, - value: ResourceStr | PixelMap, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -275,9 +280,7 @@ export function ImageSpan( return new ArkImageSpanComponent() }) NodeAttach((): ArkImageSpanPeer => ArkImageSpanPeer.create(receiver), (_: ArkImageSpanPeer) => { - receiver.setImageSpanOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 59daffadc752b90c8348f693b45be2dac86d446e..ae8865164b9ae64da12fb775fe67d77f450e1a11 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 @@ -195,6 +195,9 @@ export class ArkIndicatorComponentPeer extends ArkCommonMethodPeer { } export type IndicatorComponentInterface = (controller?: IndicatorComponentController) => IndicatorComponentAttribute; export interface IndicatorComponentAttribute extends CommonMethod { + setIndicatorComponentOptions(controller?: IndicatorComponentController): this { + return this + } initialIndex(value: number | undefined): this count(value: number | undefined): this style(value: DotIndicator | DigitIndicator | undefined): this @@ -209,6 +212,9 @@ export class ArkIndicatorComponentStyle extends ArkCommonMethodStyle implements loop_value?: boolean | undefined vertical_value?: boolean | undefined onChange_value?: ((index: number) => void) | undefined + public setIndicatorComponentOptions(controller?: IndicatorComponentController): this { + return this + } public initialIndex(value: number | undefined): this { return this } @@ -295,10 +301,9 @@ export class ArkIndicatorComponentComponent extends ArkCommonMethodComponent imp } } /** @memo */ -export function IndicatorComponent( +export function IndicatorComponentImpl( /** @memo */ style: ((attributes: IndicatorComponentAttribute) => void) | undefined, - controller?: IndicatorComponentController, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -306,9 +311,7 @@ export function IndicatorComponent( return new ArkIndicatorComponentComponent() }) NodeAttach((): ArkIndicatorComponentPeer => ArkIndicatorComponentPeer.create(receiver), (_: ArkIndicatorComponentPeer) => { - receiver.setIndicatorComponentOptions(controller) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 e8112da9a4c4e4b355d335d9b22495c90c066ffb..3d687b7d07be351bb188c5e6dae2de44cbc8f700 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 @@ -107,10 +107,16 @@ export class ArkLazyGridLayoutStyle extends ArkCommonMethodStyle implements Lazy } } export interface LazyVGridLayoutAttribute extends LazyGridLayoutAttribute { + setLazyVGridLayoutOptions(): this { + return this + } columnsTemplate(value: string | undefined): this } export class ArkLazyVGridLayoutStyle extends ArkLazyGridLayoutStyle implements LazyVGridLayoutAttribute { columnsTemplate_value?: string | undefined + public setLazyVGridLayoutOptions(): this { + return this + } public columnsTemplate(value: string | undefined): this { return this } @@ -167,10 +173,9 @@ export class ArkLazyVGridLayoutComponent extends ArkLazyGridLayoutComponent impl } } /** @memo */ -export function LazyVGridLayout( +export function LazyVGridLayoutImpl( /** @memo */ style: ((attributes: LazyVGridLayoutAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -178,9 +183,7 @@ export function LazyVGridLayout( return new ArkLazyVGridLayoutComponent() }) NodeAttach((): ArkLazyVGridLayoutPeer => ArkLazyVGridLayoutPeer.create(receiver), (_: ArkLazyVGridLayoutPeer) => { - receiver.setLazyVGridLayoutOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 228e1d7aae38ddec501f20bb9f8dc2f5e9b65796..53f1302e9b8989b8f75ef2eef4720f5be0552aa3 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 @@ -94,6 +94,9 @@ export interface LineOptions { } export type LineInterface = (options?: LineOptions) => LineAttribute; export interface LineAttribute extends CommonShapeMethod { + setLineOptions(options?: LineOptions): this { + return this + } startPoint(value: ShapePoint | undefined): this endPoint(value: ShapePoint | undefined): this attributeModifier(value: AttributeModifier | AttributeModifier | undefined): this { return this; } @@ -101,6 +104,9 @@ export interface LineAttribute extends CommonShapeMethod { export class ArkLineStyle extends ArkCommonShapeMethodStyle implements LineAttribute { startPoint_value?: ShapePoint | undefined endPoint_value?: ShapePoint | undefined + public setLineOptions(options?: LineOptions): this { + return this + } public startPoint(value: ShapePoint | undefined): this { return this } @@ -148,10 +154,9 @@ export class ArkLineComponent extends ArkCommonShapeMethodComponent implements L } } /** @memo */ -export function Line( +export function LineImpl( /** @memo */ style: ((attributes: LineAttribute) => void) | undefined, - options?: LineOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -159,9 +164,7 @@ export function Line( return new ArkLineComponent() }) NodeAttach((): ArkLinePeer => ArkLinePeer.create(receiver), (_: ArkLinePeer) => { - receiver.setLineOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 79e8c5318f458b9a4ea3c768f02dc0535084ad2c..3f8774b9dcc9c16fd6ccbcc281908a4eda773d7d 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 @@ -174,6 +174,9 @@ export interface LinearIndicatorStyle { } export type LinearIndicatorInterface = (count?: number, controller?: LinearIndicatorController) => LinearIndicatorAttribute; export interface LinearIndicatorAttribute extends CommonMethod { + setLinearIndicatorOptions(count?: number, controller?: LinearIndicatorController): this { + return this + } indicatorStyle(value: LinearIndicatorStyle | undefined): this indicatorLoop(value: boolean | undefined): this onChange(value: OnLinearIndicatorChangeCallback | undefined): this @@ -182,6 +185,9 @@ export class ArkLinearIndicatorStyle extends ArkCommonMethodStyle implements Lin indicatorStyle_value?: LinearIndicatorStyle | undefined indicatorLoop_value?: boolean | undefined onChange_value?: OnLinearIndicatorChangeCallback | undefined + public setLinearIndicatorOptions(count?: number, controller?: LinearIndicatorController): this { + return this + } public indicatorStyle(value: LinearIndicatorStyle | undefined): this { return this } @@ -237,10 +243,9 @@ export class ArkLinearIndicatorComponent extends ArkCommonMethodComponent implem } } /** @memo */ -export function LinearIndicator( +export function LinearIndicatorImpl( /** @memo */ style: ((attributes: LinearIndicatorAttribute) => void) | undefined, - count?: number, controller?: LinearIndicatorController, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -248,9 +253,7 @@ export function LinearIndicator( return new ArkLinearIndicatorComponent() }) NodeAttach((): ArkLinearIndicatorPeer => ArkLinearIndicatorPeer.create(receiver), (_: ArkLinearIndicatorPeer) => { - receiver.setLinearIndicatorOptions(count,controller) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/list.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/list.ts index 2f578c93a31990ea260219c82e1ece866ab3130a..e0f5f1b0f9bd0b5999c1ea79febd6deb1c4015eb 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/list.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/list.ts @@ -643,6 +643,9 @@ export type Callback_Number_Number_Number_Void = (start: number, end: number, ce export type Callback_Number_Boolean = (index: number) => boolean; export type Callback_Number_Number_Boolean = (from: number, to: number) => boolean; export interface ListAttribute extends ScrollableCommonMethod { + setListOptions(options?: ListOptions): this { + return this + } alignListItem(value: ListItemAlign | undefined): this listDirection(value: Axis | undefined): this scrollBar(value: BarState | undefined): this @@ -720,6 +723,9 @@ export class ArkListStyle extends ArkScrollableCommonMethodStyle implements List onScrollFrameBegin_value?: OnScrollFrameBeginCallback | undefined onWillScroll_value?: OnWillScrollCallback | undefined onDidScroll_value?: OnScrollCallback | undefined + public setListOptions(options?: ListOptions): this { + return this + } public alignListItem(value: ListItemAlign | undefined): this { return this } @@ -1187,10 +1193,9 @@ export class ArkListComponent extends ArkScrollableCommonMethodComponent impleme } } /** @memo */ -export function List( +export function ListImpl( /** @memo */ style: ((attributes: ListAttribute) => void) | undefined, - options?: ListOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1198,10 +1203,8 @@ export function List( return new ArkListComponent() }) NodeAttach((): ArkListPeer => ArkListPeer.create(receiver), (_: ArkListPeer) => { - receiver.setListOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class ListScrollerInternal { 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 7b77af698e3956a911b20c07e5cf95e2fc7e2136..b54c9c0bbf90b15753f4635df1d77f2bd3814f03 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 @@ -209,6 +209,9 @@ export interface ListItemOptions { style?: ListItemStyle; } export interface ListItemAttribute extends CommonMethod { + setListItemOptions(value?: ListItemOptions | string): this { + return this + } sticky(value: Sticky | undefined): this editable(value: boolean | EditMode | undefined): this selectable(value: boolean | undefined): this @@ -224,6 +227,9 @@ export class ArkListItemStyle extends ArkCommonMethodStyle implements ListItemAt selected_value?: boolean | Bindable | undefined swipeAction_value?: SwipeActionOptions | undefined onSelect_value?: ((isVisible: boolean) => void) | undefined + public setListItemOptions(value?: ListItemOptions | string): this { + return this + } public sticky(value: Sticky | undefined): this { return this } @@ -334,10 +340,9 @@ export class ArkListItemComponent extends ArkCommonMethodComponent implements Li } } /** @memo */ -export function ListItem( +export function ListItemImpl( /** @memo */ style: ((attributes: ListItemAttribute) => void) | undefined, - value?: ListItemOptions | undefined, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -345,9 +350,7 @@ export function ListItem( return new ArkListItemComponent() }) NodeAttach((): ArkListItemPeer => ArkListItemPeer.create(receiver), (_: ArkListItemPeer) => { - receiver.setListItemOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 1c2e086f490cdd7f49b6c627c67896a523a209ff..46daac1bb6a57a8cbe2894e527cfff0b02e39f16 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 @@ -92,12 +92,18 @@ export interface ListItemGroupOptions { } export type ListItemGroupInterface = (options?: ListItemGroupOptions) => ListItemGroupAttribute; export interface ListItemGroupAttribute extends CommonMethod { + setListItemGroupOptions(options?: ListItemGroupOptions): this { + return this + } divider(value: ListDividerOptions | null | undefined): this childrenMainSize(value: ChildrenMainSize | undefined): this } export class ArkListItemGroupStyle extends ArkCommonMethodStyle implements ListItemGroupAttribute { divider_value?: ListDividerOptions | null | undefined childrenMainSize_value?: ChildrenMainSize | undefined + public setListItemGroupOptions(options?: ListItemGroupOptions): this { + return this + } public divider(value: ListDividerOptions | null | undefined): this { return this } @@ -139,10 +145,9 @@ export class ArkListItemGroupComponent extends ArkCommonMethodComponent implemen } } /** @memo */ -export function ListItemGroup( +export function ListItemGroupImpl( /** @memo */ style: ((attributes: ListItemGroupAttribute) => void) | undefined, - options?: ListItemGroupOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -150,9 +155,7 @@ export function ListItemGroup( return new ArkListItemGroupComponent() }) NodeAttach((): ArkListItemGroupPeer => ArkListItemGroupPeer.create(receiver), (_: ArkListItemGroupPeer) => { - receiver.setListItemGroupOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 490e61e216a3764f800ccd1a1d78eff650998333..58378fda2473734b073f431778a7bdcb08688a6a 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 @@ -113,6 +113,9 @@ export enum LoadingProgressStyle { } export type LoadingProgressInterface = () => LoadingProgressAttribute; export interface LoadingProgressAttribute extends CommonMethod { + setLoadingProgressOptions(): this { + return this + } color(value: ResourceColor | undefined): this enableLoading(value: boolean | undefined): this contentModifier(value: ContentModifier | undefined): this @@ -121,6 +124,9 @@ export class ArkLoadingProgressStyle extends ArkCommonMethodStyle implements Loa color_value?: ResourceColor | undefined enableLoading_value?: boolean | undefined contentModifier_value?: ContentModifier | undefined + public setLoadingProgressOptions(): this { + return this + } public color(value: ResourceColor | undefined): this { return this } @@ -176,10 +182,9 @@ export class ArkLoadingProgressComponent extends ArkCommonMethodComponent implem } } /** @memo */ -export function LoadingProgress( +export function LoadingProgressImpl( /** @memo */ style: ((attributes: LoadingProgressAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -187,9 +192,7 @@ export function LoadingProgress( return new ArkLoadingProgressComponent() }) NodeAttach((): ArkLoadingProgressPeer => ArkLoadingProgressPeer.create(receiver), (_: ArkLoadingProgressPeer) => { - receiver.setLoadingProgressOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 3e40fe6cac9cb41152f0302f5dded707d7e7f2e9..dc58f7549c9652cd248b6d164bbe958cd5fb53c2 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 @@ -91,10 +91,16 @@ export enum LocationButtonOnClickResult { } export type LocationButtonCallback = (event: ClickEvent, result: LocationButtonOnClickResult, error?: BusinessError) => void; export interface LocationButtonAttribute extends SecurityComponentMethod { + setLocationButtonOptions(options?: LocationButtonOptions): this { + return this + } onClick(value: LocationButtonCallback | undefined): this } export class ArkLocationButtonStyle extends ArkSecurityComponentMethodStyle implements LocationButtonAttribute { onClick_value?: LocationButtonCallback | undefined + public setLocationButtonOptions(options?: LocationButtonOptions): this { + return this + } public onClick(value: LocationButtonCallback | undefined): this { return this } @@ -126,10 +132,9 @@ export class ArkLocationButtonComponent extends ArkSecurityComponentMethodCompon } } /** @memo */ -export function LocationButton( +export function LocationButtonImpl( /** @memo */ style: ((attributes: LocationButtonAttribute) => void) | undefined, - options?: LocationButtonOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -137,9 +142,7 @@ export function LocationButton( return new ArkLocationButtonComponent() }) NodeAttach((): ArkLocationButtonPeer => ArkLocationButtonPeer.create(receiver), (_: ArkLocationButtonPeer) => { - receiver.setLocationButtonOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 ebb2b26e1ee47ae72c5ed96446dc3a1e5d921afc..2f56ac1714bf4525f5db5f33077bf83aa2942fb0 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 @@ -229,6 +229,9 @@ export interface MarqueeOptions { } export type MarqueeInterface = (options: MarqueeOptions) => MarqueeAttribute; export interface MarqueeAttribute extends CommonMethod { + setMarqueeOptions(options: MarqueeOptions): this { + return this + } fontColor(value: ResourceColor | undefined): this fontSize(value: Length | undefined): this allowScale(value: boolean | undefined): this @@ -249,6 +252,9 @@ export class ArkMarqueeStyle extends ArkCommonMethodStyle implements MarqueeAttr onStart_value?: (() => void) | undefined onBounce_value?: (() => void) | undefined onFinish_value?: (() => void) | undefined + public setMarqueeOptions(options: MarqueeOptions): this { + return this + } public fontColor(value: ResourceColor | undefined): this { return this } @@ -368,10 +374,9 @@ export class ArkMarqueeComponent extends ArkCommonMethodComponent implements Mar } } /** @memo */ -export function Marquee( +export function MarqueeImpl( /** @memo */ style: ((attributes: MarqueeAttribute) => void) | undefined, - options: MarqueeOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -379,9 +384,7 @@ export function Marquee( return new ArkMarqueeComponent() }) NodeAttach((): ArkMarqueePeer => ArkMarqueePeer.create(receiver), (_: ArkMarqueePeer) => { - receiver.setMarqueeOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/mediaCachedImage.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/mediaCachedImage.ts index a021a778d491de7e7cc4fb8eb7128239b451688a..2ba1dbcb8f35e717306e184a37761c1359394464 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/mediaCachedImage.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/mediaCachedImage.ts @@ -83,8 +83,14 @@ export interface ASTCResource { } export type MediaCachedImageInterface = (src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource) => MediaCachedImageAttribute; export interface MediaCachedImageAttribute extends ImageAttribute { + setMediaCachedImageOptions(src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): this { + return this + } } export class ArkMediaCachedImageStyle extends ArkImageStyle implements MediaCachedImageAttribute { + public setMediaCachedImageOptions(src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): this { + return this + } } export class ArkMediaCachedImageComponent extends ArkImageComponent implements MediaCachedImageAttribute { getPeer(): ArkMediaCachedImagePeer { @@ -105,10 +111,9 @@ export class ArkMediaCachedImageComponent extends ArkImageComponent implements M } } /** @memo */ -export function MediaCachedImage( +export function MediaCachedImageImpl( /** @memo */ style: ((attributes: MediaCachedImageAttribute) => void) | undefined, - src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -116,9 +121,7 @@ export function MediaCachedImage( return new ArkMediaCachedImageComponent() }) NodeAttach((): ArkMediaCachedImagePeer => ArkMediaCachedImagePeer.create(receiver), (_: ArkMediaCachedImagePeer) => { - receiver.setMediaCachedImageOptions(src) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 ed2f278949ebd0a37e388473bddbb304200498f8..78f76da2a05d3b982d3425e7644bcb180694d9a7 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 @@ -168,6 +168,9 @@ export enum SubMenuExpandingMode { STACK_EXPAND = 2 } export interface MenuAttribute extends CommonMethod { + setMenuOptions(): this { + return this + } fontSize(value: Length | undefined): this font(value: Font | undefined): this fontColor(value: ResourceColor | undefined): this @@ -184,6 +187,9 @@ export class ArkMenuStyle extends ArkCommonMethodStyle implements MenuAttribute menuItemDivider_value?: DividerStyleOptions | undefined menuItemGroupDivider_value?: DividerStyleOptions | undefined subMenuExpandingMode_value?: SubMenuExpandingMode | undefined + public setMenuOptions(): this { + return this + } public fontSize(value: Length | undefined): this { return this } @@ -280,10 +286,9 @@ export class ArkMenuComponent extends ArkCommonMethodComponent implements MenuAt } } /** @memo */ -export function Menu( +export function MenuImpl( /** @memo */ style: ((attributes: MenuAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -291,9 +296,7 @@ export function Menu( return new ArkMenuComponent() }) NodeAttach((): ArkMenuPeer => ArkMenuPeer.create(receiver), (_: ArkMenuPeer) => { - receiver.setMenuOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 97d70cb11f70eaa259d7a423e4c316fae0842186..ac8b61db6f67e1a3f2b0000e80c3b6647acf6d5b 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 @@ -239,6 +239,9 @@ export interface MenuItemOptions { } export type MenuItemInterface = (value?: MenuItemOptions | CustomBuilder) => MenuItemAttribute; export interface MenuItemAttribute extends CommonMethod { + setMenuItemOptions(value?: MenuItemOptions | CustomBuilder): this { + return this + } selected(value: boolean | Bindable | undefined): this selectIcon(value: boolean | ResourceStr | SymbolGlyphModifier | undefined): this onChange(value: ((isVisible: boolean) => void) | undefined): this @@ -256,6 +259,9 @@ export class ArkMenuItemStyle extends ArkCommonMethodStyle implements MenuItemAt contentFontColor_value?: ResourceColor | undefined labelFont_value?: Font | undefined labelFontColor_value?: ResourceColor | undefined + public setMenuItemOptions(value?: MenuItemOptions | CustomBuilder): this { + return this + } public selected(value: boolean | Bindable | undefined): this { return this } @@ -365,10 +371,9 @@ export class ArkMenuItemComponent extends ArkCommonMethodComponent implements Me } } /** @memo */ -export function MenuItem( +export function MenuItemImpl( /** @memo */ style: ((attributes: MenuItemAttribute) => void) | undefined, - value?: MenuItemOptions | CustomBuilder, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -376,9 +381,7 @@ export function MenuItem( return new ArkMenuItemComponent() }) NodeAttach((): ArkMenuItemPeer => ArkMenuItemPeer.create(receiver), (_: ArkMenuItemPeer) => { - receiver.setMenuItemOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItemGroup.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItemGroup.ts index 66e4e864cb0eb28b38e2bddf1a9f782cc604d754..5cdac72492c449891faa47f37340005a0a10580a 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItemGroup.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/menuItemGroup.ts @@ -58,8 +58,14 @@ export interface MenuItemGroupOptions { } export type MenuItemGroupInterface = (value?: MenuItemGroupOptions) => MenuItemGroupAttribute; export interface MenuItemGroupAttribute extends CommonMethod { + setMenuItemGroupOptions(value?: MenuItemGroupOptions): this { + return this + } } export class ArkMenuItemGroupStyle extends ArkCommonMethodStyle implements MenuItemGroupAttribute { + public setMenuItemGroupOptions(value?: MenuItemGroupOptions): this { + return this + } } export class ArkMenuItemGroupComponent extends ArkCommonMethodComponent implements MenuItemGroupAttribute { getPeer(): ArkMenuItemGroupPeer { @@ -80,10 +86,9 @@ export class ArkMenuItemGroupComponent extends ArkCommonMethodComponent implemen } } /** @memo */ -export function MenuItemGroup( +export function MenuItemGroupImpl( /** @memo */ style: ((attributes: MenuItemGroupAttribute) => void) | undefined, - value?: MenuItemGroupOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -91,9 +96,7 @@ export function MenuItemGroup( return new ArkMenuItemGroupComponent() }) NodeAttach((): ArkMenuItemGroupPeer => ArkMenuItemGroupPeer.create(receiver), (_: ArkMenuItemGroupPeer) => { - receiver.setMenuItemGroupOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 eba16e405ac09c8839af3a1d34f998cea192572c..3f209aebf55f325254ba0cf7eb8425bca12dfff1 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 @@ -813,6 +813,9 @@ export type Callback_Boolean = () => boolean; export type Callback_Object_Void = (parameter: Object) => void; export type Callback_NavDestinationActiveReason_Void = (parameter: NavDestinationActiveReason) => void; export interface NavDestinationAttribute extends CommonMethod { + setNavDestinationOptions(): this { + return this + } hideTitleBar(hide: boolean | undefined, animated?: boolean): this hideBackButton(value: boolean | undefined): this onShown(value: (() => void) | undefined): this @@ -871,6 +874,9 @@ export class ArkNavDestinationStyle extends ArkCommonMethodStyle implements NavD onNewParam_value?: ((parameter: Object | null | undefined) => void) | undefined preferredOrientation_value?: Orientation | undefined enableNavigationIndicator_value?: boolean | undefined + public setNavDestinationOptions(): this { + return this + } public hideTitleBar(hide: boolean | undefined, animated?: boolean): this { return this } @@ -1264,10 +1270,9 @@ export class ArkNavDestinationComponent extends ArkCommonMethodComponent impleme } } /** @memo */ -export function NavDestination( +export function NavDestinationImpl( /** @memo */ style: ((attributes: NavDestinationAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1275,9 +1280,7 @@ export function NavDestination( return new ArkNavDestinationComponent() }) NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { - receiver.setNavDestinationOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 a948586fee820956f84780b5c398c1200b287800..9217b3cd972e99fe247d53ebaa3e505f07403469 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 @@ -83,12 +83,18 @@ export enum NavRouteMode { REPLACE = 2 } export interface NavRouterAttribute extends CommonMethod { + setNavRouterOptions(value?: RouteInfo): this { + return this + } onStateChange(value: ((isVisible: boolean) => void) | undefined): this mode(value: NavRouteMode | undefined): this } export class ArkNavRouterStyle extends ArkCommonMethodStyle implements NavRouterAttribute { onStateChange_value?: ((isVisible: boolean) => void) | undefined mode_value?: NavRouteMode | undefined + public setNavRouterOptions(value?: RouteInfo): this { + return this + } public onStateChange(value: ((isVisible: boolean) => void) | undefined): this { return this } @@ -131,10 +137,9 @@ export class ArkNavRouterComponent extends ArkCommonMethodComponent implements N } } /** @memo */ -export function NavRouter( +export function NavRouterImpl( /** @memo */ style: ((attributes: NavRouterAttribute) => void) | undefined, - value?: RouteInfo, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -142,9 +147,7 @@ export function NavRouter( return new ArkNavRouterComponent() }) NodeAttach((): ArkNavRouterPeer => ArkNavRouterPeer.create(receiver), (_: ArkNavRouterPeer) => { - receiver.setNavRouterOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigation.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigation.ts index c526d25ed1b442bae889b05b9d97f8d5d7165c85..ba6c99c10dd4ae96b0fb4c2e5901eb107e170b16 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigation.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/navigation.ts @@ -1396,6 +1396,9 @@ export type Callback_NavigationMode_Void = (mode: NavigationMode) => void; export type Callback_String_Opt_Object_Void = (name: string, param: Object | undefined) => void; export type Type_NavigationAttribute_customNavContentTransition_delegate = (from: NavContentInfo, to: NavContentInfo, operation: NavigationOperation) => NavigationAnimatedTransition | undefined; export interface NavigationAttribute extends CommonMethod { + setNavigationOptions(pathInfos?: NavPathStack): this { + return this + } navBarWidth(value: Length | Bindable | undefined): this navBarPosition(value: NavBarPosition | undefined): this navBarWidthRange(value: [ Dimension, Dimension ] | undefined): this @@ -1453,6 +1456,9 @@ export class ArkNavigationStyle extends ArkCommonMethodStyle implements Navigati recoverable_value?: boolean | undefined enableDragBar_value?: boolean | undefined enableModeChangeAnimation_value?: boolean | undefined + public setNavigationOptions(pathInfos?: NavPathStack): this { + return this + } public navBarWidth(value: Length | Bindable | undefined): this { return this } @@ -1574,6 +1580,41 @@ export class ArkNavigationComponent extends ArkCommonMethodComponent implements info = pathInfos! } hookNavigationSetNavigationOptionsImpl(this.getPeer().peer.ptr, info) + + if (pathInfos != undefined) { + const updater: (name: string, param: object|undefined)=>PeerNode = + (name: string, param: object|undefined) => { + let node = ArkStackPeer.create(new ArkStackComponent()) + return createUiDetachedRoot((): PeerNode => ArkStackPeer.create(new ArkStackComponent()), () => { + setNeedCreate(true) + this._navDestination(name, param); + setNeedCreate(false) + }) + } + const value_casted = updater as ((name: string, param: object|undefined) => PeerNode) + NavExtender.setUpdateStackCallback(pathInfos!, () => { + addPartialUpdate(() => { + if (!this.isNeedSync()) { + return + } + InteropNativeModule._NativeLog("AceNavigation: sync navigation stack") + this.updateNeedSync(false) + let size: int32 = pathInfos!.size() as int32 + InteropNativeModule._NativeLog("AceNavigation: path stack size: " + size) + let names: Array = pathInfos!.getAllPathName() + for (let index: int32 = 0; index < size; index++) { + if (NavExtender.checkNeedCreate(this.getPeer().peer.ptr, index)) { + InteropNativeModule._NativeLog("AceNavigation: create new node: " + index + ", name: " + names[index]) + let param = pathInfos!.getParamByIndex(index) + let node = value_casted(names[index], param) + NavExtender.setNavDestinationNode(pathInfos!, index, node.peer.ptr) + } + } + NavExtender.syncStack(pathInfos!) + }, __context, (isBefore: boolean) => {}) + this.updateNeedSync(true) + }) + } return this } return this @@ -1868,10 +1909,9 @@ export class ArkNavigationComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function Navigation( +export function NavigationImpl( /** @memo */ style: ((attributes: NavigationAttribute) => void) | undefined, - pathInfos?: NavPathStack, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1879,61 +1919,7 @@ export function Navigation( return new ArkNavigationComponent() }) NodeAttach((): ArkNavigationPeer => ArkNavigationPeer.create(receiver), (_: ArkNavigationPeer) => { - receiver.setNavigationOptions(pathInfos) style?.(receiver) content_?.() - if (pathInfos != undefined) { - remember(() => { - const updater: (name: string, param: object|undefined)=>PeerNode = - (name: string, param: object|undefined) => { - let node = ArkStackPeer.create(new ArkStackComponent()) - return createUiDetachedRoot((): PeerNode => ArkStackPeer.create(new ArkStackComponent()), () => { - setNeedCreate(true) - receiver._navDestination(name, param); - setNeedCreate(false) - }) - } - const value_casted = updater as ((name: string, param: object|undefined) => PeerNode) - NavExtender.setUpdateStackCallback(pathInfos!, () => { - addPartialUpdate(() => { - if (!receiver.isNeedSync()) { - return - } - InteropNativeModule._NativeLog("AceNavigation: sync navigation stack") - receiver.updateNeedSync(false) - let size: int32 = pathInfos!.size() as int32 - InteropNativeModule._NativeLog("AceNavigation: path stack size: " + size) - let names: Array = pathInfos!.getAllPathName() - for (let index: int32 = 0; index < size; index++) { - if (NavExtender.checkNeedCreate(receiver.getPeer().peer.ptr, index)) { - InteropNativeModule._NativeLog("AceNavigation: create new node: " + index + ", name: " + names[index]) - let param = pathInfos!.getParamByIndex(index) - let node = value_casted(names[index], param) - NavExtender.setNavDestinationNode(pathInfos!, index, node.peer.ptr) - } - } - NavExtender.syncStack(pathInfos!) - }, __context, (isBefore: boolean) => {}) - receiver.updateNeedSync(true) - }) - }) - // NavExtender.setOnPopCallback(pathInfos!, (id: string) => { - // const result = PathStackUtils.result - // if (runtimeType(result) === RuntimeType.UNDEFINED) { - // return - // } - // const info = PathStackUtils.getNavPathInfoById(id) - // if (runtimeType(info) === RuntimeType.UNDEFINED) { - // return - // } - // const onPop = info!.onPop - // if (runtimeType(onPop) === RuntimeType.UNDEFINED) { - // return; - // } - // const popInfo: PopInfo = {result: result!, info: info!} - // onPop!(popInfo) - // }) - } - receiver.applyAttributesFinish() }) } 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 1f486023e25ad53620ece188d0251491e4625b93..5f59b131bd0fd60a4027fb7248607bce94948595 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 @@ -124,6 +124,9 @@ export interface Literal_String_target_NavigationType_type { type?: NavigationType; } export interface NavigatorAttribute extends CommonMethod { + setNavigatorOptions(value?: Literal_String_target_NavigationType_type): this { + return this + } active(value: boolean | undefined): this type(value: NavigationType | undefined): this target(value: string | undefined): this @@ -134,6 +137,9 @@ export class ArkNavigatorStyle extends ArkCommonMethodStyle implements Navigator type_value?: NavigationType | undefined target_value?: string | undefined params_value?: Object | undefined + public setNavigatorOptions(value?: Literal_String_target_NavigationType_type): this { + return this + } public active(value: boolean | undefined): this { return this } @@ -198,10 +204,9 @@ export class ArkNavigatorComponent extends ArkCommonMethodComponent implements N } } /** @memo */ -export function Navigator( +export function NavigatorImpl( /** @memo */ style: ((attributes: NavigatorAttribute) => void) | undefined, - value?: Literal_String_target_NavigationType_type, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -209,9 +214,7 @@ export function Navigator( return new ArkNavigatorComponent() }) NodeAttach((): ArkNavigatorPeer => ArkNavigatorPeer.create(receiver), (_: ArkNavigatorPeer) => { - receiver.setNavigatorOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 3ebd7e1f26949c53ae3b5d5790e7b79b7237dba9..0fbb759bd9827d9264c171ef5cfd7abc7d0db13a 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 @@ -285,6 +285,9 @@ export type PanelInterface = (show: boolean) => PanelAttribute; export type Callback_Number_Number_PanelMode_Void = (width: number, height: number, mode: PanelMode) => void; export type Callback_Opt_PanelMode_Void = (mode: PanelMode | undefined) => void; export interface PanelAttribute extends CommonMethod { + setPanelOptions(show: boolean): this { + return this + } mode(value: PanelMode | undefined): this type(value: PanelType | undefined): this dragBar(value: boolean | undefined): this @@ -312,6 +315,9 @@ export class ArkPanelStyle extends ArkCommonMethodStyle implements PanelAttribut showCloseIcon_value?: boolean | undefined onChange_value?: ((width: number,height: number,mode: PanelMode) => void) | undefined onHeightChange_value?: ((index: number) => void) | undefined + public setPanelOptions(show: boolean): this { + return this + } public mode(value: PanelMode | undefined): this { return this } @@ -475,10 +481,9 @@ export class ArkPanelComponent extends ArkCommonMethodComponent implements Panel } } /** @memo */ -export function Panel( +export function PanelImpl( /** @memo */ style: ((attributes: PanelAttribute) => void) | undefined, - show: boolean, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -486,9 +491,7 @@ export function Panel( return new ArkPanelComponent() }) NodeAttach((): ArkPanelPeer => ArkPanelPeer.create(receiver), (_: ArkPanelPeer) => { - receiver.setPanelOptions(show) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 1d8c4d682ace4c73f2c5cc5314425fd120744164..ae336a26f7b517667af3a16040adfd91f067bda6 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 @@ -80,10 +80,16 @@ export enum PasteButtonOnClickResult { } export type PasteButtonCallback = (event: ClickEvent, result: PasteButtonOnClickResult, error?: BusinessError) => void; export interface PasteButtonAttribute extends SecurityComponentMethod { + setPasteButtonOptions(options?: PasteButtonOptions): this { + return this + } onClick(value: PasteButtonCallback | undefined): this } export class ArkPasteButtonStyle extends ArkSecurityComponentMethodStyle implements PasteButtonAttribute { onClick_value?: PasteButtonCallback | undefined + public setPasteButtonOptions(options?: PasteButtonOptions): this { + return this + } public onClick(value: PasteButtonCallback | undefined): this { return this } @@ -116,10 +122,9 @@ export class ArkPasteButtonComponent extends ArkSecurityComponentMethodComponent } } /** @memo */ -export function PasteButton( +export function PasteButtonImpl( /** @memo */ style: ((attributes: PasteButtonAttribute) => void) | undefined, - options?: PasteButtonOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -127,9 +132,7 @@ export function PasteButton( return new ArkPasteButtonComponent() }) NodeAttach((): ArkPasteButtonPeer => ArkPasteButtonPeer.create(receiver), (_: ArkPasteButtonPeer) => { - receiver.setPasteButtonOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 1bea5c15c306829ad837ba61e77b0e6a02b97169..bb2200dcffbe5f3beef7240f72908e4963c4f5a5 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 @@ -73,10 +73,16 @@ export interface PathOptions { export type PathInterface = (options?: PathOptions) => PathAttribute; export interface PathAttribute extends CommonShapeMethod { commands(value: string | undefined): this + setPathOptions(options?: PathOptions): this { + return this + } attributeModifier(value: AttributeModifier | AttributeModifier | undefined): this { return this; } } export class ArkPathStyle extends ArkCommonShapeMethodStyle implements PathAttribute { commands_value?: string | undefined + public setPathOptions(options?: PathOptions): this { + return this + } public commands(value: string | undefined): this { return this } @@ -113,10 +119,9 @@ export class ArkPathComponent extends ArkCommonShapeMethodComponent implements P } } /** @memo */ -export function Path( +export function PathImpl( /** @memo */ style: ((attributes: PathAttribute) => void) | undefined, - options?: PathOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -124,9 +129,7 @@ export function Path( return new ArkPathComponent() }) NodeAttach((): ArkPathPeer => ArkPathPeer.create(receiver), (_: ArkPathPeer) => { - receiver.setPathOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 75810ebaf149d03e121de1b2f494ebf7c5613873..6811d932034e7804df867d4f28757cdec1f1f4db 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 @@ -382,6 +382,9 @@ export interface CircleStyleOptions { export type PatternLockInterface = (controller?: PatternLockController) => PatternLockAttribute; export type Callback_Array_Number_Void = (input: Array) => void; export interface PatternLockAttribute extends CommonMethod { + setPatternLockOptions(controller?: PatternLockController): this { + return this + } sideLength(value: Length | undefined): this circleRadius(value: Length | undefined): this backgroundColor(value: ResourceColor | undefined): this @@ -410,6 +413,9 @@ export class ArkPatternLockStyle extends ArkCommonMethodStyle implements Pattern onDotConnect_value?: ((index: number) => void) | undefined activateCircleStyle_value?: CircleStyleOptions | undefined skipUnselectedPoint_value?: boolean | undefined + public setPatternLockOptions(controller?: PatternLockController): this { + return this + } public sideLength(value: Length | undefined): this { return this } @@ -573,10 +579,9 @@ export class ArkPatternLockComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function PatternLock( +export function PatternLockImpl( /** @memo */ style: ((attributes: PatternLockAttribute) => void) | undefined, - controller?: PatternLockController, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -584,9 +589,7 @@ export function PatternLock( return new ArkPatternLockComponent() }) NodeAttach((): ArkPatternLockPeer => ArkPatternLockPeer.create(receiver), (_: ArkPatternLockPeer) => { - receiver.setPatternLockOptions(controller) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 7d434e5d4a5284019d73c46eac1cfccf83b4dfd1..83d48374f61fa0f3a0dc16b0b8d63c6ce941a050 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 @@ -85,12 +85,18 @@ export interface PluginErrorData { export type PluginErrorCallback = (info: PluginErrorData) => void; export type PluginComponentInterface = (options: PluginComponentOptions) => PluginComponentAttribute; export interface PluginComponentAttribute extends CommonMethod { + setPluginComponentOptions(options: PluginComponentOptions): this { + return this + } onComplete(value: VoidCallback | undefined): this onError(value: PluginErrorCallback | undefined): this } export class ArkPluginComponentStyle extends ArkCommonMethodStyle implements PluginComponentAttribute { onComplete_value?: VoidCallback | undefined onError_value?: PluginErrorCallback | undefined + public setPluginComponentOptions(options: PluginComponentOptions): this { + return this + } public onComplete(value: VoidCallback | undefined): this { return this } @@ -133,10 +139,9 @@ export class ArkPluginComponentComponent extends ArkCommonMethodComponent implem } } /** @memo */ -export function PluginComponent( +export function PluginComponentImpl( /** @memo */ style: ((attributes: PluginComponentAttribute) => void) | undefined, - options: PluginComponentOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -144,9 +149,7 @@ export function PluginComponent( return new ArkPluginComponentComponent() }) NodeAttach((): ArkPluginComponentPeer => ArkPluginComponentPeer.create(receiver), (_: ArkPluginComponentPeer) => { - receiver.setPluginComponentOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 da585e5966258d3bb8fcf0f8cb14309bbc2ec73d..2f96d8b7865bc98ca2e40b0cdfbfe282af8cdec1 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 @@ -82,10 +82,16 @@ export interface PolygonOptions { export type PolygonInterface = (options?: PolygonOptions) => PolygonAttribute; export interface PolygonAttribute extends CommonShapeMethod { points(value: Array | undefined): this + setPolygonOptions(options?: PolygonOptions): this { + return this + } attributeModifier(value: AttributeModifier | AttributeModifier | undefined): this { return this; } } export class ArkPolygonStyle extends ArkCommonShapeMethodStyle implements PolygonAttribute { points_value?: Array | undefined + public setPolygonOptions(options?: PolygonOptions): this { + return this + } public points(value: Array | undefined): this { return this } @@ -122,10 +128,9 @@ export class ArkPolygonComponent extends ArkCommonShapeMethodComponent implement } } /** @memo */ -export function Polygon( +export function PolygonImpl( /** @memo */ style: ((attributes: PolygonAttribute) => void) | undefined, - options?: PolygonOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -133,9 +138,7 @@ export function Polygon( return new ArkPolygonComponent() }) NodeAttach((): ArkPolygonPeer => ArkPolygonPeer.create(receiver), (_: ArkPolygonPeer) => { - receiver.setPolygonOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 6505bd7c4c683cb1e1b5c1b6dfa1c81e38177d4d..db67712486602f5e6928f55bea3b44b3a9a62ca0 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 @@ -82,10 +82,16 @@ export interface PolylineOptions { export type PolylineInterface = (options?: PolylineOptions) => PolylineAttribute; export interface PolylineAttribute extends CommonShapeMethod { points(value: Array | undefined): this + setPolylineOptions(options?: PolylineOptions): this { + return this + } attributeModifier(value: AttributeModifier | AttributeModifier | undefined): this { return this; } } export class ArkPolylineStyle extends ArkCommonShapeMethodStyle implements PolylineAttribute { points_value?: Array | undefined + public setPolylineOptions(options?: PolylineOptions): this { + return this + } public points(value: Array | undefined): this { return this } @@ -122,10 +128,9 @@ export class ArkPolylineComponent extends ArkCommonShapeMethodComponent implemen } } /** @memo */ -export function Polyline( +export function PolylineImpl( /** @memo */ style: ((attributes: PolylineAttribute) => void) | undefined, - options?: PolylineOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -133,9 +138,7 @@ export function Polyline( return new ArkPolylineComponent() }) NodeAttach((): ArkPolylinePeer => ArkPolylinePeer.create(receiver), (_: ArkPolylinePeer) => { - receiver.setPolylineOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 f4eeb646a617fe2391bbe9b8c0c686c2cee5992f..4caf9839f1b0c4de089ae59f3b81ea84070e0d2d 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 @@ -238,6 +238,9 @@ export interface ProgressStyleMap { } export type ProgressInterface = (options: ProgressOptions) => ProgressAttribute; export interface ProgressAttribute extends CommonMethod { + setProgressOptions(options: ProgressOptions): this { + return this + } value(value: number | undefined): this color(value: ResourceColor | LinearGradient | undefined): this style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions | undefined): this @@ -250,6 +253,9 @@ export class ArkProgressStyle extends ArkCommonMethodStyle implements ProgressAt style_value?: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions | undefined privacySensitive_value?: boolean | undefined contentModifier_value?: ContentModifier | undefined + public setProgressOptions(options: ProgressOptions): this { + return this + } public value(value: number | undefined): this { return this } @@ -329,10 +335,9 @@ export class ArkProgressComponent extends ArkCommonMethodComponent implements Pr } } /** @memo */ -export function Progress( +export function ProgressImpl( /** @memo */ style: ((attributes: ProgressAttribute) => void) | undefined, - options: ProgressOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -340,9 +345,7 @@ export function Progress( return new ArkProgressComponent() }) NodeAttach((): ArkProgressPeer => ArkProgressPeer.create(receiver), (_: ArkProgressPeer) => { - receiver.setProgressOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 313e906459af7449463988bb662846b5288ae38a..41aca432e73eaf8f15dc1bdadb9e970a578c2005 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 @@ -136,6 +136,9 @@ export class ArkQRCodePeer extends ArkCommonMethodPeer { } export type QRCodeInterface = (value: string) => QRCodeAttribute; export interface QRCodeAttribute extends CommonMethod { + setQRCodeOptions(value: string): this { + return this + } color(value: ResourceColor | undefined): this backgroundColor(value: ResourceColor | undefined): this contentOpacity(value: number | Resource | undefined): this @@ -144,6 +147,9 @@ export class ArkQRCodeStyle extends ArkCommonMethodStyle implements QRCodeAttrib color_value?: ResourceColor | undefined backgroundColor_value?: ResourceColor | undefined contentOpacity_value?: number | Resource | undefined + public setQRCodeOptions(value: string): this { + return this + } public color(value: ResourceColor | undefined): this { return this } @@ -197,10 +203,9 @@ export class ArkQRCodeComponent extends ArkCommonMethodComponent implements QRCo } } /** @memo */ -export function QRCode( +export function QRCodeImpl( /** @memo */ style: ((attributes: QRCodeAttribute) => void) | undefined, - value: string, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -208,9 +213,7 @@ export function QRCode( return new ArkQRCodeComponent() }) NodeAttach((): ArkQRCodePeer => ArkQRCodePeer.create(receiver), (_: ArkQRCodePeer) => { - receiver.setQRCodeOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 b18d0c22556e7fde231e3e19ecd3df0b0ca34a71..e8724d4c4be57802a365ba880e2a5cc878aa5fdf 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 @@ -158,6 +158,9 @@ export interface RadioStyle { export type RadioInterface = (options: RadioOptions) => RadioAttribute; export type OnRadioChangeCallback = (isChecked: boolean) => void; export interface RadioAttribute extends CommonMethod { + setRadioOptions(options: RadioOptions): this { + return this + } checked(value: boolean | Bindable | undefined): this onChange(value: ((isVisible: boolean) => void) | undefined | OnRadioChangeCallback | undefined): this radioStyle(value: RadioStyle | undefined): this @@ -169,6 +172,9 @@ export class ArkRadioStyle extends ArkCommonMethodStyle implements RadioAttribut onChange_value?: ((isVisible: boolean) => void) | undefined radioStyle_value?: RadioStyle contentModifier_value?: ContentModifier | undefined + public setRadioOptions(options: RadioOptions): this { + return this + } public checked(value: boolean | Bindable | undefined): this { return this } @@ -266,10 +272,9 @@ export class ArkRadioComponent extends ArkCommonMethodComponent implements Radio } } /** @memo */ -export function Radio( +export function RadioImpl( /** @memo */ style: ((attributes: RadioAttribute) => void) | undefined, - options: RadioOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -277,9 +282,7 @@ export function Radio( return new ArkRadioComponent() }) NodeAttach((): ArkRadioPeer => ArkRadioPeer.create(receiver), (_: ArkRadioPeer) => { - receiver.setRadioOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 1bad8b8e86c4a2bd1b1274a696df4706323846dc..8446cafbfbb0c09fc5015cf9ef851c242267a48d 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 @@ -199,6 +199,9 @@ export interface RatingConfiguration extends CommonConfiguration void; export interface RatingAttribute extends CommonMethod { + setRatingOptions(options?: RatingOptions): this { + return this + } stars(value: number | undefined): this stepSize(value: number | undefined): this starStyle(value: StarStyleOptions | undefined): this @@ -212,6 +215,9 @@ export class ArkRatingStyle extends ArkCommonMethodStyle implements RatingAttrib starStyle_value?: StarStyleOptions | undefined onChange_value?: ((index: number) => void) | undefined contentModifier_value?: ContentModifier | undefined + public setRatingOptions(options?: RatingOptions): this { + return this + } public stars(value: number | undefined): this { return this } @@ -345,10 +351,9 @@ export class ArkRatingComponent extends ArkCommonMethodComponent implements Rati } } /** @memo */ -export function Rating( +export function RatingImpl( /** @memo */ style: ((attributes: RatingAttribute) => void) | undefined, - options?: RatingOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -356,9 +361,7 @@ export function Rating( return new ArkRatingComponent() }) NodeAttach((): ArkRatingPeer => ArkRatingPeer.create(receiver), (_: ArkRatingPeer) => { - receiver.setRatingOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 9cf2b403e1e75f6853659a9a10468f10ee0b9a6a..b9af0ee40309c68082f338dd66e6293c395dc413 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 @@ -157,6 +157,9 @@ export interface RoundedRectOptions { } export type RectInterface = (options?: RectOptions | RoundedRectOptions) => RectAttribute; export interface RectAttribute extends CommonShapeMethod { + setRectOptions(options?: RectOptions | RoundedRectOptions): this { + return this + } radiusWidth(value: number | string | undefined): this radiusHeight(value: number | string | undefined): this radius(value: Length | Array | undefined): this @@ -166,6 +169,9 @@ export class ArkRectStyle extends ArkCommonShapeMethodStyle implements RectAttri radiusWidth_value?: number | string | undefined radiusHeight_value?: number | string | undefined radius_value?: Length | Array | undefined + public setRectOptions(options?: RectOptions | RoundedRectOptions): this { + return this + } public radiusWidth(value: number | string | undefined): this { return this } @@ -224,10 +230,9 @@ export class ArkRectComponent extends ArkCommonShapeMethodComponent implements R } } /** @memo */ -export function Rect( +export function RectImpl( /** @memo */ style: ((attributes: RectAttribute) => void) | undefined, - options?: RectOptions | RoundedRectOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -235,9 +240,7 @@ export function Rect( return new ArkRectComponent() }) NodeAttach((): ArkRectPeer => ArkRectPeer.create(receiver), (_: ArkRectPeer) => { - receiver.setRectOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 ea1609e2034756e7ef7678cbcb7c55d5a64469a6..c89619ec0942367ac1a2f89140d4a3426769c7ca 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 @@ -151,6 +151,9 @@ export interface RefreshOptions { export type RefreshInterface = (value: RefreshOptions) => RefreshAttribute; export type Callback_RefreshStatus_Void = (state: RefreshStatus) => void; export interface RefreshAttribute extends CommonMethod { + setRefreshOptions(value: RefreshOptions): this { + return this + } onStateChange(value: ((state: RefreshStatus) => void) | undefined): this onRefreshing(value: (() => void) | undefined): this refreshOffset(value: number | undefined): this @@ -166,6 +169,9 @@ export class ArkRefreshStyle extends ArkCommonMethodStyle implements RefreshAttr pullToRefresh_value?: boolean | undefined onOffsetChange_value?: ((index: number) => void) | undefined pullDownRatio_value?: number | undefined + public setRefreshOptions(value: RefreshOptions): this { + return this + } public onStateChange(value: ((state: RefreshStatus) => void) | undefined): this { return this } @@ -276,10 +282,9 @@ export class ArkRefreshComponent extends ArkCommonMethodComponent implements Ref } } /** @memo */ -export function Refresh( +export function RefreshImpl( /** @memo */ style: ((attributes: RefreshAttribute) => void) | undefined, - value: RefreshOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -287,9 +292,7 @@ export function Refresh( return new ArkRefreshComponent() }) NodeAttach((): ArkRefreshPeer => ArkRefreshPeer.create(receiver), (_: ArkRefreshPeer) => { - receiver.setRefreshOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 18e17347279d22a8bc1b706165d43f8af27de3de..307f0f567e8173939f0cced31a6b457116d1eaae 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 @@ -125,12 +125,18 @@ export interface LocalizedBarrierStyle { referencedId: Array; } export interface RelativeContainerAttribute extends CommonMethod { + setRelativeContainerOptions(): this { + return this + } guideLine(value: Array | undefined): this barrier(value: Array | undefined | Array | undefined): this } export class ArkRelativeContainerStyle extends ArkCommonMethodStyle implements RelativeContainerAttribute { guideLine_value?: Array | undefined barrier_value?: Array | undefined + public setRelativeContainerOptions(): this { + return this + } public guideLine(value: Array | undefined): this { return this } @@ -181,10 +187,9 @@ export class ArkRelativeContainerComponent extends ArkCommonMethodComponent impl } } /** @memo */ -export function RelativeContainer( +export function RelativeContainerImpl( /** @memo */ style: ((attributes: RelativeContainerAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -192,9 +197,7 @@ export function RelativeContainer( return new ArkRelativeContainerComponent() }) NodeAttach((): ArkRelativeContainerPeer => ArkRelativeContainerPeer.create(receiver), (_: ArkRelativeContainerPeer) => { - receiver.setRelativeContainerOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/remoteWindow.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/remoteWindow.ts index c79abfebb505dffd9ad281104c4ba5b98368bca0..a6baced940bcd658a7643d9a65d672f5e54e34c1 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/remoteWindow.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/remoteWindow.ts @@ -60,9 +60,14 @@ export interface WindowAnimationTarget { } export type RemoteWindowInterface = (target: WindowAnimationTarget) => RemoteWindowAttribute; export interface RemoteWindowAttribute extends CommonMethod { + setRemoteWindowOptions(target: WindowAnimationTarget): this { + return this + } } export class ArkRemoteWindowStyle extends ArkCommonMethodStyle implements RemoteWindowAttribute { - + public setRemoteWindowOptions(target: WindowAnimationTarget): this { + return this + } } export class ArkRemoteWindowComponent extends ArkCommonMethodComponent implements RemoteWindowAttribute { getPeer(): ArkRemoteWindowPeer { @@ -83,10 +88,9 @@ export class ArkRemoteWindowComponent extends ArkCommonMethodComponent implement } } /** @memo */ -export function RemoteWindow( +export function RemoteWindowImpl( /** @memo */ style: ((attributes: RemoteWindowAttribute) => void) | undefined, - target: WindowAnimationTarget, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -94,9 +98,7 @@ export function RemoteWindow( return new ArkRemoteWindowComponent() }) NodeAttach((): ArkRemoteWindowPeer => ArkRemoteWindowPeer.create(receiver), (_: ArkRemoteWindowPeer) => { - receiver.setRemoteWindowOptions(target) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 369996ccccd70b8f249aed28e6d333e0f346350a..65f35c38d2585b425dd540fef94838c39ba049c3 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 @@ -936,6 +936,9 @@ export type Callback_RichEditorChangeValue_Boolean = (parameter: RichEditorChang export type Callback_CutEvent_Void = (parameter: CutEvent) => void; export type Callback_CopyEvent_Void = (parameter: CopyEvent) => void; export interface RichEditorAttribute extends CommonMethod { + setRichEditorOptions(value: RichEditorOptions | RichEditorStyledStringOptions): this { + return this + } onReady(value: (() => void) | undefined): this onSelect(value: ((parameter: RichEditorSelection) => void) | undefined): this onSelectionChange(value: ((parameter: RichEditorRange) => void) | undefined): this @@ -1001,6 +1004,9 @@ export class ArkRichEditorStyle extends ArkCommonMethodStyle implements RichEdit maxLines_value?: number | undefined keyboardAppearance_value?: KeyboardAppearance | undefined stopBackPress_value?: boolean | undefined + public setRichEditorOptions(value: RichEditorOptions | RichEditorStyledStringOptions): this { + return this + } public onReady(value: (() => void) | undefined): this { return this } @@ -1411,10 +1417,9 @@ export class ArkRichEditorComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function RichEditor( +export function RichEditorImpl( /** @memo */ style: ((attributes: RichEditorAttribute) => void) | undefined, - value: RichEditorOptions | RichEditorStyledStringOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1422,10 +1427,8 @@ export function RichEditor( return new ArkRichEditorComponent() }) NodeAttach((): ArkRichEditorPeer => ArkRichEditorPeer.create(receiver), (_: ArkRichEditorPeer) => { - receiver.setRichEditorOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class RichEditorControllerInternal { 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 862b3cde28529e1a91adee6c937bbb653cf40b86..5fa9f93914ebc643d7d4752052cd6495117fa3f6 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 @@ -68,10 +68,16 @@ export class ArkRichTextPeer extends ArkCommonMethodPeer { } export type RichTextInterface = (content: string) => RichTextAttribute; export interface RichTextAttribute extends CommonMethod { + setRichTextOptions(content: string): this { + return this + } onStart(value: (() => void) | undefined): this onComplete(value: (() => void) | undefined): this } export class ArkRichTextStyle extends ArkCommonMethodStyle implements RichTextAttribute { + public setRichTextOptions(content: string): this { + return this + } onStart_value?: (() => void) | undefined onComplete_value?: (() => void) | undefined public onStart(value: (() => void) | undefined): this { @@ -116,10 +122,9 @@ export class ArkRichTextComponent extends ArkCommonMethodComponent implements Ri } } /** @memo */ -export function RichText( +export function RichTextImpl( /** @memo */ style: ((attributes: RichTextAttribute) => void) | undefined, - content: string, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -127,9 +132,7 @@ export function RichText( return new ArkRichTextComponent() }) NodeAttach((): ArkRichTextPeer => ArkRichTextPeer.create(receiver), (_: ArkRichTextPeer) => { - receiver.setRichTextOptions(content) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rootScene.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rootScene.ts index 400d7c778970f7e6245940ce45fe7794ea9c3820..fca944ae512a4eafb187a9fc9c74ab227fb3acab 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rootScene.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/rootScene.ts @@ -49,8 +49,14 @@ export interface RootSceneSession { } export type RootSceneInterface = (session: RootSceneSession) => RootSceneAttribute; export interface RootSceneAttribute extends CommonMethod { + setRootSceneOptions(session: RootSceneSession): this { + return this + } } export class ArkRootSceneStyle extends ArkCommonMethodStyle implements RootSceneAttribute { + public setRootSceneOptions(session: RootSceneSession): this { + return this + } } export class ArkRootSceneComponent extends ArkCommonMethodComponent implements RootSceneAttribute { getPeer(): ArkRootScenePeer { @@ -71,10 +77,9 @@ export class ArkRootSceneComponent extends ArkCommonMethodComponent implements R } } /** @memo */ -export function RootScene( +export function RootSceneImpl( /** @memo */ style: ((attributes: RootSceneAttribute) => void) | undefined, - session: RootSceneSession, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -82,9 +87,7 @@ export function RootScene( return new ArkRootSceneComponent() }) NodeAttach((): ArkRootScenePeer => ArkRootScenePeer.create(receiver), (_: ArkRootScenePeer) => { - receiver.setRootSceneOptions(session) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 1989b8c88cd4a17c0b0313ab7a2c2e5337e8386e..7e407559737444c577a5289822ec01bfd945f9f2 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 @@ -149,6 +149,9 @@ export interface RowOptionsV2 { } export interface RowAttribute extends CommonMethod { + setRowOptions(options?: RowOptions | RowOptions | RowOptionsV2): this { + return this + } alignItems(value: VerticalAlign | undefined): this; justifyContent(value: FlexAlign | undefined): this; pointLight(value: PointLightStyle | undefined): this; @@ -160,6 +163,9 @@ export class ArkRowStyle extends ArkCommonMethodStyle implements RowAttribute { justifyContent_value?: FlexAlign | undefined; pointLight_value?: PointLightStyle | undefined; reverse_value?: boolean | undefined; + public setRowOptions(options?: RowOptions | RowOptions | RowOptionsV2): this { + return this + } public alignItems(value: VerticalAlign | undefined): this { return this; } @@ -241,10 +247,9 @@ export class ArkRowComponent extends ArkCommonMethodComponent implements RowAttr } /** @memo */ -export function Row( +export function RowImpl( /** @memo */ style: ((attributes: RowAttribute) => void) | undefined, - options?: RowOptions | RowOptions | RowOptionsV2, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -252,9 +257,7 @@ export function Row( return new ArkRowComponent() }) NodeAttach((): ArkRowPeer => ArkRowPeer.create(receiver), (_: ArkRowPeer) => { - receiver.setRowOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 3e7a4a983b9f39d2c6107831ab939231e371886d..338022404c171360622cfab4128e24fb5627835f 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 @@ -58,10 +58,16 @@ export class ArkRowSplitPeer extends ArkCommonMethodPeer { } export type RowSplitInterface = () => RowSplitAttribute; export interface RowSplitAttribute extends CommonMethod { + setRowSplitOptions(): this { + return this + } resizeable(value: boolean | undefined): this } export class ArkRowSplitStyle extends ArkCommonMethodStyle implements RowSplitAttribute { resizeable_value?: boolean | undefined + public setRowSplitOptions(): this { + return this + } public resizeable(value: boolean | undefined): this { return this } @@ -92,10 +98,9 @@ export class ArkRowSplitComponent extends ArkCommonMethodComponent implements Ro } } /** @memo */ -export function RowSplit( +export function RowSplitImpl( /** @memo */ style: ((attributes: RowSplitAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -103,9 +108,7 @@ export function RowSplit( return new ArkRowSplitComponent() }) NodeAttach((): ArkRowSplitPeer => ArkRowSplitPeer.create(receiver), (_: ArkRowSplitPeer) => { - receiver.setRowSplitOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 b29592a83ba691842c9f705c02631dc7e15f9e40..a3b8dd4657d932c4a50c95afc7d30d5c15aab647 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 @@ -94,10 +94,16 @@ export enum SaveButtonOnClickResult { } export type SaveButtonCallback = (event: ClickEvent, result: SaveButtonOnClickResult, error?: BusinessError) => void; export interface SaveButtonAttribute extends SecurityComponentMethod { + setSaveButtonOptions(options?: SaveButtonOptions): this { + return this + } onClick(value: SaveButtonCallback | undefined): this } export class ArkSaveButtonStyle extends ArkSecurityComponentMethodStyle implements SaveButtonAttribute { onClick_value?: SaveButtonCallback | undefined + public setSaveButtonOptions(options?: SaveButtonOptions): this { + return this + } public onClick(value: SaveButtonCallback | undefined): this { return this } @@ -130,10 +136,9 @@ export class ArkSaveButtonComponent extends ArkSecurityComponentMethodComponent } } /** @memo */ -export function SaveButton( +export function SaveButtonImpl( /** @memo */ style: ((attributes: SaveButtonAttribute) => void) | undefined, - options?: SaveButtonOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -141,9 +146,7 @@ export function SaveButton( return new ArkSaveButtonComponent() }) NodeAttach((): ArkSaveButtonPeer => ArkSaveButtonPeer.create(receiver), (_: ArkSaveButtonPeer) => { - receiver.setSaveButtonOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/screen.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/screen.ts index 8f078efc7d18fbcef185d44b7c1a1020bc5c29f0..2e0cf19373b7f168c37d61380d66f36c93a4a281 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/screen.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/screen.ts @@ -44,8 +44,14 @@ export class ArkScreenPeer extends ArkCommonMethodPeer { } export type ScreenInterface = (screenId: number) => ScreenAttribute; export interface ScreenAttribute extends CommonMethod { + setScreenOptions(screenId: number): this { + return this + } } export class ArkScreenStyle extends ArkCommonMethodStyle implements ScreenAttribute { + public setScreenOptions(screenId: number): this { + return this + } } export class ArkScreenComponent extends ArkCommonMethodComponent implements ScreenAttribute { getPeer(): ArkScreenPeer { @@ -66,10 +72,9 @@ export class ArkScreenComponent extends ArkCommonMethodComponent implements Scre } } /** @memo */ -export function Screen( +export function ScreenImpl( /** @memo */ style: ((attributes: ScreenAttribute) => void) | undefined, - screenId: number, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -77,9 +82,7 @@ export function Screen( return new ArkScreenComponent() }) NodeAttach((): ArkScreenPeer => ArkScreenPeer.create(receiver), (_: ArkScreenPeer) => { - receiver.setScreenOptions(screenId) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 ea397ebbd0423ece865c9d03526820f617c580f1..cfd7611d01f4875146902d6398d705659b25cd89 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 @@ -598,6 +598,9 @@ export interface OnScrollFrameBeginHandlerResult { } export type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) => OnScrollFrameBeginHandlerResult; export interface ScrollAttribute extends ScrollableCommonMethod { + setScrollOptions(scroller?: Scroller): this { + return this + } scrollable(value: ScrollDirection | undefined): this onScroll(value: ((first: number,last: number) => void) | undefined): this onWillScroll(value: ScrollOnWillScrollCallback | undefined): this @@ -637,6 +640,9 @@ export class ArkScrollStyle extends ArkScrollableCommonMethodStyle implements Sc scrollSnap_value?: ScrollSnapOptions | undefined enablePaging_value?: boolean | undefined initialOffset_value?: OffsetOptions | undefined + public setScrollOptions(scroller?: Scroller): this { + return this + } public scrollable(value: ScrollDirection | undefined): this { return this } @@ -869,10 +875,9 @@ export class ArkScrollComponent extends ArkScrollableCommonMethodComponent imple } } /** @memo */ -export function Scroll( +export function ScrollImpl( /** @memo */ style: ((attributes: ScrollAttribute) => void) | undefined, - scroller?: Scroller, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -880,9 +885,7 @@ export function Scroll( return new ArkScrollComponent() }) NodeAttach((): ArkScrollPeer => ArkScrollPeer.create(receiver), (_: ArkScrollPeer) => { - receiver.setScrollOptions(scroller) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 c700994d6afa3edcf07c1b225ac5c28662ee17b2..da1a1471f8103f060f92c4e72230f7dd710c06cb 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 @@ -72,10 +72,16 @@ export interface ScrollBarOptions { } export type ScrollBarInterface = (value: ScrollBarOptions) => ScrollBarAttribute; export interface ScrollBarAttribute extends CommonMethod { + setScrollBarOptions(value: ScrollBarOptions): this { + return this + } enableNestedScroll(value: boolean | undefined): this } export class ArkScrollBarStyle extends ArkCommonMethodStyle implements ScrollBarAttribute { enableNestedScroll_value?: boolean | undefined + public setScrollBarOptions(value: ScrollBarOptions): this { + return this + } public enableNestedScroll(value: boolean | undefined): this { return this } @@ -107,10 +113,9 @@ export class ArkScrollBarComponent extends ArkCommonMethodComponent implements S } } /** @memo */ -export function ScrollBar( +export function ScrollBarImpl( /** @memo */ style: ((attributes: ScrollBarAttribute) => void) | undefined, - value: ScrollBarOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -118,9 +123,7 @@ export function ScrollBar( return new ArkScrollBarComponent() }) NodeAttach((): ArkScrollBarPeer => ArkScrollBarPeer.create(receiver), (_: ArkScrollBarPeer) => { - receiver.setScrollBarOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 3c7f2177965c55b605bc0970a0f54eed86365cc7..33485ce46ef48071751acd766fbab573ae534c00 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 @@ -892,6 +892,9 @@ export type Callback_DeleteValue_Boolean = (parameter: DeleteValue) => boolean; export type Callback_DeleteValue_Void = (parameter: DeleteValue) => void; export type Callback_EditableTextChangeValue_Boolean = (parameter: EditableTextChangeValue) => boolean; export interface SearchAttribute extends CommonMethod { + setSearchOptions(options?: SearchOptions): this { + return this + } fontColor(value: ResourceColor | undefined): this searchIcon(value: IconOptions | SymbolGlyphModifier | undefined): this cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions | undefined): this @@ -986,6 +989,9 @@ export class ArkSearchStyle extends ArkCommonMethodStyle implements SearchAttrib stopBackPress_value?: boolean | undefined onWillChange_value?: ((parameter: EditableTextChangeValue) => boolean) | undefined keyboardAppearance_value?: KeyboardAppearance | undefined + public setSearchOptions(options?: SearchOptions): this { + return this + } public fontColor(value: ResourceColor | undefined): this { return this } @@ -1544,10 +1550,9 @@ export class ArkSearchComponent extends ArkCommonMethodComponent implements Sear } } /** @memo */ -export function Search( +export function SearchImpl( /** @memo */ style: ((attributes: SearchAttribute) => void) | undefined, - options?: SearchOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1555,10 +1560,8 @@ export function Search( return new ArkSearchComponent() }) NodeAttach((): ArkSearchPeer => ArkSearchPeer.create(receiver), (_: ArkSearchPeer) => { - receiver.setSearchOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class SearchControllerInternal { 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 1cb6534932f4a43dc46babb3c66b8d79e7273afa..b86a429b9e25abc7076e4595e1f9d5d517051cdb 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 @@ -1233,6 +1233,9 @@ export type Callback_Number_String_Void = (index: number, value: string) => void export type Callback_Opt_Union_Number_Resource_Void = (selected: number | Resource | undefined) => void; export type Callback_Opt_ResourceStr_Void = (value: ResourceStr | undefined) => void; export interface SelectAttribute extends CommonMethod { + setSelectOptions(options: Array): this { + return this + } selected(value: number | Resource | Bindable | Bindable | undefined): this value(value: ResourceStr | Bindable | Bindable | undefined): this font(value: Font | undefined): this @@ -1292,6 +1295,9 @@ export class ArkSelectStyle extends ArkCommonMethodStyle implements SelectAttrib dividerStyle_value?: DividerStyleOptions | undefined avoidance_value?: AvoidanceMode | undefined menuOutline_value?: MenuOutlineOptions | undefined + public setSelectOptions(options: Array): this { + return this + } public selected(value: number | Resource | Bindable | Bindable | undefined): this { return this } @@ -1809,10 +1815,9 @@ export class ArkSelectComponent extends ArkCommonMethodComponent implements Sele } } /** @memo */ -export function Select( +export function SelectImpl( /** @memo */ style: ((attributes: SelectAttribute) => void) | undefined, - options: Array, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1820,9 +1825,7 @@ export function Select( return new ArkSelectComponent() }) NodeAttach((): ArkSelectPeer => ArkSelectPeer.create(receiver), (_: ArkSelectPeer) => { - receiver.setSelectOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 96097d42c0128bea1e04ed2ac0a5a3fd8c71800f..b9dd5a93a7ba6ac15bd666eed6ccb2675296aff2 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 @@ -326,6 +326,9 @@ export interface ViewportRect { height?: number | string; } export interface ShapeAttribute extends CommonMethod { + setShapeOptions(value?: PixelMap): this { + return this + } viewPort(value: ViewportRect | undefined): this stroke(value: ResourceColor | undefined): this fill(value: ResourceColor | undefined): this @@ -354,6 +357,9 @@ export class ArkShapeStyle extends ArkCommonMethodStyle implements ShapeAttribut fillOpacity_value?: number | string | Resource | undefined strokeWidth_value?: number | string | undefined antiAlias_value?: boolean | undefined + public setShapeOptions(value?: PixelMap): this { + return this + } public viewPort(value: ViewportRect | undefined): this { return this } @@ -525,10 +531,9 @@ export class ArkShapeComponent extends ArkCommonMethodComponent implements Shape } } /** @memo */ -export function Shape( +export function ShapeImpl( /** @memo */ style: ((attributes: ShapeAttribute) => void) | undefined, - value?: PixelMap, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -536,9 +541,7 @@ export function Shape( return new ArkShapeComponent() }) NodeAttach((): ArkShapePeer => ArkShapePeer.create(receiver), (_: ArkShapePeer) => { - receiver.setShapeOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 df74c26a09b92326b7bdc6e16a90a52ee6cd307a..faf3875973ebeb7cffd00650dfe00f41d00d1a43 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 @@ -269,6 +269,9 @@ export interface ButtonStyle { } export type SideBarContainerInterface = (type?: SideBarContainerType) => SideBarContainerAttribute; export interface SideBarContainerAttribute extends CommonMethod { + setSideBarContainerOptions(type?: SideBarContainerType): this { + return this + } showSideBar(value: boolean | Bindable | undefined): this controlButton(value: ButtonStyle | undefined): this showControlButton(value: boolean | undefined): this @@ -295,6 +298,9 @@ export class ArkSideBarContainerStyle extends ArkCommonMethodStyle implements Si sideBarPosition_value?: SideBarPosition | undefined divider_value?: DividerStyle | null | undefined minContentWidth_value?: Dimension | undefined + public setSideBarContainerOptions(type?: SideBarContainerType): this { + return this + } public showSideBar(value: boolean | Bindable | undefined): this { return this } @@ -477,10 +483,9 @@ export class ArkSideBarContainerComponent extends ArkCommonMethodComponent imple } } /** @memo */ -export function SideBarContainer( +export function SideBarContainerImpl( /** @memo */ style: ((attributes: SideBarContainerAttribute) => void) | undefined, - type?: SideBarContainerType, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -488,9 +493,7 @@ export function SideBarContainer( return new ArkSideBarContainerComponent() }) NodeAttach((): ArkSideBarContainerPeer => ArkSideBarContainerPeer.create(receiver), (_: ArkSideBarContainerPeer) => { - receiver.setSideBarContainerOptions(type) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/slider.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/slider.ts index 731a1f5c49e65b129f3f3549a76682998f696a1b..8fc393718e3b7c3f794456780a1f628ccd645806 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/slider.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/slider.ts @@ -573,6 +573,9 @@ export interface SliderConfiguration extends CommonConfiguration SliderAttribute; export type Callback_Number_SliderChangeMode_Void = (value: number, mode: SliderChangeMode) => void; export interface SliderAttribute extends CommonMethod { + setSliderOptions(options?: SliderOptions): this { + return this + } blockColor(value: ResourceColor | undefined): this trackColor(value: ResourceColor | LinearGradient | undefined): this selectedColor(value: ResourceColor | LinearGradient | undefined): this @@ -621,6 +624,9 @@ export class ArkSliderStyle extends ArkCommonMethodStyle implements SliderAttrib slideRange_value?: SlideRange | undefined digitalCrownSensitivity_value?: CrownSensitivity | undefined enableHapticFeedback_value?: boolean | undefined + public setSliderOptions(options?: SliderOptions): this { + return this + } public blockColor(value: ResourceColor | undefined): this { return this } @@ -926,10 +932,9 @@ export class ArkSliderComponent extends ArkCommonMethodComponent implements Slid } } /** @memo */ -export function Slider( +export function SliderImpl( /** @memo */ style: ((attributes: SliderAttribute) => void) | undefined, - options?: SliderOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -937,9 +942,7 @@ export function Slider( return new ArkSliderComponent() }) NodeAttach((): ArkSliderPeer => ArkSliderPeer.create(receiver), (_: ArkSliderPeer) => { - receiver.setSliderOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 ffca634c01852607005c1fc94a8b3e20378460d0..fafc83a2657227a13ef307668846dce4feae685f 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 @@ -339,6 +339,9 @@ export class ArkBaseSpanStyle extends ArkCommonMethodStyle implements BaseSpan { } export type SpanInterface = (value: string | Resource) => SpanAttribute; export interface SpanAttribute extends BaseSpan { + setSpanOptions(value: string | Resource): this { + return this + } font(value: Font | undefined): this fontColor(value: ResourceColor | undefined): this fontSize(value: number | string | Resource | undefined): this @@ -363,6 +366,9 @@ export class ArkSpanStyle extends ArkBaseSpanStyle implements SpanAttribute { textCase_value?: TextCase | undefined lineHeight_value?: Length | undefined textShadow_value?: ShadowOptions | Array | undefined + public setSpanOptions(value: string | Resource): this { + return this + } public font(value: Font | undefined): this { return this } @@ -530,10 +536,9 @@ export class ArkSpanComponent extends ArkBaseSpanComponent implements SpanAttrib } } /** @memo */ -export function Span( +export function SpanImpl( /** @memo */ style: ((attributes: SpanAttribute) => void) | undefined, - value: string | Resource, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -541,9 +546,7 @@ export function Span( return new ArkSpanComponent() }) NodeAttach((): ArkSpanPeer => ArkSpanPeer.create(receiver), (_: ArkSpanPeer) => { - receiver.setSpanOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } 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 b468bfeafa7290c5fcfa3cb98b8ec304d3e5e316..ed3326b6f4a9fd48ce196afe583ede498dd25640 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 @@ -83,12 +83,18 @@ export interface StackOptions { } export type StackInterface = (options?: StackOptions) => StackAttribute; export interface StackAttribute extends CommonMethod { + setStackOptions(options?: StackOptions): this { + return this + } alignContent(value: Alignment | undefined): this pointLight(value: PointLightStyle | undefined): this } export class ArkStackStyle extends ArkCommonMethodStyle implements StackAttribute { alignContent_value?: Alignment | undefined pointLight_value?: PointLightStyle | undefined + public setStackOptions(options?: StackOptions): this { + return this + } public alignContent(value: Alignment | undefined): this { return this } @@ -131,10 +137,9 @@ export class ArkStackComponent extends ArkCommonMethodComponent implements Stack } } /** @memo */ -export function Stack( +export function StackImpl( /** @memo */ style: ((attributes: StackAttribute) => void) | undefined, - options?: StackOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -142,9 +147,7 @@ export function Stack( return new ArkStackComponent() }) NodeAttach((): ArkStackPeer => ArkStackPeer.create(receiver), (_: ArkStackPeer) => { - receiver.setStackOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepper.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepper.ts index a2cf4ddc852967bbfd8d4c00b10f5b988a78e340..44493a9c7e4a24f9de65deec50206b6670c0c396 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepper.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepper.ts @@ -137,6 +137,9 @@ export interface StepperOptions { } export type StepperInterface = (value?: StepperOptions) => StepperAttribute; export interface StepperAttribute extends CommonMethod { + setStepperOptions(value?: StepperOptions): this { + return this + } onFinish(value: (() => void) | undefined): this onSkip(value: (() => void) | undefined): this onChange(value: ((first: number,last: number) => void) | undefined): this @@ -150,6 +153,9 @@ export class ArkStepperStyle extends ArkCommonMethodStyle implements StepperAttr onChange_value?: ((first: number,last: number) => void) | undefined onNext_value?: ((first: number,last: number) => void) | undefined onPrevious_value?: ((first: number,last: number) => void) | undefined + public setStepperOptions(value?: StepperOptions): this { + return this + } public onFinish(value: (() => void) | undefined): this { return this } @@ -236,10 +242,9 @@ export class ArkStepperComponent extends ArkCommonMethodComponent implements Ste } } /** @memo */ -export function Stepper( +export function StepperImpl( /** @memo */ style: ((attributes: StepperAttribute) => void) | undefined, - value?: StepperOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -247,9 +252,7 @@ export function Stepper( return new ArkStepperComponent() }) NodeAttach((): ArkStepperPeer => ArkStepperPeer.create(receiver), (_: ArkStepperPeer) => { - receiver.setStepperOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepperItem.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepperItem.ts index 73378a2f46ed3a43eb05add320863466c3cb7442..580880aadd3d27e0610259e44f2e8d0865281bb1 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepperItem.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/stepperItem.ts @@ -93,6 +93,9 @@ export enum ItemState { } export type StepperItemInterface = () => StepperItemAttribute; export interface StepperItemAttribute extends CommonMethod { + setStepperItemOptions(): this { + return this + } prevLabel(value: string | undefined): this nextLabel(value: string | undefined): this status(value: ItemState | undefined): this @@ -102,6 +105,9 @@ export class ArkStepperItemStyle extends ArkCommonMethodStyle implements Stepper prevLabel_value?: string | undefined nextLabel_value?: string | undefined status_value?: ItemState + public setStepperItemOptions(): this { + return this + } public prevLabel(value: string | undefined): this { return this } @@ -161,10 +167,9 @@ export class ArkStepperItemComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function StepperItem( +export function StepperItemImpl( /** @memo */ style: ((attributes: StepperItemAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -172,9 +177,7 @@ export function StepperItem( return new ArkStepperItemComponent() }) NodeAttach((): ArkStepperItemPeer => ArkStepperItemPeer.create(receiver), (_: ArkStepperItemPeer) => { - receiver.setStepperItemOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/swiper.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/swiper.ts index 3ddea283c192e82654a2562dffd17f076e7fa547..54089e12e14c38df2a1e169184e79e9a5ecfcd94 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/swiper.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/swiper.ts @@ -880,6 +880,9 @@ export type OnSwiperAnimationStartCallback = (index: number, targetIndex: number export type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; export type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; export interface SwiperAttribute extends CommonMethod { + setSwiperOptions(controller?: SwiperController): this { + return this + } index(value: number | Bindable | undefined): this autoPlay(autoPlay: boolean | undefined, options?: AutoPlayOptions): this interval(value: number | undefined): this @@ -939,6 +942,9 @@ export class ArkSwiperStyle extends ArkCommonMethodStyle implements SwiperAttrib indicatorInteractive_value?: boolean | undefined pageFlipMode_value?: PageFlipMode | undefined onContentWillScroll_value?: ContentWillScrollCallback | undefined + public setSwiperOptions(controller?: SwiperController): this { + return this + } public index(value: number | Bindable | undefined): this { return this } @@ -1346,10 +1352,9 @@ export class ArkSwiperComponent extends ArkCommonMethodComponent implements Swip } } /** @memo */ -export function Swiper( +export function SwiperImpl( /** @memo */ style: ((attributes: SwiperAttribute) => void) | undefined, - controller?: SwiperController, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1357,10 +1362,8 @@ export function Swiper( return new ArkSwiperComponent() }) NodeAttach((): ArkSwiperPeer => ArkSwiperPeer.create(receiver), (_: ArkSwiperPeer) => { - receiver.setSwiperOptions(controller) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class Indicator { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolSpan.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolSpan.ts index 0a3abb86ecfd1f6363e4a90b00c981a832e7074c..bfaae7c5e796c66b3015a1d65476a7b2e0845f97 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolSpan.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolSpan.ts @@ -168,6 +168,9 @@ export class ArkSymbolSpanPeer extends ArkCommonMethodPeer { } export type SymbolSpanInterface = (value: Resource) => SymbolSpanAttribute; export interface SymbolSpanAttribute extends CommonMethod { + setSymbolSpanOptions(value: Resource): this { + return this + } fontSize(value: number | string | Resource | undefined): this fontColor(value: Array | undefined): this fontWeight(value: number | FontWeight | string | undefined): this @@ -180,6 +183,9 @@ export class ArkSymbolSpanStyle extends ArkCommonMethodStyle implements SymbolSp fontWeight_value?: number | FontWeight | string | undefined effectStrategy_value?: SymbolEffectStrategy | undefined renderingStrategy_value?: SymbolRenderingStrategy | undefined + public setSymbolSpanOptions(value: Resource): this { + return this + } public fontSize(value: number | string | Resource | undefined): this { return this } @@ -255,10 +261,9 @@ export class ArkSymbolSpanComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function SymbolSpan( +export function SymbolSpanImpl( /** @memo */ style: ((attributes: SymbolSpanAttribute) => void) | undefined, - value: Resource, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -266,9 +271,7 @@ export function SymbolSpan( return new ArkSymbolSpanComponent() }) NodeAttach((): ArkSymbolSpanPeer => ArkSymbolSpanPeer.create(receiver), (_: ArkSymbolSpanPeer) => { - receiver.setSymbolSpanOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolglyph.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolglyph.ts index 7335bf81d6eb31fa542a8fd52380dddbf54dcf21..a4fbf12e73210f78fc669fa7faf2891b9d74f60d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolglyph.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/symbolglyph.ts @@ -446,6 +446,9 @@ export enum EffectFillStyle { ITERATIVE = 1 } export interface SymbolGlyphAttribute extends CommonMethod { + setSymbolGlyphOptions(value?: Resource): this { + return this + } fontSize(value: number | string | Resource | undefined): this { return this; } fontColor(value: Array | undefined): this { return this; } fontWeight(value: number | FontWeight | string | undefined): this { return this; } @@ -464,6 +467,9 @@ export class ArkSymbolGlyphStyle extends ArkCommonMethodStyle implements SymbolG renderingStrategy_value?: SymbolRenderingStrategy | undefined minFontScale_value?: number | Resource | undefined maxFontScale_value?: number | Resource | undefined + public setSymbolGlyphOptions(value?: Resource): this { + return this + } public fontSize(value: number | string | Resource | undefined): this { return this } @@ -589,10 +595,9 @@ export class ArkSymbolGlyphComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function SymbolGlyph( +export function SymbolGlyphImpl( /** @memo */ style: ((attributes: SymbolGlyphAttribute) => void) | undefined, - value?: Resource, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -600,10 +605,8 @@ export function SymbolGlyph( return new ArkSymbolGlyphComponent() }) NodeAttach((): ArkSymbolGlyphPeer => ArkSymbolGlyphPeer.create(receiver), (_: ArkSymbolGlyphPeer) => { - receiver.setSymbolGlyphOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class HierarchicalSymbolEffectInternal { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabContent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabContent.ts index 87ce32d83fe6998184c455146859c553528c2af1..0876c22dfdbace3cd8e965506f98a00efcd6a02c 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabContent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabContent.ts @@ -217,6 +217,9 @@ export interface TabBarOptions { } export type TabContentInterface = () => TabContentAttribute; export interface TabContentAttribute extends CommonMethod { + setTabContentOptions(): this { + return this + } tabBar(value: string | Resource | CustomBuilder | TabBarOptions | undefined | SubTabBarStyle | BottomTabBarStyle | undefined | ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions | undefined): this onWillShow(value: VoidCallback | undefined): this onWillHide(value: VoidCallback | undefined): this @@ -225,6 +228,9 @@ export class ArkTabContentStyle extends ArkCommonMethodStyle implements TabConte tabBar_value?: string | Resource | CustomBuilder | TabBarOptions | undefined onWillShow_value?: VoidCallback | undefined onWillHide_value?: VoidCallback | undefined + public setTabContentOptions(): this { + return this + } public tabBar(value: string | Resource | CustomBuilder | TabBarOptions | undefined | SubTabBarStyle | BottomTabBarStyle | undefined | ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions | undefined): this { return this } @@ -291,10 +297,9 @@ export class ArkTabContentComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function TabContent( +export function TabContentImpl( /** @memo */ style: ((attributes: TabContentAttribute) => void) | undefined, - /** @memo */ content_?: (() => void) | undefined, ): void { @@ -302,10 +307,8 @@ export function TabContent( return new ArkTabContentComponent() }) NodeAttach((): ArkTabContentPeer => ArkTabContentPeer.create(receiver), (_: ArkTabContentPeer) => { - receiver.setTabContentOptions() style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class SubTabBarStyle { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabs.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabs.ts index d1102979ea44e4fe82ab24b69b3c6bf5da6dd84d..f837c8410936edd01a82d500962ee5e9c1331020 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabs.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/tabs.ts @@ -674,6 +674,9 @@ export type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimatio export type TabsCustomContentTransitionCallback = (from: number, to: number) => TabContentAnimatedTransition | undefined; export type OnTabsContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; export interface TabsAttribute extends CommonMethod { + setTabsOptions(options?: TabsOptions): this { + return this + } vertical(value: boolean | undefined): this barPosition(value: BarPosition | undefined): this scrollable(value: boolean | undefined): this @@ -731,6 +734,9 @@ export class ArkTabsStyle extends ArkCommonMethodStyle implements TabsAttribute barBackgroundEffect_value?: BackgroundEffectOptions | undefined pageFlipMode_value?: PageFlipMode | undefined onContentWillChange_value?: OnTabsContentWillChangeCallback | undefined + public setTabsOptions(options?: TabsOptions): this { + return this + } public vertical(value: boolean | undefined): this { return this } @@ -1087,10 +1093,9 @@ export class ArkTabsComponent extends ArkCommonMethodComponent implements TabsAt } } /** @memo */ -export function Tabs( +export function TabsImpl( /** @memo */ style: ((attributes: TabsAttribute) => void) | undefined, - options?: TabsOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1098,9 +1103,7 @@ export function Tabs( return new ArkTabsComponent() }) NodeAttach((): ArkTabsPeer => ArkTabsPeer.create(receiver), (_: ArkTabsPeer) => { - receiver.setTabsOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/text.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/text.ts index 946e6cc7ee6a346b2700636a6c2993de93b5202d..3cd26bd5a4f812cafbc08039ec3f8f8cb2b45e10 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/text.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/text.ts @@ -942,6 +942,9 @@ export interface TextOverflowOptions { export type TextInterface = (content?: string | Resource, value?: TextOptions) => TextAttribute; export type Callback_MarqueeState_Void = (parameter: MarqueeState) => void; export interface TextAttribute extends CommonMethod { + setTextOptions(content?: string | Resource, value?: TextOptions): this { + return this + } font(fontValue: Font | undefined, options?: FontSettingOptions): this { return this;} fontColor(value: ResourceColor | undefined): this { return this;} fontSize(value: number | string | Resource | undefined): this { return this;} @@ -1029,6 +1032,9 @@ export class ArkTextStyle extends ArkCommonMethodStyle implements TextAttribute editMenuOptions_value?: EditMenuOptions | undefined halfLeading_value?: boolean | undefined enableHapticFeedback_value?: boolean | undefined + public setTextOptions(content?: string | Resource, value?: TextOptions): this { + return this + } public font(fontValue: Font | undefined, options?: FontSettingOptions): this { return this } @@ -1573,10 +1579,9 @@ export class ArkTextComponent extends ArkCommonMethodComponent implements TextAt } /** @memo */ -export function Text( +export function TextImpl( /** @memo */ style: ((attributes: TextAttribute) => void) | undefined, - content?: string | Resource, value?: TextOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1584,9 +1589,7 @@ export function Text( return new ArkTextComponent() }) NodeAttach((): ArkTextPeer => ArkTextPeer.create(receiver), (_: ArkTextPeer) => { - receiver.setTextOptions(content,value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textArea.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textArea.ts index 1845a607caadb83600e72f08dd413663bce64bd3..9d6c390f3323c4d62d40eb1dfac88b8106083198 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textArea.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textArea.ts @@ -1049,6 +1049,9 @@ export type Callback_EnterKeyType_Void = (enterKey: EnterKeyType) => void; export type Callback_String_PasteEvent_Void = (value: string, event: PasteEvent) => void; export type Callback_ResourceStr_Void = (text: ResourceStr) => void; export interface TextAreaAttribute extends CommonMethod { + setTextAreaOptions(value?: TextAreaOptions): this { + return this + } placeholderColor(value: ResourceColor | undefined): this placeholderFont(value: Font | undefined): this enterKeyType(value: EnterKeyType | undefined): this @@ -1169,6 +1172,9 @@ export class ArkTextAreaStyle extends ArkCommonMethodStyle implements TextAreaAt stopBackPress_value?: boolean | undefined onWillChange_value?: ((parameter: EditableTextChangeValue) => boolean) | undefined keyboardAppearance_value?: KeyboardAppearance | undefined + public setTextAreaOptions(value?: TextAreaOptions): this { + return this + } public placeholderColor(value: ResourceColor | undefined): this { return this } @@ -1871,10 +1877,9 @@ export class ArkTextAreaComponent extends ArkCommonMethodComponent implements Te } } /** @memo */ -export function TextArea( +export function TextAreaImpl( /** @memo */ style: ((attributes: TextAreaAttribute) => void) | undefined, - value?: TextAreaOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -1882,10 +1887,8 @@ export function TextArea( return new ArkTextAreaComponent() }) NodeAttach((): ArkTextAreaPeer => ArkTextAreaPeer.create(receiver), (_: ArkTextAreaPeer) => { - receiver.setTextAreaOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class TextAreaControllerInternal { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textClock.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textClock.ts index ae83aeaae47da63c69409073ad31ddfd18a60b05..ad58fd36c3a3a981538ecd8ba24d96c0b3f38023 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textClock.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textClock.ts @@ -304,6 +304,9 @@ export interface TextClockOptions { } export type TextClockInterface = (options?: TextClockOptions) => TextClockAttribute; export interface TextClockAttribute extends CommonMethod { + setTextClockOptions(options?: TextClockOptions): this { + return this + } format(value: string | undefined): this onDateChange(value: ((index: number) => void) | undefined): this fontColor(value: ResourceColor | undefined): this @@ -328,6 +331,9 @@ export class ArkTextClockStyle extends ArkCommonMethodStyle implements TextClock fontFeature_value?: string | undefined contentModifier_value?: ContentModifier | undefined dateTimeOptions_value?: DateTimeOptions | undefined + public setTextClockOptions(options?: TextClockOptions): this { + return this + } public format(value: string | undefined): this { return this } @@ -469,10 +475,9 @@ export class ArkTextClockComponent extends ArkCommonMethodComponent implements T } } /** @memo */ -export function TextClock( +export function TextClockImpl( /** @memo */ style: ((attributes: TextClockAttribute) => void) | undefined, - options?: TextClockOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -480,9 +485,7 @@ export function TextClock( return new ArkTextClockComponent() }) NodeAttach((): ArkTextClockPeer => ArkTextClockPeer.create(receiver), (_: ArkTextClockPeer) => { - receiver.setTextClockOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textInput.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textInput.ts index 775b7a2a945c6ce5f6534f69bac6a879bf480aac..52d3a0b623d4254d706b5d0117ffb8417a78fe93 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textInput.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textInput.ts @@ -1376,6 +1376,9 @@ export type OnTextSelectionChangeCallback = (selectionStart: number, selectionEn export type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; export type OnPasteCallback = (content: string, event: PasteEvent) => void; export interface TextInputAttribute extends CommonMethod { + setTextInputOptions(value?: TextInputOptions): this { + return this + } type(value: InputType | undefined): this contentType(value: ContentType | undefined): this placeholderColor(value: ResourceColor | undefined): this @@ -1520,6 +1523,9 @@ export class ArkTextInputStyle extends ArkCommonMethodStyle implements TextInput stopBackPress_value?: boolean | undefined onWillChange_value?: ((parameter: EditableTextChangeValue) => boolean) | undefined keyboardAppearance_value?: KeyboardAppearance | undefined + public setTextInputOptions(value?: TextInputOptions): this { + return this + } public type(value: InputType | undefined): this { return this } @@ -2435,10 +2441,9 @@ export class ArkTextInputComponent extends ArkCommonMethodComponent implements T } } /** @memo */ -export function TextInput( +export function TextInputImpl( /** @memo */ style: ((attributes: TextInputAttribute) => void) | undefined, - value?: TextInputOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -2446,10 +2451,8 @@ export function TextInput( return new ArkTextInputComponent() }) NodeAttach((): ArkTextInputPeer => ArkTextInputPeer.create(receiver), (_: ArkTextInputPeer) => { - receiver.setTextInputOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } export class TextInputControllerInternal { diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textPicker.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textPicker.ts index e8596d816c1f23f9fed8c9fa969d1219fb28aba5..7e4e21c4dec7cc5651c5f0a2a03afef93cad0c2a 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textPicker.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textPicker.ts @@ -487,6 +487,9 @@ export type Type_TextPickerAttribute_onChange_callback = (value: string | Array< export type Callback_Union_Number_Array_Number_Void = (selected: number | Array) => void; export type Callback_Union_String_Array_String_Void = (value: string | Array) => void; export interface TextPickerAttribute extends CommonMethod { + setTextPickerOptions(options?: TextPickerOptions): this { + return this + } defaultPickerItemHeight(value: number | string | undefined): this canLoop(value: boolean | undefined): this disappearTextStyle(value: PickerTextStyle | undefined): this @@ -525,6 +528,9 @@ export class ArkTextPickerStyle extends ArkCommonMethodStyle implements TextPick gradientHeight_value?: Dimension | undefined enableHapticFeedback_value?: boolean | undefined digitalCrownSensitivity_value?: CrownSensitivity | undefined + public setTextPickerOptions(options?: TextPickerOptions): this { + return this + } public defaultPickerItemHeight(value: number | string | undefined): this { return this } @@ -880,10 +886,9 @@ export class ArkTextPickerComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function TextPicker( +export function TextPickerImpl( /** @memo */ style: ((attributes: TextPickerAttribute) => void) | undefined, - options?: TextPickerOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -891,9 +896,7 @@ export function TextPicker( return new ArkTextPickerComponent() }) NodeAttach((): ArkTextPickerPeer => ArkTextPickerPeer.create(receiver), (_: ArkTextPickerPeer) => { - receiver.setTextPickerOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textTimer.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textTimer.ts index 5950d28dfef73dfa92bfa84bc6371f657c67dfd7..3ef62b24cd9a20fe4cebefaf8dc9b491aa769300 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textTimer.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/textTimer.ts @@ -289,6 +289,9 @@ export interface TextTimerOptions { } export type TextTimerInterface = (options?: TextTimerOptions) => TextTimerAttribute; export interface TextTimerAttribute extends CommonMethod { + setTextTimerOptions(options?: TextTimerOptions): this { + return this + } format(value: string | undefined): this fontColor(value: ResourceColor | undefined): this fontSize(value: Length | undefined): this @@ -309,6 +312,9 @@ export class ArkTextTimerStyle extends ArkCommonMethodStyle implements TextTimer onTimer_value?: ((utc: int64,elapsedTime: int64) => void) | undefined textShadow_value?: ShadowOptions | Array | undefined contentModifier_value?: ContentModifier | undefined + public setTextTimerOptions(options?: TextTimerOptions): this { + return this + } public format(value: string | undefined): this { return this } @@ -428,10 +434,9 @@ export class ArkTextTimerComponent extends ArkCommonMethodComponent implements T } } /** @memo */ -export function TextTimer( +export function TextTimerImpl( /** @memo */ style: ((attributes: TextTimerAttribute) => void) | undefined, - options?: TextTimerOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -439,9 +444,7 @@ export function TextTimer( return new ArkTextTimerComponent() }) NodeAttach((): ArkTextTimerPeer => ArkTextTimerPeer.create(receiver), (_: ArkTextTimerPeer) => { - receiver.setTextTimerOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/timePicker.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/timePicker.ts index f7ef7d20e52987cad07d8a10d86388baa9f1f85f..38500eb03551bd2982da0f3a80f7ba7ba4e305b0 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/timePicker.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/timePicker.ts @@ -330,6 +330,9 @@ export type TimePickerInterface = (options?: TimePickerOptions) => TimePickerAtt export type OnTimePickerChangeCallback = (result: TimePickerResult) => void; export type Callback_TimePickerResult_Void = (value: TimePickerResult) => void; export interface TimePickerAttribute extends CommonMethod { + setTimePickerOptions(options?: TimePickerOptions): this { + return this + } useMilitaryTime(value: boolean | undefined): this loop(value: boolean | undefined): this disappearTextStyle(value: PickerTextStyle | undefined): this @@ -355,6 +358,9 @@ export class ArkTimePickerStyle extends ArkCommonMethodStyle implements TimePick enableHapticFeedback_value?: boolean | undefined digitalCrownSensitivity_value?: CrownSensitivity | undefined enableCascade_value?: boolean | undefined + public setTimePickerOptions(options?: TimePickerOptions): this { + return this + } public useMilitaryTime(value: boolean | undefined): this { return this } @@ -622,10 +628,9 @@ export class ArkTimePickerComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function TimePicker( +export function TimePickerImpl( /** @memo */ style: ((attributes: TimePickerAttribute) => void) | undefined, - options?: TimePickerOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -633,9 +638,7 @@ export function TimePicker( return new ArkTimePickerComponent() }) NodeAttach((): ArkTimePickerPeer => ArkTimePickerPeer.create(receiver), (_: ArkTimePickerPeer) => { - receiver.setTimePickerOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/toggle.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/toggle.ts index 8a56529622734394e4328ad59870b0db06bf4d51..923525afab3c6667611bc62442aa791acc14e649 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/toggle.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/toggle.ts @@ -288,6 +288,9 @@ export interface ToggleOptions { } export type ToggleInterface = (options: ToggleOptions) => ToggleAttribute; export interface ToggleAttribute extends CommonMethod { + setToggleOptions(options: ToggleOptions): this { + return this + } onChange(value: ((isVisible: boolean) => void) | undefined): this contentModifier(value: ContentModifier | undefined): this selectedColor(value: ResourceColor | undefined): this @@ -301,6 +304,9 @@ export class ArkToggleStyle extends ArkCommonMethodStyle implements ToggleAttrib selectedColor_value?: ResourceColor | undefined switchPointColor_value?: ResourceColor | undefined switchStyle_value?: SwitchStyle | undefined + public setToggleOptions(options: ToggleOptions): this { + return this + } public onChange(value: ((isVisible: boolean) => void) | undefined): this { return this } @@ -528,45 +534,18 @@ export class ArkToggleComponent extends ArkCommonMethodComponent implements Togg } } /** @memo */ -export function Toggle( +export function ToggleImpl( /** @memo */ style: ((attributes: ToggleAttribute) => void) | undefined, - options: ToggleOptions, /** @memo */ content_?: (() => void) | undefined, ): void { - if (options.type == ToggleType.SWITCH) { - const receiver = remember(() => { - return new ArkToggleComponent() - }) - - NodeAttach((): ArkTogglePeer => ArkTogglePeer.create(receiver), (_: ArkTogglePeer) => { - receiver.setToggleOptions(options) - style?.(receiver) - content_?.() - receiver.applyAttributesFinish() - }) - } else if (options.type === ToggleType.BUTTON) { - const receiver = remember(() => { - return new ArkToggleButtonComponent() - }) - - NodeAttach((): ArkToggleButtonPeer => ArkToggleButtonPeer.create(receiver), (_: ArkToggleButtonPeer) => { - receiver.setToggleOptions(options) - style?.(receiver) - content_?.() - receiver.applyAttributesFinish() - }) - } else if (options.type == ToggleType.CHECKBOX) { - const receiver = remember(() => { - return new ArkToggleCheckboxComponent() - }) - - NodeAttach((): ArkToggleCheckboxPeer => ArkToggleCheckboxPeer.create(receiver), (_: ArkToggleCheckboxPeer) => { - receiver.setToggleOptions(options) - style?.(receiver) - content_?.() - receiver.applyAttributesFinish() - }) - } + const receiver = remember(() => { + return new ArkToggleComponent() + }) + + NodeAttach((): ArkTogglePeer => ArkTogglePeer.create(receiver), (_: ArkTogglePeer) => { + style?.(receiver) + content_?.() + }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/uiExtensionComponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/uiExtensionComponent.ts index 924f96f952e4838fe4500cc13d7a937afefccf08..38652e0d6477b3013b43a0bb7b038bf8428ada17 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/uiExtensionComponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/uiExtensionComponent.ts @@ -297,6 +297,9 @@ export interface UIExtensionOptions { export type Callback_UIExtensionProxy_Void = (parameter: UIExtensionProxy) => void; export type UIExtensionComponentInterface = (want: Want, options?: UIExtensionOptions) => UIExtensionComponentAttribute; export interface UIExtensionComponentAttribute extends CommonMethod { + setUIExtensionComponentOptions(want: Want, options?: UIExtensionOptions): this { + return this + } onRemoteReady(value: ((parameter: UIExtensionProxy) => void) | undefined): this onReceive(value: ((parameter: Map) => void) | undefined): this onResult(value: ((parameter: Literal_Number_code__want) => void) | undefined): this @@ -313,6 +316,9 @@ export class ArkUIExtensionComponentStyle extends ArkCommonMethodStyle implement onError_value?: ErrorCallback | undefined onTerminated_value?: ((parameter: TerminationInfo) => void) | undefined onDrawReady_value?: (() => void) | undefined + public setUIExtensionComponentOptions(want: Want, options?: UIExtensionOptions): this { + return this + } public onRemoteReady(value: ((parameter: UIExtensionProxy) => void) | undefined): this { return this } @@ -417,10 +423,9 @@ export class ArkUIExtensionComponentComponent extends ArkCommonMethodComponent i } } /** @memo */ -export function UIExtensionComponent( +export function UIExtensionComponentImpl( /** @memo */ style: ((attributes: UIExtensionComponentAttribute) => void) | undefined, - want: Want, options?: UIExtensionOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -428,9 +433,7 @@ export function UIExtensionComponent( return new ArkUIExtensionComponentComponent() }) NodeAttach((): ArkUIExtensionComponentPeer => ArkUIExtensionComponentPeer.create(receiver), (_: ArkUIExtensionComponentPeer) => { - receiver.setUIExtensionComponentOptions(want,options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/video.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/video.ts index 3ef206db858b9d17783477df63136757bb35642a..f729a0b163acb69c6b7f67420b3de96eb07b8e89 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/video.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/video.ts @@ -415,6 +415,9 @@ export type Callback_FullscreenInfo_Void = (parameter: FullscreenInfo) => void; export type Callback_PreparedInfo_Void = (parameter: PreparedInfo) => void; export type Callback_PlaybackInfo_Void = (parameter: PlaybackInfo) => void; export interface VideoAttribute extends CommonMethod { + setVideoOptions(value: VideoOptions): this { + return this + } muted(value: boolean | undefined): this autoPlay(value: boolean | undefined): this controls(value: boolean | undefined): this @@ -456,6 +459,9 @@ export class ArkVideoStyle extends ArkCommonMethodStyle implements VideoAttribut analyzerConfig_value?: ImageAnalyzerConfig | undefined surfaceBackgroundColor_value?: ColorMetrics | undefined enableShortcutKey_value?: boolean | undefined + public setVideoOptions(value: VideoOptions): this { + return this + } public muted(value: boolean | undefined): this { return this } @@ -688,10 +694,9 @@ export class ArkVideoComponent extends ArkCommonMethodComponent implements Video } } /** @memo */ -export function Video( +export function VideoImpl( /** @memo */ style: ((attributes: VideoAttribute) => void) | undefined, - value: VideoOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -699,9 +704,7 @@ export function Video( return new ArkVideoComponent() }) NodeAttach((): ArkVideoPeer => ArkVideoPeer.create(receiver), (_: ArkVideoPeer) => { - receiver.setVideoOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/waterFlow.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/waterFlow.ts index b4e539857a291ede150d9203a8d53ed1d666f669..b470bdc1be73ce27b3e358941b99f69af92fbf05 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/waterFlow.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/waterFlow.ts @@ -308,6 +308,9 @@ export interface WaterFlowOptions { } export type WaterFlowInterface = (options?: WaterFlowOptions) => WaterFlowAttribute; export interface WaterFlowAttribute extends ScrollableCommonMethod { + setWaterFlowOptions(options?: WaterFlowOptions): this { + return this + } columnsTemplate(value: string | undefined): this itemConstraintSize(value: ConstraintSizeOptions | undefined): this rowsTemplate(value: string | undefined): this @@ -343,6 +346,9 @@ export class ArkWaterFlowStyle extends ArkScrollableCommonMethodStyle implements onScrollIndex_value?: ((first: number,last: number) => void) | undefined onWillScroll_value?: OnWillScrollCallback | undefined onDidScroll_value?: OnScrollCallback | undefined + public setWaterFlowOptions(options?: WaterFlowOptions): this { + return this + } public columnsTemplate(value: string | undefined): this { return this } @@ -565,10 +571,9 @@ export class ArkWaterFlowComponent extends ArkScrollableCommonMethodComponent im } } /** @memo */ -export function WaterFlow( +export function WaterFlowImpl( /** @memo */ style: ((attributes: WaterFlowAttribute) => void) | undefined, - options?: WaterFlowOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -576,9 +581,7 @@ export function WaterFlow( return new ArkWaterFlowComponent() }) NodeAttach((): ArkWaterFlowPeer => ArkWaterFlowPeer.create(receiver), (_: ArkWaterFlowPeer) => { - receiver.setWaterFlowOptions(options) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/web.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/web.ts index 3fa5dc351bd0569f378810278ef6f85ea887eab9..ba78c8cef935d9e3a3a69bc1a712b7d53d678a9d 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/web.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/web.ts @@ -3670,6 +3670,9 @@ export type Callback_OnOverScrollEvent_Void = (parameter: OnOverScrollEvent) => export type Callback_NativeEmbedDataInfo_Void = (event: NativeEmbedDataInfo) => void; export type Callback_NativeEmbedTouchInfo_Void = (event: NativeEmbedTouchInfo) => void; export interface WebAttribute extends CommonMethod { + setWebOptions(value: WebOptions): this { + return this + } javaScriptAccess(value: boolean | undefined): this fileAccess(value: boolean | undefined): this onlineImageAccess(value: boolean | undefined): this @@ -3924,6 +3927,9 @@ export class ArkWebStyle extends ArkCommonMethodStyle implements WebAttribute { runJavaScriptOnDocumentEnd_value?: Array | undefined runJavaScriptOnHeadEnd_value?: Array | undefined nativeEmbedOptions_value?: EmbedOptions + public setWebOptions(value: WebOptions): this { + return this + } public javaScriptAccess(value: boolean | undefined): this { return this } @@ -5372,10 +5378,9 @@ export class ArkWebComponent extends ArkCommonMethodComponent implements WebAttr } } /** @memo */ -export function Web( +export function WebImpl( /** @memo */ style: ((attributes: WebAttribute) => void) | undefined, - value: WebOptions, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -5383,9 +5388,7 @@ export function Web( return new ArkWebComponent() }) NodeAttach((): ArkWebPeer => ArkWebPeer.create(receiver), (_: ArkWebPeer) => { - receiver.setWebOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/windowScene.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/windowScene.ts index 0d6171a27885e0d1d21b932c39b59303cfde9f86..08885627a59d6fc84ad167e0137768cfd45f9898 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/windowScene.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/windowScene.ts @@ -64,9 +64,15 @@ export class ArkWindowScenePeer extends ArkCommonMethodPeer { } export type WindowSceneInterface = (persistentId: number) => WindowSceneAttribute; export interface WindowSceneAttribute extends CommonMethod { + setWindowSceneOptions(persistentId: number): this { + return this + } attractionEffect(destination: Position | undefined, fraction: number | undefined): this } export class ArkWindowSceneStyle extends ArkCommonMethodStyle implements WindowSceneAttribute { + public setWindowSceneOptions(persistentId: number): this { + return this + } public attractionEffect(destination: Position | undefined, fraction: number | undefined): this { return this } @@ -99,10 +105,9 @@ export class ArkWindowSceneComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function WindowScene( +export function WindowSceneImpl( /** @memo */ style: ((attributes: WindowSceneAttribute) => void) | undefined, - persistentId: number, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -110,9 +115,7 @@ export function WindowScene( return new ArkWindowSceneComponent() }) NodeAttach((): ArkWindowScenePeer => ArkWindowScenePeer.create(receiver), (_: ArkWindowScenePeer) => { - receiver.setWindowSceneOptions(persistentId) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/xcomponent.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/xcomponent.ts index 4aa333572858fea933017e07b54aece03cff6873..9a2d88237be3af8bee73e5d98885fc3a5aa5a000 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/xcomponent.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/component/xcomponent.ts @@ -337,6 +337,9 @@ export interface XComponentParameters { export type OnNativeLoadCallback = (event?: Object) => void; export type Callback_String_SurfaceRect_Void = (surfaceId: string, rect: SurfaceRect) => void; export interface XComponentAttribute extends CommonMethod { + setXComponentOptions(value: XComponentParameters | XComponentOptions | NativeXComponentParameters): this { + return this + } onLoad(value: VoidCallback | undefined): this onDestroy(value: VoidCallback | undefined): this enableAnalyzer(value: boolean | undefined): this @@ -352,6 +355,9 @@ export class ArkXComponentStyle extends ArkCommonMethodStyle implements XCompone enableSecure_value?: boolean | undefined hdrBrightness_value?: number | undefined enableTransparentLayer_value?: boolean | undefined + public setXComponentOptions(value: XComponentParameters | XComponentOptions | NativeXComponentParameters): this { + return this + } public onLoad(value: VoidCallback | undefined): this { return this } @@ -441,10 +447,9 @@ export class ArkXComponentComponent extends ArkCommonMethodComponent implements } } /** @memo */ -export function XComponent( +export function XComponentImpl( /** @memo */ style: ((attributes: XComponentAttribute) => void) | undefined, - value: XComponentParameters | XComponentOptions | NativeXComponentParameters, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -452,9 +457,7 @@ export function XComponent( return new ArkXComponentComponent() }) NodeAttach((): ArkXComponentPeer => ArkXComponentPeer.create(receiver), (_: ArkXComponentPeer) => { - receiver.setXComponentOptions(value) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/contentSlot.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/contentSlot.ts index fa141bd93541c83b01dcf6d409befbc793f7626f..2767e4882d4fd64e3bd6ffee425c0517cb3d6536 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/contentSlot.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/contentSlot.ts @@ -47,6 +47,12 @@ export class ArkContentSlotPeer extends PeerNode { } } +export class ArkContentSlotStyle extends ArkCommonMethodStyle implements ContentSlotAttribute { + public setContentSlotOptions(content?: Content): this { + return this + } +} + export class ArkContentSlotComponent extends ComponentBase implements ContentSlotAttribute { getPeer(): ArkContentSlotPeer { return (this.peer as ArkContentSlotPeer) @@ -66,10 +72,9 @@ export class ArkContentSlotComponent extends ComponentBase implements ContentSlo } } /** @memo */ -export function ContentSlot( +export function ContentSlotImpl( /** @memo */ style: ((attributes: ContentSlotAttribute) => void) | undefined, - content?: Content, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -77,9 +82,7 @@ export function ContentSlot( return new ArkContentSlotComponent() }) NodeAttach((): ArkContentSlotPeer => ArkContentSlotPeer.create(receiver), (_: ArkContentSlotPeer) => { - receiver.setContentSlotOptions(content) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/nodeContainer.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/nodeContainer.ts index 5c00fa95d0dcc087ba61986f8794e158c20f8a7f..f6336eff6474934fcbaf8294982dd9b8d13ae0c0 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/nodeContainer.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/nodeContainer.ts @@ -105,8 +105,14 @@ export class ArkNodeContainerPeer extends ArkCommonMethodPeer { } export type NodeContainerInterface = (controller: NodeController) => NodeContainerAttribute; export interface NodeContainerAttribute extends CommonMethod { + setNodeContainerOptions(controller: NodeController): this { + return this + } } export class ArkNodeContainerStyle extends ArkCommonMethodStyle implements NodeContainerAttribute { + public setNodeContainerOptions(controller: NodeController): this { + return this + } } export class ArkNodeContainerComponent extends ArkCommonMethodComponent implements NodeContainerAttribute { private controller: NodeController | null = null; @@ -169,10 +175,9 @@ export class ArkNodeContainerComponent extends ArkCommonMethodComponent implemen } } /** @memo */ -export function NodeContainer( +export function NodeContainerImpl( /** @memo */ style: ((attributes: NodeContainerAttribute) => void) | undefined, - controller: NodeController, /** @memo */ content_?: (() => void) | undefined, ): void { @@ -183,9 +188,7 @@ export function NodeContainer( return new ArkNodeContainerComponent(uiContext!) }) NodeAttach((): ArkNodeContainerPeer => ArkNodeContainerPeer.create(receiver), (_: ArkNodeContainerPeer) => { - receiver.setNodeContainerOptions(controller) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) } diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/particle.ts b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/particle.ts index 6c3f6923b442b88b609757c23f10d460f476e710..723b57795a739b862dd4e76edba4470a17fba8dc 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/particle.ts +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala-arkts/arkui-ohos/src/handwritten/component/particle.ts @@ -66,6 +66,9 @@ export interface DisturbanceFieldOptions { } export interface ParticleAttribute extends CommonMethod { + setParticleOptions(particles: Particles): this { + return this + } disturbanceFields(value: Array | undefined): this emitter(value: Array | undefined): this /** @memo */ @@ -297,6 +300,9 @@ export class ArkParticleStyle extends ArkCommonMethodStyle implements ParticleAt disturbanceFields_value?: Array | undefined emitter_value?: Array | undefined attributeModifier_value?: AttributeModifier | AttributeModifier | undefined + public setParticleOptions(particles: Particles): this { + return this + } public disturbanceFields(value: Array | undefined): this { return this } @@ -350,10 +356,9 @@ export class ArkParticleComponent extends ArkCommonMethodComponent implements Pa } } /** @memo */ -export function Particle( +export function ParticleImpl( /** @memo */ style: ((attributes: ParticleAttribute) => void) | undefined, - particles: Particles, /** @memo */ content_?: (() => void) | undefined, ) { @@ -361,9 +366,7 @@ export function Particle( return new ArkParticleComponent() }) NodeAttach((): ArkParticlePeer => ArkParticlePeer.create(receiver), (_: ArkParticlePeer) => { - receiver.setParticleOptions(particles) style?.(receiver) content_?.() - receiver.applyAttributesFinish() }) }