• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/*** if arkts 1.2 */
22import { Resource, ResourceStr, ResourceColor, LocalizedMargin } from './arkui/component/units';
23import { Prop } from './arkui/stateManagement/common';
24import { Component } from './arkui/component/customComponent';
25/*** endif */
26
27/**
28 * Controls the style types of GridObjectSortComponent.
29 * @enum { string }
30 * @syscap SystemCapability.ArkUI.ArkUI.Full
31 * @crossplatform
32 * @since arkts {'1.1':'11','1.2':'20'}
33 * @arkts 1.1&1.2
34 */
35 /**
36 * Controls the style types of GridObjectSortComponent.
37 * @enum { string }
38 * @syscap SystemCapability.ArkUI.ArkUI.Full
39 * @crossplatform
40 * @atomicservice
41 * @since 12
42 */
43export declare enum GridObjectSortComponentType {
44  /**
45   * The GridObjectSortComponent image text type.
46   * @syscap SystemCapability.ArkUI.ArkUI.Full
47   * @crossplatform
48   * @since arkts {'1.1':'11','1.2':'20'}
49   * @arkts 1.1&1.2
50   */
51   /**
52   * The GridObjectSortComponent image text type.
53   * @syscap SystemCapability.ArkUI.ArkUI.Full
54   * @crossplatform
55   * @atomicservice
56   * @since 12
57   */
58  IMAGE_TEXT = "image_text",
59
60  /**
61   * The GridObjectSortComponent text type.
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @since arkts {'1.1':'11','1.2':'20'}
65   * @arkts 1.1&1.2
66   */
67   /**
68   * The GridObjectSortComponent text type.
69   * @syscap SystemCapability.ArkUI.ArkUI.Full
70   * @crossplatform
71   * @atomicservice
72   * @since 12
73   */
74  TEXT = "text"
75}
76
77/**
78 * Declaration of the GridObjectSortComponent item.
79 * @interface GridObjectSortComponentIteml
80 * @syscap SystemCapability.ArkUI.ArkUI.Full
81 * @crossplatform
82 * @since arkts {'1.1':'11','1.2':'20'}
83 * @arkts 1.1&1.2
84 */
85 /**
86 * Declaration of the GridObjectSortComponent item.
87 * @interface GridObjectSortComponentIteml
88 * @syscap SystemCapability.ArkUI.ArkUI.Full
89 * @crossplatform
90 * @atomicservice
91 * @since 12
92 */
93export interface GridObjectSortComponentItem {
94  /**
95   * id of GridObjectSortComponent item.
96   * @type { number | string }
97   * @syscap SystemCapability.ArkUI.ArkUI.Full
98   * @crossplatform
99   * @since arkts {'1.1':'11','1.2':'20'}
100   * @arkts 1.1&1.2
101   */
102   /**
103   * id of GridObjectSortComponent item.
104   * @type { number | string }
105   * @syscap SystemCapability.ArkUI.ArkUI.Full
106   * @crossplatform
107   * @atomicservice
108   * @since 12
109   */
110  id: number | string;
111
112  /**
113   * GridObjectSortComponent item text.
114   * @type { ResourceStr }
115   * @syscap SystemCapability.ArkUI.ArkUI.Full
116   * @crossplatform
117   * @since arkts {'1.1':'11','1.2':'20'}
118   * @arkts 1.1&1.2
119   */
120   /**
121   * GridObjectSortComponent item text.
122   * @type { ResourceStr }
123   * @syscap SystemCapability.ArkUI.ArkUI.Full
124   * @crossplatform
125   * @atomicservice
126   * @since 12
127   */
128  text: ResourceStr;
129
130  /**
131   * selected of GridObjectSortComponent item, true is show area, false is add area.
132   * @type { boolean }
133   * @syscap SystemCapability.ArkUI.ArkUI.Full
134   * @crossplatform
135   * @since arkts {'1.1':'11','1.2':'20'}
136   * @arkts 1.1&1.2
137   */
138   /**
139   * selected of GridObjectSortComponent item, true is show area, false is add area.
140   * @type { boolean }
141   * @syscap SystemCapability.ArkUI.ArkUI.Full
142   * @crossplatform
143   * @atomicservice
144   * @since 12
145   */
146  selected: boolean;
147
148  /**
149   * order of GridObjectSortComponentItem, Used for sorting dataList.
150   * @type { number }
151   * @syscap SystemCapability.ArkUI.ArkUI.Full
152   * @crossplatform
153   * @since arkts {'1.1':'11','1.2':'20'}
154   * @arkts 1.1&1.2
155   */
156   /**
157   * order of GridObjectSortComponentItem, Used for sorting dataList.
158   * @type { number }
159   * @syscap SystemCapability.ArkUI.ArkUI.Full
160   * @crossplatform
161   * @atomicservice
162   * @since 12
163   */
164  order: number;
165
166  /**
167   * image resource path of the GridObjectSortComponent item.
168   * @type { ?ResourceStr }
169   * @syscap SystemCapability.ArkUI.ArkUI.Full
170   * @crossplatform
171   * @since arkts {'1.1':'11','1.2':'20'}
172   * @arkts 1.1&1.2
173   */
174   /**
175   * image resource path of the GridObjectSortComponent item.
176   * @type { ?ResourceStr }
177   * @syscap SystemCapability.ArkUI.ArkUI.Full
178   * @crossplatform
179   * @atomicservice
180   * @since 12
181   */
182  url?: ResourceStr;
183
184  /**
185   * symbol of the GridObjectSortComponent item.
186   * @type { ?SymbolGlyphModifier }
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @atomicservice
189   * @since 18
190   */
191  symbolStyle?: SymbolGlyphModifier;
192}
193
194/**
195 * GridObjectSortComponentOptions of GridObjectSortComponent.
196 * @interface GridEditOptions
197 * @syscap SystemCapability.ArkUI.ArkUI.Full
198 * @crossplatform
199 * @since arkts {'1.1':'11','1.2':'20'}
200 * @arkts 1.1&1.2
201 */
202 /**
203 * GridObjectSortComponentOptions of GridObjectSortComponent.
204 * @interface GridEditOptions
205 * @syscap SystemCapability.ArkUI.ArkUI.Full
206 * @crossplatform
207 * @atomicservice
208 * @since 12
209 */
210export interface GridObjectSortComponentOptions {
211  /**
212   * Configuration GridObjectSortComponent type.
213   * @type { GridObjectSortComponentType }
214   * @default GridObjectSortComponentType.TEXT
215   * @syscap SystemCapability.ArkUI.ArkUI.Full
216   * @crossplatform
217   * @since arkts {'1.1':'11','1.2':'20'}
218   * @arkts 1.1&1.2
219   */
220   /**
221   * Configuration GridObjectSortComponent type.
222   * @type { GridObjectSortComponentType }
223   * @default GridObjectSortComponentType.TEXT
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @atomicservice
227   * @since 12
228   */
229  type?: GridObjectSortComponentType;
230
231  /**
232   * The size of the GridObjectSortComponent image.
233   * @type { ?number | ?Resource }
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @crossplatform
236   * @since arkts {'1.1':'11','1.2':'20'}
237   * @arkts 1.1&1.2
238   */
239   /**
240   * The size of the GridObjectSortComponent image.
241   * @type { ?number | ?Resource }
242   * @syscap SystemCapability.ArkUI.ArkUI.Full
243   * @crossplatform
244   * @atomicservice
245   * @since 12
246   */
247  imageSize?: number | Resource;
248
249  /**
250   * The title displayed in the unedited state of the  GridObjectSortComponent.
251   * @type { ?ResourceStr }
252   * @syscap SystemCapability.ArkUI.ArkUI.Full
253   * @crossplatform
254   * @since arkts {'1.1':'11','1.2':'20'}
255   * @arkts 1.1&1.2
256   */
257   /**
258   * The title displayed in the unedited state of the  GridObjectSortComponent.
259   * @type { ?ResourceStr }
260   * @syscap SystemCapability.ArkUI.ArkUI.Full
261   * @crossplatform
262   * @atomicservice
263   * @since 12
264   */
265  normalTitle?: ResourceStr;
266
267  /**
268   * The title displayed in the GridObjectSortComponent edit state.
269   * @type { ?ResourceStr }
270   * @syscap SystemCapability.ArkUI.ArkUI.Full
271   * @crossplatform
272   * @since arkts {'1.1':'11','1.2':'20'}
273   * @arkts 1.1&1.2
274   */
275   /**
276   * The title displayed in the GridObjectSortComponent edit state.
277   * @type { ?ResourceStr }
278   * @syscap SystemCapability.ArkUI.ArkUI.Full
279   * @crossplatform
280   * @atomicservice
281   * @since 12
282   */
283  editTitle?: ResourceStr;
284
285  /**
286   * Display Area Title, First subtitle of the GridObjectSortComponent.
287   * @type { ?ResourceStr }
288   * @syscap SystemCapability.ArkUI.ArkUI.Full
289   * @crossplatform
290   * @since arkts {'1.1':'11','1.2':'20'}
291   * @arkts 1.1&1.2
292   */
293   /**
294   * Display Area Title, First subtitle of the GridObjectSortComponent.
295   * @type { ?ResourceStr }
296   * @syscap SystemCapability.ArkUI.ArkUI.Full
297   * @crossplatform
298   * @atomicservice
299   * @since 12
300   */
301  showAreaTitle?: ResourceStr;
302
303  /**
304   * Add Zone Title, second subtitle of the GridObjectSortComponent.
305   * @type { ?ResourceStr }
306   * @syscap SystemCapability.ArkUI.ArkUI.Full
307   * @crossplatform
308   * @since arkts {'1.1':'11','1.2':'20'}
309   * @arkts 1.1&1.2
310   */
311   /**
312   * Add Zone Title, second subtitle of the GridObjectSortComponent.
313   * @type { ?ResourceStr }
314   * @syscap SystemCapability.ArkUI.ArkUI.Full
315   * @crossplatform
316   * @atomicservice
317   * @since 12
318   */
319  addAreaTitle?: ResourceStr;
320}
321
322/**
323 * Declare struct GridObjectSortComponent.
324 * @struct { GridObjectSortComponent }
325 * @syscap SystemCapability.ArkUI.ArkUI.Full
326 * @crossplatform
327 * @since arkts {'1.1':'11','1.2':'20'}
328 * @arkts 1.1&1.2
329 */
330 /**
331 * Declare struct GridObjectSortComponent.
332 * @struct { GridObjectSortComponent }
333 * @syscap SystemCapability.ArkUI.ArkUI.Full
334 * @crossplatform
335 * @atomicservice
336 * @since 12
337 */
338@Component
339export declare struct GridObjectSortComponent {
340  /**
341   * Component types and parameters of the GridObjectSortComponent.
342   * @type { GridObjectSortComponentOptions }
343   * @syscap SystemCapability.ArkUI.ArkUI.Full
344   * @crossplatform
345   * @since arkts {'1.1':'11','1.2':'20'}
346   * @arkts 1.1&1.2
347   */
348   /**
349   * Component types and parameters of the GridObjectSortComponent.
350   * @type { GridObjectSortComponentOptions }
351   * @syscap SystemCapability.ArkUI.ArkUI.Full
352   * @crossplatform
353   * @atomicservice
354   * @since 12
355   */
356  @Prop
357  options: GridObjectSortComponentOptions;
358
359  /**
360   * Data list of GridObjectSortComponent.
361   * @type { Array<GridObjectSortComponentItem> }
362   * @syscap SystemCapability.ArkUI.ArkUI.Full
363   * @crossplatform
364   * @since arkts {'1.1':'11','1.2':'20'}
365   * @arkts 1.1&1.2
366   */
367   /**
368   * Data list of GridObjectSortComponent.
369   * @type { Array<GridObjectSortComponentItem> }
370   * @syscap SystemCapability.ArkUI.ArkUI.Full
371   * @crossplatform
372   * @atomicservice
373   * @since 12
374   */
375  dataList: Array<GridObjectSortComponentItem>;
376
377  /**
378   * Callback when Obtain edited data.
379   * @type { (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void }
380   * @syscap SystemCapability.ArkUI.ArkUI.Full
381   * @crossplatform
382   * @since arkts {'1.1':'11','1.2':'20'}
383   * @arkts 1.1&1.2
384   */
385   /**
386   * Callback when Obtain edited data.
387   * @type { (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void }
388   * @syscap SystemCapability.ArkUI.ArkUI.Full
389   * @crossplatform
390   * @atomicservice
391   * @since 12
392   */
393  onSave: (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void;
394
395  /**
396   * Cancel callback for saving data.
397   * @type { () => void }
398   * @syscap SystemCapability.ArkUI.ArkUI.Full
399   * @crossplatform
400   * @since arkts {'1.1':'11','1.2':'20'}
401   * @arkts 1.1&1.2
402   */
403   /**
404   * Cancel callback for saving data.
405   * @type { () => void }
406   * @syscap SystemCapability.ArkUI.ArkUI.Full
407   * @crossplatform
408   * @atomicservice
409   * @since 12
410   */
411  onCancel: () => void;
412
413  /**
414   * Build function of GridObjectSortComponent.
415   * @syscap SystemCapability.ArkUI.ArkUI.Full
416   * @crossplatform
417   * @since arkts {'1.1':'11','1.2':'20'}
418   * @arkts 1.1&1.2
419   */
420   /**
421   * Build function of GridObjectSortComponent.
422   * @syscap SystemCapability.ArkUI.ArkUI.Full
423   * @crossplatform
424   * @atomicservice
425   * @since 12
426   */
427  build(): void;
428}