1/* 2 * Copyright (c) 2024-2025 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 16const overrideMap = new Map(); 17overrideMap.set( 18 'ArkCheckboxComponent', 19 new Map([ 20 ['Symbol(width)', CheckboxWidthModifier], 21 ['Symbol(height)', CheckboxHeightModifier], 22 ]) 23); 24overrideMap.set( 25 'ArkTextComponent', 26 new Map([ 27 ['Symbol(foregroundColor)', TextForegroundColorModifier] 28 ]) 29); 30function applyAndMergeModifier(instance, modifier) { 31 let myMap = modifier._modifiersWithKeys; 32 myMap.setOnChange((key, value) => { 33 modifier._changed = !modifier._changed; 34 }); 35 let component = instance; 36 mergeMaps(component._modifiersWithKeys, modifier._modifiersWithKeys); 37} 38function copyModifierWithKey(obj) { 39 let newObj = { ...obj }; 40 newObj.applyStage = obj === null || obj === void 0 ? void 0 : obj.applyStage; 41 newObj.applyPeer = obj === null || obj === void 0 ? void 0 : obj.applyPeer; 42 newObj.checkObjectDiff = obj === null || obj === void 0 ? void 0 : obj.checkObjectDiff; 43 return newObj; 44} 45function mergeMaps(stageMap, newMap) { 46 newMap.forEach((value, key) => { 47 stageMap.set(key, copyModifierWithKey(value)); 48 }); 49 return stageMap; 50} 51class ModifierUtils { 52 static copyModifierWithKey(obj) { 53 let newObj = { ...obj }; 54 newObj.applyStage = obj === null || obj === void 0 ? void 0 : obj.applyStage; 55 newObj.applyPeer = obj === null || obj === void 0 ? void 0 : obj.applyPeer; 56 newObj.checkObjectDiff = obj === null || obj === void 0 ? void 0 : obj.checkObjectDiff; 57 return newObj; 58 } 59 static mergeMaps(stageMap, newMap) { 60 newMap.forEach((value, key) => { 61 stageMap.set(key, this.copyModifierWithKey(value)); 62 }); 63 } 64 static mergeMapsEmplace(stageMap, newMap, componentOverrideMap) { 65 newMap.forEach((value, key) => { 66 if (!key) { 67 ArkLogConsole.debug('key of modifier map is undefined, ModifierWithKey is ' + 68 (value ? value.constructor.name.toString() : 'undefined')); 69 } else { 70 if (componentOverrideMap.has(key.toString())) { 71 const newValue = new (componentOverrideMap.get(key.toString()))(value.stageValue); 72 stageMap.set(key, newValue); 73 } else { 74 stageMap.set(key, this.copyModifierWithKey(value)); 75 } 76 } 77 }); 78 } 79 static applyAndMergeModifier(instance, modifier) { 80 let component = instance; 81 if (component.constructor.name && overrideMap.has(component.constructor.name)) { 82 const componentOverrideMap = overrideMap.get(component.constructor.name); 83 this.mergeMapsEmplace(component._modifiersWithKeys, modifier._modifiersWithKeys, 84 componentOverrideMap); 85 } else { 86 this.mergeMaps(component._modifiersWithKeys, modifier._modifiersWithKeys); 87 } 88 } 89 static applySetOnChange(modifier) { 90 // It is to make the stateMgmt can addRef of _changed, 91 // so that the modifier change can be observed by makeObserved when modifier._changed changed. 92 modifier._changed; 93 let myMap = modifier._modifiersWithKeys; 94 if (modifier._classType === ModifierType.STATE) { 95 myMap.setOnChange((key, value) => { 96 this.putDirtyModifier(modifier, value); 97 }); 98 } else { 99 myMap.setOnChange((key, value) => { 100 modifier._changed = !modifier._changed; 101 }); 102 } 103 } 104 static putDirtyModifier(arkModifier, attributeModifierWithKey) { 105 attributeModifierWithKey.value = attributeModifierWithKey.stageValue; 106 if (!arkModifier._weakPtr.invalid()) { 107 attributeModifierWithKey.applyPeer(arkModifier.nativePtr, 108 (attributeModifierWithKey.value === undefined || 109 attributeModifierWithKey.value === null) 110 ); 111 } else { 112 ArkLogConsole.debug('pointer is invalid when putDirtyModifier in ' + (arkModifier ? 113 arkModifier.constructor.name.toString() : 'undefined') + ' of ' + (attributeModifierWithKey ? 114 attributeModifierWithKey.constructor.name.toString() : 'undefined')); 115 } 116 this.dirtyComponentSet.add(arkModifier); 117 if (!this.dirtyFlag) { 118 this.dirtyFlag = true; 119 this.requestFrame(); 120 } 121 } 122 static requestFrame() { 123 const frameCallback = () => { 124 if (this.timeoutId !== -1) { 125 clearTimeout(this.timeoutId); 126 } 127 this.dirtyComponentSet.forEach((item) => { 128 const nativePtrValid = !item._weakPtr.invalid(); 129 if (item._nativePtrChanged && nativePtrValid) { 130 item._modifiersWithKeys.forEach((value, key) => { 131 value.applyPeer(item.nativePtr, 132 (value.value === undefined || value.value === null)); 133 }); 134 item._nativePtrChanged = false; 135 } 136 if (nativePtrValid) { 137 getUINativeModule().frameNode.markDirty(item.nativePtr, 0b100); 138 } 139 }); 140 this.dirtyComponentSet.clear(); 141 this.dirtyFlag = false; 142 this.timeoutId = -1; 143 }; 144 if (this.timeoutId !== -1) { 145 clearTimeout(this.timeoutId); 146 } 147 this.timeoutId = setTimeout(frameCallback, 100); 148 getUINativeModule().frameNode.registerFrameCallback(frameCallback); 149 } 150} 151ModifierUtils.dirtyComponentSet = new Set(); 152ModifierUtils.dirtyFlag = false; 153ModifierUtils.timeoutId = -1; 154class ModifierMap { 155 constructor() { 156 this.map_ = new Map(); 157 } 158 clear() { 159 this.map_.clear(); 160 } 161 delete(key) { 162 return this.map_.delete(key); 163 } 164 forEach(callbackfn, thisArg) { 165 this.map_.forEach(callbackfn, thisArg); 166 } 167 get(key) { 168 return this.map_.get(key); 169 } 170 has(key) { 171 return this.map_.has(key); 172 } 173 set(key, value) { 174 const _a = this.changeCallback; 175 this.map_.set(key, value); 176 _a === null || _a === void 0 ? void 0 : _a(key, value); 177 return this; 178 } 179 get size() { 180 return this.map_.size; 181 } 182 entries() { 183 return this.map_.entries(); 184 } 185 keys() { 186 return this.map_.keys(); 187 } 188 values() { 189 return this.map_.values(); 190 } 191 [Symbol.iterator]() { 192 return this.map_.entries(); 193 } 194 get [Symbol.toStringTag]() { 195 return 'ModifierMapTag'; 196 } 197 setOnChange(callback) { 198 this.changeCallback = callback; 199 } 200} 201class AttributeUpdater { 202 constructor() { 203 this._state = AttributeUpdater.StateEnum.INIT; 204 this._attribute = null; 205 this._isAttributeUpdater = true; 206 } 207 get isAttributeUpdater() { 208 return this._isAttributeUpdater; 209 } 210 get attribute() { 211 return this._attribute; 212 } 213 set attribute(value) { 214 if (!this._attribute && value) { 215 this._attribute = value; 216 } 217 } 218 get modifierState() { 219 return this._state; 220 } 221 set modifierState(value) { 222 this._state = value; 223 } 224 initializeModifier(instance) {} 225 onComponentChanged(instance) {} 226 updateConstructorParams(...args) { 227 if (!this.attribute) { 228 ArkLogConsole.debug('AttributeUpdater has not been initialized before updateConstructorParams.'); 229 return; 230 } 231 this.attribute.initialize(args); 232 } 233} 234AttributeUpdater.StateEnum = { 235 INIT: 0, 236 UPDATE: 1, 237}; 238class CommonModifier extends ArkComponent { 239 constructor(nativePtr, classType) { 240 if (!classType) { 241 classType = ModifierType.EXPOSE_MODIFIER; 242 } 243 super(nativePtr, classType); 244 } 245 applyNormalAttribute(instance) { 246 ModifierUtils.applySetOnChange(this); 247 ModifierUtils.applyAndMergeModifier(instance, this); 248 } 249} 250class AlphabetIndexerModifier extends ArkAlphabetIndexerComponent { 251 constructor(nativePtr, classType) { 252 super(nativePtr, classType); 253 this._modifiersWithKeys = new ModifierMap(); 254 } 255 applyNormalAttribute(instance) { 256 ModifierUtils.applySetOnChange(this); 257 ModifierUtils.applyAndMergeModifier(instance, this); 258 } 259} 260class BlankModifier extends ArkBlankComponent { 261 constructor(nativePtr, classType) { 262 super(nativePtr, classType); 263 this._modifiersWithKeys = new ModifierMap(); 264 } 265 applyNormalAttribute(instance) { 266 ModifierUtils.applySetOnChange(this); 267 ModifierUtils.applyAndMergeModifier(instance, this); 268 } 269} 270class ButtonModifier extends ArkButtonComponent { 271 constructor(nativePtr, classType) { 272 super(nativePtr, classType); 273 this._modifiersWithKeys = new ModifierMap(); 274 } 275 applyNormalAttribute(instance) { 276 ModifierUtils.applySetOnChange(this); 277 ModifierUtils.applyAndMergeModifier(instance, this); 278 } 279} 280class CalendarPickerModifier extends ArkCalendarPickerComponent { 281 constructor(nativePtr, classType) { 282 super(nativePtr, classType); 283 this._modifiersWithKeys = new ModifierMap(); 284 } 285 applyNormalAttribute(instance) { 286 ModifierUtils.applySetOnChange(this); 287 ModifierUtils.applyAndMergeModifier(instance, this); 288 } 289} 290class CheckboxModifier extends ArkCheckboxComponent { 291 constructor(nativePtr, classType) { 292 super(nativePtr, classType); 293 this._modifiersWithKeys = new ModifierMap(); 294 } 295 applyNormalAttribute(instance) { 296 ModifierUtils.applySetOnChange(this); 297 ModifierUtils.applyAndMergeModifier(instance, this); 298 } 299} 300class CheckboxGroupModifier extends ArkCheckboxGroupComponent { 301 constructor(nativePtr, classType) { 302 super(nativePtr, classType); 303 this._modifiersWithKeys = new ModifierMap(); 304 } 305 applyNormalAttribute(instance) { 306 ModifierUtils.applySetOnChange(this); 307 ModifierUtils.applyAndMergeModifier(instance, this); 308 } 309} 310class CircleModifier extends ArkCircleComponent { 311 constructor(nativePtr, classType) { 312 super(nativePtr, classType); 313 this._modifiersWithKeys = new ModifierMap(); 314 } 315 applyNormalAttribute(instance) { 316 ModifierUtils.applySetOnChange(this); 317 ModifierUtils.applyAndMergeModifier(instance, this); 318 } 319} 320class ColumnModifier extends ArkColumnComponent { 321 constructor(nativePtr, classType) { 322 super(nativePtr, classType); 323 this._modifiersWithKeys = new ModifierMap(); 324 } 325 applyNormalAttribute(instance) { 326 ModifierUtils.applySetOnChange(this); 327 ModifierUtils.applyAndMergeModifier(instance, this); 328 } 329} 330class ColumnSplitModifier extends ArkColumnSplitComponent { 331 constructor(nativePtr, classType) { 332 super(nativePtr, classType); 333 this._modifiersWithKeys = new ModifierMap(); 334 } 335 applyNormalAttribute(instance) { 336 ModifierUtils.applySetOnChange(this); 337 ModifierUtils.applyAndMergeModifier(instance, this); 338 } 339} 340class CounterModifier extends ArkCounterComponent { 341 constructor(nativePtr, classType) { 342 super(nativePtr, classType); 343 this._modifiersWithKeys = new ModifierMap(); 344 } 345 applyNormalAttribute(instance) { 346 ModifierUtils.applySetOnChange(this); 347 ModifierUtils.applyAndMergeModifier(instance, this); 348 } 349} 350class DataPanelModifier extends ArkDataPanelComponent { 351 constructor(nativePtr, classType) { 352 super(nativePtr, classType); 353 this._modifiersWithKeys = new ModifierMap(); 354 } 355 applyNormalAttribute(instance) { 356 ModifierUtils.applySetOnChange(this); 357 ModifierUtils.applyAndMergeModifier(instance, this); 358 } 359} 360class DatePickerModifier extends ArkDatePickerComponent { 361 constructor(nativePtr, classType) { 362 super(nativePtr, classType); 363 this._modifiersWithKeys = new ModifierMap(); 364 } 365 applyNormalAttribute(instance) { 366 ModifierUtils.applySetOnChange(this); 367 ModifierUtils.applyAndMergeModifier(instance, this); 368 } 369} 370class DividerModifier extends ArkDividerComponent { 371 constructor(nativePtr, classType) { 372 super(nativePtr, classType); 373 this._modifiersWithKeys = new ModifierMap(); 374 } 375 applyNormalAttribute(instance) { 376 ModifierUtils.applySetOnChange(this); 377 ModifierUtils.applyAndMergeModifier(instance, this); 378 } 379} 380class EmbeddedComponentModifier extends ArkEmbeddedComponent { 381 constructor(nativePtr, classType) { 382 super(nativePtr, classType); 383 this._modifiersWithKeys = new ModifierMap(); 384 } 385 applyNormalAttribute(instance) { 386 ModifierUtils.applySetOnChange(this); 387 ModifierUtils.applyAndMergeModifier(instance, this); 388 } 389} 390class FlexModifier extends ArkFlexComponent { 391 constructor(nativePtr, classType) { 392 super(nativePtr, classType); 393 this._modifiersWithKeys = new ModifierMap(); 394 } 395 applyNormalAttribute(instance) { 396 ModifierUtils.applySetOnChange(this); 397 ModifierUtils.applyAndMergeModifier(instance, this); 398 } 399} 400class FormComponentModifier extends ArkFormComponentComponent { 401 constructor(nativePtr, classType) { 402 super(nativePtr, classType); 403 this._modifiersWithKeys = new ModifierMap(); 404 } 405 applyNormalAttribute(instance) { 406 ModifierUtils.applySetOnChange(this); 407 ModifierUtils.applyAndMergeModifier(instance, this); 408 } 409} 410class GaugeModifier extends ArkGaugeComponent { 411 constructor(nativePtr, classType) { 412 super(nativePtr, classType); 413 this._modifiersWithKeys = new ModifierMap(); 414 } 415 applyNormalAttribute(instance) { 416 ModifierUtils.applySetOnChange(this); 417 ModifierUtils.applyAndMergeModifier(instance, this); 418 } 419} 420class GridModifier extends ArkGridComponent { 421 constructor(nativePtr, classType) { 422 super(nativePtr, classType); 423 this._modifiersWithKeys = new ModifierMap(); 424 } 425 applyNormalAttribute(instance) { 426 ModifierUtils.applySetOnChange(this); 427 ModifierUtils.applyAndMergeModifier(instance, this); 428 } 429} 430class GridColModifier extends ArkGridColComponent { 431 constructor(nativePtr, classType) { 432 super(nativePtr, classType); 433 this._modifiersWithKeys = new ModifierMap(); 434 } 435 applyNormalAttribute(instance) { 436 ModifierUtils.applySetOnChange(this); 437 ModifierUtils.applyAndMergeModifier(instance, this); 438 } 439} 440class GridItemModifier extends ArkGridItemComponent { 441 constructor(nativePtr, classType) { 442 super(nativePtr, classType); 443 this._modifiersWithKeys = new ModifierMap(); 444 } 445 applyNormalAttribute(instance) { 446 ModifierUtils.applySetOnChange(this); 447 ModifierUtils.applyAndMergeModifier(instance, this); 448 } 449} 450class GridRowModifier extends ArkGridRowComponent { 451 constructor(nativePtr, classType) { 452 super(nativePtr, classType); 453 this._modifiersWithKeys = new ModifierMap(); 454 } 455 applyNormalAttribute(instance) { 456 ModifierUtils.applySetOnChange(this); 457 ModifierUtils.applyAndMergeModifier(instance, this); 458 } 459} 460class HyperlinkModifier extends ArkHyperlinkComponent { 461 constructor(nativePtr, classType) { 462 super(nativePtr, classType); 463 this._modifiersWithKeys = new ModifierMap(); 464 } 465 applyNormalAttribute(instance) { 466 ModifierUtils.applySetOnChange(this); 467 ModifierUtils.applyAndMergeModifier(instance, this); 468 } 469} 470function copyImageAnimatorModifierWithKey(obj) { 471 let _a; 472 let _b; 473 let newObj = { ...obj }; 474 if (obj.convertImageFrames !== undefined) { 475 newObj.convertImageFrames = (_a = obj) === null || _a === void 0 ? void 0 : _a.convertImageFrames; 476 newObj.isEqual = (_b = obj) === null || _b === void 0 ? void 0 : _b.isEqual; 477 } 478 newObj.applyStage = obj === null || obj === void 0 ? void 0 : obj.applyStage; 479 newObj.applyPeer = obj === null || obj === void 0 ? void 0 : obj.applyPeer; 480 newObj.checkObjectDiff = obj === null || obj === void 0 ? void 0 : obj.checkObjectDiff; 481 return newObj; 482} 483function mergeImageAnimatorMaps(stageMap, newMap) { 484 newMap.forEach((value, key) => { 485 stageMap.set(key, copyImageAnimatorModifierWithKey(value)); 486 }); 487 return stageMap; 488} 489class ImageAnimatorModifier extends ArkImageAnimatorComponent { 490 constructor(nativePtr, classType) { 491 super(nativePtr, classType); 492 this._modifiersWithKeys = new ModifierMap(); 493 } 494 applyNormalAttribute(instance) { 495 ModifierUtils.applySetOnChange(this); 496 let component = instance; 497 mergeImageAnimatorMaps(component._modifiersWithKeys, this._modifiersWithKeys); 498 } 499} 500class ImageModifier extends ArkImageComponent { 501 constructor(nativePtr, classType) { 502 super(nativePtr, classType); 503 this._modifiersWithKeys = new ModifierMap(); 504 } 505 applyNormalAttribute(instance) { 506 ModifierUtils.applySetOnChange(this); 507 ModifierUtils.applyAndMergeModifier(instance, this); 508 } 509} 510class ImageSpanModifier extends ArkImageSpanComponent { 511 constructor(nativePtr, classType) { 512 super(nativePtr, classType); 513 this._modifiersWithKeys = new ModifierMap(); 514 } 515 applyNormalAttribute(instance) { 516 ModifierUtils.applySetOnChange(this); 517 ModifierUtils.applyAndMergeModifier(instance, this); 518 } 519} 520class LineModifier extends ArkLineComponent { 521 constructor(nativePtr, classType) { 522 super(nativePtr, classType); 523 this._modifiersWithKeys = new ModifierMap(); 524 } 525 applyNormalAttribute(instance) { 526 ModifierUtils.applySetOnChange(this); 527 ModifierUtils.applyAndMergeModifier(instance, this); 528 } 529} 530class ListModifier extends ArkListComponent { 531 constructor(nativePtr, classType) { 532 super(nativePtr, classType); 533 this._modifiersWithKeys = new ModifierMap(); 534 } 535 applyNormalAttribute(instance) { 536 ModifierUtils.applySetOnChange(this); 537 ModifierUtils.applyAndMergeModifier(instance, this); 538 } 539} 540class ListItemModifier extends ArkListItemComponent { 541 constructor(nativePtr, classType) { 542 super(nativePtr, classType); 543 this._modifiersWithKeys = new ModifierMap(); 544 } 545 applyNormalAttribute(instance) { 546 ModifierUtils.applySetOnChange(this); 547 ModifierUtils.applyAndMergeModifier(instance, this); 548 } 549} 550class ListItemGroupModifier extends ArkListItemGroupComponent { 551 constructor(nativePtr, classType) { 552 super(nativePtr, classType); 553 this._modifiersWithKeys = new ModifierMap(); 554 } 555 applyNormalAttribute(instance) { 556 ModifierUtils.applySetOnChange(this); 557 ModifierUtils.applyAndMergeModifier(instance, this); 558 } 559} 560class LoadingProgressModifier extends ArkLoadingProgressComponent { 561 constructor(nativePtr, classType) { 562 super(nativePtr, classType); 563 this._modifiersWithKeys = new ModifierMap(); 564 } 565 applyNormalAttribute(instance) { 566 ModifierUtils.applySetOnChange(this); 567 ModifierUtils.applyAndMergeModifier(instance, this); 568 } 569} 570class MarqueeModifier extends ArkMarqueeComponent { 571 constructor(nativePtr, classType) { 572 super(nativePtr, classType); 573 this._modifiersWithKeys = new ModifierMap(); 574 } 575 applyNormalAttribute(instance) { 576 ModifierUtils.applySetOnChange(this); 577 ModifierUtils.applyAndMergeModifier(instance, this); 578 } 579} 580class MenuModifier extends ArkMenuComponent { 581 constructor(nativePtr, classType) { 582 super(nativePtr, classType); 583 this._modifiersWithKeys = new ModifierMap(); 584 } 585 applyNormalAttribute(instance) { 586 ModifierUtils.applySetOnChange(this); 587 ModifierUtils.applyAndMergeModifier(instance, this); 588 } 589} 590class MenuItemModifier extends ArkMenuItemComponent { 591 constructor(nativePtr, classType) { 592 super(nativePtr, classType); 593 this._modifiersWithKeys = new ModifierMap(); 594 } 595 applyNormalAttribute(instance) { 596 ModifierUtils.applySetOnChange(this); 597 ModifierUtils.applyAndMergeModifier(instance, this); 598 } 599} 600class NavDestinationModifier extends ArkNavDestinationComponent { 601 constructor(nativePtr, classType) { 602 super(nativePtr, classType); 603 this._modifiersWithKeys = new ModifierMap(); 604 } 605 applyNormalAttribute(instance) { 606 ModifierUtils.applySetOnChange(this); 607 ModifierUtils.applyAndMergeModifier(instance, this); 608 } 609} 610class NavigationModifier extends ArkNavigationComponent { 611 constructor(nativePtr, classType) { 612 super(nativePtr, classType); 613 this._modifiersWithKeys = new ModifierMap(); 614 } 615 applyNormalAttribute(instance) { 616 ModifierUtils.applySetOnChange(this); 617 ModifierUtils.applyAndMergeModifier(instance, this); 618 } 619} 620class NavigatorModifier extends ArkNavigatorComponent { 621 constructor(nativePtr, classType) { 622 super(nativePtr, classType); 623 this._modifiersWithKeys = new ModifierMap(); 624 } 625 applyNormalAttribute(instance) { 626 ModifierUtils.applySetOnChange(this); 627 ModifierUtils.applyAndMergeModifier(instance, this); 628 } 629} 630class NavRouterModifier extends ArkNavRouterComponent { 631 constructor(nativePtr, classType) { 632 super(nativePtr, classType); 633 this._modifiersWithKeys = new ModifierMap(); 634 } 635 applyNormalAttribute(instance) { 636 ModifierUtils.applySetOnChange(this); 637 ModifierUtils.applyAndMergeModifier(instance, this); 638 } 639} 640class PanelModifier extends ArkPanelComponent { 641 constructor(nativePtr, classType) { 642 super(nativePtr, classType); 643 this._modifiersWithKeys = new ModifierMap(); 644 } 645 applyNormalAttribute(instance) { 646 ModifierUtils.applySetOnChange(this); 647 ModifierUtils.applyAndMergeModifier(instance, this); 648 } 649} 650class PathModifier extends ArkPathComponent { 651 constructor(nativePtr, classType) { 652 super(nativePtr, classType); 653 this._modifiersWithKeys = new ModifierMap(); 654 } 655 applyNormalAttribute(instance) { 656 ModifierUtils.applySetOnChange(this); 657 ModifierUtils.applyAndMergeModifier(instance, this); 658 } 659} 660class PatternLockModifier extends ArkPatternLockComponent { 661 constructor(nativePtr, classType) { 662 super(nativePtr, classType); 663 this._modifiersWithKeys = new ModifierMap(); 664 } 665 applyNormalAttribute(instance) { 666 ModifierUtils.applySetOnChange(this); 667 ModifierUtils.applyAndMergeModifier(instance, this); 668 } 669} 670class PluginComponentModifier extends ArkPluginComponent { 671 constructor(nativePtr, classType) { 672 super(nativePtr, classType); 673 this._modifiersWithKeys = new ModifierMap(); 674 } 675 applyNormalAttribute(instance) { 676 ModifierUtils.applySetOnChange(this); 677 ModifierUtils.applyAndMergeModifier(instance, this); 678 } 679} 680class PolygonModifier extends ArkPolygonComponent { 681 constructor(nativePtr, classType) { 682 super(nativePtr, classType); 683 this._modifiersWithKeys = new ModifierMap(); 684 } 685 applyNormalAttribute(instance) { 686 ModifierUtils.applySetOnChange(this); 687 ModifierUtils.applyAndMergeModifier(instance, this); 688 } 689} 690class PolylineModifier extends ArkPolylineComponent { 691 constructor(nativePtr, classType) { 692 super(nativePtr, classType); 693 this._modifiersWithKeys = new ModifierMap(); 694 } 695 applyNormalAttribute(instance) { 696 ModifierUtils.applySetOnChange(this); 697 ModifierUtils.applyAndMergeModifier(instance, this); 698 } 699} 700class ProgressModifier extends ArkProgressComponent { 701 constructor(nativePtr, classType) { 702 super(nativePtr, classType); 703 this._modifiersWithKeys = new ModifierMap(); 704 } 705 applyNormalAttribute(instance) { 706 ModifierUtils.applySetOnChange(this); 707 ModifierUtils.applyAndMergeModifier(instance, this); 708 } 709} 710class QRCodeModifier extends ArkQRCodeComponent { 711 constructor(nativePtr, classType) { 712 super(nativePtr, classType); 713 this._modifiersWithKeys = new ModifierMap(); 714 } 715 applyNormalAttribute(instance) { 716 ModifierUtils.applySetOnChange(this); 717 ModifierUtils.applyAndMergeModifier(instance, this); 718 } 719} 720class RadioModifier extends ArkRadioComponent { 721 constructor(nativePtr, classType) { 722 super(nativePtr, classType); 723 this._modifiersWithKeys = new ModifierMap(); 724 } 725 applyNormalAttribute(instance) { 726 ModifierUtils.applySetOnChange(this); 727 ModifierUtils.applyAndMergeModifier(instance, this); 728 } 729} 730class RatingModifier extends ArkRatingComponent { 731 constructor(nativePtr, classType) { 732 super(nativePtr, classType); 733 this._modifiersWithKeys = new ModifierMap(); 734 } 735 applyNormalAttribute(instance) { 736 ModifierUtils.applySetOnChange(this); 737 ModifierUtils.applyAndMergeModifier(instance, this); 738 } 739} 740class RectModifier extends ArkRectComponent { 741 constructor(nativePtr, classType) { 742 super(nativePtr, classType); 743 this._modifiersWithKeys = new ModifierMap(); 744 } 745 applyNormalAttribute(instance) { 746 ModifierUtils.applySetOnChange(this); 747 ModifierUtils.applyAndMergeModifier(instance, this); 748 } 749} 750class RefreshModifier extends ArkRefreshComponent { 751 constructor(nativePtr, classType) { 752 super(nativePtr, classType); 753 this._modifiersWithKeys = new ModifierMap(); 754 } 755 applyNormalAttribute(instance) { 756 ModifierUtils.applySetOnChange(this); 757 ModifierUtils.applyAndMergeModifier(instance, this); 758 } 759} 760class RelativeContainerModifier extends ArkRelativeContainerComponent { 761 constructor(nativePtr, classType) { 762 super(nativePtr, classType); 763 this._modifiersWithKeys = new ModifierMap(); 764 } 765 applyNormalAttribute(instance) { 766 ModifierUtils.applySetOnChange(this); 767 ModifierUtils.applyAndMergeModifier(instance, this); 768 } 769} 770class RichEditorModifier extends ArkRichEditorComponent { 771 constructor(nativePtr, classType) { 772 super(nativePtr, classType); 773 this._modifiersWithKeys = new ModifierMap(); 774 } 775 applyNormalAttribute(instance) { 776 ModifierUtils.applySetOnChange(this); 777 ModifierUtils.applyAndMergeModifier(instance, this); 778 } 779} 780class RowModifier extends ArkRowComponent { 781 constructor(nativePtr, classType) { 782 super(nativePtr, classType); 783 this._modifiersWithKeys = new ModifierMap(); 784 } 785 applyNormalAttribute(instance) { 786 ModifierUtils.applySetOnChange(this); 787 ModifierUtils.applyAndMergeModifier(instance, this); 788 } 789} 790class RowSplitModifier extends ArkRowSplitComponent { 791 constructor(nativePtr, classType) { 792 super(nativePtr, classType); 793 this._modifiersWithKeys = new ModifierMap(); 794 } 795 applyNormalAttribute(instance) { 796 ModifierUtils.applySetOnChange(this); 797 ModifierUtils.applyAndMergeModifier(instance, this); 798 } 799} 800class ScrollModifier extends ArkScrollComponent { 801 constructor(nativePtr, classType) { 802 super(nativePtr, classType); 803 this._modifiersWithKeys = new ModifierMap(); 804 } 805 applyNormalAttribute(instance) { 806 ModifierUtils.applySetOnChange(this); 807 ModifierUtils.applyAndMergeModifier(instance, this); 808 } 809} 810class SearchModifier extends ArkSearchComponent { 811 constructor(nativePtr, classType) { 812 super(nativePtr, classType); 813 this._modifiersWithKeys = new ModifierMap(); 814 } 815 applyNormalAttribute(instance) { 816 ModifierUtils.applySetOnChange(this); 817 ModifierUtils.applyAndMergeModifier(instance, this); 818 } 819} 820class SelectModifier extends ArkSelectComponent { 821 constructor(nativePtr, classType) { 822 super(nativePtr, classType); 823 this._modifiersWithKeys = new ModifierMap(); 824 } 825 applyNormalAttribute(instance) { 826 ModifierUtils.applySetOnChange(this); 827 ModifierUtils.applyAndMergeModifier(instance, this); 828 } 829} 830class ShapeModifier extends ArkShapeComponent { 831 constructor(nativePtr, classType) { 832 super(nativePtr, classType); 833 this._modifiersWithKeys = new ModifierMap(); 834 } 835 applyNormalAttribute(instance) { 836 ModifierUtils.applySetOnChange(this); 837 ModifierUtils.applyAndMergeModifier(instance, this); 838 } 839} 840class SideBarContainerModifier extends ArkSideBarContainerComponent { 841 constructor(nativePtr, classType) { 842 super(nativePtr, classType); 843 this._modifiersWithKeys = new ModifierMap(); 844 } 845 applyNormalAttribute(instance) { 846 ModifierUtils.applySetOnChange(this); 847 ModifierUtils.applyAndMergeModifier(instance, this); 848 } 849} 850class SliderModifier extends ArkSliderComponent { 851 constructor(nativePtr, classType) { 852 super(nativePtr, classType); 853 this._modifiersWithKeys = new ModifierMap(); 854 } 855 applyNormalAttribute(instance) { 856 ModifierUtils.applySetOnChange(this); 857 ModifierUtils.applyAndMergeModifier(instance, this); 858 } 859} 860class SpanModifier extends ArkSpanComponent { 861 constructor(nativePtr, classType) { 862 super(nativePtr, classType); 863 this._modifiersWithKeys = new ModifierMap(); 864 } 865 applyNormalAttribute(instance) { 866 ModifierUtils.applySetOnChange(this); 867 ModifierUtils.applyAndMergeModifier(instance, this); 868 } 869} 870class StackModifier extends ArkStackComponent { 871 constructor(nativePtr, classType) { 872 super(nativePtr, classType); 873 this._modifiersWithKeys = new ModifierMap(); 874 } 875 applyNormalAttribute(instance) { 876 ModifierUtils.applySetOnChange(this); 877 ModifierUtils.applyAndMergeModifier(instance, this); 878 } 879} 880class StepperItemModifier extends ArkStepperItemComponent { 881 constructor(nativePtr, classType) { 882 super(nativePtr, classType); 883 this._modifiersWithKeys = new ModifierMap(); 884 } 885 applyNormalAttribute(instance) { 886 ModifierUtils.applySetOnChange(this); 887 ModifierUtils.applyAndMergeModifier(instance, this); 888 } 889} 890class SwiperModifier extends ArkSwiperComponent { 891 constructor(nativePtr, classType) { 892 super(nativePtr, classType); 893 this._modifiersWithKeys = new ModifierMap(); 894 } 895 applyNormalAttribute(instance) { 896 ModifierUtils.applySetOnChange(this); 897 ModifierUtils.applyAndMergeModifier(instance, this); 898 } 899} 900class TabContentModifier extends ArkTabContentComponent { 901 constructor(nativePtr, classType) { 902 super(nativePtr, classType); 903 this._modifiersWithKeys = new ModifierMap(); 904 } 905 applyNormalAttribute(instance) { 906 ModifierUtils.applySetOnChange(this); 907 ModifierUtils.applyAndMergeModifier(instance, this); 908 } 909} 910class TabsModifier extends ArkTabsComponent { 911 constructor(nativePtr, classType) { 912 super(nativePtr, classType); 913 this._modifiersWithKeys = new ModifierMap(); 914 } 915 applyNormalAttribute(instance) { 916 ModifierUtils.applySetOnChange(this); 917 ModifierUtils.applyAndMergeModifier(instance, this); 918 } 919} 920class TextAreaModifier extends ArkTextAreaComponent { 921 constructor(nativePtr, classType) { 922 super(nativePtr, classType); 923 this._modifiersWithKeys = new ModifierMap(); 924 } 925 applyNormalAttribute(instance) { 926 ModifierUtils.applySetOnChange(this); 927 ModifierUtils.applyAndMergeModifier(instance, this); 928 } 929} 930class TextModifier extends ArkTextComponent { 931 constructor(nativePtr, classType) { 932 super(nativePtr, classType); 933 this._modifiersWithKeys = new ModifierMap(); 934 } 935 applyNormalAttribute(instance) { 936 ModifierUtils.applySetOnChange(this); 937 ModifierUtils.applyAndMergeModifier(instance, this); 938 } 939} 940class TextClockModifier extends ArkTextClockComponent { 941 constructor(nativePtr, classType) { 942 super(nativePtr, classType); 943 this._modifiersWithKeys = new ModifierMap(); 944 } 945 applyNormalAttribute(instance) { 946 ModifierUtils.applySetOnChange(this); 947 ModifierUtils.applyAndMergeModifier(instance, this); 948 } 949} 950class TextInputModifier extends ArkTextInputComponent { 951 constructor(nativePtr, classType) { 952 super(nativePtr, classType); 953 this._modifiersWithKeys = new ModifierMap(); 954 } 955 applyNormalAttribute(instance) { 956 ModifierUtils.applySetOnChange(this); 957 ModifierUtils.applyAndMergeModifier(instance, this); 958 } 959} 960class TextPickerModifier extends ArkTextPickerComponent { 961 constructor(nativePtr, classType) { 962 super(nativePtr, classType); 963 this._modifiersWithKeys = new ModifierMap(); 964 } 965 applyNormalAttribute(instance) { 966 ModifierUtils.applySetOnChange(this); 967 ModifierUtils.applyAndMergeModifier(instance, this); 968 } 969} 970class TextTimerModifier extends ArkTextTimerComponent { 971 constructor(nativePtr, classType) { 972 super(nativePtr, classType); 973 this._modifiersWithKeys = new ModifierMap(); 974 } 975 applyNormalAttribute(instance) { 976 ModifierUtils.applySetOnChange(this); 977 ModifierUtils.applyAndMergeModifier(instance, this); 978 } 979} 980class TimePickerModifier extends ArkTimePickerComponent { 981 constructor(nativePtr, classType) { 982 super(nativePtr, classType); 983 this._modifiersWithKeys = new ModifierMap(); 984 } 985 applyNormalAttribute(instance) { 986 ModifierUtils.applySetOnChange(this); 987 ModifierUtils.applyAndMergeModifier(instance, this); 988 } 989} 990class ToggleModifier extends ArkToggleComponent { 991 constructor(nativePtr, classType) { 992 super(nativePtr, classType); 993 this._modifiersWithKeys = new ModifierMap(); 994 } 995 applyNormalAttribute(instance) { 996 ModifierUtils.applySetOnChange(this); 997 ModifierUtils.applyAndMergeModifier(instance, this); 998 } 999} 1000class VideoModifier extends ArkVideoComponent { 1001 constructor(nativePtr, classType) { 1002 super(nativePtr, classType); 1003 this._modifiersWithKeys = new ModifierMap(); 1004 } 1005 applyNormalAttribute(instance) { 1006 ModifierUtils.applySetOnChange(this); 1007 ModifierUtils.applyAndMergeModifier(instance, this); 1008 } 1009} 1010class WaterFlowModifier extends ArkWaterFlowComponent { 1011 constructor(nativePtr, classType) { 1012 super(nativePtr, classType); 1013 this._modifiersWithKeys = new ModifierMap(); 1014 } 1015 applyNormalAttribute(instance) { 1016 ModifierUtils.applySetOnChange(this); 1017 ModifierUtils.applyAndMergeModifier(instance, this); 1018 } 1019} 1020class ParticleModifier extends ArkParticleComponent { 1021 constructor(nativePtr, classType) { 1022 super(nativePtr, classType); 1023 this._modifiersWithKeys = new ModifierMap(); 1024 } 1025 applyNormalAttribute(instance) { 1026 ModifierUtils.applySetOnChange(this); 1027 ModifierUtils.applyAndMergeModifier(instance, this); 1028 } 1029} 1030 1031class MediaCachedImageModifier extends ArkMediaCachedImageComponent { 1032 constructor(nativePtr, classType) { 1033 super(nativePtr, classType); 1034 this._modifiersWithKeys = new ModifierMap(); 1035 } 1036 applyNormalAttribute(instance) { 1037 ModifierUtils.applySetOnChange(this); 1038 ModifierUtils.applyAndMergeModifier(instance, this); 1039 } 1040} 1041 1042class SymbolGlyphModifier extends ArkSymbolGlyphComponent { 1043 constructor(src, nativePtr, classType) { 1044 super(nativePtr, classType); 1045 this._modifiersWithKeys = new ModifierMap(); 1046 if (src !== undefined) { 1047 this.initialize([src]); 1048 } 1049 } 1050 applyNormalAttribute(instance) { 1051 ModifierUtils.applySetOnChange(this); 1052 ModifierUtils.applyAndMergeModifier(instance, this); 1053 } 1054} 1055 1056class SymbolSpanModifier extends ArkSymbolSpanComponent { 1057 constructor(src, nativePtr, classType) { 1058 super(nativePtr, classType); 1059 this._modifiersWithKeys = new ModifierMap(); 1060 if (src !== undefined) { 1061 this.initialize([src]); 1062 } 1063 } 1064 applyNormalAttribute(instance) { 1065 ModifierUtils.applySetOnChange(this); 1066 ModifierUtils.applyAndMergeModifier(instance, this); 1067 } 1068} 1069 1070class Component3DModifier extends ArkComponent3DComponent { 1071 constructor(nativePtr, classType) { 1072 super(nativePtr, classType); 1073 this._modifiersWithKeys = new ModifierMap(); 1074 } 1075 applyNormalAttribute(instance) { 1076 ModifierUtils.applySetOnChange(this); 1077 ModifierUtils.applyAndMergeModifier(instance, this); 1078 } 1079} 1080 1081class ContainerSpanModifier extends ArkContainerSpanComponent { 1082 constructor(nativePtr, classType) { 1083 super(nativePtr, classType); 1084 this._modifiersWithKeys = new ModifierMap(); 1085 } 1086 applyNormalAttribute(instance) { 1087 ModifierUtils.applySetOnChange(this); 1088 ModifierUtils.applyAndMergeModifier(instance, this); 1089 } 1090} 1091 1092class LinearIndicatorModifier extends ArkLinearIndicatorComponent { 1093 constructor(nativePtr, classType) { 1094 super(nativePtr, classType); 1095 this._modifiersWithKeys = new ModifierMap(); 1096 } 1097 applyNormalAttribute(instance) { 1098 ModifierUtils.applySetOnChange(this); 1099 ModifierUtils.applyAndMergeModifier(instance, this); 1100 } 1101} 1102 1103class IndicatorComponentModifier extends ArkIndicatorComponentComponent { 1104 constructor(nativePtr, classType) { 1105 super(nativePtr, classType); 1106 this._modifiersWithKeys = new ModifierMap(); 1107 } 1108 applyNormalAttribute(instance) { 1109 ModifierUtils.applySetOnChange(this); 1110 ModifierUtils.applyAndMergeModifier(instance, this); 1111 } 1112} 1113 1114class LazyVGridLayoutModifier extends ArkLazyVGridLayoutComponent { 1115 constructor(nativePtr, classType) { 1116 super(nativePtr, classType); 1117 this._modifiersWithKeys = new ModifierMap(); 1118 } 1119 applyNormalAttribute(instance) { 1120 ModifierUtils.applySetOnChange(this); 1121 ModifierUtils.applyAndMergeModifier(instance, this); 1122 } 1123} 1124 1125class StepperModifier extends ArkStepperComponent { 1126 constructor(nativePtr, classType) { 1127 super(nativePtr, classType); 1128 this._modifiersWithKeys = new ModifierMap(); 1129 } 1130 applyNormalAttribute(instance) { 1131 ModifierUtils.applySetOnChange(this); 1132 ModifierUtils.applyAndMergeModifier(instance, this); 1133 } 1134 } 1135 1136export default { 1137 CommonModifier, AlphabetIndexerModifier, BlankModifier, ButtonModifier, CalendarPickerModifier, CheckboxModifier, CheckboxGroupModifier, CircleModifier, 1138 ColumnModifier, ColumnSplitModifier, CounterModifier, DataPanelModifier, DatePickerModifier, DividerModifier, FormComponentModifier, GaugeModifier, 1139 GridModifier, GridColModifier, GridItemModifier, GridRowModifier, HyperlinkModifier, ImageAnimatorModifier, ImageModifier, ImageSpanModifier, LineModifier, 1140 ListModifier, ListItemModifier, ListItemGroupModifier, LoadingProgressModifier, MarqueeModifier, MenuModifier, MenuItemModifier, NavDestinationModifier, 1141 NavigationModifier, NavigatorModifier, NavRouterModifier, PanelModifier, PathModifier, PatternLockModifier, PolygonModifier, PolylineModifier, 1142 ProgressModifier, QRCodeModifier, RadioModifier, RatingModifier, RectModifier, RelativeContainerModifier, RichEditorModifier, RowModifier, RowSplitModifier, 1143 ScrollModifier, SearchModifier, SelectModifier, ShapeModifier, SideBarContainerModifier, SliderModifier, SpanModifier, StackModifier, StepperItemModifier, 1144 SwiperModifier, TabsModifier, TextAreaModifier, TextModifier, TextClockModifier, TextInputModifier, TextPickerModifier, TextTimerModifier, TimePickerModifier, 1145 ToggleModifier, VideoModifier, WaterFlowModifier, FlexModifier, PluginComponentModifier, RefreshModifier, TabContentModifier, ModifierUtils, AttributeUpdater, 1146 ParticleModifier, MediaCachedImageModifier, SymbolGlyphModifier, SymbolSpanModifier, Component3DModifier, ContainerSpanModifier, LinearIndicatorModifier, 1147 IndicatorComponentModifier, LazyVGridLayoutModifier, ModifierMap, StepperModifier, EmbeddedComponentModifier 1148}; 1149