diff --git a/arkoala-arkts/arkui/src/generated/ArkPageTransition.ts b/arkoala-arkts/arkui/src/generated/ArkPageTransition.ts deleted file mode 100644 index 6482632337010cffa2eb248abf3bdc7e9ebbce23..0000000000000000000000000000000000000000 --- a/arkoala-arkts/arkui/src/generated/ArkPageTransition.ts +++ /dev/null @@ -1,73 +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 { ArkCommonTransitionPeer } from "./peers/ArkPageTransitionPeer" -import { SlideEffect } from "./ArkPageTransitionInterfaces" -import { TranslateOptions, ScaleOptions } from "./ArkCommonInterfaces" -/** @memo:stable */ -export class ArkCommonTransitionComponent extends ComponentBase { - getPeer(): ArkCommonTransitionPeer { - return (this.peer as ArkCommonTransitionPeer) - } - /** @memo */ - slide(value: SlideEffect): this { - if (this.checkPriority("slide")) { - const value_casted = value as (SlideEffect) - this.getPeer()?.slideAttribute(value_casted) - return this - } - return this - } - /** @memo */ - translate(value: TranslateOptions): this { - if (this.checkPriority("translate")) { - const value_casted = value as (TranslateOptions) - this.getPeer()?.translateAttribute(value_casted) - return this - } - return this - } - /** @memo */ - scale(value: ScaleOptions): this { - if (this.checkPriority("scale")) { - const value_casted = value as (ScaleOptions) - this.getPeer()?.scaleAttribute(value_casted) - return this - } - return this - } - /** @memo */ - opacity(value: number): this { - if (this.checkPriority("opacity")) { - const value_casted = value as (number) - this.getPeer()?.opacityAttribute(value_casted) - return this - } - return this - } - public applyAttributesFinish(): void { - // we calls this function outside of class, so need to make it public - super.applyAttributesFinish() - } -} diff --git a/arkoala-arkts/arkui/types/index-full.d.ts b/arkoala-arkts/arkui/types/index-full.d.ts index 6af255cdbb30f281b1633ab9cf08a533c432cead..e08d2cee39fe012c19c689a70a1067cb629abe52 100644 --- a/arkoala-arkts/arkui/types/index-full.d.ts +++ b/arkoala-arkts/arkui/types/index-full.d.ts @@ -14,6 +14,93 @@ */ +// TODO: these are missing types to bringup Shopping +declare const PageTransitionEnter: PageTransitionEnterInterface +declare const PageTransitionExit: PageTransitionExitInterface +declare interface PageTransitionEnterInterface extends CommonTransition { + onEnter(event: PageTransitionCallback): PageTransitionEnterInterface; + (value: PageTransitionOptions): PageTransitionEnterInterface; +} +declare interface PageTransitionExitInterface extends CommonTransition { + onExit(event: PageTransitionCallback): PageTransitionExitInterface; + (value: PageTransitionOptions): PageTransitionExitInterface; +} +declare const Navigation: NavigationInterface + +declare interface IDataSource { + totalCount(): number; + + getData(index: number): T; + getData(index: number): any; + + registerDataChangeListener(listener: DataChangeListener): void; + + unregisterDataChangeListener(listener: DataChangeListener): void; +} +interface LazyForEachInterface { + ( + dataSource: IDataSource, + itemGenerator: (item: T, index: number) => void, + keyGenerator?: (item: T, index: number) => string + ): LazyForEachAttribute; +} + +declare function ForEach ( + arr: Array, + itemGenerator: (item: T, index: number) => void, + keyGenerator?: (item: T, index: number) => string, +): ForEachAttribute; + +declare class ForEachAttribute extends DynamicNode> { +} + +interface ForEachInterface { + ( + arr: Array, + itemGenerator: (item: T, index: number) => void, + keyGenerator?: (item: T, index: number) => string, + ): ForEachAttribute +// TODO: have overloads for [] and Array + /* + ( + arr: T[], + itemGenerator: (item: T, index: number) => void, + keyGenerator?: (item: T, index: number) => string, + ): ForEachAttribute; + */ +} + +declare function LazyForEach( + dataSource: IDataSource, + itemGenerator: (item: T, index: number) => void, + keyGenerator?: (item: T, index: number) => string, +): LazyForEachAttribute // extends LazyForEachInterface {} + +declare class LocalStorage { + /* + // Uncomment for full sdk + + constructor(initializingProperties?: Object); + static GetShared(): LocalStorage; + static getShared(): LocalStorage; + public ref(propName: string): AbstractProperty | undefined; + public setAndRef(propName: string, defaultValue: T): AbstractProperty; + has(propName: string): boolean; + keys(): IterableIterator; + size(): number; + get(propName: string): T | undefined; + set(propName: string, newValue: T): boolean; + setOrCreate(propName: string, newValue: T): boolean; + link(propName: string): SubscribedAbstractProperty; + setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty; + prop(propName: string): SubscribedAbstractProperty; + setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty; + delete(propName: string): boolean; + clear(): boolean; + */ +} + + // WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! declare const Component: ClassDecorator & ((options: ComponentOptions) => ClassDecorator); @@ -104,18 +191,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; declare const Reusable: ClassDecorator; -declare class ForEachAttribute extends DynamicNode { -} - -interface ForEachInterface { - ( - arr: Array, - itemGenerator: (item: any, index: number) => void, - keyGenerator?: (item: any, index: number) => string, - ): ForEachAttribute; -} -declare const ForEach: ForEachInterface; declare interface DataChangeListener { onDataReloaded(): void; @@ -141,28 +217,9 @@ declare interface DataChangeListener { */ } -declare interface IDataSource { - totalCount(): number; - - getData(index: number): any; - - registerDataChangeListener(listener: DataChangeListener): void; - - unregisterDataChangeListener(listener: DataChangeListener): void; -} - declare class LazyForEachAttribute extends DynamicNode { } -interface LazyForEachInterface { - ( - dataSource: IDataSource, - itemGenerator: (item: any, index: number) => void, - keyGenerator?: (item: any, index: number) => string, - ): LazyForEachAttribute; -} - -declare const LazyForEach: LazyForEachInterface; // Until we have full sdk declare interface LayoutChild {} @@ -2459,25 +2516,6 @@ declare class PersistentStorage { static Keys(): string[]; static keys(): string[]; } -declare class LocalStorage { - constructor(initializingProperties?: Object); - static GetShared(): LocalStorage; - static getShared(): LocalStorage; - ref(propName: string): AbstractProperty | undefined; - setAndRef(propName: string, defaultValue: T): AbstractProperty; - has(propName: string): boolean; - keys(): IterableIterator; - size(): number; - get(propName: string): T | undefined; - set(propName: string, newValue: T): boolean; - setOrCreate(propName: string, newValue: T): boolean; - link(propName: string): SubscribedAbstractProperty; - setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty; - prop(propName: string): SubscribedAbstractProperty; - setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty; - delete(propName: string): boolean; - clear(): boolean; -} declare interface Scene { __SceneStub: string; } @@ -4221,17 +4259,8 @@ declare interface DataExchangeOperation { declare interface DataOperation { stub: string; } -declare interface IDataSource { - totalCount(): number; - getData(index: number): any; - registerDataChangeListener(listener: DataChangeListener): void; - unregisterDataChangeListener(listener: DataChangeListener): void; -} declare type Callback_Any_Number_Void = ((item: any, index: number) => void); declare type Callback_Any_Number_String = ((item: any, index: number) => string); -declare interface LazyForEachInterface { - (dataSource: IDataSource, itemGenerator: ((item: any, index: number) => void), keyGenerator?: ((item: any, index: number) => string)): LazyForEachAttribute; -} declare interface LineOptions { width?: (string|number); height?: (string|number);