1/* 2 * Copyright (c) 2022-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 * Defines the list item group style. 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 10 27 */ 28/** 29 * Defines the list item group style. 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @atomicservice 35 * @since 11 36 */ 37declare enum ListItemGroupStyle { 38 /** 39 * Show custom style. 40 * 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @since 10 43 */ 44 /** 45 * Show custom style. 46 * 47 * @syscap SystemCapability.ArkUI.ArkUI.Full 48 * @crossplatform 49 * @atomicservice 50 * @since 11 51 */ 52 NONE = 0, 53 54 /** 55 * Show default style. 56 * 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @since 10 59 */ 60 /** 61 * Show default style. 62 * 63 * @syscap SystemCapability.ArkUI.ArkUI.Full 64 * @crossplatform 65 * @atomicservice 66 * @since 11 67 */ 68 CARD = 1, 69} 70 71/** 72 * Defines the list item group options. 73 * 74 * @interface ListItemGroupOptions 75 * @syscap SystemCapability.ArkUI.ArkUI.Full 76 * @since 9 77 */ 78/** 79 * Defines the list item group options. 80 * 81 * @interface ListItemGroupOptions 82 * @syscap SystemCapability.ArkUI.ArkUI.Full 83 * @crossplatform 84 * @since 10 85 */ 86/** 87 * Defines the list item group options. 88 * 89 * @interface ListItemGroupOptions 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @crossplatform 92 * @atomicservice 93 * @since 11 94 */ 95declare interface ListItemGroupOptions { 96 /** 97 * Describes the ListItemGroup header. 98 * 99 * @type { ?CustomBuilder } 100 * @syscap SystemCapability.ArkUI.ArkUI.Full 101 * @since 9 102 */ 103 /** 104 * Describes the ListItemGroup header. 105 * 106 * @type { ?CustomBuilder } 107 * @syscap SystemCapability.ArkUI.ArkUI.Full 108 * @crossplatform 109 * @since 10 110 */ 111 /** 112 * Describes the ListItemGroup header. 113 * 114 * @type { ?CustomBuilder } 115 * @syscap SystemCapability.ArkUI.ArkUI.Full 116 * @crossplatform 117 * @atomicservice 118 * @since 11 119 */ 120 header?: CustomBuilder; 121 122 /** 123 * Describes the ListItemGroup headerComponent. 124 * 125 * @type { ?ComponentContent } 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @crossplatform 128 * @atomicservice 129 * @since 13 130 */ 131 headerComponent?: ComponentContent; 132 133 /** 134 * Describes the ListItemGroup footer. 135 * 136 * @type { ?CustomBuilder } 137 * @syscap SystemCapability.ArkUI.ArkUI.Full 138 * @since 9 139 */ 140 /** 141 * Describes the ListItemGroup footer. 142 * 143 * @type { ?CustomBuilder } 144 * @syscap SystemCapability.ArkUI.ArkUI.Full 145 * @crossplatform 146 * @since 10 147 */ 148 /** 149 * Describes the ListItemGroup footer. 150 * 151 * @type { ?CustomBuilder } 152 * @syscap SystemCapability.ArkUI.ArkUI.Full 153 * @crossplatform 154 * @atomicservice 155 * @since 11 156 */ 157 footer?: CustomBuilder; 158 159 /** 160 * Describes the ListItemGroup footerComponent. 161 * 162 * @type { ?ComponentContent } 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @crossplatform 165 * @atomicservice 166 * @since 13 167 */ 168 footerComponent?: ComponentContent; 169 170 /** 171 * Describes the ListItemGroup space. 172 * 173 * @type { ?(number | string) } 174 * @syscap SystemCapability.ArkUI.ArkUI.Full 175 * @since 9 176 */ 177 /** 178 * Describes the ListItemGroup space. 179 * 180 * @type { ?(number | string) } 181 * @syscap SystemCapability.ArkUI.ArkUI.Full 182 * @crossplatform 183 * @since 10 184 */ 185 /** 186 * Describes the ListItemGroup space. 187 * 188 * @type { ?(number | string) } 189 * @syscap SystemCapability.ArkUI.ArkUI.Full 190 * @crossplatform 191 * @atomicservice 192 * @since 11 193 */ 194 space?: number | string; 195 196 /** 197 * Describes the ListItemGroup style. 198 * 199 * @type { ?ListItemGroupStyle } 200 * @syscap SystemCapability.ArkUI.ArkUI.Full 201 * @since 10 202 */ 203 /** 204 * Describes the ListItemGroup style. 205 * 206 * @type { ?ListItemGroupStyle } 207 * @syscap SystemCapability.ArkUI.ArkUI.Full 208 * @crossplatform 209 * @atomicservice 210 * @since 11 211 */ 212 style?: ListItemGroupStyle; 213} 214 215/** 216 * Defines the ListItemGroup component 217 * 218 * @interface ListItemGroupInterface 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @since 9 221 */ 222/** 223 * Defines the ListItemGroup component 224 * 225 * @interface ListItemGroupInterface 226 * @syscap SystemCapability.ArkUI.ArkUI.Full 227 * @crossplatform 228 * @since 10 229 */ 230/** 231 * Defines the ListItemGroup component 232 * 233 * @interface ListItemGroupInterface 234 * @syscap SystemCapability.ArkUI.ArkUI.Full 235 * @crossplatform 236 * @atomicservice 237 * @since 11 238 */ 239interface ListItemGroupInterface { 240 /** 241 * Called when interface is called. 242 * 243 * @param { ListItemGroupOptions } options 244 * @returns { ListItemGroupAttribute } 245 * @syscap SystemCapability.ArkUI.ArkUI.Full 246 * @since 9 247 */ 248 /** 249 * Called when interface is called. 250 * 251 * @param { ListItemGroupOptions } options 252 * @returns { ListItemGroupAttribute } 253 * @syscap SystemCapability.ArkUI.ArkUI.Full 254 * @crossplatform 255 * @since 10 256 */ 257 /** 258 * Called when interface is called. 259 * 260 * @param { ListItemGroupOptions } options 261 * @returns { ListItemGroupAttribute } 262 * @syscap SystemCapability.ArkUI.ArkUI.Full 263 * @crossplatform 264 * @atomicservice 265 * @since 11 266 */ 267 (options?: ListItemGroupOptions): ListItemGroupAttribute; 268} 269 270/** 271 * Defines the item group attribute functions. 272 * 273 * @extends CommonMethod<ListItemGroupAttribute> 274 * @syscap SystemCapability.ArkUI.ArkUI.Full 275 * @since 9 276 */ 277/** 278 * Defines the item group attribute functions. 279 * 280 * @extends CommonMethod<ListItemGroupAttribute> 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @since 10 284 */ 285/** 286 * Defines the item group attribute functions. 287 * 288 * @extends CommonMethod<ListItemGroupAttribute> 289 * @syscap SystemCapability.ArkUI.ArkUI.Full 290 * @crossplatform 291 * @atomicservice 292 * @since 11 293 */ 294declare class ListItemGroupAttribute extends CommonMethod<ListItemGroupAttribute> { 295 /** 296 * Called when the ListItemGroup split line style is set. 297 * 298 * @param { { 299 * strokeWidth: Length; 300 * color?: ResourceColor; 301 * startMargin?: Length; 302 * endMargin?: Length; 303 * } | null } value 304 * @returns { ListItemGroupAttribute } 305 * @syscap SystemCapability.ArkUI.ArkUI.Full 306 * @since 9 307 */ 308 /** 309 * Called when the ListItemGroup split line style is set. 310 * 311 * @param { { 312 * strokeWidth: Length; 313 * color?: ResourceColor; 314 * startMargin?: Length; 315 * endMargin?: Length; 316 * } | null } value 317 * @returns { ListItemGroupAttribute } 318 * @syscap SystemCapability.ArkUI.ArkUI.Full 319 * @crossplatform 320 * @since 10 321 */ 322 /** 323 * Called when the ListItemGroup split line style is set. 324 * 325 * @param { { 326 * strokeWidth: Length; 327 * color?: ResourceColor; 328 * startMargin?: Length; 329 * endMargin?: Length; 330 * } | null } value 331 * @returns { ListItemGroupAttribute } 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @crossplatform 334 * @atomicservice 335 * @since 11 336 */ 337 /** 338 * Called when the ListItemGroup split line style is set. 339 * Anonymous Object Rectification. 340 * 341 * @param { ListDividerOptions | null } value 342 * @returns { ListItemGroupAttribute } 343 * @syscap SystemCapability.ArkUI.ArkUI.Full 344 * @crossplatform 345 * @atomicservice 346 * @since 18 347 */ 348 divider( 349 value: ListDividerOptions | null, 350 ): ListItemGroupAttribute; 351 352 /** 353 * Set children main size for ListItemGroup. 354 * 355 * @param { ChildrenMainSize } value - children main size for ListItemGroup 356 * @returns { ListItemGroupAttribute } the attribute of the ListItemGroup. 357 * @syscap SystemCapability.ArkUI.ArkUI.Full 358 * @crossplatform 359 * @atomicservice 360 * @since 12 361 */ 362 childrenMainSize(value: ChildrenMainSize): ListItemGroupAttribute; 363} 364 365/** 366 * Defines ListItemGroup Component instance. 367 * 368 * @syscap SystemCapability.ArkUI.ArkUI.Full 369 * @since 9 370 */ 371/** 372 * Defines ListItemGroup Component instance. 373 * 374 * @syscap SystemCapability.ArkUI.ArkUI.Full 375 * @crossplatform 376 * @since 10 377 */ 378/** 379 * Defines ListItemGroup Component instance. 380 * 381 * @syscap SystemCapability.ArkUI.ArkUI.Full 382 * @crossplatform 383 * @atomicservice 384 * @since 11 385 */ 386declare const ListItemGroupInstance: ListItemGroupAttribute; 387 388/** 389 * Defines ListItemGroup Component. 390 * 391 * @syscap SystemCapability.ArkUI.ArkUI.Full 392 * @since 9 393 */ 394/** 395 * Defines ListItemGroup Component. 396 * 397 * @syscap SystemCapability.ArkUI.ArkUI.Full 398 * @crossplatform 399 * @since 10 400 */ 401/** 402 * Defines ListItemGroup Component. 403 * 404 * @syscap SystemCapability.ArkUI.ArkUI.Full 405 * @crossplatform 406 * @atomicservice 407 * @since 11 408 */ 409declare const ListItemGroup: ListItemGroupInterface; 410