From e577742a018cc04082350461b05f18c031990010 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 13:57:57 +0000 Subject: [PATCH 01/16] add ArkNavDestination.ts. Signed-off-by: Sokolova Irina --- arkoala-arkts/arkui/src/ArkNavDestination.ts | 277 +++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 arkoala-arkts/arkui/src/ArkNavDestination.ts diff --git a/arkoala-arkts/arkui/src/ArkNavDestination.ts b/arkoala-arkts/arkui/src/ArkNavDestination.ts new file mode 100644 index 000000000..3f66de7e6 --- /dev/null +++ b/arkoala-arkts/arkui/src/ArkNavDestination.ts @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! + +import { int32 } from "@koalaui/common" +import { KStringPtr, KBoolean } from "@koalaui/interop" +import { NodeAttach, remember } from "@koalaui/runtime" +import { runtimeType, RuntimeType, isResource, isInstanceOf } from "../generated/peers/SerializerBase" +import { ComponentBase } from "../generated/ComponentBase" +import { TypeChecker } from "#components" +import { ArkCommonMethodComponent } from "../generated/ArkCommon" +import { ArkNavDestinationPeer } from "./peers/ArkNavDestinationPeer" +import { UseEventsProperties } from "../generated/use_properties" +import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "../generated/ArkCommonInterfaces" +import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "../generated/ArkNavDestinationInterfaces" +import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "../generated/SyntheticDeclarations" +import { ResourceStr } from "../generated/ArkUnitsInterfaces" +import { PixelMap } from "../generated/ArkArkui-externalInterfaces" +import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "../generated/ArkNavigationInterfaces" +import { NavDestinationContext } from "../generated/ArkNavDestinationContextMaterialized" +import { Scroller } from "../generated/ArkScrollerMaterialized" +import { Resource } from "../generated/ArkResourceInterfaces" +/** @memo:stable */ +export class ArkNavDestinationComponent extends ArkCommonMethodComponent { + getPeer(): ArkNavDestinationPeer { + return (this.peer as ArkNavDestinationPeer) + } + /** @memo */ + setNavDestinationOptions(): this { + if (this.checkPriority("setNavDestinationOptions")) { + this.getPeer()?.setNavDestinationOptionsAttribute() + return this + } + return this + } + /** @memo */ + hideTitleBar(hide: boolean, animated?: boolean): this { + if (this.checkPriority("hideTitleBar")) { + const hide_type = runtimeType(hide) + const animated_type = runtimeType(animated) + if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.BOOLEAN == animated_type)))) { + const hide_casted = hide as (boolean) + const animated_casted = animated as (boolean) + this.getPeer()?.hideTitleBar1Attribute(hide_casted, animated_casted) + return this + } + if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.UNDEFINED == animated_type)))) { + const hide_casted = hide as (boolean) + this.getPeer()?.hideTitleBar0Attribute(hide_casted) + return this + } + throw new Error("Can not select appropriate overload") + } + return this + } + /** @memo */ + onShown(value: Function0): this { + if (this.checkPriority("onShown")) { + const value_casted = value as (Function0) + this.getPeer()?.onShownAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onHidden(value: Function0): this { + if (this.checkPriority("onHidden")) { + const value_casted = value as (Function0) + this.getPeer()?.onHiddenAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onBackPressed(value: Function0): this { + if (this.checkPriority("onBackPressed")) { + const value_casted = value as (Function0) + this.getPeer()?.onBackPressedAttribute(value_casted) + return this + } + return this + } + /** @memo */ + mode(value: NavDestinationMode): this { + if (this.checkPriority("mode")) { + const value_casted = value as (NavDestinationMode) + this.getPeer()?.modeAttribute(value_casted) + return this + } + return this + } + /** @memo */ + backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): this { + if (this.checkPriority("backButtonIcon")) { + const value_casted = value as (ResourceStr | PixelMap | SymbolGlyphModifier) + this.getPeer()?.backButtonIconAttribute(value_casted) + return this + } + return this + } + /** @memo */ + menus(value: Array | CustomBuilder): this { + if (this.checkPriority("menus")) { + const value_casted = value as (Array | CustomBuilder) + this.getPeer()?.menusAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onReady(value: Function1): this { + if (this.checkPriority("onReady")) { + const value_casted = value as (Function1) + this.getPeer()?.onReadyAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillAppear(value: Function0): this { + if (this.checkPriority("onWillAppear")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillAppearAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillDisappear(value: Function0): this { + if (this.checkPriority("onWillDisappear")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillDisappearAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillShow(value: Function0): this { + if (this.checkPriority("onWillShow")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillShowAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillHide(value: Function0): this { + if (this.checkPriority("onWillHide")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillHideAttribute(value_casted) + return this + } + return this + } + /** @memo */ + systemBarStyle(value?: SystemBarStyle): this { + if (this.checkPriority("systemBarStyle")) { + const value_casted = value as (SystemBarStyle | undefined) + this.getPeer()?.systemBarStyleAttribute(value_casted) + return this + } + return this + } + /** @memo */ + recoverable(value?: boolean): this { + if (this.checkPriority("recoverable")) { + const value_casted = value as (boolean | undefined) + this.getPeer()?.recoverableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + systemTransition(value: NavigationSystemTransitionType): this { + if (this.checkPriority("systemTransition")) { + const value_casted = value as (NavigationSystemTransitionType) + this.getPeer()?.systemTransitionAttribute(value_casted) + return this + } + return this + } + /** @memo */ + bindToScrollable(value: Array): this { + if (this.checkPriority("bindToScrollable")) { + const value_casted = value as (Array) + this.getPeer()?.bindToScrollableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + bindToNestedScrollable(value: Array): this { + if (this.checkPriority("bindToNestedScrollable")) { + const value_casted = value as (Array) + this.getPeer()?.bindToNestedScrollableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): this { + if (this.checkPriority("title")) { + const value_casted = value as (string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource) + const options_casted = options as (NavigationTitleOptions | undefined) + this.getPeer()?.titleAttribute(value_casted, options_casted) + return this + } + return this + } + /** @memo */ + toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): this { + if (this.checkPriority("toolbarConfiguration")) { + const toolbarParam_casted = toolbarParam as (Array | CustomBuilder) + const options_casted = options as (NavigationToolbarOptions | undefined) + this.getPeer()?.toolbarConfigurationAttribute(toolbarParam_casted, options_casted) + return this + } + return this + } + /** @memo */ + hideToolBar(hide: boolean, animated?: boolean): this { + if (this.checkPriority("hideToolBar")) { + const hide_casted = hide as (boolean) + const animated_casted = animated as (boolean | undefined) + this.getPeer()?.hideToolBarAttribute(hide_casted, animated_casted) + return this + } + return this + } + /** @memo */ + ignoreLayoutSafeArea(types?: Array, edges?: Array): this { + if (this.checkPriority("ignoreLayoutSafeArea")) { + const types_casted = types as (Array | undefined) + const edges_casted = edges as (Array | undefined) + this.getPeer()?.ignoreLayoutSafeAreaAttribute(types_casted, edges_casted) + return this + } + return this + } + public applyAttributesFinish(): void { + // we calls this function outside of class, so need to make it public + super.applyAttributesFinish() + } +} + +/** @memo */ +export function ArkNavDestination( + /** @memo */ + style: ((attributes: ArkNavDestinationComponent) => void) | undefined, + /** @memo */ + content_: (() => void) | undefined, + +) { + const receiver = remember(() => { + return new ArkNavDestinationComponent() + }) + NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { + receiver.setNavDestinationOptions() + style?.(receiver) + content_?.() + receiver.applyAttributesFinish() + }) +} -- Gitee From 75952528db1d063768f8a0c39f46551a0f329f97 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 13:58:40 +0000 Subject: [PATCH 02/16] add ArkNavPatchInfo.ts Signed-off-by: Sokolova Irina --- arkoala-arkts/arkui/src/ArkNavPatchInfo.ts | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 arkoala-arkts/arkui/src/ArkNavPatchInfo.ts diff --git a/arkoala-arkts/arkui/src/ArkNavPatchInfo.ts b/arkoala-arkts/arkui/src/ArkNavPatchInfo.ts new file mode 100644 index 000000000..fa1b45767 --- /dev/null +++ b/arkoala-arkts/arkui/src/ArkNavPatchInfo.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { PopInfo } from "../generated/ArkNavigationInterfaces" + +/** + * Represents navigation path information. + */ +export class NavPathInfo { + /** + * Creates an instance of NavPathInfo. + * @param name - The name of the navigation path. + * @param param - Additional parameters associated with the path. + * @param onPop - Optional callback invoked when the path is popped. + * @param isEntry - Indicates if this path is an entry point. + */ + constructor( + public name: string, + public param?: unknown, + public onPop?: (parameter: PopInfo) => void, + public isEntry: boolean = false + ) { + // Initialization logic can be added here if needed + } + + /** + * Handles the pop action for the navigation path. + * @param parameter - Information about the pop event. + */ + handlePop(parameter: PopInfo): void { + if (this.onPop) { + this.onPop(parameter) + } + } + + /** + * Checks if the navigation path is an entry point. + * @returns True if it's an entry path, otherwise false. + */ + isEntryPoint(): boolean { + return this.isEntry + } +} -- Gitee From 4e2e4b659210f9f5f82d4555f0f89fa8d91ffa35 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 13:59:07 +0000 Subject: [PATCH 03/16] add ArkNavPatchStack.ts. Signed-off-by: Sokolova Irina --- arkoala-arkts/arkui/src/ArkNavPatchStack.ts | 159 ++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 arkoala-arkts/arkui/src/ArkNavPatchStack.ts diff --git a/arkoala-arkts/arkui/src/ArkNavPatchStack.ts b/arkoala-arkts/arkui/src/ArkNavPatchStack.ts new file mode 100644 index 000000000..e13d8624c --- /dev/null +++ b/arkoala-arkts/arkui/src/ArkNavPatchStack.ts @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { NavPathInfo, NavigationOptions, PopInfo, NavigationInterception } from "../generated/ArkNavigationInterfaces"; + +/** + * Represents a stack of navigation paths. + */ +export class NavPathStack { + private stack: NavPathInfo[] = [] + private parentStack?: NavPathStack + private interception?: NavigationInterception + private animationsDisabled: boolean = false + + /** + * Creates an instance of NavPathStack. + */ + constructor() { + // Initialization logic can be added here if needed + } + + /** + * Pushes a navigation path onto the stack. + * @param info - The navigation path information. + * @param animated - Optional flag to animate the transition. + */ + pushPath(info: NavPathInfo, animated: boolean = true): void { + if (!this.animationsDisabled && animated) { + // Perform animation logic + } + this.stack.push(info) + } + + /** + * Pushes a destination onto the stack asynchronously. + * @param info - The navigation path information. + * @param animated - Optional flag to animate the transition. + * @returns A promise that resolves when the destination is pushed. + */ + pushDestination(info: NavPathInfo, animated: boolean = true): Promise { + return new Promise((resolve) => { + this.pushPath(info, animated) + resolve() + }) + } + + /** + * Replaces the current navigation path with a new one. + * @param info - The new navigation path information. + * @param animated - Optional flag to animate the transition. + */ + replacePath(info: NavPathInfo, animated: boolean = true): void { + if (this.stack.length > 0) { + this.popToIndex(this.stack.length - 1, {}, animated) + } + this.pushPath(info, animated) + } + + /** + * Pops the stack to the specified index with an optional result. + * @param index - The index to pop to. + * @param result - The result to pass back. + * @param animated - Optional flag to animate the transition. + */ + popToIndex(index: number, result: Object, animated: boolean = true): void { + if (index < 0 || index >= this.stack.length) { + throw new Error("Index out of bounds") + } + + while (this.stack.length > index + 1) { + const popped = this.stack.pop() + if (popped && popped.onPop) { + // Создаем объект PopInfo с корректным NavPathInfo + const popInfo: PopInfo = { + info: popped, // `popped` уже должен быть типа NavPathInfo + result: result, + } + + // Передаем объект popInfo в onPop + popped.onPop(popInfo) + } + } + if (!this.animationsDisabled && animated) { + // Perform animation logic + } + } + + /** + * Clears all navigation paths from the stack. + * @param animated - Optional flag to animate the clearing. + */ + clear(animated: boolean = true): void { + while (this.stack.length > 0) { + const popped = this.stack.pop() + if (popped && popped.onPop) { + const popInfo: PopInfo = { + info: popped, + result: {}, + } + popped.onPop(popInfo) + } + } + if (!this.animationsDisabled && animated) { + // Perform animation logic + } + } + + /** + * Retrieves the names of all navigation paths in the stack. + * @returns An array of path names. + */ + getAllPathName(): string[] { + return this.stack.map((path) => path.name) + } + + /** + * Retrieves the size of the stack. + * @returns The number of paths in the stack. + */ + size(): number { + return this.stack.length + } + + /** + * Disables or enables animations for navigation transitions. + * @param value - True to disable animations, false to enable. + */ + disableAnimation(value: boolean): void { + this.animationsDisabled = value + } + + /** + * Sets the navigation interception handler. + * @param interception - The navigation interception handler. + */ + setInterception(interception: NavigationInterception): void { + this.interception = interception + } + + /** + * Retrieves the parent navigation path stack, if any. + * @returns The parent NavPathStack or undefined if there is no parent. + */ + getParent(): NavPathStack | undefined { + return this.parentStack + } +} -- Gitee From 6452515bfba5b30b25d3993cec31f509457a3fb2 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:00:14 +0000 Subject: [PATCH 04/16] Remove arkoala-arkts/arkui/src/ArkNavPatchInfo.ts --- arkoala-arkts/arkui/src/ArkNavPatchInfo.ts | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 arkoala-arkts/arkui/src/ArkNavPatchInfo.ts diff --git a/arkoala-arkts/arkui/src/ArkNavPatchInfo.ts b/arkoala-arkts/arkui/src/ArkNavPatchInfo.ts deleted file mode 100644 index fa1b45767..000000000 --- a/arkoala-arkts/arkui/src/ArkNavPatchInfo.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { PopInfo } from "../generated/ArkNavigationInterfaces" - -/** - * Represents navigation path information. - */ -export class NavPathInfo { - /** - * Creates an instance of NavPathInfo. - * @param name - The name of the navigation path. - * @param param - Additional parameters associated with the path. - * @param onPop - Optional callback invoked when the path is popped. - * @param isEntry - Indicates if this path is an entry point. - */ - constructor( - public name: string, - public param?: unknown, - public onPop?: (parameter: PopInfo) => void, - public isEntry: boolean = false - ) { - // Initialization logic can be added here if needed - } - - /** - * Handles the pop action for the navigation path. - * @param parameter - Information about the pop event. - */ - handlePop(parameter: PopInfo): void { - if (this.onPop) { - this.onPop(parameter) - } - } - - /** - * Checks if the navigation path is an entry point. - * @returns True if it's an entry path, otherwise false. - */ - isEntryPoint(): boolean { - return this.isEntry - } -} -- Gitee From 02f94a0654e279e0f1b02f71af97e6e214c297ed Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:00:23 +0000 Subject: [PATCH 05/16] Remove arkoala-arkts/arkui/src/ArkNavPatchStack.ts --- arkoala-arkts/arkui/src/ArkNavPatchStack.ts | 159 -------------------- 1 file changed, 159 deletions(-) delete mode 100644 arkoala-arkts/arkui/src/ArkNavPatchStack.ts diff --git a/arkoala-arkts/arkui/src/ArkNavPatchStack.ts b/arkoala-arkts/arkui/src/ArkNavPatchStack.ts deleted file mode 100644 index e13d8624c..000000000 --- a/arkoala-arkts/arkui/src/ArkNavPatchStack.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { NavPathInfo, NavigationOptions, PopInfo, NavigationInterception } from "../generated/ArkNavigationInterfaces"; - -/** - * Represents a stack of navigation paths. - */ -export class NavPathStack { - private stack: NavPathInfo[] = [] - private parentStack?: NavPathStack - private interception?: NavigationInterception - private animationsDisabled: boolean = false - - /** - * Creates an instance of NavPathStack. - */ - constructor() { - // Initialization logic can be added here if needed - } - - /** - * Pushes a navigation path onto the stack. - * @param info - The navigation path information. - * @param animated - Optional flag to animate the transition. - */ - pushPath(info: NavPathInfo, animated: boolean = true): void { - if (!this.animationsDisabled && animated) { - // Perform animation logic - } - this.stack.push(info) - } - - /** - * Pushes a destination onto the stack asynchronously. - * @param info - The navigation path information. - * @param animated - Optional flag to animate the transition. - * @returns A promise that resolves when the destination is pushed. - */ - pushDestination(info: NavPathInfo, animated: boolean = true): Promise { - return new Promise((resolve) => { - this.pushPath(info, animated) - resolve() - }) - } - - /** - * Replaces the current navigation path with a new one. - * @param info - The new navigation path information. - * @param animated - Optional flag to animate the transition. - */ - replacePath(info: NavPathInfo, animated: boolean = true): void { - if (this.stack.length > 0) { - this.popToIndex(this.stack.length - 1, {}, animated) - } - this.pushPath(info, animated) - } - - /** - * Pops the stack to the specified index with an optional result. - * @param index - The index to pop to. - * @param result - The result to pass back. - * @param animated - Optional flag to animate the transition. - */ - popToIndex(index: number, result: Object, animated: boolean = true): void { - if (index < 0 || index >= this.stack.length) { - throw new Error("Index out of bounds") - } - - while (this.stack.length > index + 1) { - const popped = this.stack.pop() - if (popped && popped.onPop) { - // Создаем объект PopInfo с корректным NavPathInfo - const popInfo: PopInfo = { - info: popped, // `popped` уже должен быть типа NavPathInfo - result: result, - } - - // Передаем объект popInfo в onPop - popped.onPop(popInfo) - } - } - if (!this.animationsDisabled && animated) { - // Perform animation logic - } - } - - /** - * Clears all navigation paths from the stack. - * @param animated - Optional flag to animate the clearing. - */ - clear(animated: boolean = true): void { - while (this.stack.length > 0) { - const popped = this.stack.pop() - if (popped && popped.onPop) { - const popInfo: PopInfo = { - info: popped, - result: {}, - } - popped.onPop(popInfo) - } - } - if (!this.animationsDisabled && animated) { - // Perform animation logic - } - } - - /** - * Retrieves the names of all navigation paths in the stack. - * @returns An array of path names. - */ - getAllPathName(): string[] { - return this.stack.map((path) => path.name) - } - - /** - * Retrieves the size of the stack. - * @returns The number of paths in the stack. - */ - size(): number { - return this.stack.length - } - - /** - * Disables or enables animations for navigation transitions. - * @param value - True to disable animations, false to enable. - */ - disableAnimation(value: boolean): void { - this.animationsDisabled = value - } - - /** - * Sets the navigation interception handler. - * @param interception - The navigation interception handler. - */ - setInterception(interception: NavigationInterception): void { - this.interception = interception - } - - /** - * Retrieves the parent navigation path stack, if any. - * @returns The parent NavPathStack or undefined if there is no parent. - */ - getParent(): NavPathStack | undefined { - return this.parentStack - } -} -- Gitee From ab984f287c858c0263ae2c97d44259b255a866ba Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:00:35 +0000 Subject: [PATCH 06/16] Remove arkoala-arkts/arkui/src/ArkNavDestination.ts --- arkoala-arkts/arkui/src/ArkNavDestination.ts | 277 ------------------- 1 file changed, 277 deletions(-) delete mode 100644 arkoala-arkts/arkui/src/ArkNavDestination.ts diff --git a/arkoala-arkts/arkui/src/ArkNavDestination.ts b/arkoala-arkts/arkui/src/ArkNavDestination.ts deleted file mode 100644 index 3f66de7e6..000000000 --- a/arkoala-arkts/arkui/src/ArkNavDestination.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { int32 } from "@koalaui/common" -import { KStringPtr, KBoolean } from "@koalaui/interop" -import { NodeAttach, remember } from "@koalaui/runtime" -import { runtimeType, RuntimeType, isResource, isInstanceOf } from "../generated/peers/SerializerBase" -import { ComponentBase } from "../generated/ComponentBase" -import { TypeChecker } from "#components" -import { ArkCommonMethodComponent } from "../generated/ArkCommon" -import { ArkNavDestinationPeer } from "./peers/ArkNavDestinationPeer" -import { UseEventsProperties } from "../generated/use_properties" -import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "../generated/ArkCommonInterfaces" -import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "../generated/ArkNavDestinationInterfaces" -import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "../generated/SyntheticDeclarations" -import { ResourceStr } from "../generated/ArkUnitsInterfaces" -import { PixelMap } from "../generated/ArkArkui-externalInterfaces" -import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "../generated/ArkNavigationInterfaces" -import { NavDestinationContext } from "../generated/ArkNavDestinationContextMaterialized" -import { Scroller } from "../generated/ArkScrollerMaterialized" -import { Resource } from "../generated/ArkResourceInterfaces" -/** @memo:stable */ -export class ArkNavDestinationComponent extends ArkCommonMethodComponent { - getPeer(): ArkNavDestinationPeer { - return (this.peer as ArkNavDestinationPeer) - } - /** @memo */ - setNavDestinationOptions(): this { - if (this.checkPriority("setNavDestinationOptions")) { - this.getPeer()?.setNavDestinationOptionsAttribute() - return this - } - return this - } - /** @memo */ - hideTitleBar(hide: boolean, animated?: boolean): this { - if (this.checkPriority("hideTitleBar")) { - const hide_type = runtimeType(hide) - const animated_type = runtimeType(animated) - if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.BOOLEAN == animated_type)))) { - const hide_casted = hide as (boolean) - const animated_casted = animated as (boolean) - this.getPeer()?.hideTitleBar1Attribute(hide_casted, animated_casted) - return this - } - if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.UNDEFINED == animated_type)))) { - const hide_casted = hide as (boolean) - this.getPeer()?.hideTitleBar0Attribute(hide_casted) - return this - } - throw new Error("Can not select appropriate overload") - } - return this - } - /** @memo */ - onShown(value: Function0): this { - if (this.checkPriority("onShown")) { - const value_casted = value as (Function0) - this.getPeer()?.onShownAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onHidden(value: Function0): this { - if (this.checkPriority("onHidden")) { - const value_casted = value as (Function0) - this.getPeer()?.onHiddenAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onBackPressed(value: Function0): this { - if (this.checkPriority("onBackPressed")) { - const value_casted = value as (Function0) - this.getPeer()?.onBackPressedAttribute(value_casted) - return this - } - return this - } - /** @memo */ - mode(value: NavDestinationMode): this { - if (this.checkPriority("mode")) { - const value_casted = value as (NavDestinationMode) - this.getPeer()?.modeAttribute(value_casted) - return this - } - return this - } - /** @memo */ - backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): this { - if (this.checkPriority("backButtonIcon")) { - const value_casted = value as (ResourceStr | PixelMap | SymbolGlyphModifier) - this.getPeer()?.backButtonIconAttribute(value_casted) - return this - } - return this - } - /** @memo */ - menus(value: Array | CustomBuilder): this { - if (this.checkPriority("menus")) { - const value_casted = value as (Array | CustomBuilder) - this.getPeer()?.menusAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onReady(value: Function1): this { - if (this.checkPriority("onReady")) { - const value_casted = value as (Function1) - this.getPeer()?.onReadyAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillAppear(value: Function0): this { - if (this.checkPriority("onWillAppear")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillAppearAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillDisappear(value: Function0): this { - if (this.checkPriority("onWillDisappear")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillDisappearAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillShow(value: Function0): this { - if (this.checkPriority("onWillShow")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillShowAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillHide(value: Function0): this { - if (this.checkPriority("onWillHide")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillHideAttribute(value_casted) - return this - } - return this - } - /** @memo */ - systemBarStyle(value?: SystemBarStyle): this { - if (this.checkPriority("systemBarStyle")) { - const value_casted = value as (SystemBarStyle | undefined) - this.getPeer()?.systemBarStyleAttribute(value_casted) - return this - } - return this - } - /** @memo */ - recoverable(value?: boolean): this { - if (this.checkPriority("recoverable")) { - const value_casted = value as (boolean | undefined) - this.getPeer()?.recoverableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - systemTransition(value: NavigationSystemTransitionType): this { - if (this.checkPriority("systemTransition")) { - const value_casted = value as (NavigationSystemTransitionType) - this.getPeer()?.systemTransitionAttribute(value_casted) - return this - } - return this - } - /** @memo */ - bindToScrollable(value: Array): this { - if (this.checkPriority("bindToScrollable")) { - const value_casted = value as (Array) - this.getPeer()?.bindToScrollableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - bindToNestedScrollable(value: Array): this { - if (this.checkPriority("bindToNestedScrollable")) { - const value_casted = value as (Array) - this.getPeer()?.bindToNestedScrollableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): this { - if (this.checkPriority("title")) { - const value_casted = value as (string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource) - const options_casted = options as (NavigationTitleOptions | undefined) - this.getPeer()?.titleAttribute(value_casted, options_casted) - return this - } - return this - } - /** @memo */ - toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): this { - if (this.checkPriority("toolbarConfiguration")) { - const toolbarParam_casted = toolbarParam as (Array | CustomBuilder) - const options_casted = options as (NavigationToolbarOptions | undefined) - this.getPeer()?.toolbarConfigurationAttribute(toolbarParam_casted, options_casted) - return this - } - return this - } - /** @memo */ - hideToolBar(hide: boolean, animated?: boolean): this { - if (this.checkPriority("hideToolBar")) { - const hide_casted = hide as (boolean) - const animated_casted = animated as (boolean | undefined) - this.getPeer()?.hideToolBarAttribute(hide_casted, animated_casted) - return this - } - return this - } - /** @memo */ - ignoreLayoutSafeArea(types?: Array, edges?: Array): this { - if (this.checkPriority("ignoreLayoutSafeArea")) { - const types_casted = types as (Array | undefined) - const edges_casted = edges as (Array | undefined) - this.getPeer()?.ignoreLayoutSafeAreaAttribute(types_casted, edges_casted) - return this - } - return this - } - public applyAttributesFinish(): void { - // we calls this function outside of class, so need to make it public - super.applyAttributesFinish() - } -} - -/** @memo */ -export function ArkNavDestination( - /** @memo */ - style: ((attributes: ArkNavDestinationComponent) => void) | undefined, - /** @memo */ - content_: (() => void) | undefined, - -) { - const receiver = remember(() => { - return new ArkNavDestinationComponent() - }) - NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { - receiver.setNavDestinationOptions() - style?.(receiver) - content_?.() - receiver.applyAttributesFinish() - }) -} -- Gitee From 9667bb3766d714e32af7af91683a7e4840b395de Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:00:57 +0000 Subject: [PATCH 07/16] add arkoala-arkts/arkui/src/ArkNavDestination.ts. Signed-off-by: Sokolova Irina --- arkoala-arkts/arkui/src/ArkNavDestination.ts | 277 +++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 arkoala-arkts/arkui/src/ArkNavDestination.ts diff --git a/arkoala-arkts/arkui/src/ArkNavDestination.ts b/arkoala-arkts/arkui/src/ArkNavDestination.ts new file mode 100644 index 000000000..3f66de7e6 --- /dev/null +++ b/arkoala-arkts/arkui/src/ArkNavDestination.ts @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! + +import { int32 } from "@koalaui/common" +import { KStringPtr, KBoolean } from "@koalaui/interop" +import { NodeAttach, remember } from "@koalaui/runtime" +import { runtimeType, RuntimeType, isResource, isInstanceOf } from "../generated/peers/SerializerBase" +import { ComponentBase } from "../generated/ComponentBase" +import { TypeChecker } from "#components" +import { ArkCommonMethodComponent } from "../generated/ArkCommon" +import { ArkNavDestinationPeer } from "./peers/ArkNavDestinationPeer" +import { UseEventsProperties } from "../generated/use_properties" +import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "../generated/ArkCommonInterfaces" +import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "../generated/ArkNavDestinationInterfaces" +import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "../generated/SyntheticDeclarations" +import { ResourceStr } from "../generated/ArkUnitsInterfaces" +import { PixelMap } from "../generated/ArkArkui-externalInterfaces" +import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "../generated/ArkNavigationInterfaces" +import { NavDestinationContext } from "../generated/ArkNavDestinationContextMaterialized" +import { Scroller } from "../generated/ArkScrollerMaterialized" +import { Resource } from "../generated/ArkResourceInterfaces" +/** @memo:stable */ +export class ArkNavDestinationComponent extends ArkCommonMethodComponent { + getPeer(): ArkNavDestinationPeer { + return (this.peer as ArkNavDestinationPeer) + } + /** @memo */ + setNavDestinationOptions(): this { + if (this.checkPriority("setNavDestinationOptions")) { + this.getPeer()?.setNavDestinationOptionsAttribute() + return this + } + return this + } + /** @memo */ + hideTitleBar(hide: boolean, animated?: boolean): this { + if (this.checkPriority("hideTitleBar")) { + const hide_type = runtimeType(hide) + const animated_type = runtimeType(animated) + if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.BOOLEAN == animated_type)))) { + const hide_casted = hide as (boolean) + const animated_casted = animated as (boolean) + this.getPeer()?.hideTitleBar1Attribute(hide_casted, animated_casted) + return this + } + if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.UNDEFINED == animated_type)))) { + const hide_casted = hide as (boolean) + this.getPeer()?.hideTitleBar0Attribute(hide_casted) + return this + } + throw new Error("Can not select appropriate overload") + } + return this + } + /** @memo */ + onShown(value: Function0): this { + if (this.checkPriority("onShown")) { + const value_casted = value as (Function0) + this.getPeer()?.onShownAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onHidden(value: Function0): this { + if (this.checkPriority("onHidden")) { + const value_casted = value as (Function0) + this.getPeer()?.onHiddenAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onBackPressed(value: Function0): this { + if (this.checkPriority("onBackPressed")) { + const value_casted = value as (Function0) + this.getPeer()?.onBackPressedAttribute(value_casted) + return this + } + return this + } + /** @memo */ + mode(value: NavDestinationMode): this { + if (this.checkPriority("mode")) { + const value_casted = value as (NavDestinationMode) + this.getPeer()?.modeAttribute(value_casted) + return this + } + return this + } + /** @memo */ + backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): this { + if (this.checkPriority("backButtonIcon")) { + const value_casted = value as (ResourceStr | PixelMap | SymbolGlyphModifier) + this.getPeer()?.backButtonIconAttribute(value_casted) + return this + } + return this + } + /** @memo */ + menus(value: Array | CustomBuilder): this { + if (this.checkPriority("menus")) { + const value_casted = value as (Array | CustomBuilder) + this.getPeer()?.menusAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onReady(value: Function1): this { + if (this.checkPriority("onReady")) { + const value_casted = value as (Function1) + this.getPeer()?.onReadyAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillAppear(value: Function0): this { + if (this.checkPriority("onWillAppear")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillAppearAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillDisappear(value: Function0): this { + if (this.checkPriority("onWillDisappear")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillDisappearAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillShow(value: Function0): this { + if (this.checkPriority("onWillShow")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillShowAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillHide(value: Function0): this { + if (this.checkPriority("onWillHide")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillHideAttribute(value_casted) + return this + } + return this + } + /** @memo */ + systemBarStyle(value?: SystemBarStyle): this { + if (this.checkPriority("systemBarStyle")) { + const value_casted = value as (SystemBarStyle | undefined) + this.getPeer()?.systemBarStyleAttribute(value_casted) + return this + } + return this + } + /** @memo */ + recoverable(value?: boolean): this { + if (this.checkPriority("recoverable")) { + const value_casted = value as (boolean | undefined) + this.getPeer()?.recoverableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + systemTransition(value: NavigationSystemTransitionType): this { + if (this.checkPriority("systemTransition")) { + const value_casted = value as (NavigationSystemTransitionType) + this.getPeer()?.systemTransitionAttribute(value_casted) + return this + } + return this + } + /** @memo */ + bindToScrollable(value: Array): this { + if (this.checkPriority("bindToScrollable")) { + const value_casted = value as (Array) + this.getPeer()?.bindToScrollableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + bindToNestedScrollable(value: Array): this { + if (this.checkPriority("bindToNestedScrollable")) { + const value_casted = value as (Array) + this.getPeer()?.bindToNestedScrollableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): this { + if (this.checkPriority("title")) { + const value_casted = value as (string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource) + const options_casted = options as (NavigationTitleOptions | undefined) + this.getPeer()?.titleAttribute(value_casted, options_casted) + return this + } + return this + } + /** @memo */ + toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): this { + if (this.checkPriority("toolbarConfiguration")) { + const toolbarParam_casted = toolbarParam as (Array | CustomBuilder) + const options_casted = options as (NavigationToolbarOptions | undefined) + this.getPeer()?.toolbarConfigurationAttribute(toolbarParam_casted, options_casted) + return this + } + return this + } + /** @memo */ + hideToolBar(hide: boolean, animated?: boolean): this { + if (this.checkPriority("hideToolBar")) { + const hide_casted = hide as (boolean) + const animated_casted = animated as (boolean | undefined) + this.getPeer()?.hideToolBarAttribute(hide_casted, animated_casted) + return this + } + return this + } + /** @memo */ + ignoreLayoutSafeArea(types?: Array, edges?: Array): this { + if (this.checkPriority("ignoreLayoutSafeArea")) { + const types_casted = types as (Array | undefined) + const edges_casted = edges as (Array | undefined) + this.getPeer()?.ignoreLayoutSafeAreaAttribute(types_casted, edges_casted) + return this + } + return this + } + public applyAttributesFinish(): void { + // we calls this function outside of class, so need to make it public + super.applyAttributesFinish() + } +} + +/** @memo */ +export function ArkNavDestination( + /** @memo */ + style: ((attributes: ArkNavDestinationComponent) => void) | undefined, + /** @memo */ + content_: (() => void) | undefined, + +) { + const receiver = remember(() => { + return new ArkNavDestinationComponent() + }) + NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { + receiver.setNavDestinationOptions() + style?.(receiver) + content_?.() + receiver.applyAttributesFinish() + }) +} -- Gitee From 1a7d6dcac0ca38069f9fc3ca2d73118cb97860bf Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:01:31 +0000 Subject: [PATCH 08/16] add arkoala-arkts/arkui/src/handwritten/ArkNavPatchInfo.ts. Signed-off-by: Sokolova Irina --- .../arkui/src/handwritten/ArkNavPatchInfo.ts | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 arkoala-arkts/arkui/src/handwritten/ArkNavPatchInfo.ts diff --git a/arkoala-arkts/arkui/src/handwritten/ArkNavPatchInfo.ts b/arkoala-arkts/arkui/src/handwritten/ArkNavPatchInfo.ts new file mode 100644 index 000000000..fa1b45767 --- /dev/null +++ b/arkoala-arkts/arkui/src/handwritten/ArkNavPatchInfo.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { PopInfo } from "../generated/ArkNavigationInterfaces" + +/** + * Represents navigation path information. + */ +export class NavPathInfo { + /** + * Creates an instance of NavPathInfo. + * @param name - The name of the navigation path. + * @param param - Additional parameters associated with the path. + * @param onPop - Optional callback invoked when the path is popped. + * @param isEntry - Indicates if this path is an entry point. + */ + constructor( + public name: string, + public param?: unknown, + public onPop?: (parameter: PopInfo) => void, + public isEntry: boolean = false + ) { + // Initialization logic can be added here if needed + } + + /** + * Handles the pop action for the navigation path. + * @param parameter - Information about the pop event. + */ + handlePop(parameter: PopInfo): void { + if (this.onPop) { + this.onPop(parameter) + } + } + + /** + * Checks if the navigation path is an entry point. + * @returns True if it's an entry path, otherwise false. + */ + isEntryPoint(): boolean { + return this.isEntry + } +} -- Gitee From eb9b495a529ab751c1c754427bd19422ede14633 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:01:58 +0000 Subject: [PATCH 09/16] add arkoala-arkts/arkui/src/handwritten/ArkNavPatchStack.ts. Signed-off-by: Sokolova Irina --- .../arkui/src/handwritten/ArkNavPatchStack.ts | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 arkoala-arkts/arkui/src/handwritten/ArkNavPatchStack.ts diff --git a/arkoala-arkts/arkui/src/handwritten/ArkNavPatchStack.ts b/arkoala-arkts/arkui/src/handwritten/ArkNavPatchStack.ts new file mode 100644 index 000000000..e13d8624c --- /dev/null +++ b/arkoala-arkts/arkui/src/handwritten/ArkNavPatchStack.ts @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { NavPathInfo, NavigationOptions, PopInfo, NavigationInterception } from "../generated/ArkNavigationInterfaces"; + +/** + * Represents a stack of navigation paths. + */ +export class NavPathStack { + private stack: NavPathInfo[] = [] + private parentStack?: NavPathStack + private interception?: NavigationInterception + private animationsDisabled: boolean = false + + /** + * Creates an instance of NavPathStack. + */ + constructor() { + // Initialization logic can be added here if needed + } + + /** + * Pushes a navigation path onto the stack. + * @param info - The navigation path information. + * @param animated - Optional flag to animate the transition. + */ + pushPath(info: NavPathInfo, animated: boolean = true): void { + if (!this.animationsDisabled && animated) { + // Perform animation logic + } + this.stack.push(info) + } + + /** + * Pushes a destination onto the stack asynchronously. + * @param info - The navigation path information. + * @param animated - Optional flag to animate the transition. + * @returns A promise that resolves when the destination is pushed. + */ + pushDestination(info: NavPathInfo, animated: boolean = true): Promise { + return new Promise((resolve) => { + this.pushPath(info, animated) + resolve() + }) + } + + /** + * Replaces the current navigation path with a new one. + * @param info - The new navigation path information. + * @param animated - Optional flag to animate the transition. + */ + replacePath(info: NavPathInfo, animated: boolean = true): void { + if (this.stack.length > 0) { + this.popToIndex(this.stack.length - 1, {}, animated) + } + this.pushPath(info, animated) + } + + /** + * Pops the stack to the specified index with an optional result. + * @param index - The index to pop to. + * @param result - The result to pass back. + * @param animated - Optional flag to animate the transition. + */ + popToIndex(index: number, result: Object, animated: boolean = true): void { + if (index < 0 || index >= this.stack.length) { + throw new Error("Index out of bounds") + } + + while (this.stack.length > index + 1) { + const popped = this.stack.pop() + if (popped && popped.onPop) { + // Создаем объект PopInfo с корректным NavPathInfo + const popInfo: PopInfo = { + info: popped, // `popped` уже должен быть типа NavPathInfo + result: result, + } + + // Передаем объект popInfo в onPop + popped.onPop(popInfo) + } + } + if (!this.animationsDisabled && animated) { + // Perform animation logic + } + } + + /** + * Clears all navigation paths from the stack. + * @param animated - Optional flag to animate the clearing. + */ + clear(animated: boolean = true): void { + while (this.stack.length > 0) { + const popped = this.stack.pop() + if (popped && popped.onPop) { + const popInfo: PopInfo = { + info: popped, + result: {}, + } + popped.onPop(popInfo) + } + } + if (!this.animationsDisabled && animated) { + // Perform animation logic + } + } + + /** + * Retrieves the names of all navigation paths in the stack. + * @returns An array of path names. + */ + getAllPathName(): string[] { + return this.stack.map((path) => path.name) + } + + /** + * Retrieves the size of the stack. + * @returns The number of paths in the stack. + */ + size(): number { + return this.stack.length + } + + /** + * Disables or enables animations for navigation transitions. + * @param value - True to disable animations, false to enable. + */ + disableAnimation(value: boolean): void { + this.animationsDisabled = value + } + + /** + * Sets the navigation interception handler. + * @param interception - The navigation interception handler. + */ + setInterception(interception: NavigationInterception): void { + this.interception = interception + } + + /** + * Retrieves the parent navigation path stack, if any. + * @returns The parent NavPathStack or undefined if there is no parent. + */ + getParent(): NavPathStack | undefined { + return this.parentStack + } +} -- Gitee From 022ad08c9e8d3002aad11e38aadeb93b038fa28c Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:02:19 +0000 Subject: [PATCH 10/16] Create peers --- arkoala-arkts/arkui/src/handwritten/peers/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 arkoala-arkts/arkui/src/handwritten/peers/.keep diff --git a/arkoala-arkts/arkui/src/handwritten/peers/.keep b/arkoala-arkts/arkui/src/handwritten/peers/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 4ec475868de5db60e25434586985f21403ec2c8a Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:02:45 +0000 Subject: [PATCH 11/16] add ArkNavDestinationPeer.ts. Signed-off-by: Sokolova Irina --- .../arkui/src/handwritten/peers/.keep | 0 .../peers/ArkNavDestinationPeer.ts | 351 ++++++++++++++++++ 2 files changed, 351 insertions(+) delete mode 100644 arkoala-arkts/arkui/src/handwritten/peers/.keep create mode 100644 arkoala-arkts/arkui/src/handwritten/peers/ArkNavDestinationPeer.ts diff --git a/arkoala-arkts/arkui/src/handwritten/peers/.keep b/arkoala-arkts/arkui/src/handwritten/peers/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/arkoala-arkts/arkui/src/handwritten/peers/ArkNavDestinationPeer.ts b/arkoala-arkts/arkui/src/handwritten/peers/ArkNavDestinationPeer.ts new file mode 100644 index 000000000..6affb7dfd --- /dev/null +++ b/arkoala-arkts/arkui/src/handwritten/peers/ArkNavDestinationPeer.ts @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! + +import { int32 } from "@koalaui/common" +import { nullptr, KPointer, KInt, KBoolean, KStringPtr } from "@koalaui/interop" +import { isResource, isInstanceOf, runtimeType, RuntimeType } from "../../generated/peers/SerializerBase" +import { Serializer } from "../../generated/peers/Serializer" +import { ArkUINodeType } from "../../generated/peers/ArkUINodeType" +import { ComponentBase } from "../../generated/ComponentBase" +import { PeerNode } from "../../generated/PeerNode" +import { NativeModule } from "#components" +import { ArkCommonMethodPeer, ArkCommonMethodAttributes } from "../../generated/peers/ArkCommonPeer" +import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "../../generated/ArkCommonInterfaces" +import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "../../generated/ArkNavDestinationInterfaces" +import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void, Callback_Any } from "../../generated/SyntheticDeclarations" +import { ResourceStr } from "../../generated/ArkUnitsInterfaces" +import { PixelMap } from "../../generated/ArkArkui-externalInterfaces" +import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "../../generated/ArkNavigationInterfaces" +import { NavDestinationContext } from "../../generated/ArkNavDestinationContextMaterialized" +import { Scroller } from "../../generated/ArkScrollerMaterialized" +import { Resource } from "../../generated/ArkResourceInterfaces" +import { GestureName, GestureComponent } from "../../generated/shared/generated-utils" +import { CallbackKind } from "../../generated/peers/CallbackKind" +import { TypeChecker } from "#components" +import { registerCallback } from "../../generated/peers/SerializerBase" +import { wrapCallback } from "@koalaui/interop" +import { MaterializedBase } from "../../generated/MaterializedBase" +import { DotIndicator } from "../../generated/ArkDotIndicatorBuilder" +import { DigitIndicator } from "../../generated/ArkDigitIndicatorBuilder" +import { SubTabBarStyle } from "../../generated/ArkSubTabBarStyleBuilder" +import { BottomTabBarStyle } from "../../generated/ArkBottomTabBarStyleBuilder" +export class ArkNavDestinationPeer extends ArkCommonMethodPeer { + protected constructor(peerPtr: KPointer, name: string = "", flags: int32 = 0) { + super(peerPtr, name, flags) + } + public static create(component?: ComponentBase, flags: int32 = 0): ArkNavDestinationPeer { + /** + TODO: Edit PeersPrinter and USE this line + const _peerPtr = NativeModule._NavDestination_construct(PeerNode.nextId(), flags) + */ + const nodeType = ArkUINodeType.CustomNode // !!!!делаем вместо ArkUINodeType.NavDestination + const _peerPtr = NativeModule._CreateNode(nodeType as int32, PeerNode.nextId(), flags) + const _peer = new ArkNavDestinationPeer(_peerPtr, "NavDestination", flags) + component?.setPeer(_peer) + return _peer + } + setNavDestinationOptionsAttribute(): void { + NativeModule._NavDestinationInterface_setNavDestinationOptions(this.peer.ptr) + } + hideTitleBar0Attribute(value: boolean): void { + NativeModule._NavDestinationAttribute_hideTitleBar0(this.peer.ptr, value ? 1 : 0) + } + hideTitleBar1Attribute(hide: boolean, animated: boolean): void { + NativeModule._NavDestinationAttribute_hideTitleBar1(this.peer.ptr, hide ? 1 : 0, animated ? 1 : 0) + } + onShownAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onShown(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onHiddenAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onHidden(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onBackPressedAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onBackPressed(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + modeAttribute(value: NavDestinationMode): void { + NativeModule._NavDestinationAttribute_mode(this.peer.ptr, (value.value as int32)) + } + backButtonIconAttribute(value: ResourceStr | PixelMap | SymbolGlyphModifier): void { + const thisSerializer : Serializer = Serializer.hold() + let value_type : int32 = RuntimeType.UNDEFINED + value_type = runtimeType(value) + if (((RuntimeType.STRING == value_type)) || ((RuntimeType.OBJECT == value_type))) { + thisSerializer.writeInt8(0 as int32) + const value_0 = value as ResourceStr + let value_0_type : int32 = RuntimeType.UNDEFINED + value_0_type = runtimeType(value_0) + if (((RuntimeType.STRING == value_0_type))) { + thisSerializer.writeInt8(0 as int32) + const value_0_0 = value_0 as string + thisSerializer.writeString(value_0_0) + } + else if (((RuntimeType.OBJECT == value_0_type))) { + thisSerializer.writeInt8(1 as int32) + const value_0_1 = value_0 as Resource + thisSerializer.writeResource(value_0_1) + } + } + else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isPixelMap(value, false, false))) { + thisSerializer.writeInt8(1 as int32) + const value_1 = value as PixelMap + thisSerializer.writePixelMap(value_1) + } + else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isSymbolGlyphModifier(value, false))) { + thisSerializer.writeInt8(2 as int32) + const value_2 = value as SymbolGlyphModifier + thisSerializer.writeSymbolGlyphModifier(value_2) + } + NativeModule._NavDestinationAttribute_backButtonIcon(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + menusAttribute(value: Array | CustomBuilder): void { + const thisSerializer : Serializer = Serializer.hold() + let value_type : int32 = RuntimeType.UNDEFINED + value_type = runtimeType(value) + if (((RuntimeType.OBJECT == value_type))) { + thisSerializer.writeInt8(0 as int32) + const value_0 = value as Array + thisSerializer.writeInt32(value_0.length as int32) + for (let i = 0; i < value_0.length; i++) { + const value_0_element = value_0[i] + thisSerializer.writeNavigationMenuItem(value_0_element) + } + } + else if (((RuntimeType.FUNCTION == value_type))) { + thisSerializer.writeInt8(1 as int32) + const value_1 = value as CustomBuilder + thisSerializer.holdAndWriteCallback(value_1) + } + NativeModule._NavDestinationAttribute_menus(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onReadyAttribute(value: Function1): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onReady(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onWillAppearAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onWillAppear(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onWillDisappearAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onWillDisappear(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onWillShowAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onWillShow(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + onWillHideAttribute(value: Function0): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.holdAndWriteCallback(value) + NativeModule._NavDestinationAttribute_onWillHide(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + systemBarStyleAttribute(value?: SystemBarStyle): void { + const thisSerializer : Serializer = Serializer.hold() + let value_type : int32 = RuntimeType.UNDEFINED + value_type = runtimeType(value) + thisSerializer.writeInt8(value_type as int32) + if ((RuntimeType.UNDEFINED) != (value_type)) { + const value_value = value! + thisSerializer.writeSystemBarStyle(value_value) + } + NativeModule._NavDestinationAttribute_systemBarStyle(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + recoverableAttribute(value?: boolean): void { + const thisSerializer : Serializer = Serializer.hold() + let value_type : int32 = RuntimeType.UNDEFINED + value_type = runtimeType(value) + thisSerializer.writeInt8(value_type as int32) + if ((RuntimeType.UNDEFINED) != (value_type)) { + const value_value = value! + thisSerializer.writeBoolean(value_value) + } + NativeModule._NavDestinationAttribute_recoverable(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + systemTransitionAttribute(value: NavigationSystemTransitionType): void { + NativeModule._NavDestinationAttribute_systemTransition(this.peer.ptr, (value.value as int32)) + } + bindToScrollableAttribute(value: Array): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.writeInt32(value.length as int32) + for (let i = 0; i < value.length; i++) { + const value_element = value[i] + thisSerializer.writeScroller(value_element) + } + NativeModule._NavDestinationAttribute_bindToScrollable(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + bindToNestedScrollableAttribute(value: Array): void { + const thisSerializer : Serializer = Serializer.hold() + thisSerializer.writeInt32(value.length as int32) + for (let i = 0; i < value.length; i++) { + const value_element = value[i] + thisSerializer.writeNestedScrollInfo(value_element) + } + NativeModule._NavDestinationAttribute_bindToNestedScrollable(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + titleAttribute(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): void { + const thisSerializer : Serializer = Serializer.hold() + let value_type : int32 = RuntimeType.UNDEFINED + value_type = runtimeType(value) + if (((RuntimeType.STRING == value_type))) { + thisSerializer.writeInt8(0 as int32) + const value_0 = value as string + thisSerializer.writeString(value_0) + } + else if (((RuntimeType.FUNCTION == value_type))) { + thisSerializer.writeInt8(1 as int32) + const value_1 = value as CustomBuilder + thisSerializer.holdAndWriteCallback(value_1) + } + else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isNavDestinationCommonTitle(value, false, false))) { + thisSerializer.writeInt8(2 as int32) + const value_2 = value as NavDestinationCommonTitle + thisSerializer.writeNavDestinationCommonTitle(value_2) + } + else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isNavDestinationCustomTitle(value, false, false))) { + thisSerializer.writeInt8(3 as int32) + const value_3 = value as NavDestinationCustomTitle + thisSerializer.writeNavDestinationCustomTitle(value_3) + } + else if (((RuntimeType.OBJECT) == (value_type)) && (isResource(value))) { + thisSerializer.writeInt8(4 as int32) + const value_4 = value as Resource + thisSerializer.writeResource(value_4) + } + let options_type : int32 = RuntimeType.UNDEFINED + options_type = runtimeType(options) + thisSerializer.writeInt8(options_type as int32) + if ((RuntimeType.UNDEFINED) != (options_type)) { + const options_value = options! + thisSerializer.writeNavigationTitleOptions(options_value) + } + NativeModule._NavDestinationAttribute_title(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + toolbarConfigurationAttribute(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): void { + const thisSerializer : Serializer = Serializer.hold() + let toolbarParam_type : int32 = RuntimeType.UNDEFINED + toolbarParam_type = runtimeType(toolbarParam) + if (((RuntimeType.OBJECT == toolbarParam_type))) { + thisSerializer.writeInt8(0 as int32) + const toolbarParam_0 = toolbarParam as Array + thisSerializer.writeInt32(toolbarParam_0.length as int32) + for (let i = 0; i < toolbarParam_0.length; i++) { + const toolbarParam_0_element = toolbarParam_0[i] + thisSerializer.writeToolbarItem(toolbarParam_0_element) + } + } + else if (((RuntimeType.FUNCTION == toolbarParam_type))) { + thisSerializer.writeInt8(1 as int32) + const toolbarParam_1 = toolbarParam as CustomBuilder + thisSerializer.holdAndWriteCallback(toolbarParam_1) + } + let options_type : int32 = RuntimeType.UNDEFINED + options_type = runtimeType(options) + thisSerializer.writeInt8(options_type as int32) + if ((RuntimeType.UNDEFINED) != (options_type)) { + const options_value = options! + thisSerializer.writeNavigationToolbarOptions(options_value) + } + NativeModule._NavDestinationAttribute_toolbarConfiguration(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + hideToolBarAttribute(hide: boolean, animated?: boolean): void { + const thisSerializer : Serializer = Serializer.hold() + let animated_type : int32 = RuntimeType.UNDEFINED + animated_type = runtimeType(animated) + thisSerializer.writeInt8(animated_type as int32) + if ((RuntimeType.UNDEFINED) != (animated_type)) { + const animated_value = animated! + thisSerializer.writeBoolean(animated_value) + } + NativeModule._NavDestinationAttribute_hideToolBar(this.peer.ptr, hide ? 1 : 0, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + ignoreLayoutSafeAreaAttribute(types?: Array, edges?: Array): void { + const thisSerializer : Serializer = Serializer.hold() + let types_type : int32 = RuntimeType.UNDEFINED + types_type = runtimeType(types) + thisSerializer.writeInt8(types_type as int32) + if ((RuntimeType.UNDEFINED) != (types_type)) { + const types_value = types! + thisSerializer.writeInt32(types_value.length as int32) + for (let i = 0; i < types_value.length; i++) { + const types_value_element = types_value[i] + thisSerializer.writeInt32(types_value_element.ordinal) + } + } + let edges_type : int32 = RuntimeType.UNDEFINED + edges_type = runtimeType(edges) + thisSerializer.writeInt8(edges_type as int32) + if ((RuntimeType.UNDEFINED) != (edges_type)) { + const edges_value = edges! + thisSerializer.writeInt32(edges_value.length as int32) + for (let i = 0; i < edges_value.length; i++) { + const edges_value_element = edges_value[i] + thisSerializer.writeInt32(edges_value_element.ordinal) + } + } + NativeModule._NavDestinationAttribute_ignoreLayoutSafeArea(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) + thisSerializer.release() + } + applyAttributes(attributes: T): void { + super.applyAttributes(attributes) + } +} +export interface ArkNavDestinationAttributes extends ArkCommonMethodAttributes { + hideTitleBar?: boolean + onShown?: Function0 + onHidden?: Function0 + onBackPressed?: Function0 + mode?: NavDestinationMode + backButtonIcon?: ResourceStr | PixelMap | SymbolGlyphModifier + menus?: Array | CustomBuilder + onReady?: Function1 + onWillAppear?: Function0 + onWillDisappear?: Function0 + onWillShow?: Function0 + onWillHide?: Function0 + systemBarStyle?: SystemBarStyle | undefined + recoverable?: boolean | undefined + systemTransition?: NavigationSystemTransitionType + bindToScrollable?: Array + bindToNestedScrollable?: Array +} -- Gitee From 014d01bf15ab6cf67be1e2cb909c32ddb60df5e7 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:03:12 +0000 Subject: [PATCH 12/16] Remove arkoala-arkts/arkui/src/ArkNavDestination.ts --- arkoala-arkts/arkui/src/ArkNavDestination.ts | 277 ------------------- 1 file changed, 277 deletions(-) delete mode 100644 arkoala-arkts/arkui/src/ArkNavDestination.ts diff --git a/arkoala-arkts/arkui/src/ArkNavDestination.ts b/arkoala-arkts/arkui/src/ArkNavDestination.ts deleted file mode 100644 index 3f66de7e6..000000000 --- a/arkoala-arkts/arkui/src/ArkNavDestination.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { int32 } from "@koalaui/common" -import { KStringPtr, KBoolean } from "@koalaui/interop" -import { NodeAttach, remember } from "@koalaui/runtime" -import { runtimeType, RuntimeType, isResource, isInstanceOf } from "../generated/peers/SerializerBase" -import { ComponentBase } from "../generated/ComponentBase" -import { TypeChecker } from "#components" -import { ArkCommonMethodComponent } from "../generated/ArkCommon" -import { ArkNavDestinationPeer } from "./peers/ArkNavDestinationPeer" -import { UseEventsProperties } from "../generated/use_properties" -import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "../generated/ArkCommonInterfaces" -import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "../generated/ArkNavDestinationInterfaces" -import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "../generated/SyntheticDeclarations" -import { ResourceStr } from "../generated/ArkUnitsInterfaces" -import { PixelMap } from "../generated/ArkArkui-externalInterfaces" -import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "../generated/ArkNavigationInterfaces" -import { NavDestinationContext } from "../generated/ArkNavDestinationContextMaterialized" -import { Scroller } from "../generated/ArkScrollerMaterialized" -import { Resource } from "../generated/ArkResourceInterfaces" -/** @memo:stable */ -export class ArkNavDestinationComponent extends ArkCommonMethodComponent { - getPeer(): ArkNavDestinationPeer { - return (this.peer as ArkNavDestinationPeer) - } - /** @memo */ - setNavDestinationOptions(): this { - if (this.checkPriority("setNavDestinationOptions")) { - this.getPeer()?.setNavDestinationOptionsAttribute() - return this - } - return this - } - /** @memo */ - hideTitleBar(hide: boolean, animated?: boolean): this { - if (this.checkPriority("hideTitleBar")) { - const hide_type = runtimeType(hide) - const animated_type = runtimeType(animated) - if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.BOOLEAN == animated_type)))) { - const hide_casted = hide as (boolean) - const animated_casted = animated as (boolean) - this.getPeer()?.hideTitleBar1Attribute(hide_casted, animated_casted) - return this - } - if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.UNDEFINED == animated_type)))) { - const hide_casted = hide as (boolean) - this.getPeer()?.hideTitleBar0Attribute(hide_casted) - return this - } - throw new Error("Can not select appropriate overload") - } - return this - } - /** @memo */ - onShown(value: Function0): this { - if (this.checkPriority("onShown")) { - const value_casted = value as (Function0) - this.getPeer()?.onShownAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onHidden(value: Function0): this { - if (this.checkPriority("onHidden")) { - const value_casted = value as (Function0) - this.getPeer()?.onHiddenAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onBackPressed(value: Function0): this { - if (this.checkPriority("onBackPressed")) { - const value_casted = value as (Function0) - this.getPeer()?.onBackPressedAttribute(value_casted) - return this - } - return this - } - /** @memo */ - mode(value: NavDestinationMode): this { - if (this.checkPriority("mode")) { - const value_casted = value as (NavDestinationMode) - this.getPeer()?.modeAttribute(value_casted) - return this - } - return this - } - /** @memo */ - backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): this { - if (this.checkPriority("backButtonIcon")) { - const value_casted = value as (ResourceStr | PixelMap | SymbolGlyphModifier) - this.getPeer()?.backButtonIconAttribute(value_casted) - return this - } - return this - } - /** @memo */ - menus(value: Array | CustomBuilder): this { - if (this.checkPriority("menus")) { - const value_casted = value as (Array | CustomBuilder) - this.getPeer()?.menusAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onReady(value: Function1): this { - if (this.checkPriority("onReady")) { - const value_casted = value as (Function1) - this.getPeer()?.onReadyAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillAppear(value: Function0): this { - if (this.checkPriority("onWillAppear")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillAppearAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillDisappear(value: Function0): this { - if (this.checkPriority("onWillDisappear")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillDisappearAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillShow(value: Function0): this { - if (this.checkPriority("onWillShow")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillShowAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillHide(value: Function0): this { - if (this.checkPriority("onWillHide")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillHideAttribute(value_casted) - return this - } - return this - } - /** @memo */ - systemBarStyle(value?: SystemBarStyle): this { - if (this.checkPriority("systemBarStyle")) { - const value_casted = value as (SystemBarStyle | undefined) - this.getPeer()?.systemBarStyleAttribute(value_casted) - return this - } - return this - } - /** @memo */ - recoverable(value?: boolean): this { - if (this.checkPriority("recoverable")) { - const value_casted = value as (boolean | undefined) - this.getPeer()?.recoverableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - systemTransition(value: NavigationSystemTransitionType): this { - if (this.checkPriority("systemTransition")) { - const value_casted = value as (NavigationSystemTransitionType) - this.getPeer()?.systemTransitionAttribute(value_casted) - return this - } - return this - } - /** @memo */ - bindToScrollable(value: Array): this { - if (this.checkPriority("bindToScrollable")) { - const value_casted = value as (Array) - this.getPeer()?.bindToScrollableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - bindToNestedScrollable(value: Array): this { - if (this.checkPriority("bindToNestedScrollable")) { - const value_casted = value as (Array) - this.getPeer()?.bindToNestedScrollableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): this { - if (this.checkPriority("title")) { - const value_casted = value as (string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource) - const options_casted = options as (NavigationTitleOptions | undefined) - this.getPeer()?.titleAttribute(value_casted, options_casted) - return this - } - return this - } - /** @memo */ - toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): this { - if (this.checkPriority("toolbarConfiguration")) { - const toolbarParam_casted = toolbarParam as (Array | CustomBuilder) - const options_casted = options as (NavigationToolbarOptions | undefined) - this.getPeer()?.toolbarConfigurationAttribute(toolbarParam_casted, options_casted) - return this - } - return this - } - /** @memo */ - hideToolBar(hide: boolean, animated?: boolean): this { - if (this.checkPriority("hideToolBar")) { - const hide_casted = hide as (boolean) - const animated_casted = animated as (boolean | undefined) - this.getPeer()?.hideToolBarAttribute(hide_casted, animated_casted) - return this - } - return this - } - /** @memo */ - ignoreLayoutSafeArea(types?: Array, edges?: Array): this { - if (this.checkPriority("ignoreLayoutSafeArea")) { - const types_casted = types as (Array | undefined) - const edges_casted = edges as (Array | undefined) - this.getPeer()?.ignoreLayoutSafeAreaAttribute(types_casted, edges_casted) - return this - } - return this - } - public applyAttributesFinish(): void { - // we calls this function outside of class, so need to make it public - super.applyAttributesFinish() - } -} - -/** @memo */ -export function ArkNavDestination( - /** @memo */ - style: ((attributes: ArkNavDestinationComponent) => void) | undefined, - /** @memo */ - content_: (() => void) | undefined, - -) { - const receiver = remember(() => { - return new ArkNavDestinationComponent() - }) - NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { - receiver.setNavDestinationOptions() - style?.(receiver) - content_?.() - receiver.applyAttributesFinish() - }) -} -- Gitee From ac9f27cd436c2a4a31e7b5c61100e90a157d8e88 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:05:05 +0000 Subject: [PATCH 13/16] add arkoala-arkts/arkui/src/handwritten/ArkNavDestination.ts. Signed-off-by: Sokolova Irina --- .../src/handwritten/ArkNavDestination.ts | 277 ++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 arkoala-arkts/arkui/src/handwritten/ArkNavDestination.ts diff --git a/arkoala-arkts/arkui/src/handwritten/ArkNavDestination.ts b/arkoala-arkts/arkui/src/handwritten/ArkNavDestination.ts new file mode 100644 index 000000000..3f66de7e6 --- /dev/null +++ b/arkoala-arkts/arkui/src/handwritten/ArkNavDestination.ts @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! + +import { int32 } from "@koalaui/common" +import { KStringPtr, KBoolean } from "@koalaui/interop" +import { NodeAttach, remember } from "@koalaui/runtime" +import { runtimeType, RuntimeType, isResource, isInstanceOf } from "../generated/peers/SerializerBase" +import { ComponentBase } from "../generated/ComponentBase" +import { TypeChecker } from "#components" +import { ArkCommonMethodComponent } from "../generated/ArkCommon" +import { ArkNavDestinationPeer } from "./peers/ArkNavDestinationPeer" +import { UseEventsProperties } from "../generated/use_properties" +import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "../generated/ArkCommonInterfaces" +import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "../generated/ArkNavDestinationInterfaces" +import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "../generated/SyntheticDeclarations" +import { ResourceStr } from "../generated/ArkUnitsInterfaces" +import { PixelMap } from "../generated/ArkArkui-externalInterfaces" +import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "../generated/ArkNavigationInterfaces" +import { NavDestinationContext } from "../generated/ArkNavDestinationContextMaterialized" +import { Scroller } from "../generated/ArkScrollerMaterialized" +import { Resource } from "../generated/ArkResourceInterfaces" +/** @memo:stable */ +export class ArkNavDestinationComponent extends ArkCommonMethodComponent { + getPeer(): ArkNavDestinationPeer { + return (this.peer as ArkNavDestinationPeer) + } + /** @memo */ + setNavDestinationOptions(): this { + if (this.checkPriority("setNavDestinationOptions")) { + this.getPeer()?.setNavDestinationOptionsAttribute() + return this + } + return this + } + /** @memo */ + hideTitleBar(hide: boolean, animated?: boolean): this { + if (this.checkPriority("hideTitleBar")) { + const hide_type = runtimeType(hide) + const animated_type = runtimeType(animated) + if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.BOOLEAN == animated_type)))) { + const hide_casted = hide as (boolean) + const animated_casted = animated as (boolean) + this.getPeer()?.hideTitleBar1Attribute(hide_casted, animated_casted) + return this + } + if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.UNDEFINED == animated_type)))) { + const hide_casted = hide as (boolean) + this.getPeer()?.hideTitleBar0Attribute(hide_casted) + return this + } + throw new Error("Can not select appropriate overload") + } + return this + } + /** @memo */ + onShown(value: Function0): this { + if (this.checkPriority("onShown")) { + const value_casted = value as (Function0) + this.getPeer()?.onShownAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onHidden(value: Function0): this { + if (this.checkPriority("onHidden")) { + const value_casted = value as (Function0) + this.getPeer()?.onHiddenAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onBackPressed(value: Function0): this { + if (this.checkPriority("onBackPressed")) { + const value_casted = value as (Function0) + this.getPeer()?.onBackPressedAttribute(value_casted) + return this + } + return this + } + /** @memo */ + mode(value: NavDestinationMode): this { + if (this.checkPriority("mode")) { + const value_casted = value as (NavDestinationMode) + this.getPeer()?.modeAttribute(value_casted) + return this + } + return this + } + /** @memo */ + backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): this { + if (this.checkPriority("backButtonIcon")) { + const value_casted = value as (ResourceStr | PixelMap | SymbolGlyphModifier) + this.getPeer()?.backButtonIconAttribute(value_casted) + return this + } + return this + } + /** @memo */ + menus(value: Array | CustomBuilder): this { + if (this.checkPriority("menus")) { + const value_casted = value as (Array | CustomBuilder) + this.getPeer()?.menusAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onReady(value: Function1): this { + if (this.checkPriority("onReady")) { + const value_casted = value as (Function1) + this.getPeer()?.onReadyAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillAppear(value: Function0): this { + if (this.checkPriority("onWillAppear")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillAppearAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillDisappear(value: Function0): this { + if (this.checkPriority("onWillDisappear")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillDisappearAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillShow(value: Function0): this { + if (this.checkPriority("onWillShow")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillShowAttribute(value_casted) + return this + } + return this + } + /** @memo */ + onWillHide(value: Function0): this { + if (this.checkPriority("onWillHide")) { + const value_casted = value as (Function0) + this.getPeer()?.onWillHideAttribute(value_casted) + return this + } + return this + } + /** @memo */ + systemBarStyle(value?: SystemBarStyle): this { + if (this.checkPriority("systemBarStyle")) { + const value_casted = value as (SystemBarStyle | undefined) + this.getPeer()?.systemBarStyleAttribute(value_casted) + return this + } + return this + } + /** @memo */ + recoverable(value?: boolean): this { + if (this.checkPriority("recoverable")) { + const value_casted = value as (boolean | undefined) + this.getPeer()?.recoverableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + systemTransition(value: NavigationSystemTransitionType): this { + if (this.checkPriority("systemTransition")) { + const value_casted = value as (NavigationSystemTransitionType) + this.getPeer()?.systemTransitionAttribute(value_casted) + return this + } + return this + } + /** @memo */ + bindToScrollable(value: Array): this { + if (this.checkPriority("bindToScrollable")) { + const value_casted = value as (Array) + this.getPeer()?.bindToScrollableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + bindToNestedScrollable(value: Array): this { + if (this.checkPriority("bindToNestedScrollable")) { + const value_casted = value as (Array) + this.getPeer()?.bindToNestedScrollableAttribute(value_casted) + return this + } + return this + } + /** @memo */ + title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): this { + if (this.checkPriority("title")) { + const value_casted = value as (string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource) + const options_casted = options as (NavigationTitleOptions | undefined) + this.getPeer()?.titleAttribute(value_casted, options_casted) + return this + } + return this + } + /** @memo */ + toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): this { + if (this.checkPriority("toolbarConfiguration")) { + const toolbarParam_casted = toolbarParam as (Array | CustomBuilder) + const options_casted = options as (NavigationToolbarOptions | undefined) + this.getPeer()?.toolbarConfigurationAttribute(toolbarParam_casted, options_casted) + return this + } + return this + } + /** @memo */ + hideToolBar(hide: boolean, animated?: boolean): this { + if (this.checkPriority("hideToolBar")) { + const hide_casted = hide as (boolean) + const animated_casted = animated as (boolean | undefined) + this.getPeer()?.hideToolBarAttribute(hide_casted, animated_casted) + return this + } + return this + } + /** @memo */ + ignoreLayoutSafeArea(types?: Array, edges?: Array): this { + if (this.checkPriority("ignoreLayoutSafeArea")) { + const types_casted = types as (Array | undefined) + const edges_casted = edges as (Array | undefined) + this.getPeer()?.ignoreLayoutSafeAreaAttribute(types_casted, edges_casted) + return this + } + return this + } + public applyAttributesFinish(): void { + // we calls this function outside of class, so need to make it public + super.applyAttributesFinish() + } +} + +/** @memo */ +export function ArkNavDestination( + /** @memo */ + style: ((attributes: ArkNavDestinationComponent) => void) | undefined, + /** @memo */ + content_: (() => void) | undefined, + +) { + const receiver = remember(() => { + return new ArkNavDestinationComponent() + }) + NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { + receiver.setNavDestinationOptions() + style?.(receiver) + content_?.() + receiver.applyAttributesFinish() + }) +} -- Gitee From 76af8b313179d616b282b14536dfabe27f07fe18 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:06:56 +0000 Subject: [PATCH 14/16] Remove arkoala-arkts/arkui/src/generated/ArkNavDestination.ts --- .../arkui/src/generated/ArkNavDestination.ts | 277 ------------------ 1 file changed, 277 deletions(-) delete mode 100644 arkoala-arkts/arkui/src/generated/ArkNavDestination.ts diff --git a/arkoala-arkts/arkui/src/generated/ArkNavDestination.ts b/arkoala-arkts/arkui/src/generated/ArkNavDestination.ts deleted file mode 100644 index 65ae1a9b1..000000000 --- a/arkoala-arkts/arkui/src/generated/ArkNavDestination.ts +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { int32 } from "@koalaui/common" -import { KStringPtr, KBoolean } from "@koalaui/interop" -import { NodeAttach, remember } from "@koalaui/runtime" -import { runtimeType, RuntimeType, isResource, isInstanceOf } from "./peers/SerializerBase" -import { ComponentBase } from "./ComponentBase" -import { TypeChecker } from "#components" -import { ArkCommonMethodComponent } from "./ArkCommon" -import { ArkNavDestinationPeer } from "./peers/ArkNavDestinationPeer" -import { UseEventsProperties } from "./use_properties" -import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "./ArkCommonInterfaces" -import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "./ArkNavDestinationInterfaces" -import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "./SyntheticDeclarations" -import { ResourceStr } from "./ArkUnitsInterfaces" -import { PixelMap } from "./ArkPixelMapMaterialized" -import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "./ArkNavigationInterfaces" -import { NavDestinationContext } from "./ArkNavDestinationContextMaterialized" -import { Scroller } from "./ArkScrollerMaterialized" -import { Resource } from "./ArkResourceInterfaces" -/** @memo:stable */ -export class ArkNavDestinationComponent extends ArkCommonMethodComponent { - getPeer(): ArkNavDestinationPeer { - return (this.peer as ArkNavDestinationPeer) - } - /** @memo */ - setNavDestinationOptions(): this { - if (this.checkPriority("setNavDestinationOptions")) { - this.getPeer()?.setNavDestinationOptionsAttribute() - return this - } - return this - } - /** @memo */ - hideTitleBar(hide: boolean, animated?: boolean): this { - if (this.checkPriority("hideTitleBar")) { - const hide_type = runtimeType(hide) - const animated_type = runtimeType(animated) - if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.BOOLEAN == animated_type)))) { - const hide_casted = hide as (boolean) - const animated_casted = animated as (boolean) - this.getPeer()?.hideTitleBar1Attribute(hide_casted, animated_casted) - return this - } - if ((((RuntimeType.BOOLEAN == hide_type))) && (((RuntimeType.UNDEFINED == animated_type)))) { - const hide_casted = hide as (boolean) - this.getPeer()?.hideTitleBar0Attribute(hide_casted) - return this - } - throw new Error("Can not select appropriate overload") - } - return this - } - /** @memo */ - onShown(value: Function0): this { - if (this.checkPriority("onShown")) { - const value_casted = value as (Function0) - this.getPeer()?.onShownAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onHidden(value: Function0): this { - if (this.checkPriority("onHidden")) { - const value_casted = value as (Function0) - this.getPeer()?.onHiddenAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onBackPressed(value: Function0): this { - if (this.checkPriority("onBackPressed")) { - const value_casted = value as (Function0) - this.getPeer()?.onBackPressedAttribute(value_casted) - return this - } - return this - } - /** @memo */ - mode(value: NavDestinationMode): this { - if (this.checkPriority("mode")) { - const value_casted = value as (NavDestinationMode) - this.getPeer()?.modeAttribute(value_casted) - return this - } - return this - } - /** @memo */ - backButtonIcon(value: ResourceStr | PixelMap | SymbolGlyphModifier): this { - if (this.checkPriority("backButtonIcon")) { - const value_casted = value as (ResourceStr | PixelMap | SymbolGlyphModifier) - this.getPeer()?.backButtonIconAttribute(value_casted) - return this - } - return this - } - /** @memo */ - menus(value: Array | CustomBuilder): this { - if (this.checkPriority("menus")) { - const value_casted = value as (Array | CustomBuilder) - this.getPeer()?.menusAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onReady(value: Function1): this { - if (this.checkPriority("onReady")) { - const value_casted = value as (Function1) - this.getPeer()?.onReadyAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillAppear(value: Function0): this { - if (this.checkPriority("onWillAppear")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillAppearAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillDisappear(value: Function0): this { - if (this.checkPriority("onWillDisappear")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillDisappearAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillShow(value: Function0): this { - if (this.checkPriority("onWillShow")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillShowAttribute(value_casted) - return this - } - return this - } - /** @memo */ - onWillHide(value: Function0): this { - if (this.checkPriority("onWillHide")) { - const value_casted = value as (Function0) - this.getPeer()?.onWillHideAttribute(value_casted) - return this - } - return this - } - /** @memo */ - systemBarStyle(value?: SystemBarStyle): this { - if (this.checkPriority("systemBarStyle")) { - const value_casted = value as (SystemBarStyle | undefined) - this.getPeer()?.systemBarStyleAttribute(value_casted) - return this - } - return this - } - /** @memo */ - recoverable(value?: boolean): this { - if (this.checkPriority("recoverable")) { - const value_casted = value as (boolean | undefined) - this.getPeer()?.recoverableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - systemTransition(value: NavigationSystemTransitionType): this { - if (this.checkPriority("systemTransition")) { - const value_casted = value as (NavigationSystemTransitionType) - this.getPeer()?.systemTransitionAttribute(value_casted) - return this - } - return this - } - /** @memo */ - bindToScrollable(value: Array): this { - if (this.checkPriority("bindToScrollable")) { - const value_casted = value as (Array) - this.getPeer()?.bindToScrollableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - bindToNestedScrollable(value: Array): this { - if (this.checkPriority("bindToNestedScrollable")) { - const value_casted = value as (Array) - this.getPeer()?.bindToNestedScrollableAttribute(value_casted) - return this - } - return this - } - /** @memo */ - title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): this { - if (this.checkPriority("title")) { - const value_casted = value as (string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource) - const options_casted = options as (NavigationTitleOptions | undefined) - this.getPeer()?.titleAttribute(value_casted, options_casted) - return this - } - return this - } - /** @memo */ - toolbarConfiguration(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): this { - if (this.checkPriority("toolbarConfiguration")) { - const toolbarParam_casted = toolbarParam as (Array | CustomBuilder) - const options_casted = options as (NavigationToolbarOptions | undefined) - this.getPeer()?.toolbarConfigurationAttribute(toolbarParam_casted, options_casted) - return this - } - return this - } - /** @memo */ - hideToolBar(hide: boolean, animated?: boolean): this { - if (this.checkPriority("hideToolBar")) { - const hide_casted = hide as (boolean) - const animated_casted = animated as (boolean | undefined) - this.getPeer()?.hideToolBarAttribute(hide_casted, animated_casted) - return this - } - return this - } - /** @memo */ - ignoreLayoutSafeArea(types?: Array, edges?: Array): this { - if (this.checkPriority("ignoreLayoutSafeArea")) { - const types_casted = types as (Array | undefined) - const edges_casted = edges as (Array | undefined) - this.getPeer()?.ignoreLayoutSafeAreaAttribute(types_casted, edges_casted) - return this - } - return this - } - public applyAttributesFinish(): void { - // we calls this function outside of class, so need to make it public - super.applyAttributesFinish() - } -} - -/** @memo */ -export function ArkNavDestination( - /** @memo */ - style: ((attributes: ArkNavDestinationComponent) => void) | undefined, - /** @memo */ - content_: (() => void) | undefined, - -) { - const receiver = remember(() => { - return new ArkNavDestinationComponent() - }) - NodeAttach((): ArkNavDestinationPeer => ArkNavDestinationPeer.create(receiver), (_: ArkNavDestinationPeer) => { - receiver.setNavDestinationOptions() - style?.(receiver) - content_?.() - receiver.applyAttributesFinish() - }) -} -- Gitee From e9e4bb561d1c871199ea79ae6c8721d99e4bb78e Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:07:14 +0000 Subject: [PATCH 15/16] Remove arkoala-arkts/arkui/src/generated/peers/ArkNavDestinationPeer.ts --- .../generated/peers/ArkNavDestinationPeer.ts | 348 ------------------ 1 file changed, 348 deletions(-) delete mode 100644 arkoala-arkts/arkui/src/generated/peers/ArkNavDestinationPeer.ts diff --git a/arkoala-arkts/arkui/src/generated/peers/ArkNavDestinationPeer.ts b/arkoala-arkts/arkui/src/generated/peers/ArkNavDestinationPeer.ts deleted file mode 100644 index 9f6bc280d..000000000 --- a/arkoala-arkts/arkui/src/generated/peers/ArkNavDestinationPeer.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { int32 } from "@koalaui/common" -import { nullptr, KPointer, KInt, KBoolean, KStringPtr } from "@koalaui/interop" -import { isResource, isInstanceOf, runtimeType, RuntimeType } from "./SerializerBase" -import { Serializer } from "./Serializer" -import { ArkUINodeType } from "./ArkUINodeType" -import { ComponentBase } from "../ComponentBase" -import { PeerNode } from "../PeerNode" -import { NativeModule } from "#components" -import { ArkCommonMethodPeer, ArkCommonMethodAttributes } from "./ArkCommonPeer" -import { CommonMethod, SymbolGlyphModifier, CustomBuilder, LayoutSafeAreaType, LayoutSafeAreaEdge } from "./../ArkCommonInterfaces" -import { NavDestinationAttribute, NavDestinationMode, NavigationSystemTransitionType, NestedScrollInfo, NavDestinationCommonTitle, NavDestinationCustomTitle } from "./../ArkNavDestinationInterfaces" -import { Callback_Void, Callback_Boolean, Callback_NavDestinationContext_Void } from "./../SyntheticDeclarations" -import { ResourceStr } from "./../ArkUnitsInterfaces" -import { PixelMap } from "./../ArkPixelMapMaterialized" -import { NavigationMenuItem, SystemBarStyle, NavigationTitleOptions, ToolbarItem, NavigationToolbarOptions } from "./../ArkNavigationInterfaces" -import { NavDestinationContext } from "./../ArkNavDestinationContextMaterialized" -import { Scroller } from "./../ArkScrollerMaterialized" -import { Resource } from "./../ArkResourceInterfaces" -import { GestureName, GestureComponent } from "./../shared/generated-utils" -import { CallbackKind } from "./CallbackKind" -import { CallbackTransformer } from "./CallbackTransformer" -import { TypeChecker } from "#components" -import { registerCallback } from "./SerializerBase" -import { wrapCallback } from "@koalaui/interop" -import { MaterializedBase } from "./../MaterializedBase" -import { DotIndicator } from "./../ArkDotIndicatorBuilder" -import { DigitIndicator } from "./../ArkDigitIndicatorBuilder" -import { SubTabBarStyle } from "./../ArkSubTabBarStyleBuilder" -import { BottomTabBarStyle } from "./../ArkBottomTabBarStyleBuilder" -export class ArkNavDestinationPeer extends ArkCommonMethodPeer { - protected constructor(peerPtr: KPointer, id: int32, name: string = "", flags: int32 = 0) { - super(peerPtr, id, name, flags) - } - public static create(component?: ComponentBase, flags: int32 = 0): ArkNavDestinationPeer { - const peerId = PeerNode.nextId() - const _peerPtr = NativeModule._NavDestination_construct(peerId, flags) - const _peer = new ArkNavDestinationPeer(_peerPtr, peerId, "NavDestination", flags) - component?.setPeer(_peer) - return _peer - } - setNavDestinationOptionsAttribute(): void { - NativeModule._NavDestinationInterface_setNavDestinationOptions(this.peer.ptr) - } - hideTitleBar0Attribute(value: boolean): void { - NativeModule._NavDestinationAttribute_hideTitleBar0(this.peer.ptr, value ? 1 : 0) - } - hideTitleBar1Attribute(hide: boolean, animated: boolean): void { - NativeModule._NavDestinationAttribute_hideTitleBar1(this.peer.ptr, hide ? 1 : 0, animated ? 1 : 0) - } - onShownAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onShown(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onHiddenAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onHidden(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onBackPressedAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onBackPressed(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - modeAttribute(value: NavDestinationMode): void { - NativeModule._NavDestinationAttribute_mode(this.peer.ptr, (value.value as int32)) - } - backButtonIconAttribute(value: ResourceStr | PixelMap | SymbolGlyphModifier): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - if (((RuntimeType.STRING == value_type)) || ((RuntimeType.OBJECT == value_type))) { - thisSerializer.writeInt8(0 as int32) - const value_0 = value as ResourceStr - let value_0_type : int32 = RuntimeType.UNDEFINED - value_0_type = runtimeType(value_0) - if (((RuntimeType.STRING == value_0_type))) { - thisSerializer.writeInt8(0 as int32) - const value_0_0 = value_0 as string - thisSerializer.writeString(value_0_0) - } - else if (((RuntimeType.OBJECT == value_0_type))) { - thisSerializer.writeInt8(1 as int32) - const value_0_1 = value_0 as Resource - thisSerializer.writeResource(value_0_1) - } - } - else if (((RuntimeType.OBJECT) == (value_type)) && (value instanceof PixelMap)) { - thisSerializer.writeInt8(1 as int32) - const value_1 = value as PixelMap - thisSerializer.writePixelMap(value_1) - } - else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isSymbolGlyphModifier(value, false))) { - thisSerializer.writeInt8(2 as int32) - const value_2 = value as SymbolGlyphModifier - thisSerializer.writeSymbolGlyphModifier(value_2) - } - NativeModule._NavDestinationAttribute_backButtonIcon(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - menusAttribute(value: Array | CustomBuilder): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - if (((RuntimeType.OBJECT == value_type))) { - thisSerializer.writeInt8(0 as int32) - const value_0 = value as Array - thisSerializer.writeInt32(value_0.length as int32) - for (let i = 0; i < value_0.length; i++) { - const value_0_element = value_0[i] - thisSerializer.writeNavigationMenuItem(value_0_element) - } - } - else if (((RuntimeType.FUNCTION == value_type))) { - thisSerializer.writeInt8(1 as int32) - const value_1 = value as CustomBuilder - thisSerializer.holdAndWriteCallback(CallbackTransformer.transformFromCustomBuilder(value_1)) - } - NativeModule._NavDestinationAttribute_menus(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onReadyAttribute(value: Function1): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onReady(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onWillAppearAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onWillAppear(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onWillDisappearAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onWillDisappear(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onWillShowAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onWillShow(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - onWillHideAttribute(value: Function0): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.holdAndWriteCallback(value) - NativeModule._NavDestinationAttribute_onWillHide(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - systemBarStyleAttribute(value?: SystemBarStyle): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) - if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = value! - thisSerializer.writeSystemBarStyle(value_value) - } - NativeModule._NavDestinationAttribute_systemBarStyle(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - recoverableAttribute(value?: boolean): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - thisSerializer.writeInt8(value_type as int32) - if ((RuntimeType.UNDEFINED) != (value_type)) { - const value_value = value! - thisSerializer.writeBoolean(value_value) - } - NativeModule._NavDestinationAttribute_recoverable(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - systemTransitionAttribute(value: NavigationSystemTransitionType): void { - NativeModule._NavDestinationAttribute_systemTransition(this.peer.ptr, (value.value as int32)) - } - bindToScrollableAttribute(value: Array): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.writeInt32(value.length as int32) - for (let i = 0; i < value.length; i++) { - const value_element = value[i] - thisSerializer.writeScroller(value_element) - } - NativeModule._NavDestinationAttribute_bindToScrollable(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - bindToNestedScrollableAttribute(value: Array): void { - const thisSerializer : Serializer = Serializer.hold() - thisSerializer.writeInt32(value.length as int32) - for (let i = 0; i < value.length; i++) { - const value_element = value[i] - thisSerializer.writeNestedScrollInfo(value_element) - } - NativeModule._NavDestinationAttribute_bindToNestedScrollable(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - titleAttribute(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle | Resource, options?: NavigationTitleOptions): void { - const thisSerializer : Serializer = Serializer.hold() - let value_type : int32 = RuntimeType.UNDEFINED - value_type = runtimeType(value) - if (((RuntimeType.STRING == value_type))) { - thisSerializer.writeInt8(0 as int32) - const value_0 = value as string - thisSerializer.writeString(value_0) - } - else if (((RuntimeType.FUNCTION == value_type))) { - thisSerializer.writeInt8(1 as int32) - const value_1 = value as CustomBuilder - thisSerializer.holdAndWriteCallback(CallbackTransformer.transformFromCustomBuilder(value_1)) - } - else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isNavDestinationCommonTitle(value, false, false))) { - thisSerializer.writeInt8(2 as int32) - const value_2 = value as NavDestinationCommonTitle - thisSerializer.writeNavDestinationCommonTitle(value_2) - } - else if (((RuntimeType.OBJECT) == (value_type)) && (TypeChecker.isNavDestinationCustomTitle(value, false, false))) { - thisSerializer.writeInt8(3 as int32) - const value_3 = value as NavDestinationCustomTitle - thisSerializer.writeNavDestinationCustomTitle(value_3) - } - else if (((RuntimeType.OBJECT) == (value_type)) && (isResource(value))) { - thisSerializer.writeInt8(4 as int32) - const value_4 = value as Resource - thisSerializer.writeResource(value_4) - } - let options_type : int32 = RuntimeType.UNDEFINED - options_type = runtimeType(options) - thisSerializer.writeInt8(options_type as int32) - if ((RuntimeType.UNDEFINED) != (options_type)) { - const options_value = options! - thisSerializer.writeNavigationTitleOptions(options_value) - } - NativeModule._NavDestinationAttribute_title(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - toolbarConfigurationAttribute(toolbarParam: Array | CustomBuilder, options?: NavigationToolbarOptions): void { - const thisSerializer : Serializer = Serializer.hold() - let toolbarParam_type : int32 = RuntimeType.UNDEFINED - toolbarParam_type = runtimeType(toolbarParam) - if (((RuntimeType.OBJECT == toolbarParam_type))) { - thisSerializer.writeInt8(0 as int32) - const toolbarParam_0 = toolbarParam as Array - thisSerializer.writeInt32(toolbarParam_0.length as int32) - for (let i = 0; i < toolbarParam_0.length; i++) { - const toolbarParam_0_element = toolbarParam_0[i] - thisSerializer.writeToolbarItem(toolbarParam_0_element) - } - } - else if (((RuntimeType.FUNCTION == toolbarParam_type))) { - thisSerializer.writeInt8(1 as int32) - const toolbarParam_1 = toolbarParam as CustomBuilder - thisSerializer.holdAndWriteCallback(CallbackTransformer.transformFromCustomBuilder(toolbarParam_1)) - } - let options_type : int32 = RuntimeType.UNDEFINED - options_type = runtimeType(options) - thisSerializer.writeInt8(options_type as int32) - if ((RuntimeType.UNDEFINED) != (options_type)) { - const options_value = options! - thisSerializer.writeNavigationToolbarOptions(options_value) - } - NativeModule._NavDestinationAttribute_toolbarConfiguration(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - hideToolBarAttribute(hide: boolean, animated?: boolean): void { - const thisSerializer : Serializer = Serializer.hold() - let animated_type : int32 = RuntimeType.UNDEFINED - animated_type = runtimeType(animated) - thisSerializer.writeInt8(animated_type as int32) - if ((RuntimeType.UNDEFINED) != (animated_type)) { - const animated_value = animated! - thisSerializer.writeBoolean(animated_value) - } - NativeModule._NavDestinationAttribute_hideToolBar(this.peer.ptr, hide ? 1 : 0, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - ignoreLayoutSafeAreaAttribute(types?: Array, edges?: Array): void { - const thisSerializer : Serializer = Serializer.hold() - let types_type : int32 = RuntimeType.UNDEFINED - types_type = runtimeType(types) - thisSerializer.writeInt8(types_type as int32) - if ((RuntimeType.UNDEFINED) != (types_type)) { - const types_value = types! - thisSerializer.writeInt32(types_value.length as int32) - for (let i = 0; i < types_value.length; i++) { - const types_value_element = types_value[i] - thisSerializer.writeInt32(types_value_element.ordinal) - } - } - let edges_type : int32 = RuntimeType.UNDEFINED - edges_type = runtimeType(edges) - thisSerializer.writeInt8(edges_type as int32) - if ((RuntimeType.UNDEFINED) != (edges_type)) { - const edges_value = edges! - thisSerializer.writeInt32(edges_value.length as int32) - for (let i = 0; i < edges_value.length; i++) { - const edges_value_element = edges_value[i] - thisSerializer.writeInt32(edges_value_element.ordinal) - } - } - NativeModule._NavDestinationAttribute_ignoreLayoutSafeArea(this.peer.ptr, thisSerializer.asArray(), thisSerializer.length()) - thisSerializer.release() - } - applyAttributes(attributes: T): void { - super.applyAttributes(attributes) - } -} -export interface ArkNavDestinationAttributes extends ArkCommonMethodAttributes { - hideTitleBar?: boolean - onShown?: Function0 - onHidden?: Function0 - onBackPressed?: Function0 - mode?: NavDestinationMode - backButtonIcon?: ResourceStr | PixelMap | SymbolGlyphModifier - menus?: Array | CustomBuilder - onReady?: Function1 - onWillAppear?: Function0 - onWillDisappear?: Function0 - onWillShow?: Function0 - onWillHide?: Function0 - systemBarStyle?: SystemBarStyle | undefined - recoverable?: boolean | undefined - systemTransition?: NavigationSystemTransitionType - bindToScrollable?: Array - bindToNestedScrollable?: Array -} -- Gitee From 8c178287a9ea74b2934af4afcba7c8d1f5bafe40 Mon Sep 17 00:00:00 2001 From: Sokolova Irina Date: Fri, 13 Dec 2024 14:08:51 +0000 Subject: [PATCH 16/16] update arkoala-arkts/arkui/src/generated/index.ts. Signed-off-by: Sokolova Irina --- arkoala-arkts/arkui/src/generated/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkoala-arkts/arkui/src/generated/index.ts b/arkoala-arkts/arkui/src/generated/index.ts index d259baa83..7ea815f9c 100644 --- a/arkoala-arkts/arkui/src/generated/index.ts +++ b/arkoala-arkts/arkui/src/generated/index.ts @@ -48,7 +48,7 @@ export * from "./ArkMediaCachedImage" export * from "./ArkMenu" export * from "./ArkMenuItem" export * from "./ArkMenuItemGroup" -export * from "./ArkNavDestination" +export * from "../handwritten/ArkNavDestination" export * from "./ArkNavRouter" export * from "./ArkNavigator" export * from "./ArkNodeContainer" -- Gitee