From f0278d9b1ce63e2c0543ecd7176eca8d8d7a29fd Mon Sep 17 00:00:00 2001 From: sun-xinyan Date: Mon, 18 Aug 2025 20:24:43 +0800 Subject: [PATCH] revert Indicator Signed-off-by: sun-xinyan --- api/@internal/component/ets/index-full.d.ts | 3 +- .../component/ets/linearindicator.d.ts | 325 ------------------ api/@ohos.arkui.component.d.ets | 1 - 3 files changed, 1 insertion(+), 328 deletions(-) delete mode 100644 api/@internal/component/ets/linearindicator.d.ts diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 2423154475..c7759460f3 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -149,5 +149,4 @@ /// /// /// -/// -/// \ No newline at end of file +/// \ No newline at end of file diff --git a/api/@internal/component/ets/linearindicator.d.ts b/api/@internal/component/ets/linearindicator.d.ts deleted file mode 100644 index 3b548b466a..0000000000 --- a/api/@internal/component/ets/linearindicator.d.ts +++ /dev/null @@ -1,325 +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. - */ - -/** - * @file - * @kit ArkUI - */ - -/*** if arkts 1.2 */ -import { CommonMethod, Optional } from './common'; -import { ColorMetrics, LengthMetrics } from './units'; -/*** endif */ - -/** - * Defines the LinearIndicator Controller. - * - * @interface LinearIndicatorController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class LinearIndicatorController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(); - - /** - * Sets the progress of indicator. - * - * @param { number } index - the index of current indicator, value range: [0, count - 1]. - * If index value is out of range, do nothing. - * @param { number } progress - current indicator progress value, value range: [0, 100]. - * If the progress value is out of range, do nothing. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - setProgress(index: number, progress: number): void; - - /** - * Start indicator auto play. - * - * @param { LinearIndicatorStartOptions } [options] - the options of indicator auto play. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - start(options?: LinearIndicatorStartOptions): void; - - /** - * Pause indicator auto play. - * Start auto play will be resumed from this paused position. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - pause(): void; - - /** - * Stop indicator auto play. - * Start auto play will restart from the very beginning. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - stop(): void; -} - -/** - * Provides options of indicator auto play. - * - * @interface LinearIndicatorAutoPlayOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LinearIndicatorStartOptions { - /** - * The interval between twice auto play. The unit is ms. - * - * @type { ?number } - * @default The default value is 0. if value is less than 0, the value will be 0. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - interval?: number; - - /** - * The animation curve duration. The unit is ms. - * - * @type { ?number } - * @default 4000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; -} - -/** - * Provides linear indicator style. - * - * @interface LinearIndicatorStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LinearIndicatorStyle { - /** - * The space of two linear indicator. - * - * @type { ?LengthMetrics } - * @default The default value is 4.0vp. if value is less than 0, the value will be 4.0vp. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - space?: LengthMetrics; - - /** - * Stroke width of the progress indicator. - * - * @type { ?LengthMetrics } - * @default The default value is 2.0vp. if value is less than 0, the value will be 2.0vp. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: LengthMetrics; - - /** - * The stroke radius of linear indicator. - * - * @type { ?LengthMetrics } - * @default The default value is 1.0vp. if value is more than strokeWidth/2, the value will be strokeWidth/2. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeRadius?: LengthMetrics; - - /** - * The track background color of linear indicator. - * - * @type { ?ColorMetrics } - * @default comp_background_tertiary - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - trackBackgroundColor?: ColorMetrics; - - /** - * The track color of linear indicator. - * - * @type { ?ColorMetrics } - * @default comp_background_emphasize - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - trackColor?: ColorMetrics; -} - -/** - * Provides an interface for indicator. - * - * @interface LinearIndicatorInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface LinearIndicatorInterface { - /** - * Constructor parameters - * - * @param { number } count - the number of progress in LinearIndicator. minimum value is 2(default is 5). - * if count is less than 2, the value will be 2. - * @param { LinearIndicatorController } controller - Controller of LinearIndicator. - * @returns { LinearIndicatorAttribute } return the instance of the LinearIndicatorAttribute - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - (count?: number, controller?: LinearIndicatorController): LinearIndicatorAttribute; -} - -/** - * Defines the Indicator attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class LinearIndicatorAttribute extends CommonMethod { - /** - * Sets the indicator style. - * - * @param { Optional } style - the style of LinearIndicator - * @returns { LinearIndicatorAttribute } return the instance of the LinearIndicatorAttribute - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - indicatorStyle(style: Optional): LinearIndicatorAttribute; - - /** - * Sets whether indicator supports loop, default is true. - * - * @param { Optional } loop - indicate whether loop playback is supported - * @returns { LinearIndicatorAttribute } return the instance of the LinearIndicatorAttribute - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - indicatorLoop(loop: Optional): LinearIndicatorAttribute; - - /** - * Called when progress value update. - * - * @param { Optional } callback - callback of the progress change event. - * @returns { LinearIndicatorAttribute } return the instance of the LinearIndicatorAttribute - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onChange(callback: Optional): LinearIndicatorAttribute; -} - -/** - * Defines the callback type used in the indicator progress change event. - * - * @typedef { function } OnLinearIndicatorChangeCallback - * @param { number } index - index of current indicator. - * @param { number } progress - current indicator progress value. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type OnLinearIndicatorChangeCallback = (index: number, progress: number) => void; - -/** - * Defines Indicator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare const LinearIndicator: LinearIndicatorInterface; - -/** - * Defines Indicator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare const LinearIndicatorInstance: LinearIndicatorAttribute diff --git a/api/@ohos.arkui.component.d.ets b/api/@ohos.arkui.component.d.ets index a0fe3c2371..5a7ce4bda1 100644 --- a/api/@ohos.arkui.component.d.ets +++ b/api/@ohos.arkui.component.d.ets @@ -80,7 +80,6 @@ export * from './arkui/component/inspector'; export * from './arkui/component/interop'; export * from './arkui/component/lazyForEach'; export * from './arkui/component/line'; -export * from './arkui/component/linearindicator'; export * from './arkui/component/list'; export * from './arkui/component/listItem'; export * from './arkui/component/listItemGroup'; -- Gitee