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/** 22 * Controls the style types of GridObjectSortComponent. 23 * @enum { string } 24 * @syscap SystemCapability.ArkUI.ArkUI.Full 25 * @crossplatform 26 * @since 11 27 */ 28 /** 29 * Controls the style types of GridObjectSortComponent. 30 * @enum { string } 31 * @syscap SystemCapability.ArkUI.ArkUI.Full 32 * @crossplatform 33 * @atomicservice 34 * @since 12 35 */ 36export declare enum GridObjectSortComponentType { 37 /** 38 * The GridObjectSortComponent image text type. 39 * @syscap SystemCapability.ArkUI.ArkUI.Full 40 * @crossplatform 41 * @since 11 42 */ 43 /** 44 * The GridObjectSortComponent image text type. 45 * @syscap SystemCapability.ArkUI.ArkUI.Full 46 * @crossplatform 47 * @atomicservice 48 * @since 12 49 */ 50 IMAGE_TEXT = "image_text", 51 52 /** 53 * The GridObjectSortComponent text type. 54 * @syscap SystemCapability.ArkUI.ArkUI.Full 55 * @crossplatform 56 * @since 11 57 */ 58 /** 59 * The GridObjectSortComponent text type. 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @crossplatform 62 * @atomicservice 63 * @since 12 64 */ 65 TEXT = "text" 66} 67 68/** 69 * Declaration of the GridObjectSortComponent item. 70 * @interface GridObjectSortComponentIteml 71 * @syscap SystemCapability.ArkUI.ArkUI.Full 72 * @crossplatform 73 * @since 11 74 */ 75 /** 76 * Declaration of the GridObjectSortComponent item. 77 * @interface GridObjectSortComponentIteml 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @atomicservice 81 * @since 12 82 */ 83export interface GridObjectSortComponentItem { 84 /** 85 * id of GridObjectSortComponent item. 86 * @type { number | string } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @since 11 90 */ 91 /** 92 * id of GridObjectSortComponent item. 93 * @type { number | string } 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @crossplatform 96 * @atomicservice 97 * @since 12 98 */ 99 id: number | string; 100 101 /** 102 * GridObjectSortComponent item text. 103 * @type { ResourceStr } 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @crossplatform 106 * @since 11 107 */ 108 /** 109 * GridObjectSortComponent item text. 110 * @type { ResourceStr } 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @crossplatform 113 * @atomicservice 114 * @since 12 115 */ 116 text: ResourceStr; 117 118 /** 119 * selected of GridObjectSortComponent item, true is show area, false is add area. 120 * @type { boolean } 121 * @syscap SystemCapability.ArkUI.ArkUI.Full 122 * @crossplatform 123 * @since 11 124 */ 125 /** 126 * selected of GridObjectSortComponent item, true is show area, false is add area. 127 * @type { boolean } 128 * @syscap SystemCapability.ArkUI.ArkUI.Full 129 * @crossplatform 130 * @atomicservice 131 * @since 12 132 */ 133 selected: boolean; 134 135 /** 136 * order of GridObjectSortComponentItem, Used for sorting dataList. 137 * @type { number } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @crossplatform 140 * @since 11 141 */ 142 /** 143 * order of GridObjectSortComponentItem, Used for sorting dataList. 144 * @type { number } 145 * @syscap SystemCapability.ArkUI.ArkUI.Full 146 * @crossplatform 147 * @atomicservice 148 * @since 12 149 */ 150 order: number; 151 152 /** 153 * image resource path of the GridObjectSortComponent item. 154 * @type { ?ResourceStr } 155 * @syscap SystemCapability.ArkUI.ArkUI.Full 156 * @crossplatform 157 * @since 11 158 */ 159 /** 160 * image resource path of the GridObjectSortComponent item. 161 * @type { ?ResourceStr } 162 * @syscap SystemCapability.ArkUI.ArkUI.Full 163 * @crossplatform 164 * @atomicservice 165 * @since 12 166 */ 167 url?: ResourceStr; 168} 169 170/** 171 * GridObjectSortComponentOptions of GridObjectSortComponent. 172 * @interface GridEditOptions 173 * @syscap SystemCapability.ArkUI.ArkUI.Full 174 * @crossplatform 175 * @since 11 176 */ 177 /** 178 * GridObjectSortComponentOptions of GridObjectSortComponent. 179 * @interface GridEditOptions 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @crossplatform 182 * @atomicservice 183 * @since 12 184 */ 185export interface GridObjectSortComponentOptions { 186 /** 187 * Configuration GridObjectSortComponent type. 188 * @type { GridObjectSortComponentType } 189 * @default GridObjectSortComponentType.TEXT 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @crossplatform 192 * @since 11 193 */ 194 /** 195 * Configuration GridObjectSortComponent type. 196 * @type { GridObjectSortComponentType } 197 * @default GridObjectSortComponentType.TEXT 198 * @syscap SystemCapability.ArkUI.ArkUI.Full 199 * @crossplatform 200 * @atomicservice 201 * @since 12 202 */ 203 type?: GridObjectSortComponentType; 204 205 /** 206 * The size of the GridObjectSortComponent image. 207 * @type { ?number | ?Resource } 208 * @syscap SystemCapability.ArkUI.ArkUI.Full 209 * @crossplatform 210 * @since 11 211 */ 212 /** 213 * The size of the GridObjectSortComponent image. 214 * @type { ?number | ?Resource } 215 * @syscap SystemCapability.ArkUI.ArkUI.Full 216 * @crossplatform 217 * @atomicservice 218 * @since 12 219 */ 220 imageSize?: number | Resource; 221 222 /** 223 * The title displayed in the unedited state of the GridObjectSortComponent. 224 * @type { ?ResourceStr } 225 * @syscap SystemCapability.ArkUI.ArkUI.Full 226 * @crossplatform 227 * @since 11 228 */ 229 /** 230 * The title displayed in the unedited state of the GridObjectSortComponent. 231 * @type { ?ResourceStr } 232 * @syscap SystemCapability.ArkUI.ArkUI.Full 233 * @crossplatform 234 * @atomicservice 235 * @since 12 236 */ 237 normalTitle?: ResourceStr; 238 239 /** 240 * The title displayed in the GridObjectSortComponent edit state. 241 * @type { ?ResourceStr } 242 * @syscap SystemCapability.ArkUI.ArkUI.Full 243 * @crossplatform 244 * @since 11 245 */ 246 /** 247 * The title displayed in the GridObjectSortComponent edit state. 248 * @type { ?ResourceStr } 249 * @syscap SystemCapability.ArkUI.ArkUI.Full 250 * @crossplatform 251 * @atomicservice 252 * @since 12 253 */ 254 editTitle?: ResourceStr; 255 256 /** 257 * Display Area Title, First subtitle of the GridObjectSortComponent. 258 * @type { ?ResourceStr } 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @crossplatform 261 * @since 11 262 */ 263 /** 264 * Display Area Title, First subtitle of the GridObjectSortComponent. 265 * @type { ?ResourceStr } 266 * @syscap SystemCapability.ArkUI.ArkUI.Full 267 * @crossplatform 268 * @atomicservice 269 * @since 12 270 */ 271 showAreaTitle?: ResourceStr; 272 273 /** 274 * Add Zone Title, second subtitle of the GridObjectSortComponent. 275 * @type { ?ResourceStr } 276 * @syscap SystemCapability.ArkUI.ArkUI.Full 277 * @crossplatform 278 * @since 11 279 */ 280 /** 281 * Add Zone Title, second subtitle of the GridObjectSortComponent. 282 * @type { ?ResourceStr } 283 * @syscap SystemCapability.ArkUI.ArkUI.Full 284 * @crossplatform 285 * @atomicservice 286 * @since 12 287 */ 288 addAreaTitle?: ResourceStr; 289} 290 291/** 292 * Declare struct GridObjectSortComponent. 293 * @struct { GridObjectSortComponent } 294 * @syscap SystemCapability.ArkUI.ArkUI.Full 295 * @crossplatform 296 * @since 11 297 */ 298 /** 299 * Declare struct GridObjectSortComponent. 300 * @struct { GridObjectSortComponent } 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @crossplatform 303 * @atomicservice 304 * @since 12 305 */ 306@Component 307export declare struct GridObjectSortComponent { 308 /** 309 * Component types and parameters of the GridObjectSortComponent. 310 * @type { GridObjectSortComponentOptions } 311 * @syscap SystemCapability.ArkUI.ArkUI.Full 312 * @crossplatform 313 * @since 11 314 */ 315 /** 316 * Component types and parameters of the GridObjectSortComponent. 317 * @type { GridObjectSortComponentOptions } 318 * @syscap SystemCapability.ArkUI.ArkUI.Full 319 * @crossplatform 320 * @atomicservice 321 * @since 12 322 */ 323 @Prop 324 options: GridObjectSortComponentOptions; 325 326 /** 327 * Data list of GridObjectSortComponent. 328 * @type { Array<GridObjectSortComponentItem> } 329 * @syscap SystemCapability.ArkUI.ArkUI.Full 330 * @crossplatform 331 * @since 11 332 */ 333 /** 334 * Data list of GridObjectSortComponent. 335 * @type { Array<GridObjectSortComponentItem> } 336 * @syscap SystemCapability.ArkUI.ArkUI.Full 337 * @crossplatform 338 * @atomicservice 339 * @since 12 340 */ 341 dataList: Array<GridObjectSortComponentItem>; 342 343 /** 344 * Callback when Obtain edited data. 345 * @type { (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void } 346 * @syscap SystemCapability.ArkUI.ArkUI.Full 347 * @crossplatform 348 * @since 11 349 */ 350 /** 351 * Callback when Obtain edited data. 352 * @type { (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void } 353 * @syscap SystemCapability.ArkUI.ArkUI.Full 354 * @crossplatform 355 * @atomicservice 356 * @since 12 357 */ 358 onSave: (select: Array<GridObjectSortComponentItem>, unselect: Array<GridObjectSortComponentItem>) => void; 359 360 /** 361 * Cancel callback for saving data. 362 * @type { () => void } 363 * @syscap SystemCapability.ArkUI.ArkUI.Full 364 * @crossplatform 365 * @since 11 366 */ 367 /** 368 * Cancel callback for saving data. 369 * @type { () => void } 370 * @syscap SystemCapability.ArkUI.ArkUI.Full 371 * @crossplatform 372 * @atomicservice 373 * @since 12 374 */ 375 onCancel: () => void; 376 377 /** 378 * Build function of GridObjectSortComponent. 379 * @syscap SystemCapability.ArkUI.ArkUI.Full 380 * @crossplatform 381 * @since 11 382 */ 383 /** 384 * Build function of GridObjectSortComponent. 385 * @syscap SystemCapability.ArkUI.ArkUI.Full 386 * @crossplatform 387 * @atomicservice 388 * @since 12 389 */ 390 build(): void; 391}