1/* 2 * Copyright (c) 2021-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 * CheckboxGroup SelectStatus 18 * 19 * @enum { number } 20 * @syscap SystemCapability.ArkUI.ArkUI.Full 21 * @since 8 22 */ 23/** 24 * CheckboxGroup SelectStatus 25 * 26 * @enum { number } 27 * @syscap SystemCapability.ArkUI.ArkUI.Full 28 * @since 9 29 * @form 30 */ 31/** 32 * CheckboxGroup SelectStatus 33 * 34 * @enum { number } 35 * @syscap SystemCapability.ArkUI.ArkUI.Full 36 * @crossplatform 37 * @since 10 38 * @form 39 */ 40declare enum SelectStatus { 41 /** 42 * All checkboxes are selected. 43 * 44 * @syscap SystemCapability.ArkUI.ArkUI.Full 45 * @since 8 46 */ 47 /** 48 * All checkboxes are selected. 49 * 50 * @syscap SystemCapability.ArkUI.ArkUI.Full 51 * @since 9 52 * @form 53 */ 54 /** 55 * All checkboxes are selected. 56 * 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @crossplatform 59 * @since 10 60 * @form 61 */ 62 All, 63 /** 64 * Part of the checkbox is selected. 65 * 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @since 8 68 */ 69 /** 70 * Part of the checkbox is selected. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @since 9 74 * @form 75 */ 76 /** 77 * Part of the checkbox is selected. 78 * 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @crossplatform 81 * @since 10 82 * @form 83 */ 84 Part, 85 /** 86 * None of the checkbox is selected. 87 * 88 * @syscap SystemCapability.ArkUI.ArkUI.Full 89 * @since 8 90 */ 91 /** 92 * None of the checkbox is selected. 93 * 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @since 9 96 * @form 97 */ 98 /** 99 * None of the checkbox is selected. 100 * 101 * @syscap SystemCapability.ArkUI.ArkUI.Full 102 * @crossplatform 103 * @since 10 104 * @form 105 */ 106 None, 107} 108 109/** 110 * Defines the options of CheckboxGroup. 111 * 112 * @interface CheckboxGroupOptions 113 * @syscap SystemCapability.ArkUI.ArkUI.Full 114 * @since 8 115 */ 116/** 117 * Defines the options of CheckboxGroup. 118 * 119 * @interface CheckboxGroupOptions 120 * @syscap SystemCapability.ArkUI.ArkUI.Full 121 * @since 9 122 * @form 123 */ 124/** 125 * Defines the options of CheckboxGroup. 126 * 127 * @interface CheckboxGroupOptions 128 * @syscap SystemCapability.ArkUI.ArkUI.Full 129 * @crossplatform 130 * @since 10 131 * @form 132 */ 133declare interface CheckboxGroupOptions { 134 /** 135 * Setting the group of CheckboxGroup. 136 * 137 * @type { ?string } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @since 8 140 */ 141 /** 142 * Setting the group of CheckboxGroup. 143 * 144 * @type { ?string } 145 * @syscap SystemCapability.ArkUI.ArkUI.Full 146 * @since 9 147 * @form 148 */ 149 /** 150 * Setting the group of CheckboxGroup. 151 * 152 * @type { ?string } 153 * @syscap SystemCapability.ArkUI.ArkUI.Full 154 * @crossplatform 155 * @since 10 156 * @form 157 */ 158 group?: string; 159} 160 161/** 162 * Defines the options of CheckboxGroupResult. 163 * 164 * @interface CheckboxGroupResult 165 * @syscap SystemCapability.ArkUI.ArkUI.Full 166 * @since 8 167 */ 168/** 169 * Defines the options of CheckboxGroupResult. 170 * 171 * @interface CheckboxGroupResult 172 * @syscap SystemCapability.ArkUI.ArkUI.Full 173 * @since 9 174 * @form 175 */ 176/** 177 * Defines the options of CheckboxGroupResult. 178 * 179 * @interface CheckboxGroupResult 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @crossplatform 182 * @since 10 183 * @form 184 */ 185declare interface CheckboxGroupResult { 186 /** 187 * Checkbox name. 188 * 189 * @type { Array<string> } 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @since 8 192 */ 193 /** 194 * Checkbox name. 195 * 196 * @type { Array<string> } 197 * @syscap SystemCapability.ArkUI.ArkUI.Full 198 * @since 9 199 * @form 200 */ 201 /** 202 * Checkbox name. 203 * 204 * @type { Array<string> } 205 * @syscap SystemCapability.ArkUI.ArkUI.Full 206 * @crossplatform 207 * @since 10 208 * @form 209 */ 210 name: Array<string>; 211 /** 212 * Set the group of status. 213 * 214 * @type { SelectStatus } 215 * @syscap SystemCapability.ArkUI.ArkUI.Full 216 * @since 8 217 */ 218 /** 219 * Set the group of status. 220 * 221 * @type { SelectStatus } 222 * @syscap SystemCapability.ArkUI.ArkUI.Full 223 * @since 9 224 * @form 225 */ 226 /** 227 * Set the group of status. 228 * 229 * @type { SelectStatus } 230 * @syscap SystemCapability.ArkUI.ArkUI.Full 231 * @crossplatform 232 * @since 10 233 * @form 234 */ 235 status: SelectStatus; 236} 237 238/** 239 * Provides an interface for the CheckboxGroup component. 240 * 241 * @interface CheckboxGroupInterface 242 * @syscap SystemCapability.ArkUI.ArkUI.Full 243 * @since 8 244 */ 245/** 246 * Provides an interface for the CheckboxGroup component. 247 * 248 * @interface CheckboxGroupInterface 249 * @syscap SystemCapability.ArkUI.ArkUI.Full 250 * @since 9 251 * @form 252 */ 253/** 254 * Provides an interface for the CheckboxGroup component. 255 * 256 * @interface CheckboxGroupInterface 257 * @syscap SystemCapability.ArkUI.ArkUI.Full 258 * @crossplatform 259 * @since 10 260 * @form 261 */ 262interface CheckboxGroupInterface { 263 /** 264 * Called when the CheckboxGroup component is used. 265 * 266 * @param { CheckboxGroupOptions } options 267 * @returns { CheckboxGroupAttribute } 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @since 8 270 */ 271 /** 272 * Called when the CheckboxGroup component is used. 273 * 274 * @param { CheckboxGroupOptions } options 275 * @returns { CheckboxGroupAttribute } 276 * @syscap SystemCapability.ArkUI.ArkUI.Full 277 * @since 9 278 * @form 279 */ 280 /** 281 * Called when the CheckboxGroup component is used. 282 * 283 * @param { CheckboxGroupOptions } options 284 * @returns { CheckboxGroupAttribute } 285 * @syscap SystemCapability.ArkUI.ArkUI.Full 286 * @crossplatform 287 * @since 10 288 * @form 289 */ 290 (options?: CheckboxGroupOptions): CheckboxGroupAttribute; 291} 292 293/** 294 * Defines the attribute functions of CheckboxGroup. 295 * 296 * @extends CommonMethod 297 * @syscap SystemCapability.ArkUI.ArkUI.Full 298 * @since 8 299 */ 300/** 301 * Defines the attribute functions of CheckboxGroup. 302 * 303 * @extends CommonMethod 304 * @syscap SystemCapability.ArkUI.ArkUI.Full 305 * @since 9 306 * @form 307 */ 308/** 309 * Defines the attribute functions of CheckboxGroup. 310 * 311 * @extends CommonMethod 312 * @syscap SystemCapability.ArkUI.ArkUI.Full 313 * @crossplatform 314 * @since 10 315 * @form 316 */ 317declare class CheckboxGroupAttribute extends CommonMethod<CheckboxGroupAttribute> { 318 /** 319 * setting whether all checkbox is selected. 320 * 321 * @param { boolean } value 322 * @returns { CheckboxGroupAttribute } 323 * @syscap SystemCapability.ArkUI.ArkUI.Full 324 * @since 8 325 */ 326 /** 327 * setting whether all checkbox is selected. 328 * 329 * @param { boolean } value 330 * @returns { CheckboxGroupAttribute } 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @since 9 333 * @form 334 */ 335 /** 336 * setting whether all checkbox is selected. 337 * 338 * @param { boolean } value 339 * @returns { CheckboxGroupAttribute } 340 * @syscap SystemCapability.ArkUI.ArkUI.Full 341 * @crossplatform 342 * @since 10 343 * @form 344 */ 345 selectAll(value: boolean): CheckboxGroupAttribute; 346 347 /** 348 * setting the display color of checkbox. 349 * 350 * @param { ResourceColor } value 351 * @returns { CheckboxGroupAttribute } 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @since 8 354 */ 355 /** 356 * setting the display color of checkbox. 357 * 358 * @param { ResourceColor } value 359 * @returns { CheckboxGroupAttribute } 360 * @syscap SystemCapability.ArkUI.ArkUI.Full 361 * @since 9 362 * @form 363 */ 364 /** 365 * setting the display color of checkbox. 366 * 367 * @param { ResourceColor } value 368 * @returns { CheckboxGroupAttribute } 369 * @syscap SystemCapability.ArkUI.ArkUI.Full 370 * @crossplatform 371 * @since 10 372 * @form 373 */ 374 selectedColor(value: ResourceColor): CheckboxGroupAttribute; 375 376 /** 377 * Set the display border color of unselected checkbox. 378 * 379 * @param { ResourceColor } value - The color of border when checkboxgroup unselected. 380 * @returns { CheckboxGroupAttribute } 381 * @syscap SystemCapability.ArkUI.ArkUI.Full 382 * @crossplatform 383 * @since 10 384 */ 385 unselectedColor(value: ResourceColor): CheckboxGroupAttribute; 386 387 /** 388 * Set the mark style of checkbox. 389 * 390 * @param { MarkStyle } value - The style configuration of checkboxgroup mark. 391 * @returns { CheckboxGroupAttribute } 392 * @syscap SystemCapability.ArkUI.ArkUI.Full 393 * @crossplatform 394 * @since 10 395 */ 396 mark(value: MarkStyle): CheckboxGroupAttribute; 397 398 /** 399 * Called when the selection status changes. 400 * 401 * @param { function } callback 402 * @returns { CheckboxGroupAttribute } 403 * @syscap SystemCapability.ArkUI.ArkUI.Full 404 * @since 8 405 */ 406 /** 407 * Called when the selection status changes. 408 * 409 * @param { function } callback 410 * @returns { CheckboxGroupAttribute } 411 * @syscap SystemCapability.ArkUI.ArkUI.Full 412 * @since 9 413 * @form 414 */ 415 /** 416 * Called when the selection status changes. 417 * 418 * @param { function } callback 419 * @returns { CheckboxGroupAttribute } 420 * @syscap SystemCapability.ArkUI.ArkUI.Full 421 * @crossplatform 422 * @since 10 423 * @form 424 */ 425 onChange(callback: (event: CheckboxGroupResult) => void): CheckboxGroupAttribute; 426} 427 428/** 429 * Defines CheckboxGroup Component. 430 * 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @since 8 433 */ 434/** 435 * Defines CheckboxGroup Component. 436 * 437 * @syscap SystemCapability.ArkUI.ArkUI.Full 438 * @since 9 439 * @form 440 */ 441/** 442 * Defines CheckboxGroup Component. 443 * 444 * @syscap SystemCapability.ArkUI.ArkUI.Full 445 * @crossplatform 446 * @since 10 447 * @form 448 */ 449declare const CheckboxGroup: CheckboxGroupInterface; 450 451/** 452 * Defines CheckboxGroup Component instance. 453 * 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @since 8 456 */ 457/** 458 * Defines CheckboxGroup Component instance. 459 * 460 * @syscap SystemCapability.ArkUI.ArkUI.Full 461 * @since 9 462 * @form 463 */ 464/** 465 * Defines CheckboxGroup Component instance. 466 * 467 * @syscap SystemCapability.ArkUI.ArkUI.Full 468 * @crossplatform 469 * @since 10 470 * @form 471 */ 472declare const CheckboxGroupInstance: CheckboxGroupAttribute; 473