1/* 2 * Copyright (c) 2023-2024 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/// <reference path='./import.ts' /> 17let LogTag; 18(function (LogTag) { 19 LogTag[LogTag['STATE_MGMT'] = 0] = 'STATE_MGMT'; 20 LogTag[LogTag['ARK_COMPONENT'] = 1] = 'ARK_COMPONENT'; 21})(LogTag || (LogTag = {})); 22class ArkLogConsole { 23 static log(...args) { 24 aceConsole.log(LogTag.ARK_COMPONENT, ...args); 25 } 26 static debug(...args) { 27 aceConsole.debug(LogTag.ARK_COMPONENT, ...args); 28 } 29 static info(...args) { 30 aceConsole.info(LogTag.ARK_COMPONENT, ...args); 31 } 32 static warn(...args) { 33 aceConsole.warn(LogTag.ARK_COMPONENT, ...args); 34 } 35 static error(...args) { 36 aceConsole.error(LogTag.ARK_COMPONENT, ...args); 37 } 38} 39const arkUINativeModule = globalThis.getArkUINativeModule(); 40function getUINativeModule() { 41 if (arkUINativeModule) { 42 return arkUINativeModule; 43 } 44 return globalThis.getArkUINativeModule(); 45} 46let ModifierType; 47(function (ModifierType) { 48 ModifierType[ModifierType['ORIGIN'] = 0] = 'ORIGIN'; 49 ModifierType[ModifierType['STATE'] = 1] = 'STATE'; 50 ModifierType[ModifierType['FRAME_NODE'] = 2] = 'FRAME_NODE'; 51 ModifierType[ModifierType['EXPOSE_MODIFIER'] = 3] = 'EXPOSE_MODIFIER'; 52})(ModifierType || (ModifierType = {})); 53const UI_STATE_NORMAL = 0; 54const UI_STATE_PRESSED = 1; 55const UI_STATE_FOCUSED = 1 << 1; 56const UI_STATE_DISABLED = 1 << 2; 57const UI_STATE_SELECTED = 1 << 3; 58function applyUIAttributesInit(modifier, nativeNode) { 59 if (modifier.applyPressedAttribute === undefined && 60 modifier.applyFocusedAttribute === undefined && 61 modifier.applyDisabledAttribute === undefined && 62 modifier.applySelectedAttribute === undefined) { 63 return; 64 } 65 let state = 0; 66 if (modifier.applyPressedAttribute !== undefined) { 67 state |= UI_STATE_PRESSED; 68 } 69 if (modifier.applyFocusedAttribute !== undefined) { 70 state |= UI_STATE_FOCUSED; 71 } 72 if (modifier.applyDisabledAttribute !== undefined) { 73 state |= UI_STATE_DISABLED; 74 } 75 if (modifier.applySelectedAttribute !== undefined) { 76 state |= UI_STATE_SELECTED; 77 } 78 getUINativeModule().setSupportedUIState(nativeNode, state); 79} 80function applyUIAttributes(modifier, nativeNode, component) { 81 applyUIAttributesInit(modifier, nativeNode); 82 const currentUIState = getUINativeModule().getUIState(nativeNode); 83 if (modifier.applyNormalAttribute !== undefined) { 84 modifier.applyNormalAttribute(component); 85 } 86 if ((currentUIState & UI_STATE_PRESSED) && (modifier.applyPressedAttribute !== undefined)) { 87 modifier.applyPressedAttribute(component); 88 } 89 if ((currentUIState & UI_STATE_FOCUSED) && (modifier.applyFocusedAttribute !== undefined)) { 90 modifier.applyFocusedAttribute(component); 91 } 92 if ((currentUIState & UI_STATE_DISABLED) && (modifier.applyDisabledAttribute !== undefined)) { 93 modifier.applyDisabledAttribute(component); 94 } 95 if ((currentUIState & UI_STATE_SELECTED) && (modifier.applySelectedAttribute !== undefined)) { 96 modifier.applySelectedAttribute(component); 97 } 98} 99function isResource(variable) { 100 return (variable === null || variable === void 0 ? void 0 : variable.bundleName) !== undefined; 101} 102function isResourceEqual(stageValue, value) { 103 return (stageValue.bundleName === value.bundleName) && 104 (stageValue.moduleName === value.moduleName) && 105 (stageValue.id === value.id) && 106 (stageValue.params === value.params) && 107 (stageValue.type === value.type); 108} 109function isBaseOrResourceEqual(stageValue, value) { 110 if (isResource(stageValue) && isResource(value)) { 111 return isResourceEqual(stageValue, value); 112 } 113 else if (!isResource(stageValue) && !isResource(value)) { 114 return (stageValue === value); 115 } 116 return false; 117} 118const SAFE_AREA_TYPE_NONE = 0; 119const SAFE_AREA_TYPE_SYSTEM = 1; 120const SAFE_AREA_TYPE_CUTOUT = 2; 121const SAFE_AREA_TYPE_KEYBOARD = 4; 122const SAFE_AREA_TYPE_ALL = 7; 123const SAFE_AREA_EDGE_NONE = 0; 124const SAFE_AREA_EDGE_TOP = 1; 125const SAFE_AREA_EDGE_BOTTOM = 2; 126const SAFE_AREA_EDGE_START = 4; 127const SAFE_AREA_EDGE_END = 8; 128const SAFE_AREA_EDGE_ALL = 15; 129const SAFE_AREA_TYPE_LIMIT = 3; 130const SAFE_AREA_EDGE_LIMIT = 4; 131const DIRECTION_RANGE = 3; 132const SAFE_AREA_LOWER_LIMIT = 0; 133class ModifierWithKey { 134 constructor(value) { 135 this.stageValue = value; 136 } 137 applyStage(node, component) { 138 if (this.stageValue === undefined || this.stageValue === null) { 139 this.value = this.stageValue; 140 this.applyPeer(node, true, component); 141 return true; 142 } 143 const stageTypeInfo = typeof this.stageValue; 144 const valueTypeInfo = typeof this.value; 145 let different = false; 146 if (stageTypeInfo !== valueTypeInfo) { 147 different = true; 148 } 149 else if (stageTypeInfo === 'number' || stageTypeInfo === 'string' || stageTypeInfo === 'boolean') { 150 different = (this.stageValue !== this.value); 151 } 152 else { 153 different = this.checkObjectDiff(); 154 } 155 if (different) { 156 this.value = this.stageValue; 157 this.applyPeer(node, false, component); 158 } 159 return false; 160 } 161 applyStageImmediately(node, component) { 162 this.value = this.stageValue; 163 if (this.stageValue === undefined || this.stageValue === null) { 164 this.applyPeer(node, true, component); 165 return; 166 } 167 this.applyPeer(node, false, component); 168 } 169 applyPeer(node, reset, component) { } 170 checkObjectDiff() { 171 return true; 172 } 173} 174class BackgroundColorModifier extends ModifierWithKey { 175 constructor(value) { 176 super(value); 177 } 178 applyPeer(node, reset) { 179 if (reset) { 180 getUINativeModule().common.resetBackgroundColor(node); 181 } 182 else { 183 getUINativeModule().common.setBackgroundColor(node, this.value); 184 } 185 } 186 checkObjectDiff() { 187 return !isBaseOrResourceEqual(this.stageValue, this.value); 188 } 189} 190BackgroundColorModifier.identity = Symbol('backgroundColor'); 191class WidthModifier extends ModifierWithKey { 192 constructor(value) { 193 super(value); 194 } 195 applyPeer(node, reset) { 196 if (reset) { 197 getUINativeModule().common.resetWidth(node); 198 } 199 else { 200 getUINativeModule().common.setWidth(node, this.value); 201 } 202 } 203 checkObjectDiff() { 204 return !isBaseOrResourceEqual(this.stageValue, this.value); 205 } 206} 207WidthModifier.identity = Symbol('width'); 208class BorderWidthModifier extends ModifierWithKey { 209 constructor(value) { 210 super(value); 211 } 212 applyPeer(node, reset) { 213 if (reset) { 214 getUINativeModule().common.resetBorderWidth(node); 215 } 216 else { 217 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 218 getUINativeModule().common.setBorderWidth(node, this.value, this.value, this.value, this.value); 219 } 220 else { 221 if ((Object.keys(this.value).indexOf('start') >= 0) || 222 (Object.keys(this.value).indexOf('end') >= 0)) { 223 getUINativeModule().common.setBorderWidth(node, this.value.top, this.value.end, this.value.bottom, this.value.start); 224 } else { 225 getUINativeModule().common.setBorderWidth(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 226 } 227 } 228 } 229 } 230 checkObjectDiff() { 231 if (isResource(this.stageValue) && isResource(this.value)) { 232 return !isResourceEqual(this.stageValue, this.value); 233 } 234 else if (!isResource(this.stageValue) && !isResource(this.value)) { 235 if ((Object.keys(this.value).indexOf('start') >= 0) || 236 (Object.keys(this.value).indexOf('end') >= 0)) { 237 return !(this.stageValue.start === this.value.start && 238 this.stageValue.end === this.value.end && 239 this.stageValue.top === this.value.top && 240 this.stageValue.bottom === this.value.bottom); 241 } 242 return !(this.stageValue.left === this.value.left && 243 this.stageValue.right === this.value.right && 244 this.stageValue.top === this.value.top && 245 this.stageValue.bottom === this.value.bottom); 246 } 247 else { 248 return true; 249 } 250 } 251} 252BorderWidthModifier.identity = Symbol('borderWidth'); 253class HeightModifier extends ModifierWithKey { 254 constructor(value) { 255 super(value); 256 } 257 applyPeer(node, reset) { 258 if (reset) { 259 getUINativeModule().common.resetHeight(node); 260 } 261 else { 262 getUINativeModule().common.setHeight(node, this.value); 263 } 264 } 265 checkObjectDiff() { 266 return !isBaseOrResourceEqual(this.stageValue, this.value); 267 } 268} 269HeightModifier.identity = Symbol('height'); 270 271class ChainModeifier extends ModifierWithKey { 272 constructor(value) { 273 super(value); 274 } 275 applyPeer(node, reset) { 276 if (reset) { 277 getUINativeModule().common.resetChainMode(node); 278 } 279 else { 280 getUINativeModule().common.setChainMode(node, this.value.direction, this.value.style); 281 } 282 } 283 checkObjectDiff() { 284 return !isBaseOrResourceEqual(this.stageValue, this.value); 285 } 286} 287ChainModeifier.identity = Symbol('chainMode'); 288 289class BorderRadiusModifier extends ModifierWithKey { 290 constructor(value) { 291 super(value); 292 } 293 applyPeer(node, reset) { 294 if (reset) { 295 getUINativeModule().common.resetBorderRadius(node); 296 } 297 else { 298 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 299 getUINativeModule().common.setBorderRadius(node, this.value, this.value, this.value, this.value); 300 } 301 else { 302 if ((Object.keys(this.value).indexOf('topStart') >= 0) || 303 (Object.keys(this.value).indexOf('topEnd') >= 0) || 304 (Object.keys(this.value).indexOf('bottomStart') >= 0) || 305 (Object.keys(this.value).indexOf('bottomEnd') >= 0)) { 306 getUINativeModule().common.setBorderRadius(node, this.value.topStart, this.value.topEnd, this.value.bottomStart, this.value.bottomEnd); 307 } else { 308 getUINativeModule().common.setBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 309 } 310 } 311 } 312 } 313 checkObjectDiff() { 314 if (isResource(this.stageValue) && isResource(this.value)) { 315 return !isResourceEqual(this.stageValue, this.value); 316 } 317 else if (!isResource(this.stageValue) && !isResource(this.value)) { 318 if ((Object.keys(this.value).indexOf('topStart') >= 0) || 319 (Object.keys(this.value).indexOf('topEnd') >= 0) || 320 (Object.keys(this.value).indexOf('bottomStart') >= 0) || 321 (Object.keys(this.value).indexOf('bottomEnd') >= 0)) { 322 return !(this.stageValue.topStart === this.value.topStart && 323 this.stageValue.topEnd === this.value.topEnd && 324 this.stageValue.bottomStart === this.value.bottomStart && 325 this.stageValue.bottomEnd === this.value.bottomEnd); 326 } 327 return !(this.stageValue.topLeft === this.value.topLeft && 328 this.stageValue.topRight === this.value.topRight && 329 this.stageValue.bottomLeft === this.value.bottomLeft && 330 this.stageValue.bottomRight === this.value.bottomRight); 331 } 332 else { 333 return true; 334 } 335 } 336} 337BorderRadiusModifier.identity = Symbol('borderRadius'); 338class PositionModifier extends ModifierWithKey { 339 constructor(value) { 340 super(value); 341 } 342 applyPeer(node, reset) { 343 if (reset) { 344 getUINativeModule().common.resetPosition(node); 345 } else { 346 if (isUndefined(this.value)) { 347 getUINativeModule().common.resetPosition(node); 348 } else if (('x' in this.value) || ('y' in this.value)) { 349 getUINativeModule().common.setPosition(node, false, this.value.x, this.value.y); 350 } else if (('top' in this.value) || ('bottom' in this.value) || ('left' in this.value) || ('start' in this.value) || ('right' in this.value) || ('end' in this.value)) { 351 if (('start' in this.value)) { 352 this.value.left = this.value.start; 353 } 354 if (('end' in this.value)) { 355 this.value.right = this.value.end; 356 } 357 getUINativeModule().common.setPosition(node, true, this.value.top, this.value.left, this.value.bottom, this.value.right); 358 } else { 359 getUINativeModule().common.resetPosition(node); 360 } 361 } 362 } 363 checkObjectDiff() { 364 return !isBaseOrResourceEqual(this.stageValue.x, this.value.x) || 365 !isBaseOrResourceEqual(this.stageValue.y, this.value.y) || 366 !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 367 !isBaseOrResourceEqual(this.stageValue.left, this.value.left) || 368 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 369 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 370 !isBaseOrResourceEqual(this.stageValue.start, this.value.start) || 371 !isBaseOrResourceEqual(this.stageValue.end, this.value.end); 372 } 373} 374PositionModifier.identity = Symbol('position'); 375class BorderColorModifier extends ModifierWithKey { 376 constructor(value) { 377 super(value); 378 } 379 applyPeer(node, reset) { 380 if (reset) { 381 getUINativeModule().common.resetBorderColor(node); 382 } 383 else { 384 const valueType = typeof this.value; 385 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 386 getUINativeModule().common.setBorderColor(node, this.value, this.value, this.value, this.value, false); 387 } 388 else { 389 if ((Object.keys(this.value).indexOf('start') >= 0) || 390 (Object.keys(this.value).indexOf('end') >= 0)) { 391 getUINativeModule().common.setBorderColor(node, this.value.top, this.value.end, this.value.bottom, this.value.start, true); 392 } else { 393 getUINativeModule().common.setBorderColor(node, this.value.top, this.value.right, this.value.bottom, this.value.left, false); 394 } 395 } 396 } 397 } 398 checkObjectDiff() { 399 if (isResource(this.stageValue) && isResource(this.value)) { 400 return !isResourceEqual(this.stageValue, this.value); 401 } 402 else if (!isResource(this.stageValue) && !isResource(this.value)) { 403 if ((Object.keys(this.value).indexOf('start') >= 0) || 404 (Object.keys(this.value).indexOf('end') >= 0)) { 405 return !(this.stageValue.start === this.value.start && 406 this.stageValue.end === this.value.end && 407 this.stageValue.top === this.value.top && 408 this.stageValue.bottom === this.value.bottom); 409 } 410 return !(this.stageValue.left === this.value.left && 411 this.stageValue.right === this.value.right && 412 this.stageValue.top === this.value.top && 413 this.stageValue.bottom === this.value.bottom); 414 } 415 else { 416 return true; 417 } 418 } 419} 420BorderColorModifier.identity = Symbol('borderColor'); 421class TransformModifier extends ModifierWithKey { 422 constructor(value) { 423 super(value); 424 } 425 applyPeer(node, reset) { 426 if (reset) { 427 getUINativeModule().common.resetTransform(node); 428 } 429 else { 430 getUINativeModule().common.setTransform(node, this.value.matrix4x4); 431 } 432 } 433 checkObjectDiff() { 434 return !deepCompareArrays(this.stageValue.matrix4x4, this.value.matrix4x4); 435 } 436} 437TransformModifier.identity = Symbol('transform'); 438class BorderStyleModifier extends ModifierWithKey { 439 constructor(value) { 440 super(value); 441 } 442 applyPeer(node, reset) { 443 let _a, _b, _c, _d; 444 if (reset) { 445 getUINativeModule().common.resetBorderStyle(node); 446 } 447 else { 448 let type; 449 let style; 450 let top; 451 let right; 452 let bottom; 453 let left; 454 if (isNumber(this.value)) { 455 style = this.value; 456 type = true; 457 } 458 else if (isObject(this.value)) { 459 top = (_a = this.value) === null || _a === void 0 ? void 0 : _a.top; 460 right = (_b = this.value) === null || _b === void 0 ? void 0 : _b.right; 461 bottom = (_c = this.value) === null || _c === void 0 ? void 0 : _c.bottom; 462 left = (_d = this.value) === null || _d === void 0 ? void 0 : _d.left; 463 type = true; 464 } 465 if (type === true) { 466 getUINativeModule().common.setBorderStyle(node, type, style, top, right, bottom, left); 467 } 468 else { 469 getUINativeModule().common.resetBorderStyle(node); 470 } 471 } 472 } 473 checkObjectDiff() { 474 let _a, _b, _c, _d, _e, _f, _g, _h; 475 return !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.top) === ((_b = this.stageValue) === null || _b === void 0 ? void 0 : _b.top) && 476 ((_c = this.value) === null || _c === void 0 ? void 0 : _c.right) === ((_d = this.stageValue) === null || _d === void 0 ? void 0 : _d.right) && 477 ((_e = this.value) === null || _e === void 0 ? void 0 : _e.bottom) === ((_f = this.stageValue) === null || _f === void 0 ? void 0 : _f.bottom) && 478 ((_g = this.value) === null || _g === void 0 ? void 0 : _g.left) === ((_h = this.stageValue) === null || _h === void 0 ? void 0 : _h.left)); 479 } 480} 481BorderStyleModifier.identity = Symbol('borderStyle'); 482class ShadowModifier extends ModifierWithKey { 483 constructor(value) { 484 super(value); 485 } 486 applyPeer(node, reset) { 487 if (reset) { 488 getUINativeModule().common.resetShadow(node); 489 } 490 else { 491 if (isNumber(this.value)) { 492 getUINativeModule().common.setShadow(node, this.value, undefined, undefined, undefined, undefined, undefined, undefined); 493 } 494 else { 495 getUINativeModule().common.setShadow(node, undefined, this.value.radius, 496 this.value.type, this.value.color, 497 this.value.offsetX, this.value.offsetY, this.value.fill); 498 } 499 } 500 } 501 checkObjectDiff() { 502 return !(this.stageValue.radius === this.value.radius && 503 this.stageValue.type === this.value.type && 504 this.stageValue.color === this.value.color && 505 this.stageValue.offsetX === this.value.offsetX && 506 this.stageValue.offsetY === this.value.offsetY && 507 this.stageValue.fill === this.value.fill); 508 } 509} 510ShadowModifier.identity = Symbol('shadow'); 511class HitTestBehaviorModifier extends ModifierWithKey { 512 constructor(value) { 513 super(value); 514 } 515 applyPeer(node, reset) { 516 if (reset) { 517 getUINativeModule().common.resetHitTestBehavior(node); 518 } 519 else { 520 getUINativeModule().common.setHitTestBehavior(node, this.value); 521 } 522 } 523} 524HitTestBehaviorModifier.identity = Symbol('hitTestBehavior'); 525class ZIndexModifier extends ModifierWithKey { 526 constructor(value) { 527 super(value); 528 } 529 applyPeer(node, reset) { 530 if (reset) { 531 getUINativeModule().common.resetZIndex(node); 532 } 533 else { 534 getUINativeModule().common.setZIndex(node, this.value); 535 } 536 } 537} 538ZIndexModifier.identity = Symbol('zIndex'); 539class OpacityModifier extends ModifierWithKey { 540 constructor(value) { 541 super(value); 542 } 543 applyPeer(node, reset) { 544 if (reset) { 545 getUINativeModule().common.resetOpacity(node); 546 } 547 else { 548 getUINativeModule().common.setOpacity(node, this.value); 549 } 550 } 551 checkObjectDiff() { 552 return !isBaseOrResourceEqual(this.stageValue, this.value); 553 } 554} 555OpacityModifier.identity = Symbol('opacity'); 556class AlignModifier extends ModifierWithKey { 557 constructor(value) { 558 super(value); 559 } 560 applyPeer(node, reset) { 561 if (reset) { 562 getUINativeModule().common.resetAlign(node); 563 } 564 else { 565 getUINativeModule().common.setAlign(node, this.value); 566 } 567 } 568} 569AlignModifier.identity = Symbol('align'); 570class BackdropBlurModifier extends ModifierWithKey { 571 constructor(value) { 572 super(value); 573 } 574 applyPeer(node, reset) { 575 if (reset) { 576 getUINativeModule().common.resetBackdropBlur(node); 577 } 578 else { 579 getUINativeModule().common.setBackdropBlur( 580 node, this.value.value, (_a = this.value.options) === null || _a === void 0 ? void 0 : _a.grayscale); 581 } 582 } 583 checkObjectDiff() { 584 return !((this.stageValue.value === this.value.value) && 585 (this.stageValue.options === this.value.options)); 586 } 587} 588BackdropBlurModifier.identity = Symbol('backdropBlur'); 589class HueRotateModifier extends ModifierWithKey { 590 constructor(value) { 591 super(value); 592 } 593 applyPeer(node, reset) { 594 if (reset) { 595 getUINativeModule().common.resetHueRotate(node); 596 } 597 else { 598 getUINativeModule().common.setHueRotate(node, this.value); 599 } 600 } 601} 602HueRotateModifier.identity = Symbol('hueRotate'); 603class InvertModifier extends ModifierWithKey { 604 constructor(value) { 605 super(value); 606 } 607 applyPeer(node, reset) { 608 if (reset) { 609 getUINativeModule().common.resetInvert(node); 610 } 611 else { 612 if (isNumber(this.value)) { 613 getUINativeModule().common.setInvert(node, this.value, undefined, undefined, undefined, undefined); 614 } 615 else { 616 getUINativeModule().common.setInvert( 617 node, undefined, this.value.low, this.value.high, this.value.threshold, this.value.thresholdRange); 618 } 619 } 620 } 621 checkObjectDiff() { 622 return !(this.stageValue.high == this.value.high && 623 this.stageValue.low == this.value.low && 624 this.stageValue.threshold == this.value.threshold && 625 this.stageValue.thresholdRange == this.value.thresholdRange); 626 } 627} 628InvertModifier.identity = Symbol('invert'); 629class SepiaModifier extends ModifierWithKey { 630 constructor(value) { 631 super(value); 632 } 633 applyPeer(node, reset) { 634 if (reset) { 635 getUINativeModule().common.resetSepia(node); 636 } 637 else { 638 getUINativeModule().common.setSepia(node, this.value); 639 } 640 } 641} 642SepiaModifier.identity = Symbol('sepia'); 643class SaturateModifier extends ModifierWithKey { 644 constructor(value) { 645 super(value); 646 } 647 applyPeer(node, reset) { 648 if (reset) { 649 getUINativeModule().common.resetSaturate(node); 650 } 651 else { 652 getUINativeModule().common.setSaturate(node, this.value); 653 } 654 } 655} 656SaturateModifier.identity = Symbol('saturate'); 657class ColorBlendModifier extends ModifierWithKey { 658 constructor(value) { 659 super(value); 660 } 661 applyPeer(node, reset) { 662 if (reset) { 663 getUINativeModule().common.resetColorBlend(node); 664 } 665 else { 666 getUINativeModule().common.setColorBlend(node, this.value); 667 } 668 } 669 checkObjectDiff() { 670 return !isBaseOrResourceEqual(this.stageValue, this.value); 671 } 672} 673ColorBlendModifier.identity = Symbol('colorBlend'); 674class GrayscaleModifier extends ModifierWithKey { 675 constructor(value) { 676 super(value); 677 } 678 applyPeer(node, reset) { 679 if (reset) { 680 getUINativeModule().common.resetGrayscale(node); 681 } 682 else { 683 getUINativeModule().common.setGrayscale(node, this.value); 684 } 685 } 686} 687GrayscaleModifier.identity = Symbol('grayscale'); 688class ContrastModifier extends ModifierWithKey { 689 constructor(value) { 690 super(value); 691 } 692 applyPeer(node, reset) { 693 if (reset) { 694 getUINativeModule().common.resetContrast(node); 695 } 696 else { 697 getUINativeModule().common.setContrast(node, this.value); 698 } 699 } 700} 701ContrastModifier.identity = Symbol('contrast'); 702class BrightnessModifier extends ModifierWithKey { 703 constructor(value) { 704 super(value); 705 } 706 applyPeer(node, reset) { 707 if (reset) { 708 getUINativeModule().common.resetBrightness(node); 709 } 710 else { 711 getUINativeModule().common.setBrightness(node, this.value); 712 } 713 } 714} 715BrightnessModifier.identity = Symbol('brightness'); 716class BlurModifier extends ModifierWithKey { 717 constructor(value) { 718 super(value); 719 } 720 applyPeer(node, reset) { 721 if (reset) { 722 getUINativeModule().common.resetBlur(node); 723 } 724 else { 725 getUINativeModule().common.setBlur( 726 node, this.value.value, (_a = this.value.options) === null || _a === void 0 ? void 0 : _a.grayscale); 727 } 728 } 729 checkObjectDiff() { 730 return !((this.stageValue.value === this.value.value) && 731 (this.stageValue.options === this.value.options)); 732 } 733} 734BlurModifier.identity = Symbol('blur'); 735class LinearGradientModifier extends ModifierWithKey { 736 constructor(value) { 737 super(value); 738 } 739 applyPeer(node, reset) { 740 if (reset) { 741 getUINativeModule().common.resetLinearGradient(node); 742 } 743 else { 744 getUINativeModule().common.setLinearGradient(node, this.value.angle, this.value.direction, this.value.colors, this.value.repeating); 745 } 746 } 747 checkObjectDiff() { 748 return !((this.stageValue.angle === this.value.angle) && 749 (this.stageValue.direction === this.value.direction) && 750 (this.stageValue.colors === this.value.colors) && 751 (this.stageValue.repeating === this.value.repeating)); 752 } 753} 754LinearGradientModifier.identity = Symbol('linearGradient'); 755class RadialGradientModifier extends ModifierWithKey { 756 constructor(value) { 757 super(value); 758 } 759 applyPeer(node, reset) { 760 if (reset) { 761 getUINativeModule().common.resetRadialGradient(node); 762 } 763 else { 764 getUINativeModule().common.setRadialGradient(node, this.value.center, this.value.radius, this.value.colors, this.value.repeating); 765 } 766 } 767 checkObjectDiff() { 768 return !((this.stageValue.center === this.value.center) && 769 (this.stageValue.radius === this.value.radius) && 770 (this.stageValue.colors === this.value.colors) && 771 (this.stageValue.repeating === this.value.repeating)); 772 } 773} 774RadialGradientModifier.identity = Symbol('radialGradient'); 775class SweepGradientModifier extends ModifierWithKey { 776 constructor(value) { 777 super(value); 778 } 779 applyPeer(node, reset) { 780 if (reset) { 781 getUINativeModule().common.resetSweepGradient(node); 782 } 783 else { 784 getUINativeModule().common.setSweepGradient(node, this.value.center, this.value.start, 785 this.value.end, this.value.rotation, this.value.colors, this.value.repeating); 786 } 787 } 788 checkObjectDiff() { 789 return !((this.stageValue.center === this.value.center) && 790 (this.stageValue.start === this.value.start) && 791 (this.stageValue.end === this.value.end) && 792 (this.stageValue.rotation === this.value.rotation) && 793 (this.stageValue.colors === this.value.colors) && 794 (this.stageValue.repeating === this.value.repeating)); 795 } 796} 797SweepGradientModifier.identity = Symbol('sweepGradient'); 798class OverlayModifier extends ModifierWithKey { 799 constructor(value) { 800 super(value); 801 } 802 applyPeer(node, reset) { 803 if (reset) { 804 getUINativeModule().common.resetOverlay(node); 805 } 806 else { 807 getUINativeModule().common.setOverlay(node, this.value.value, this.value.align, 808 this.value.offsetX, this.value.offsetY, this.value.hasOptions, this.value.hasOffset); 809 } 810 } 811 checkObjectDiff() { 812 if (isUndefined(this.value)) { 813 return !isUndefined(this.stageValue); 814 } 815 return this.value.checkObjectDiff(this.stageValue); 816 } 817} 818OverlayModifier.identity = Symbol('overlay'); 819class BorderImageModifier extends ModifierWithKey { 820 constructor(value) { 821 super(value); 822 } 823 applyPeer(node, reset) { 824 if (reset) { 825 getUINativeModule().common.resetBorderImage(node); 826 } 827 else { 828 let sliceTop; 829 let sliceRight; 830 let sliceBottom; 831 let sliceLeft; 832 let repeat; 833 let source; 834 let sourceAngle; 835 let sourceDirection; 836 let sourceColors; 837 let sourceRepeating; 838 let widthTop; 839 let widthRight; 840 let widthBottom; 841 let widthLeft; 842 let outsetTop; 843 let outsetRight; 844 let outsetBottom; 845 let outsetLeft; 846 let fill; 847 if (!isUndefined(this.value.slice)) { 848 if (isLengthType(this.value.slice) || isResource(this.value.slice)) { 849 let tmpSlice = this.value.slice; 850 sliceTop = tmpSlice; 851 sliceRight = tmpSlice; 852 sliceBottom = tmpSlice; 853 sliceLeft = tmpSlice; 854 } 855 else { 856 let tmpSlice = this.value.slice; 857 sliceTop = tmpSlice.top; 858 sliceRight = tmpSlice.right; 859 sliceBottom = tmpSlice.bottom; 860 sliceLeft = tmpSlice.left; 861 } 862 } 863 repeat = this.value.repeat; 864 if (!isUndefined(this.value.source)) { 865 if (isString(this.value.source) || isResource(this.value.source)) { 866 source = this.value.source; 867 } 868 else { 869 let tmpSource = this.value.source; 870 sourceAngle = tmpSource.angle; 871 sourceDirection = tmpSource.direction; 872 sourceColors = tmpSource.colors; 873 sourceRepeating = tmpSource.repeating; 874 } 875 } 876 if (!isUndefined(this.value.width)) { 877 if (isLengthType(this.value.width) || isResource(this.value.width)) { 878 let tmpWidth = this.value.width; 879 widthTop = tmpWidth; 880 widthRight = tmpWidth; 881 widthBottom = tmpWidth; 882 widthLeft = tmpWidth; 883 } 884 else { 885 let tmpWidth = this.value.width; 886 widthTop = tmpWidth.top; 887 widthRight = tmpWidth.right; 888 widthBottom = tmpWidth.bottom; 889 widthLeft = tmpWidth.left; 890 } 891 } 892 if (!isUndefined(this.value.outset)) { 893 if (isLengthType(this.value.outset) || isResource(this.value.outset)) { 894 let tmpOutset = this.value.outset; 895 outsetTop = tmpOutset; 896 outsetRight = tmpOutset; 897 outsetBottom = tmpOutset; 898 outsetLeft = tmpOutset; 899 } 900 else { 901 let tmpOutset = this.value.outset; 902 outsetTop = tmpOutset.top; 903 outsetRight = tmpOutset.right; 904 outsetBottom = tmpOutset.bottom; 905 outsetLeft = tmpOutset.left; 906 } 907 } 908 fill = this.value.fill; 909 getUINativeModule().common.setBorderImage(node, sliceTop, sliceRight, sliceBottom, 910 sliceLeft, repeat, source, sourceAngle, sourceDirection, sourceColors, sourceRepeating, 911 widthTop, widthRight, widthBottom, widthLeft, outsetTop, outsetRight, outsetBottom, 912 outsetLeft, fill); 913 } 914 } 915} 916BorderImageModifier.identity = Symbol('borderImage'); 917class BorderModifier extends ModifierWithKey { 918 constructor(value) { 919 super(value); 920 } 921 applyPeer(node, reset) { 922 if (reset) { 923 getUINativeModule().common.resetBorder(node); 924 } 925 else { 926 let isLocalizedBorderWidth; 927 let isLocalizedBorderColor; 928 let isLocalizedBorderRadius; 929 if ((Object.keys(this.value.arkWidth).indexOf('start') >= 0 && !isUndefined(this.value.arkWidth.start)) || 930 (Object.keys(this.value.arkWidth).indexOf('end') >= 0) && !isUndefined(this.value.arkWidth.end)) { 931 isLocalizedBorderWidth = true; 932 } else { 933 isLocalizedBorderWidth = false; 934 } 935 if ((Object.keys(this.value.arkColor).indexOf('startColor') >= 0 && !isUndefined(this.value.arkColor.startColor)) || 936 (Object.keys(this.value.arkColor).indexOf('endColor') >= 0) && !isUndefined(this.value.arkColor.endColor)) { 937 isLocalizedBorderColor = true; 938 } else { 939 isLocalizedBorderColor = false; 940 } 941 if ((Object.keys(this.value.arkRadius).indexOf('topStart') >= 0 && !isUndefined(this.value.arkRadius.topStart)) || 942 (Object.keys(this.value.arkRadius).indexOf('topEnd') >= 0 && !isUndefined(this.value.arkRadius.topEnd)) || 943 (Object.keys(this.value.arkRadius).indexOf('bottomStart') >= 0 && !isUndefined(this.value.arkRadius.bottomStart)) || 944 (Object.keys(this.value.arkRadius).indexOf('bottomEnd') >= 0 && !isUndefined(this.value.arkRadius.bottomEnd))) { 945 isLocalizedBorderRadius = true; 946 } else { 947 isLocalizedBorderRadius = false; 948 } 949 getUINativeModule().common.setBorderWithDashParams(node, this.value.arkWidth.left, 950 this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 951 this.value.arkColor.leftColor, this.value.arkColor.rightColor, 952 this.value.arkColor.topColor, this.value.arkColor.bottomColor, 953 this.value.arkRadius.topLeft, this.value.arkRadius.topRight, 954 this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, 955 this.value.arkStyle.top, this.value.arkStyle.right, this.value.arkStyle.bottom, 956 this.value.arkStyle.left, this.value.arkDashGap.left, 957 this.value.arkDashGap.right, this.value.arkDashGap.top, this.value.arkDashGap.bottom, 958 this.value.arkDashWidth.left, this.value.arkDashWidth.right, 959 this.value.arkDashWidth.top, this.value.arkDashWidth.bottom, this.value.arkWidth.start, 960 this.value.arkWidth.end, this.value.arkColor.startColor, this.value.arkColor.endColor, 961 this.value.arkRadius.topStart, this.value.arkRadius.topEnd, this.value.arkRadius.bottomStart, 962 this.value.arkRadius.bottomEnd, isLocalizedBorderWidth, isLocalizedBorderColor, isLocalizedBorderRadius, 963 this.value.arkDashGap.start, this.value.arkDashGap.end, this.value.arkDashWidth.start, this.value.arkDashWidth.end); 964 } 965 } 966 checkObjectDiff() { 967 return this.value.checkObjectDiff(this.stageValue); 968 } 969} 970BorderModifier.identity = Symbol('border'); 971class OutlineColorModifier extends ModifierWithKey { 972 constructor(value) { 973 super(value); 974 } 975 applyPeer(node, reset) { 976 if (reset) { 977 getUINativeModule().common.resetOutlineColor(node); 978 } 979 else { 980 const valueType = typeof this.value; 981 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 982 getUINativeModule().common.setOutlineColor(node, this.value, this.value, this.value, this.value); 983 } 984 else { 985 getUINativeModule().common.setOutlineColor(node, this.value.left, this.value.right, this.value.top, this.value.bottom); 986 } 987 } 988 } 989 checkObjectDiff() { 990 if (isResource(this.stageValue) && isResource(this.value)) { 991 return !isResourceEqual(this.stageValue, this.value); 992 } 993 else if (!isResource(this.stageValue) && !isResource(this.value)) { 994 return !(this.stageValue.left === this.value.left && 995 this.stageValue.right === this.value.right && 996 this.stageValue.top === this.value.top && 997 this.stageValue.bottom === this.value.bottom); 998 } 999 else { 1000 return true; 1001 } 1002 } 1003} 1004OutlineColorModifier.identity = Symbol('outlineColor'); 1005class OutlineRadiusModifier extends ModifierWithKey { 1006 constructor(value) { 1007 super(value); 1008 } 1009 applyPeer(node, reset) { 1010 if (reset) { 1011 getUINativeModule().common.resetOutlineRadius(node); 1012 } 1013 else { 1014 const valueType = typeof this.value; 1015 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 1016 getUINativeModule().common.setOutlineRadius(node, this.value, this.value, this.value, this.value); 1017 } 1018 else { 1019 getUINativeModule().common.setOutlineRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 1020 } 1021 } 1022 } 1023 checkObjectDiff() { 1024 if (isResource(this.stageValue) && isResource(this.value)) { 1025 return !isResourceEqual(this.stageValue, this.value); 1026 } 1027 else if (!isResource(this.stageValue) && !isResource(this.value)) { 1028 return !(this.stageValue.topLeft === this.value.topLeft && 1029 this.stageValue.topRight === this.value.topRight && 1030 this.stageValue.bottomLeft === this.value.bottomLeft && 1031 this.stageValue.bottomRight === this.value.bottomRight); 1032 } 1033 else { 1034 return true; 1035 } 1036 } 1037} 1038OutlineRadiusModifier.identity = Symbol('outlineRadius'); 1039class OutlineStyleModifier extends ModifierWithKey { 1040 constructor(value) { 1041 super(value); 1042 } 1043 applyPeer(node, reset) { 1044 if (reset) { 1045 getUINativeModule().common.resetOutlineStyle(node); 1046 } 1047 else { 1048 if (isNumber(this.value)) { 1049 getUINativeModule().common.setOutlineStyle(node, this.value, this.value, this.value, this.value); 1050 } 1051 else { 1052 getUINativeModule().common.setOutlineStyle(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 1053 } 1054 } 1055 } 1056 checkObjectDiff() { 1057 return !(this.value.top === this.stageValue.top && 1058 this.value.right === this.stageValue.right && 1059 this.value.bottom === this.stageValue.bottom && 1060 this.value.left === this.stageValue.left); 1061 } 1062} 1063OutlineStyleModifier.identity = Symbol('outlineStyle'); 1064class OutlineWidthModifier extends ModifierWithKey { 1065 constructor(value) { 1066 super(value); 1067 } 1068 applyPeer(node, reset) { 1069 if (reset) { 1070 getUINativeModule().common.resetOutlineWidth(node); 1071 } 1072 else { 1073 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 1074 getUINativeModule().common.setOutlineWidth(node, this.value, this.value, this.value, this.value); 1075 } 1076 else { 1077 getUINativeModule().common.setOutlineWidth(node, this.value.left, this.value.right, this.value.top, this.value.bottom); 1078 } 1079 } 1080 } 1081 checkObjectDiff() { 1082 if (isResource(this.stageValue) && isResource(this.value)) { 1083 return !isResourceEqual(this.stageValue, this.value); 1084 } 1085 else if (!isResource(this.stageValue) && !isResource(this.value)) { 1086 return !(this.stageValue.left === this.value.left && 1087 this.stageValue.right === this.value.right && 1088 this.stageValue.top === this.value.top && 1089 this.stageValue.bottom === this.value.bottom); 1090 } 1091 else { 1092 return true; 1093 } 1094 } 1095} 1096OutlineWidthModifier.identity = Symbol('outlineWidth'); 1097class OutlineModifier extends ModifierWithKey { 1098 constructor(value) { 1099 super(value); 1100 } 1101 applyPeer(node, reset) { 1102 if (reset) { 1103 getUINativeModule().common.resetOutline(node); 1104 } 1105 else { 1106 let widthLeft; 1107 let widthRight; 1108 let widthTop; 1109 let widthBottom; 1110 if (!isUndefined(this.value.width) && this.value.width != null) { 1111 if (isNumber(this.value.width) || isString(this.value.width) || isResource(this.value.width)) { 1112 widthLeft = this.value.width; 1113 widthRight = this.value.width; 1114 widthTop = this.value.width; 1115 widthBottom = this.value.width; 1116 } 1117 else { 1118 widthLeft = this.value.width.left; 1119 widthRight = this.value.width.right; 1120 widthTop = this.value.width.top; 1121 widthBottom = this.value.width.bottom; 1122 } 1123 } 1124 let leftColor; 1125 let rightColor; 1126 let topColor; 1127 let bottomColor; 1128 if (!isUndefined(this.value.color) && this.value.color != null) { 1129 if (isNumber(this.value.color) || isString(this.value.color) || isResource(this.value.color)) { 1130 leftColor = this.value.color; 1131 rightColor = this.value.color; 1132 topColor = this.value.color; 1133 bottomColor = this.value.color; 1134 } 1135 else { 1136 leftColor = this.value.color.left; 1137 rightColor = this.value.color.right; 1138 topColor = this.value.color.top; 1139 bottomColor = this.value.color.bottom; 1140 } 1141 } 1142 let topLeft; 1143 let topRight; 1144 let bottomLeft; 1145 let bottomRight; 1146 if (!isUndefined(this.value.radius) && this.value.radius != null) { 1147 if (isNumber(this.value.radius) || isString(this.value.radius) || isResource(this.value.radius)) { 1148 topLeft = this.value.radius; 1149 topRight = this.value.radius; 1150 bottomLeft = this.value.radius; 1151 bottomRight = this.value.radius; 1152 } 1153 else { 1154 topLeft = this.value.radius.topLeft; 1155 topRight = this.value.radius.topRight; 1156 bottomLeft = this.value.radius.bottomLeft; 1157 bottomRight = this.value.radius.bottomRight; 1158 } 1159 } 1160 let styleTop; 1161 let styleRight; 1162 let styleBottom; 1163 let styleLeft; 1164 if (!isUndefined(this.value.style) && this.value.style != null) { 1165 if (isNumber(this.value.style) || isString(this.value.style) || isResource(this.value.style)) { 1166 styleTop = this.value.style; 1167 styleRight = this.value.style; 1168 styleBottom = this.value.style; 1169 styleLeft = this.value.style; 1170 } 1171 else { 1172 styleTop = this.value.style.top; 1173 styleRight = this.value.style.right; 1174 styleBottom = this.value.style.bottom; 1175 styleLeft = this.value.style.left; 1176 } 1177 } 1178 getUINativeModule().common.setOutline(node, widthLeft, widthRight, widthTop, widthBottom, 1179 leftColor, rightColor, topColor, bottomColor, 1180 topLeft, topRight, bottomLeft, bottomRight, 1181 styleTop, styleRight, styleBottom, styleLeft); 1182 } 1183 } 1184 checkObjectDiff() { 1185 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 1186 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 1187 !isBaseOrResourceEqual(this.stageValue.radius, this.value.radius) || 1188 !isBaseOrResourceEqual(this.stageValue.style, this.value.style); 1189 } 1190} 1191OutlineModifier.identity = Symbol('outline'); 1192class ForegroundBlurStyleModifier extends ModifierWithKey { 1193 constructor(value) { 1194 super(value); 1195 } 1196 applyPeer(node, reset) { 1197 if (reset) { 1198 getUINativeModule().common.resetForegroundBlurStyle(node); 1199 } 1200 else { 1201 getUINativeModule().common.setForegroundBlurStyle(node, this.value.blurStyle, this.value.colorMode, this.value.adaptiveColor, this.value.scale, 1202 (_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale); 1203 } 1204 } 1205 checkObjectDiff() { 1206 return !(this.stageValue.blurStyle === this.value.blurStyle && 1207 this.stageValue.colorMode === this.value.colorMode && 1208 this.stageValue.adaptiveColor === this.value.adaptiveColor && 1209 this.stageValue.scale === this.value.scale && 1210 this.stageValue.blurOptions === this.value.blurOptions); 1211 } 1212} 1213ForegroundBlurStyleModifier.identity = Symbol('foregroundBlurStyle'); 1214class BackgroundImagePositionModifier extends ModifierWithKey { 1215 constructor(value) { 1216 super(value); 1217 } 1218 applyPeer(node, reset) { 1219 let _a, _b; 1220 if (reset) { 1221 getUINativeModule().common.resetBackgroundImagePosition(node); 1222 } 1223 else { 1224 if (isNumber(this.value)) { 1225 getUINativeModule().common.setBackgroundImagePosition(node, this.value, undefined, undefined); 1226 } 1227 else { 1228 getUINativeModule().common.setBackgroundImagePosition(node, undefined, 1229 (_a = this.value) === null || _a === void 0 ? void 0 : _a.x, 1230 (_b = this.value) === null || _b === void 0 ? void 0 : _b.y); 1231 } 1232 } 1233 } 1234 checkObjectDiff() { 1235 let _a, _b, _c, _d; 1236 return !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.x) === ((_b = this.stageValue) === null || _b === void 0 ? void 0 : _b.x) && 1237 ((_c = this.value) === null || _c === void 0 ? void 0 : _c.y) === ((_d = this.stageValue) === null || _d === void 0 ? void 0 : _d.y)); 1238 } 1239} 1240BackgroundImagePositionModifier.identity = Symbol('backgroundImagePosition'); 1241class BackgroundImageResizableModifier extends ModifierWithKey { 1242 constructor(value) { 1243 super(value); 1244 } 1245 applyPeer(node, reset) { 1246 if (reset) { 1247 getUINativeModule().common.resetBackgroundImageResizable(node); 1248 } 1249 else { 1250 let sliceTop, sliceBottom, sliceLeft, sliceRight; 1251 if (!isUndefined(this.value.slice)) { 1252 let tempSlice = this.value.slice; 1253 sliceTop = tempSlice.top; 1254 sliceBottom = tempSlice.bottom; 1255 sliceLeft = tempSlice.left; 1256 sliceRight = tempSlice.right; 1257 } 1258 getUINativeModule().common.setBackgroundImageResizable(node, sliceTop, sliceBottom, sliceLeft, sliceRight); 1259 } 1260 } 1261 checkObjectDiff() { 1262 return !isBaseOrResourceEqual(this.stageValue, this.value); 1263 } 1264} 1265BackgroundImageResizableModifier.identity = Symbol('backgroundImageResizable'); 1266class LinearGradientBlurModifier extends ModifierWithKey { 1267 constructor(value) { 1268 super(value); 1269 } 1270 applyPeer(node, reset) { 1271 if (reset) { 1272 getUINativeModule().common.resetLinearGradientBlur(node); 1273 } 1274 else { 1275 getUINativeModule().common.setLinearGradientBlur(node, this.value.blurRadius, this.value.fractionStops, this.value.direction); 1276 } 1277 } 1278 checkObjectDiff() { 1279 return !this.value.isEqual(this.stageValue); 1280 } 1281} 1282LinearGradientBlurModifier.identity = Symbol('linearGradientBlur'); 1283class BackgroundImageModifier extends ModifierWithKey { 1284 constructor(value) { 1285 super(value); 1286 } 1287 applyPeer(node, reset) { 1288 if (reset) { 1289 getUINativeModule().common.resetBackgroundImage(node); 1290 } 1291 else { 1292 getUINativeModule().common.setBackgroundImage(node, this.value.src, this.value.repeat); 1293 } 1294 } 1295 checkObjectDiff() { 1296 return !(this.stageValue.src === this.value.src && 1297 this.stageValue.repeat === this.value.repeat); 1298 } 1299} 1300BackgroundImageModifier.identity = Symbol('backgroundImage'); 1301class BackgroundBlurStyleModifier extends ModifierWithKey { 1302 constructor(value) { 1303 super(value); 1304 } 1305 applyPeer(node, reset) { 1306 if (reset) { 1307 getUINativeModule().common.resetBackgroundBlurStyle(node); 1308 } 1309 else { 1310 getUINativeModule().common.setBackgroundBlurStyle(node, this.value.blurStyle, this.value.colorMode, 1311 this.value.adaptiveColor, this.value.scale, 1312 (_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale, 1313 this.value.policy, this.value.inactiveColor, this.value.type); 1314 } 1315 } 1316} 1317BackgroundBlurStyleModifier.identity = Symbol('backgroundBlurStyle'); 1318class BackgroundImageSizeModifier extends ModifierWithKey { 1319 constructor(value) { 1320 super(value); 1321 } 1322 applyPeer(node, reset) { 1323 let _a, _b; 1324 if (reset) { 1325 getUINativeModule().common.resetBackgroundImageSize(node); 1326 } 1327 else { 1328 if (isNumber(this.value)) { 1329 getUINativeModule().common.setBackgroundImageSize(node, this.value, undefined, undefined); 1330 } 1331 else { 1332 getUINativeModule().common.setBackgroundImageSize(node, undefined, 1333 (_a = this.value) === null || _a === void 0 ? void 0 : _a.width, 1334 (_b = this.value) === null || _b === void 0 ? void 0 : _b.height); 1335 } 1336 } 1337 } 1338 checkObjectDiff() { 1339 return !(this.value.width === this.stageValue.width && 1340 this.value.height === this.stageValue.height); 1341 } 1342} 1343BackgroundImageSizeModifier.identity = Symbol('backgroundImageSize'); 1344class TranslateModifier extends ModifierWithKey { 1345 constructor(value) { 1346 super(value); 1347 } 1348 applyPeer(node, reset) { 1349 if (reset) { 1350 getUINativeModule().common.resetTranslate(node); 1351 } 1352 else { 1353 getUINativeModule().common.setTranslate(node, this.value.x, this.value.y, this.value.z); 1354 } 1355 } 1356 checkObjectDiff() { 1357 return !(this.value.x === this.stageValue.x && 1358 this.value.y === this.stageValue.y && 1359 this.value.z === this.stageValue.z); 1360 } 1361} 1362TranslateModifier.identity = Symbol('translate'); 1363class ScaleModifier extends ModifierWithKey { 1364 constructor(value) { 1365 super(value); 1366 } 1367 applyPeer(node, reset) { 1368 if (reset) { 1369 getUINativeModule().common.resetScale(node); 1370 } 1371 else { 1372 getUINativeModule().common.setScale(node, this.value.x, this.value.y, this.value.z, this.value.centerX, this.value.centerY); 1373 } 1374 } 1375 checkObjectDiff() { 1376 return !(this.value.x === this.stageValue.x && 1377 this.value.y === this.stageValue.y && 1378 this.value.z === this.stageValue.z && 1379 this.value.centerX === this.stageValue.centerX && 1380 this.value.centerY === this.stageValue.centerY); 1381 } 1382} 1383ScaleModifier.identity = Symbol('scale'); 1384class RotateModifier extends ModifierWithKey { 1385 constructor(value) { 1386 super(value); 1387 } 1388 applyPeer(node, reset) { 1389 if (reset) { 1390 getUINativeModule().common.resetRotate(node); 1391 } 1392 else { 1393 getUINativeModule().common.setRotate(node, this.value.x, this.value.y, 1394 this.value.z, this.value.angle, this.value.centerX, this.value.centerY, 1395 this.value.centerY, this.value.perspective); 1396 } 1397 } 1398 checkObjectDiff() { 1399 return !(this.value.x === this.stageValue.x && 1400 this.value.y === this.stageValue.y && 1401 this.value.z === this.stageValue.z && 1402 this.value.angle === this.stageValue.angle && 1403 this.value.centerX === this.stageValue.centerX && 1404 this.value.centerY === this.stageValue.centerY && 1405 this.value.centerZ === this.stageValue.centerZ && 1406 this.value.perspective === this.stageValue.perspective); 1407 } 1408} 1409RotateModifier.identity = Symbol('rotate'); 1410class GeometryTransitionModifier extends ModifierWithKey { 1411 constructor(value) { 1412 super(value); 1413 } 1414 applyPeer(node, reset) { 1415 let _a, _b; 1416 if (reset) { 1417 getUINativeModule().common.resetGeometryTransition(node); 1418 } 1419 else { 1420 getUINativeModule().common.setGeometryTransition(node, this.value.id, 1421 (_a = this.value.options) === null || _a === void 0 ? void 0 : _a.follow, 1422 (_b = this.value.options) === null || _b === void 0 ? void 0 : _b.hierarchyStrategy); 1423 } 1424 } 1425} 1426GeometryTransitionModifier.identity = Symbol('geometryTransition'); 1427class BlendModeModifier extends ModifierWithKey { 1428 constructor(value) { 1429 super(value); 1430 } 1431 applyPeer(node, reset) { 1432 if (reset) { 1433 getUINativeModule().common.resetBlendMode(node); 1434 } 1435 else { 1436 getUINativeModule().common.setBlendMode(node, this.value.blendMode, this.value.blendApplyType); 1437 } 1438 } 1439} 1440BlendModeModifier.identity = Symbol('blendMode'); 1441class AdvancedBlendModeModifier extends ModifierWithKey { 1442 constructor(value) { 1443 super(value); 1444 } 1445 applyPeer(node, reset) { 1446 if (reset) { 1447 getUINativeModule().common.resetAdvancedBlendMode(node); 1448 } else { 1449 getUINativeModule().common.setAdvancedBlendMode(node, this.value.blendMode, this.value.blendApplyType); 1450 } 1451 } 1452} 1453AdvancedBlendModeModifier.identity = Symbol('advancedBlendMode'); 1454class ClipModifier extends ModifierWithKey { 1455 constructor(value) { 1456 super(value); 1457 } 1458 applyPeer(node, reset) { 1459 if (reset) { 1460 getUINativeModule().common.resetClip(node); 1461 } 1462 else { 1463 getUINativeModule().common.setClip(node, this.value); 1464 } 1465 } 1466 checkObjectDiff() { 1467 return true; 1468 } 1469} 1470ClipModifier.identity = Symbol('clip'); 1471class ClipShapeModifier extends ModifierWithKey { 1472 constructor(value) { 1473 super(value); 1474 } 1475 applyPeer(node, reset) { 1476 if (reset) { 1477 getUINativeModule().common.resetClipShape(node); 1478 } 1479 else { 1480 getUINativeModule().common.setClipShape(node, this.value); 1481 } 1482 } 1483 checkObjectDiff() { 1484 return true; 1485 } 1486} 1487ClipShapeModifier.identity = Symbol('clipShape'); 1488class MaskModifier extends ModifierWithKey { 1489 constructor(value) { 1490 super(value); 1491 } 1492 applyPeer(node, reset) { 1493 if (reset) { 1494 getUINativeModule().common.resetMask(node); 1495 } 1496 else { 1497 getUINativeModule().common.setMask(node, this.value); 1498 } 1499 } 1500 checkObjectDiff() { 1501 return true; 1502 } 1503} 1504MaskModifier.identity = Symbol('mask'); 1505class MaskShapeModifier extends ModifierWithKey { 1506 constructor(value) { 1507 super(value); 1508 } 1509 applyPeer(node, reset) { 1510 if (reset) { 1511 getUINativeModule().common.resetMaskShape(node); 1512 } 1513 else { 1514 getUINativeModule().common.setMaskShape(node, this.value); 1515 } 1516 } 1517 checkObjectDiff() { 1518 return true; 1519 } 1520} 1521MaskShapeModifier.identity = Symbol('maskShape'); 1522class PixelStretchEffectModifier extends ModifierWithKey { 1523 constructor(value) { 1524 super(value); 1525 } 1526 applyPeer(node, reset) { 1527 if (reset) { 1528 getUINativeModule().common.resetPixelStretchEffect(node); 1529 } 1530 else { 1531 getUINativeModule().common.setPixelStretchEffect(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 1532 } 1533 } 1534 checkObjectDiff() { 1535 return !(this.stageValue.left === this.value.left && 1536 this.stageValue.right === this.value.right && 1537 this.stageValue.top === this.value.top && 1538 this.stageValue.bottom === this.value.bottom); 1539 } 1540} 1541PixelStretchEffectModifier.identity = Symbol('pixelStretchEffect'); 1542class LightUpEffectModifier extends ModifierWithKey { 1543 constructor(value) { 1544 super(value); 1545 } 1546 applyPeer(node, reset) { 1547 if (reset) { 1548 getUINativeModule().common.resetLightUpEffect(node); 1549 } 1550 else { 1551 getUINativeModule().common.setLightUpEffect(node, this.value); 1552 } 1553 } 1554} 1555LightUpEffectModifier.identity = Symbol('lightUpEffect'); 1556class SphericalEffectModifier extends ModifierWithKey { 1557 constructor(value) { 1558 super(value); 1559 } 1560 applyPeer(node, reset) { 1561 if (reset) { 1562 getUINativeModule().common.resetSphericalEffect(node); 1563 } 1564 else { 1565 getUINativeModule().common.setSphericalEffect(node, this.value); 1566 } 1567 } 1568} 1569SphericalEffectModifier.identity = Symbol('sphericalEffect'); 1570class RenderGroupModifier extends ModifierWithKey { 1571 constructor(value) { 1572 super(value); 1573 } 1574 applyPeer(node, reset) { 1575 if (reset) { 1576 getUINativeModule().common.resetRenderGroup(node); 1577 } 1578 else { 1579 getUINativeModule().common.setRenderGroup(node, this.value); 1580 } 1581 } 1582} 1583RenderGroupModifier.identity = Symbol('renderGroup'); 1584class RenderFitModifier extends ModifierWithKey { 1585 constructor(value) { 1586 super(value); 1587 } 1588 applyPeer(node, reset) { 1589 if (reset) { 1590 getUINativeModule().common.resetRenderFit(node); 1591 } 1592 else { 1593 getUINativeModule().common.setRenderFit(node, this.value); 1594 } 1595 } 1596} 1597RenderFitModifier.identity = Symbol('renderFit'); 1598class UseEffectModifier extends ModifierWithKey { 1599 constructor(value) { 1600 super(value); 1601 } 1602 applyPeer(node, reset) { 1603 if (reset) { 1604 getUINativeModule().common.resetUseEffect(node); 1605 } 1606 else { 1607 getUINativeModule().common.setUseEffect(node, this.value.useEffect, this.value.effectType); 1608 } 1609 } 1610} 1611UseEffectModifier.identity = Symbol('useEffect'); 1612class ForegroundEffectModifier extends ModifierWithKey { 1613 constructor(value) { 1614 super(value); 1615 } 1616 applyPeer(node, reset) { 1617 if (reset) { 1618 getUINativeModule().common.resetForegroundEffect(node); 1619 } 1620 else { 1621 getUINativeModule().common.setForegroundEffect(node, this.value.radius); 1622 } 1623 } 1624 checkObjectDiff() { 1625 return !(this.value.radius === this.stageValue.radius); 1626 } 1627} 1628ForegroundEffectModifier.identity = Symbol('foregroundEffect'); 1629class ForegroundColorModifier extends ModifierWithKey { 1630 constructor(value) { 1631 super(value); 1632 } 1633 applyPeer(node, reset) { 1634 if (reset) { 1635 getUINativeModule().common.resetForegroundColor(node); 1636 } 1637 else { 1638 getUINativeModule().common.setForegroundColor(node, this.value); 1639 } 1640 } 1641 checkObjectDiff() { 1642 return !isBaseOrResourceEqual(this.stageValue, this.value); 1643 } 1644} 1645ForegroundColorModifier.identity = Symbol('foregroundColor'); 1646class ClickModifier extends ModifierWithKey { 1647 constructor(value) { 1648 super(value); 1649 } 1650 applyPeer(node, reset) { 1651 if (reset) { 1652 getUINativeModule().common.resetOnClick(node); 1653 } else { 1654 getUINativeModule().common.setOnClick(node, this.value); 1655 } 1656 } 1657} 1658ClickModifier.identity = Symbol('onClick'); 1659class DragStartModifier extends ModifierWithKey { 1660 constructor(value) { 1661 super(value); 1662 } 1663 applyPeer(node, reset) { 1664 if (reset) { 1665 getUINativeModule().common.resetOnDragStart(node); 1666 } else { 1667 getUINativeModule().common.setOnDragStart(node, this.value); 1668 } 1669 } 1670} 1671DragStartModifier.identity = Symbol('onDragStart'); 1672class DragEnterModifier extends ModifierWithKey { 1673 constructor(value) { 1674 super(value); 1675 } 1676 applyPeer(node, reset) { 1677 if (reset) { 1678 getUINativeModule().common.resetOnDragEnter(node); 1679 } else { 1680 getUINativeModule().common.setOnDragEnter(node, this.value); 1681 } 1682 } 1683} 1684DragEnterModifier.identity = Symbol('onDragEnter'); 1685class DragMoveModifier extends ModifierWithKey { 1686 constructor(value) { 1687 super(value); 1688 } 1689 applyPeer(node, reset) { 1690 if (reset) { 1691 getUINativeModule().common.resetOnDragMove(node); 1692 } else { 1693 getUINativeModule().common.setOnDragMove(node, this.value); 1694 } 1695 } 1696} 1697DragMoveModifier.identity = Symbol('onDragMove'); 1698class DragLeaveModifier extends ModifierWithKey { 1699 constructor(value) { 1700 super(value); 1701 } 1702 applyPeer(node, reset) { 1703 if (reset) { 1704 getUINativeModule().common.resetOnDragLeave(node); 1705 } else { 1706 getUINativeModule().common.setOnDragLeave(node, this.value); 1707 } 1708 } 1709} 1710DragLeaveModifier.identity = Symbol('onDragLeave'); 1711class DropModifier extends ModifierWithKey { 1712 constructor(value) { 1713 super(value); 1714 } 1715 applyPeer(node, reset) { 1716 if (reset) { 1717 getUINativeModule().common.resetOnDrop(node); 1718 } else { 1719 getUINativeModule().common.setOnDrop(node, this.value); 1720 } 1721 } 1722} 1723DropModifier.identity = Symbol('onDrop'); 1724class DragEndModifier extends ModifierWithKey { 1725 constructor(value) { 1726 super(value); 1727 } 1728 applyPeer(node, reset) { 1729 if (reset) { 1730 getUINativeModule().common.resetOnDragEnd(node); 1731 } else { 1732 getUINativeModule().common.setOnDragEnd(node, this.value); 1733 } 1734 } 1735} 1736DragEndModifier.identity = Symbol('onDragEnd'); 1737class OnTouchModifier extends ModifierWithKey { 1738 constructor(value) { 1739 super(value); 1740 } 1741 applyPeer(node, reset) { 1742 if (reset) { 1743 getUINativeModule().common.resetOnTouch(node); 1744 } else { 1745 getUINativeModule().common.setOnTouch(node, this.value); 1746 } 1747 } 1748} 1749OnTouchModifier.identity = Symbol('onTouch'); 1750class OnAppearModifier extends ModifierWithKey { 1751 constructor(value) { 1752 super(value); 1753 } 1754 applyPeer(node, reset) { 1755 if (reset) { 1756 getUINativeModule().common.resetOnAppear(node); 1757 } else { 1758 getUINativeModule().common.setOnAppear(node, this.value); 1759 } 1760 } 1761} 1762OnAppearModifier.identity = Symbol('onAppear'); 1763class OnDisappearModifier extends ModifierWithKey { 1764 constructor(value) { 1765 super(value); 1766 } 1767 applyPeer(node, reset) { 1768 if (reset) { 1769 getUINativeModule().common.resetOnDisappear(node); 1770 } else { 1771 getUINativeModule().common.setOnDisappear(node, this.value); 1772 } 1773 } 1774} 1775OnDisappearModifier.identity = Symbol('onDisappear'); 1776class OnAttachModifier extends ModifierWithKey { 1777 constructor(value) { 1778 super(value); 1779 } 1780 applyPeer(node, reset) { 1781 if (reset) { 1782 getUINativeModule().common.resetOnAttach(node); 1783 } else { 1784 getUINativeModule().common.setOnAttach(node, this.value); 1785 } 1786 } 1787} 1788OnAttachModifier.identity = Symbol('onAttach'); 1789class OnDetachModifier extends ModifierWithKey { 1790 constructor(value) { 1791 super(value); 1792 } 1793 applyPeer(node, reset) { 1794 if (reset) { 1795 getUINativeModule().common.resetOnDetach(node); 1796 } else { 1797 getUINativeModule().common.setOnDetach(node, this.value); 1798 } 1799 } 1800} 1801OnDetachModifier.identity = Symbol('onDetach'); 1802class OnKeyEventModifier extends ModifierWithKey { 1803 constructor(value) { 1804 super(value); 1805 } 1806 applyPeer(node, reset) { 1807 if (reset) { 1808 getUINativeModule().common.resetOnKeyEvent(node); 1809 } else { 1810 getUINativeModule().common.setOnKeyEvent(node, this.value); 1811 } 1812 } 1813} 1814OnKeyEventModifier.identity = Symbol('onKeyEvent'); 1815class OnKeyPreImeModifier extends ModifierWithKey { 1816 constructor(value) { 1817 super(value); 1818 } 1819 applyPeer(node, reset) { 1820 if (reset) { 1821 getUINativeModule().common.resetOnKeyPreIme(node); 1822 } else { 1823 getUINativeModule().common.setOnKeyPreIme(node, this.value); 1824 } 1825 } 1826} 1827OnKeyPreImeModifier.identity = Symbol('onKeyPreIme'); 1828class OnFocusAxisEventModifier extends ModifierWithKey { 1829 constructor(value) { 1830 super(value); 1831 } 1832 applyPeer(node, reset) { 1833 if (reset) { 1834 getUINativeModule().common.resetOnFocusAxisEvent(node); 1835 } else { 1836 getUINativeModule().common.setOnFocusAxisEvent(node, this.value); 1837 } 1838 } 1839} 1840OnFocusAxisEventModifier.identity = Symbol('onFocusAxisEvent'); 1841class OnFocusModifier extends ModifierWithKey { 1842 constructor(value) { 1843 super(value); 1844 } 1845 applyPeer(node, reset) { 1846 if (reset) { 1847 getUINativeModule().common.resetOnFocus(node); 1848 } else { 1849 getUINativeModule().common.setOnFocus(node, this.value); 1850 } 1851 } 1852} 1853OnFocusModifier.identity = Symbol('onFocus'); 1854class OnBlurModifier extends ModifierWithKey { 1855 constructor(value) { 1856 super(value); 1857 } 1858 applyPeer(node, reset) { 1859 if (reset) { 1860 getUINativeModule().common.resetOnBlur(node); 1861 } else { 1862 getUINativeModule().common.setOnBlur(node, this.value); 1863 } 1864 } 1865} 1866OnBlurModifier.identity = Symbol('onBlur'); 1867 1868class OnHoverModifier extends ModifierWithKey { 1869 constructor(value) { 1870 super(value); 1871 } 1872 applyPeer(node, reset) { 1873 if (reset) { 1874 getUINativeModule().common.resetOnHover(node); 1875 } else { 1876 getUINativeModule().common.setOnHover(node, this.value); 1877 } 1878 } 1879} 1880OnHoverModifier.identity = Symbol('onHover'); 1881 1882class OnHoverMoveModifier extends ModifierWithKey { 1883 constructor(value) { 1884 super(value); 1885 } 1886 applyPeer(node, reset) { 1887 if (reset) { 1888 getUINativeModule().common.resetOnHoverMove(node); 1889 } else { 1890 getUINativeModule().common.setOnHoverMove(node, this.value); 1891 } 1892 } 1893} 1894OnHoverMoveModifier.identity = Symbol('onHoverMove'); 1895class OnMouseModifier extends ModifierWithKey { 1896 constructor(value) { 1897 super(value); 1898 } 1899 applyPeer(node, reset) { 1900 if (reset) { 1901 getUINativeModule().common.resetOnMouse(node); 1902 } else { 1903 getUINativeModule().common.setOnMouse(node, this.value); 1904 } 1905 } 1906} 1907OnMouseModifier.identity = Symbol('onMouse'); 1908class OnSizeChangeModifier extends ModifierWithKey { 1909 constructor(value) { 1910 super(value); 1911 } 1912 applyPeer(node, reset) { 1913 if (reset) { 1914 getUINativeModule().common.resetOnSizeChange(node); 1915 } else { 1916 getUINativeModule().common.setOnSizeChange(node, this.value); 1917 } 1918 } 1919} 1920OnSizeChangeModifier.identity = Symbol('onSizeChange'); 1921class OnAreaChangeModifier extends ModifierWithKey { 1922 constructor(value) { 1923 super(value); 1924 } 1925 applyPeer(node, reset) { 1926 if (reset) { 1927 getUINativeModule().common.resetOnAreaChange(node); 1928 } else { 1929 getUINativeModule().common.setOnAreaChange(node, this.value); 1930 } 1931 } 1932} 1933OnSizeChangeModifier.identity = Symbol('onAreaChange'); 1934class OnGestureJudgeBeginModifier extends ModifierWithKey { 1935 constructor(value) { 1936 super(value); 1937 } 1938 applyPeer(node, reset) { 1939 if (reset) { 1940 getUINativeModule().common.resetOnGestureJudgeBegin(node); 1941 } else { 1942 getUINativeModule().common.setOnGestureJudgeBegin(node, this.value); 1943 } 1944 } 1945} 1946OnGestureJudgeBeginModifier.identity = Symbol('onGestureJudgeBegin'); 1947class OnGestureRecognizerJudgeBeginModifier extends ModifierWithKey { 1948 constructor(value) { 1949 super(value); 1950 } 1951 applyPeer(node, reset) { 1952 if (reset) { 1953 getUINativeModule().common.resetOnGestureRecognizerJudgeBegin(node); 1954 } else { 1955 getUINativeModule().common.setOnGestureRecognizerJudgeBegin(node, this.value); 1956 } 1957 } 1958} 1959OnGestureRecognizerJudgeBeginModifier.identity = Symbol('onGestureRecognizerJudgeBegin'); 1960class ShouldBuiltInRecognizerParallelWithModifier extends ModifierWithKey { 1961 constructor(value) { 1962 super(value); 1963 } 1964 applyPeer(node, reset) { 1965 if (reset) { 1966 getUINativeModule().common.resetShouldBuiltInRecognizerParallelWith(node); 1967 } else { 1968 getUINativeModule().common.setShouldBuiltInRecognizerParallelWith(node, this.value); 1969 } 1970 } 1971} 1972ShouldBuiltInRecognizerParallelWithModifier.identity = Symbol('shouldBuiltInRecognizerParallelWith'); 1973class MotionPathModifier extends ModifierWithKey { 1974 constructor(value) { 1975 super(value); 1976 } 1977 applyPeer(node, reset) { 1978 if (reset) { 1979 getUINativeModule().common.resetMotionPath(node); 1980 } 1981 else { 1982 let path; 1983 let rotatable; 1984 let from; 1985 let to; 1986 if (isString(this.value.path)) { 1987 path = this.value.path; 1988 } 1989 if (isBoolean(this.value.rotatable)) { 1990 rotatable = this.value.rotatable; 1991 } 1992 if (isNumber(this.value.from) && isNumber(this.value.to)) { 1993 from = this.value.from; 1994 to = this.value.to; 1995 } 1996 getUINativeModule().common.setMotionPath(node, path, from, to, rotatable); 1997 } 1998 } 1999 checkObjectDiff() { 2000 return !(this.value.path === this.stageValue.path && 2001 this.value.from === this.stageValue.from && 2002 this.value.to === this.stageValue.to && 2003 this.value.rotatable === this.stageValue.rotatable); 2004 } 2005} 2006MotionPathModifier.identity = Symbol('motionPath'); 2007class MotionBlurModifier extends ModifierWithKey { 2008 constructor(value) { 2009 super(value); 2010 } 2011 applyPeer(node, reset) { 2012 if (reset) { 2013 getUINativeModule().common.resetMotionBlur(node); 2014 } 2015 else { 2016 getUINativeModule().common.setMotionBlur(node, this.value.radius, this.value.anchor.x, this.value.anchor.y); 2017 } 2018 } 2019} 2020MotionBlurModifier.identity = Symbol('motionBlur'); 2021class GroupDefaultFocusModifier extends ModifierWithKey { 2022 constructor(value) { 2023 super(value); 2024 } 2025 applyPeer(node, reset) { 2026 if (reset) { 2027 getUINativeModule().common.resetGroupDefaultFocus(node); 2028 } 2029 else { 2030 getUINativeModule().common.setGroupDefaultFocus(node, this.value); 2031 } 2032 } 2033} 2034GroupDefaultFocusModifier.identity = Symbol('groupDefaultFocus'); 2035class FocusOnTouchModifier extends ModifierWithKey { 2036 constructor(value) { 2037 super(value); 2038 } 2039 applyPeer(node, reset) { 2040 if (reset) { 2041 getUINativeModule().common.resetFocusOnTouch(node); 2042 } 2043 else { 2044 getUINativeModule().common.setFocusOnTouch(node, this.value); 2045 } 2046 } 2047} 2048FocusOnTouchModifier.identity = Symbol('focusOnTouch'); 2049class OffsetModifier extends ModifierWithKey { 2050 constructor(value) { 2051 super(value); 2052 } 2053 applyPeer(node, reset) { 2054 if (reset) { 2055 getUINativeModule().common.resetOffset(node); 2056 } else { 2057 if (isUndefined(this.value)) { 2058 getUINativeModule().common.resetOffset(node); 2059 } else if (('x' in this.value) || ('y' in this.value)) { 2060 getUINativeModule().common.setOffset(node, false, this.value.x, this.value.y); 2061 } else if (('top' in this.value) || ('bottom' in this.value) || ('left' in this.value) || ('start' in this.value) || ('right' in this.value) || ('end' in this.value)) { 2062 if (('start' in this.value)) { 2063 this.value.left = this.value.start; 2064 } 2065 if (('end' in this.value)) { 2066 this.value.right = this.value.end; 2067 } 2068 getUINativeModule().common.setOffset(node, true, this.value.top, this.value.left, this.value.bottom, this.value.right); 2069 } else { 2070 getUINativeModule().common.resetOffset(node); 2071 } 2072 } 2073 } 2074 checkObjectDiff() { 2075 return !isBaseOrResourceEqual(this.stageValue.x, this.value.x) || 2076 !isBaseOrResourceEqual(this.stageValue.y, this.value.y) || 2077 !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2078 !isBaseOrResourceEqual(this.stageValue.left, this.value.left) || 2079 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 2080 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2081 !isBaseOrResourceEqual(this.stageValue.start, this.value.start) || 2082 !isBaseOrResourceEqual(this.stageValue.end, this.value.end); 2083 } 2084} 2085OffsetModifier.identity = Symbol('offset'); 2086class MarkAnchorModifier extends ModifierWithKey { 2087 constructor(value) { 2088 super(value); 2089 } 2090 applyPeer(node, reset) { 2091 if (reset) { 2092 getUINativeModule().common.resetMarkAnchor(node); 2093 } 2094 else { 2095 if (this.value === void 0) { 2096 getUINativeModule().common.resetMarkAnchor(node); 2097 } else { 2098 if ('start' in this.value) { 2099 this.value.x = this.value.start; 2100 } 2101 if ('top' in this.value) { 2102 this.value.y = this.value.top; 2103 } 2104 } 2105 getUINativeModule().common.setMarkAnchor(node, this.value.x, this.value.y); 2106 } 2107 } 2108 checkObjectDiff() { 2109 return !isBaseOrResourceEqual(this.stageValue.x, this.value.x) || 2110 !isBaseOrResourceEqual(this.stageValue.y, this.value.y) || 2111 !isBaseOrResourceEqual(this.stageValue.start, this.value.start) || 2112 !isBaseOrResourceEqual(this.stageValue.top, this.value.top); 2113 } 2114} 2115MarkAnchorModifier.identity = Symbol('markAnchor'); 2116class DefaultFocusModifier extends ModifierWithKey { 2117 constructor(value) { 2118 super(value); 2119 } 2120 applyPeer(node, reset) { 2121 if (reset) { 2122 getUINativeModule().common.resetDefaultFocus(node); 2123 } 2124 else { 2125 getUINativeModule().common.setDefaultFocus(node, this.value); 2126 } 2127 } 2128} 2129DefaultFocusModifier.identity = Symbol('defaultFocus'); 2130class FocusableModifier extends ModifierWithKey { 2131 constructor(value) { 2132 super(value); 2133 } 2134 applyPeer(node, reset) { 2135 getUINativeModule().common.setFocusable(node, this.value); 2136 } 2137} 2138FocusableModifier.identity = Symbol('focusable'); 2139class TabStopModifier extends ModifierWithKey { 2140 constructor(value) { 2141 super(value); 2142 } 2143 applyPeer(node, reset) { 2144 getUINativeModule().common.setTabStop(node, this.value); 2145 } 2146} 2147TabStopModifier.identity = Symbol('tabStop'); 2148class TouchableModifier extends ModifierWithKey { 2149 constructor(value) { 2150 super(value); 2151 } 2152 applyPeer(node, reset) { 2153 if (reset) { 2154 getUINativeModule().common.resetTouchable(node); 2155 } 2156 else { 2157 getUINativeModule().common.setTouchable(node, this.value); 2158 } 2159 } 2160} 2161TouchableModifier.identity = Symbol('touchable'); 2162class MarginModifier extends ModifierWithKey { 2163 constructor(value) { 2164 super(value); 2165 } 2166 applyPeer(node, reset) { 2167 if (reset) { 2168 getUINativeModule().common.resetMargin(node); 2169 } 2170 else { 2171 getUINativeModule().common.setMargin(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 2172 } 2173 } 2174 checkObjectDiff() { 2175 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2176 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2177 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 2178 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 2179 } 2180} 2181MarginModifier.identity = Symbol('margin'); 2182class PaddingModifier extends ModifierWithKey { 2183 constructor(value) { 2184 super(value); 2185 } 2186 applyPeer(node, reset) { 2187 if (reset) { 2188 getUINativeModule().common.resetPadding(node); 2189 } 2190 else { 2191 getUINativeModule().common.setPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 2192 } 2193 } 2194 checkObjectDiff() { 2195 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2196 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2197 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 2198 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 2199 } 2200} 2201PaddingModifier.identity = Symbol('padding'); 2202class VisibilityModifier extends ModifierWithKey { 2203 constructor(value) { 2204 super(value); 2205 } 2206 applyPeer(node, reset) { 2207 if (reset) { 2208 getUINativeModule().common.resetVisibility(node); 2209 } 2210 else { 2211 getUINativeModule().common.setVisibility(node, this.value); 2212 } 2213 } 2214 checkObjectDiff() { 2215 return this.stageValue !== this.value; 2216 } 2217} 2218VisibilityModifier.identity = Symbol('visibility'); 2219class AccessibilityTextModifier extends ModifierWithKey { 2220 constructor(value) { 2221 super(value); 2222 } 2223 applyPeer(node, reset) { 2224 if (reset) { 2225 getUINativeModule().common.resetAccessibilityText(node); 2226 } 2227 else { 2228 getUINativeModule().common.setAccessibilityText(node, this.value); 2229 } 2230 } 2231} 2232AccessibilityTextModifier.identity = Symbol('accessibilityText'); 2233class AllowDropModifier extends ModifierWithKey { 2234 constructor(value) { 2235 super(value); 2236 } 2237 applyPeer(node, reset) { 2238 if (reset) { 2239 getUINativeModule().common.resetAllowDrop(node); 2240 } 2241 else { 2242 getUINativeModule().common.setAllowDrop(node, this.value); 2243 } 2244 } 2245 checkObjectDiff() { 2246 return !(Array.isArray(this.value) && Array.isArray(this.stageValue) && 2247 this.value.length === this.stageValue.length && 2248 this.value.every((value, index) => value === this.stageValue[index])); 2249 } 2250} 2251AllowDropModifier.identity = Symbol('allowDrop'); 2252class AccessibilityLevelModifier extends ModifierWithKey { 2253 constructor(value) { 2254 super(value); 2255 } 2256 applyPeer(node, reset) { 2257 if (reset) { 2258 getUINativeModule().common.resetAccessibilityLevel(node); 2259 } 2260 else { 2261 getUINativeModule().common.setAccessibilityLevel(node, this.value); 2262 } 2263 } 2264} 2265AccessibilityLevelModifier.identity = Symbol('accessibilityLevel'); 2266class AccessibilityDescriptionModifier extends ModifierWithKey { 2267 constructor(value) { 2268 super(value); 2269 } 2270 applyPeer(node, reset) { 2271 if (reset) { 2272 getUINativeModule().common.resetAccessibilityDescription(node); 2273 } 2274 else { 2275 getUINativeModule().common.setAccessibilityDescription(node, this.value); 2276 } 2277 } 2278} 2279AccessibilityDescriptionModifier.identity = Symbol('accessibilityDescription'); 2280class DirectionModifier extends ModifierWithKey { 2281 constructor(value) { 2282 super(value); 2283 } 2284 applyPeer(node, reset) { 2285 if (reset) { 2286 getUINativeModule().common.resetDirection(node); 2287 } 2288 else { 2289 getUINativeModule().common.setDirection(node, this.value); 2290 } 2291 } 2292 checkObjectDiff() { 2293 return !isBaseOrResourceEqual(this.stageValue, this.value); 2294 } 2295} 2296DirectionModifier.identity = Symbol('direction'); 2297class AlignRulesModifier extends ModifierWithKey { 2298 constructor(value) { 2299 super(value); 2300 } 2301 applyPeer(node, reset) { 2302 if (reset) { 2303 getUINativeModule().common.resetAlignRules(node); 2304 } 2305 else { 2306 getUINativeModule().common.setAlignRules(node, this.value.left, this.value.middle, 2307 this.value.right, this.value.top, this.value.center, this.value.bottom); 2308 } 2309 } 2310 checkObjectDiff() { 2311 return !isBaseOrResourceEqual(this.stageValue.left, this.value.left) || 2312 !isBaseOrResourceEqual(this.stageValue.middle, this.value.middle) || 2313 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2314 !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2315 !isBaseOrResourceEqual(this.stageValue.center, this.value.center) || 2316 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom); 2317 } 2318} 2319AlignRulesModifier.identity = Symbol('alignRules'); 2320class ExpandSafeAreaModifier extends ModifierWithKey { 2321 constructor(value) { 2322 super(value); 2323 } 2324 applyPeer(node, reset) { 2325 if (reset) { 2326 getUINativeModule().common.resetExpandSafeArea(node); 2327 } 2328 else { 2329 getUINativeModule().common.setExpandSafeArea(node, this.value.type, this.value.edges); 2330 } 2331 } 2332 checkObjectDiff() { 2333 return !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 2334 !isBaseOrResourceEqual(this.stageValue.edges, this.value.edges); 2335 } 2336} 2337ExpandSafeAreaModifier.identity = Symbol('expandSafeArea'); 2338class GridSpanModifier extends ModifierWithKey { 2339 constructor(value) { 2340 super(value); 2341 } 2342 applyPeer(node, reset) { 2343 if (reset) { 2344 getUINativeModule().common.resetGridSpan(node); 2345 } 2346 else { 2347 getUINativeModule().common.setGridSpan(node, this.value); 2348 } 2349 } 2350} 2351GridSpanModifier.identity = Symbol('gridSpan'); 2352class GridOffsetModifier extends ModifierWithKey { 2353 constructor(value) { 2354 super(value); 2355 } 2356 applyPeer(node, reset) { 2357 if (reset) { 2358 getUINativeModule().common.resetGridOffset(node); 2359 } 2360 else { 2361 getUINativeModule().common.setGridOffset(node, this.value); 2362 } 2363 } 2364} 2365GridOffsetModifier.identity = Symbol('gridOffset'); 2366class AlignSelfModifier extends ModifierWithKey { 2367 constructor(value) { 2368 super(value); 2369 } 2370 applyPeer(node, reset) { 2371 if (reset) { 2372 getUINativeModule().common.resetAlignSelf(node); 2373 } 2374 else { 2375 getUINativeModule().common.setAlignSelf(node, this.value); 2376 } 2377 } 2378 checkObjectDiff() { 2379 return !isBaseOrResourceEqual(this.stageValue, this.value); 2380 } 2381} 2382AlignSelfModifier.identity = Symbol('alignSelf'); 2383class SizeModifier extends ModifierWithKey { 2384 constructor(value) { 2385 super(value); 2386 } 2387 applyPeer(node, reset) { 2388 if (reset) { 2389 getUINativeModule().common.resetSize(node); 2390 } 2391 else { 2392 getUINativeModule().common.setSize(node, this.value.width, this.value.height); 2393 } 2394 } 2395 checkObjectDiff() { 2396 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 2397 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 2398 } 2399} 2400SizeModifier.identity = Symbol('size'); 2401class DisplayPriorityModifier extends ModifierWithKey { 2402 constructor(value) { 2403 super(value); 2404 } 2405 applyPeer(node, reset) { 2406 if (reset) { 2407 getUINativeModule().common.resetDisplayPriority(node); 2408 } 2409 else { 2410 getUINativeModule().common.setDisplayPriority(node, this.value); 2411 } 2412 } 2413 checkObjectDiff() { 2414 return !isBaseOrResourceEqual(this.stageValue, this.value); 2415 } 2416} 2417DisplayPriorityModifier.identity = Symbol('displayPriority'); 2418class IdModifier extends ModifierWithKey { 2419 constructor(value) { 2420 super(value); 2421 } 2422 applyPeer(node, reset) { 2423 if (reset) { 2424 getUINativeModule().common.resetId(node); 2425 } 2426 else { 2427 getUINativeModule().common.setId(node, this.value); 2428 } 2429 } 2430} 2431IdModifier.identity = Symbol('id'); 2432class KeyModifier extends ModifierWithKey { 2433 constructor(value) { 2434 super(value); 2435 } 2436 applyPeer(node, reset) { 2437 if (reset) { 2438 getUINativeModule().common.resetKey(node); 2439 } 2440 else { 2441 getUINativeModule().common.setKey(node, this.value); 2442 } 2443 } 2444} 2445KeyModifier.identity = Symbol('key'); 2446class RestoreIdModifier extends ModifierWithKey { 2447 constructor(value) { 2448 super(value); 2449 } 2450 applyPeer(node, reset) { 2451 if (reset) { 2452 getUINativeModule().common.resetRestoreId(node); 2453 } 2454 else { 2455 getUINativeModule().common.setRestoreId(node, this.value); 2456 } 2457 } 2458} 2459RestoreIdModifier.identity = Symbol('restoreId'); 2460class TabIndexModifier extends ModifierWithKey { 2461 constructor(value) { 2462 super(value); 2463 } 2464 applyPeer(node, reset) { 2465 if (reset) { 2466 getUINativeModule().common.resetTabIndex(node); 2467 } 2468 else { 2469 getUINativeModule().common.setTabIndex(node, this.value); 2470 } 2471 } 2472} 2473TabIndexModifier.identity = Symbol('tabIndex'); 2474class ObscuredModifier extends ModifierWithKey { 2475 constructor(value) { 2476 super(value); 2477 } 2478 applyPeer(node, reset) { 2479 if (reset || (!Array.isArray(this.value))) { 2480 getUINativeModule().common.resetObscured(node); 2481 } 2482 else { 2483 getUINativeModule().common.setObscured(node, this.value); 2484 } 2485 } 2486 checkObjectDiff() { 2487 return !(Array.isArray(this.value) && Array.isArray(this.stageValue) && 2488 this.value.length === this.stageValue.length && 2489 this.value.every((value, index) => value === this.stageValue[index])); 2490 } 2491} 2492ObscuredModifier.identity = Symbol('obscured'); 2493class BackgroundEffectModifier extends ModifierWithKey { 2494 constructor(options) { 2495 super(options); 2496 } 2497 applyPeer(node, reset) { 2498 let _a; 2499 if (reset) { 2500 getUINativeModule().common.resetBackgroundEffect(node); 2501 } 2502 else { 2503 getUINativeModule().common.setBackgroundEffect(node, this.value.radius, this.value.saturation, 2504 this.value.brightness, this.value.color, this.value.adaptiveColor, 2505 (_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale, 2506 this.value.policy, this.value.inactiveColor, this.value.type); 2507 } 2508 } 2509 checkObjectDiff() { 2510 let _a; 2511 let _b; 2512 return !(this.value.radius === this.stageValue.radius && this.value.saturation === this.stageValue.saturation && 2513 this.value.brightness === this.stageValue.brightness && 2514 isBaseOrResourceEqual(this.stageValue.color, this.value.color) && 2515 this.value.adaptiveColor === this.stageValue.adaptiveColor && 2516 this.value.policy === this.stageValue.policy && 2517 this.value.inactiveColor === this.stageValue.inactiveColor && 2518 this.value.type === this.stageValue.type && 2519 ((_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale) === ((_b = this.stageValue.blurOptions) === null || 2520 _b === void 0 ? void 0 : _b.grayscale)); 2521 } 2522} 2523BackgroundEffectModifier.identity = Symbol('backgroundEffect'); 2524class BackgroundBrightnessModifier extends ModifierWithKey { 2525 constructor(params) { 2526 super(params); 2527 } 2528 applyPeer(node, reset) { 2529 if (reset) { 2530 getUINativeModule().common.resetBackgroundBrightness(node); 2531 } 2532 else { 2533 getUINativeModule().common.setBackgroundBrightness(node, this.value.rate, this.value.lightUpDegree); 2534 } 2535 } 2536 checkObjectDiff() { 2537 return !(this.value.rate === this.stageValue.rate && this.value.lightUpDegree === this.stageValue.lightUpDegree); 2538 } 2539} 2540BackgroundBrightnessModifier.identity = Symbol('backgroundBrightness'); 2541class BackgroundBrightnessInternalModifier extends ModifierWithKey { 2542 constructor(params) { 2543 super(params); 2544 } 2545 applyPeer(node, reset) { 2546 if (reset) { 2547 getUINativeModule().common.resetBackgroundBrightnessInternal(node); 2548 } 2549 else { 2550 getUINativeModule().common.setBackgroundBrightnessInternal(node, this.value.rate, this.value.lightUpDegree, this.value.cubicCoeff, 2551 this.value.quadCoeff, this.value.saturation, this.value.posRGB, this.value.negRGB, this.value.fraction); 2552 } 2553 } 2554 checkObjectDiff() { 2555 return !(this.value.rate === this.stageValue.rate && this.value.lightUpDegree === this.stageValue.lightUpDegree && 2556 this.value.cubicCoeff === this.stageValue.cubicCoeff && this.value.quadCoeff === this.stageValue.quadCoeff && 2557 this.value.saturation === this.stageValue.saturation && this.value.posRGB === this.stageValue.posRGB && 2558 this.value.negRGB === this.stageValue.negRGB && this.value.fraction === this.stageValue.fraction); 2559 } 2560} 2561BackgroundBrightnessInternalModifier.identity = Symbol('backgroundBrightnessInternal'); 2562class ForegroundBrightnessModifier extends ModifierWithKey { 2563 constructor(params) { 2564 super(params); 2565 } 2566 applyPeer(node, reset) { 2567 if (reset) { 2568 getUINativeModule().common.resetForegroundBrightness(node); 2569 } 2570 else { 2571 getUINativeModule().common.setForegroundBrightness(node, this.value.rate, this.value.lightUpDegree, this.value.cubicCoeff, 2572 this.value.quadCoeff, this.value.saturation, this.value.posRGB, this.value.negRGB, this.value.fraction); 2573 } 2574 } 2575 checkObjectDiff() { 2576 return !(this.value.rate === this.stageValue.rate && this.value.lightUpDegree === this.stageValue.lightUpDegree && 2577 this.value.cubicCoeff === this.stageValue.cubicCoeff && this.value.quadCoeff === this.stageValue.quadCoeff && 2578 this.value.saturation === this.stageValue.saturation && this.value.posRGB === this.stageValue.posRGB && 2579 this.value.negRGB === this.stageValue.negRGB && this.value.fraction === this.stageValue.fraction); 2580 } 2581} 2582ForegroundBrightnessModifier.identity = Symbol('foregroundBrightness'); 2583class DragPreviewOptionsModifier extends ModifierWithKey { 2584 constructor(value) { 2585 super(value); 2586 } 2587 applyPeer(node, reset) { 2588 if (reset) { 2589 getUINativeModule().common.resetDragPreviewOptions(node); 2590 } 2591 else { 2592 getUINativeModule().common.setDragPreviewOptions(node, this.value); 2593 } 2594 } 2595 checkObjectDiff() { 2596 return !this.value.isEqual(this.stageValue); 2597 } 2598} 2599DragPreviewOptionsModifier.identity = Symbol('dragPreviewOptions'); 2600class DragPreviewModifier extends ModifierWithKey { 2601 constructor(value) { 2602 super(value); 2603 } 2604 applyPeer(node, reset) { 2605 if (reset) { 2606 getUINativeModule().common.resetDragPreview(node); 2607 } else { 2608 getUINativeModule().common.setDragPreview(node, this.value); 2609 } 2610 } 2611 2612 checkObjectDiff() { 2613 return !this.value.isEqual(this.stageValue); 2614 } 2615} 2616DragPreviewModifier.identity = Symbol('dragPreview'); 2617class MouseResponseRegionModifier extends ModifierWithKey { 2618 constructor(value) { 2619 super(value); 2620 } 2621 applyPeer(node, reset) { 2622 let _a, _b, _c, _d, _e, _f, _g, _h; 2623 if (reset) { 2624 getUINativeModule().common.resetMouseResponseRegion(node); 2625 } 2626 else { 2627 let responseRegion = []; 2628 if (Array.isArray(this.value)) { 2629 for (let i = 0; i < this.value.length; i++) { 2630 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 2631 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 2632 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 2633 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 2634 } 2635 } 2636 else { 2637 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 2638 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 2639 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 2640 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 2641 } 2642 getUINativeModule().common.setMouseResponseRegion(node, responseRegion, responseRegion.length); 2643 } 2644 } 2645 checkObjectDiff() { 2646 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 2647 if (this.value.length !== this.stageValue.length) { 2648 return true; 2649 } 2650 else { 2651 for (let i = 0; i < this.value.length; i++) { 2652 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 2653 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 2654 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 2655 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 2656 return true; 2657 } 2658 } 2659 return false; 2660 } 2661 } 2662 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 2663 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 2664 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 2665 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 2666 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 2667 } 2668 else { 2669 return false; 2670 } 2671 } 2672} 2673MouseResponseRegionModifier.identity = Symbol('mouseResponseRegion'); 2674class ResponseRegionModifier extends ModifierWithKey { 2675 constructor(value) { 2676 super(value); 2677 } 2678 applyPeer(node, reset) { 2679 let _a, _b, _c, _d, _e, _f, _g, _h; 2680 if (reset) { 2681 getUINativeModule().common.resetResponseRegion(node); 2682 } 2683 else { 2684 let responseRegion = []; 2685 if (Array.isArray(this.value)) { 2686 for (let i = 0; i < this.value.length; i++) { 2687 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 2688 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 2689 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 2690 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 2691 } 2692 } 2693 else { 2694 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 2695 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 2696 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 2697 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 2698 } 2699 getUINativeModule().common.setResponseRegion(node, responseRegion, responseRegion.length); 2700 } 2701 } 2702 checkObjectDiff() { 2703 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 2704 if (this.value.length !== this.stageValue.length) { 2705 return true; 2706 } 2707 else { 2708 for (let i = 0; i < this.value.length; i++) { 2709 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 2710 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 2711 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 2712 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 2713 return true; 2714 } 2715 } 2716 return false; 2717 } 2718 } 2719 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 2720 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 2721 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 2722 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 2723 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 2724 } 2725 else { 2726 return false; 2727 } 2728 } 2729} 2730ResponseRegionModifier.identity = Symbol('responseRegion'); 2731class FlexGrowModifier extends ModifierWithKey { 2732 constructor(value) { 2733 super(value); 2734 } 2735 applyPeer(node, reset) { 2736 if (reset) { 2737 getUINativeModule().common.resetFlexGrow(node); 2738 } 2739 else { 2740 getUINativeModule().common.setFlexGrow(node, this.value); 2741 } 2742 } 2743 checkObjectDiff() { 2744 return this.stageValue !== this.value; 2745 } 2746} 2747FlexGrowModifier.identity = Symbol('flexGrow'); 2748class FlexShrinkModifier extends ModifierWithKey { 2749 constructor(value) { 2750 super(value); 2751 } 2752 applyPeer(node, reset) { 2753 if (reset) { 2754 getUINativeModule().common.resetFlexShrink(node); 2755 } 2756 else { 2757 getUINativeModule().common.setFlexShrink(node, this.value); 2758 } 2759 } 2760 checkObjectDiff() { 2761 return this.stageValue !== this.value; 2762 } 2763} 2764FlexShrinkModifier.identity = Symbol('flexShrink'); 2765class AspectRatioModifier extends ModifierWithKey { 2766 constructor(value) { 2767 super(value); 2768 } 2769 applyPeer(node, reset) { 2770 if (reset) { 2771 getUINativeModule().common.resetAspectRatio(node); 2772 } 2773 else { 2774 getUINativeModule().common.setAspectRatio(node, this.value); 2775 } 2776 } 2777 checkObjectDiff() { 2778 return this.stageValue !== this.value; 2779 } 2780} 2781AspectRatioModifier.identity = Symbol('aspectRatio'); 2782class ConstraintSizeModifier extends ModifierWithKey { 2783 constructor(value) { 2784 super(value); 2785 } 2786 applyPeer(node, reset) { 2787 if (reset) { 2788 getUINativeModule().common.resetConstraintSize(node); 2789 } 2790 else { 2791 getUINativeModule().common.setConstraintSize(node, this.value.minWidth, this.value.maxWidth, this.value.minHeight, this.value.maxHeight); 2792 } 2793 } 2794 checkObjectDiff() { 2795 return !isBaseOrResourceEqual(this.stageValue.minWidth, this.value.minWidth) || 2796 !isBaseOrResourceEqual(this.stageValue.maxWidth, this.value.maxWidth) || 2797 !isBaseOrResourceEqual(this.stageValue.minHeight, this.value.minHeight) || 2798 !isBaseOrResourceEqual(this.stageValue.maxHeight, this.value.maxHeight); 2799 } 2800} 2801ConstraintSizeModifier.identity = Symbol('constraintSize'); 2802class FlexBasisModifier extends ModifierWithKey { 2803 constructor(value) { 2804 super(value); 2805 } 2806 applyPeer(node, reset) { 2807 if (reset) { 2808 getUINativeModule().common.resetFlexBasis(node); 2809 } 2810 else { 2811 getUINativeModule().common.setFlexBasis(node, this.value); 2812 } 2813 } 2814 checkObjectDiff() { 2815 return this.stageValue !== this.value; 2816 } 2817} 2818FlexBasisModifier.identity = Symbol('flexBasis'); 2819class LayoutWeightModifier extends ModifierWithKey { 2820 constructor(value) { 2821 super(value); 2822 } 2823 applyPeer(node, reset) { 2824 if (reset) { 2825 getUINativeModule().common.resetLayoutWeight(node); 2826 } 2827 else { 2828 getUINativeModule().common.setLayoutWeight(node, this.value); 2829 } 2830 } 2831} 2832LayoutWeightModifier.identity = Symbol('layoutWeight'); 2833class EnabledModifier extends ModifierWithKey { 2834 constructor(value) { 2835 super(value); 2836 } 2837 applyPeer(node, reset) { 2838 if (reset) { 2839 getUINativeModule().common.resetEnabled(node); 2840 } 2841 else { 2842 getUINativeModule().common.setEnabled(node, this.value); 2843 } 2844 } 2845} 2846EnabledModifier.identity = Symbol('enabled'); 2847class UseShadowBatchingModifier extends ModifierWithKey { 2848 constructor(value) { 2849 super(value); 2850 } 2851 applyPeer(node, reset) { 2852 if (reset) { 2853 getUINativeModule().common.resetUseShadowBatching(node); 2854 } 2855 else { 2856 getUINativeModule().common.setUseShadowBatching(node, this.value); 2857 } 2858 } 2859} 2860UseShadowBatchingModifier.identity = Symbol('useShadowBatching'); 2861class MonopolizeEventsModifier extends ModifierWithKey { 2862 constructor(value) { 2863 super(value); 2864 } 2865 applyPeer(node, reset) { 2866 if (reset) { 2867 getUINativeModule().common.resetMonopolizeEvents(node); 2868 } 2869 else { 2870 getUINativeModule().common.setMonopolizeEvents(node, this.value); 2871 } 2872 } 2873} 2874MonopolizeEventsModifier.identity = Symbol('monopolizeEvents'); 2875class DraggableModifier extends ModifierWithKey { 2876 constructor(value) { 2877 super(value); 2878 } 2879 applyPeer(node, reset) { 2880 if (reset) { 2881 getUINativeModule().common.resetDraggable(node); 2882 } 2883 else { 2884 getUINativeModule().common.setDraggable(node, this.value); 2885 } 2886 } 2887} 2888DraggableModifier.identity = Symbol('draggable'); 2889class AccessibilityGroupModifier extends ModifierWithKey { 2890 constructor(value) { 2891 super(value); 2892 } 2893 applyPeer(node, reset) { 2894 if (reset) { 2895 getUINativeModule().common.resetAccessibilityGroup(node); 2896 } 2897 else { 2898 getUINativeModule().common.setAccessibilityGroup(node, this.value); 2899 } 2900 } 2901} 2902AccessibilityGroupModifier.identity = Symbol('accessibilityGroup'); 2903class HoverEffectModifier extends ModifierWithKey { 2904 constructor(value) { 2905 super(value); 2906 } 2907 applyPeer(node, reset) { 2908 if (reset) { 2909 getUINativeModule().common.resetHoverEffect(node); 2910 } 2911 else { 2912 getUINativeModule().common.setHoverEffect(node, this.value); 2913 } 2914 } 2915} 2916HoverEffectModifier.identity = Symbol('hoverEffect'); 2917class ClickEffectModifier extends ModifierWithKey { 2918 constructor(value) { 2919 super(value); 2920 } 2921 applyPeer(node, reset) { 2922 if (reset || !this.value) { 2923 getUINativeModule().common.resetClickEffect(node); 2924 } 2925 else { 2926 getUINativeModule().common.setClickEffect(node, this.value.level, this.value.scale); 2927 } 2928 } 2929 checkObjectDiff() { 2930 return !((this.value.level === this.stageValue.level) && (this.value.scale === this.stageValue.scale)); 2931 } 2932} 2933ClickEffectModifier.identity = Symbol('clickEffect'); 2934class KeyBoardShortCutModifier extends ModifierWithKey { 2935 constructor(value) { 2936 super(value); 2937 } 2938 applyPeer(node, reset) { 2939 if (reset) { 2940 getUINativeModule().common.resetKeyBoardShortCut(node); 2941 } 2942 else { 2943 getUINativeModule().common.setKeyBoardShortCut(node, this.value.value, this.value.keys); 2944 } 2945 } 2946 checkObjectDiff() { 2947 return !this.value.isEqual(this.stageValue); 2948 } 2949} 2950KeyBoardShortCutModifier.identity = Symbol('keyboardShortcut'); 2951 2952class CustomPropertyModifier extends ModifierWithKey { 2953 constructor(value) { 2954 super(value); 2955 } 2956 applyPeer(node, reset) { 2957 const nodeId = getUINativeModule().frameNode.getIdByNodePtr(node); 2958 if (reset) { 2959 __removeCustomProperty__(nodeId, this.value.key); 2960 } else { 2961 __setValidCustomProperty__(nodeId, this.value.key, this.value.value); 2962 } 2963 } 2964} 2965CustomPropertyModifier.identity = Symbol('customProperty'); 2966 2967class TransitionModifier extends ModifierWithKey { 2968 constructor(value) { 2969 super(value); 2970 } 2971 applyPeer(node, reset) { 2972 if (reset) { 2973 getUINativeModule().common.resetTransition(node); 2974 } 2975 else { 2976 getUINativeModule().common.setTransition(node, this.value); 2977 } 2978 } 2979} 2980TransitionModifier.identity = Symbol('transition'); 2981class SharedTransitionModifier extends ModifierWithKey { 2982 constructor(value) { 2983 super(value); 2984 } 2985 applyPeer(node, reset) { 2986 if (reset) { 2987 getUINativeModule().common.resetSharedTransition(node); 2988 } 2989 else { 2990 getUINativeModule().common.setSharedTransition(node, this.value.id, this.value.options); 2991 } 2992 } 2993} 2994SharedTransitionModifier.identity = Symbol('sharedTransition'); 2995 2996class FocusScopeIdModifier extends ModifierWithKey { 2997 constructor(value) { 2998 super(value); 2999 } 3000 applyPeer(node, reset) { 3001 if (reset) { 3002 getUINativeModule().common.resetFocusScopeId(node); 3003 } 3004 else { 3005 getUINativeModule().common.setFocusScopeId(node, this.value.id, this.value.isGroup, this.value.arrowStepOut); 3006 } 3007 } 3008} 3009FocusScopeIdModifier.identity = Symbol('focusScopeId'); 3010 3011class FocusScopePriorityModifier extends ModifierWithKey { 3012 constructor(value) { 3013 super(value); 3014 } 3015 applyPeer(node, reset) { 3016 if (reset) { 3017 getUINativeModule().common.resetFocusScopePriority(node); 3018 } 3019 else { 3020 getUINativeModule().common.setFocusScopePriority(node, this.value.scopeId, this.value.priority); 3021 } 3022 } 3023} 3024FocusScopePriorityModifier.identity = Symbol('focusScopePriority'); 3025 3026class PixelRoundModifier extends ModifierWithKey { 3027 constructor(value) { 3028 super(value); 3029 } 3030 applyPeer(node, reset) { 3031 if (reset) { 3032 getUINativeModule().common.resetPixelRound(node); 3033 } 3034 else { 3035 if (!isObject(this.value)) { 3036 getUINativeModule().common.resetPixelRound(node); 3037 } else { 3038 getUINativeModule().common.setPixelRound(node, this.value.start, this.value.top, this.value.end, this.value.bottom); 3039 } 3040 } 3041 } 3042 checkObjectDiff() { 3043 return !(this.stageValue.start === this.value.start && 3044 this.stageValue.end === this.value.end && 3045 this.stageValue.top === this.value.top && 3046 this.stageValue.bottom === this.value.bottom); 3047 } 3048} 3049PixelRoundModifier.identity = Symbol('pixelRound'); 3050class FocusBoxModifier extends ModifierWithKey { 3051 constructor(value) { 3052 super(value); 3053 } 3054 applyPeer(node, reset) { 3055 if (reset) { 3056 getUINativeModule().common.resetFocusBox(node); 3057 } 3058 else { 3059 getUINativeModule().common.setFocusBox(node, this.value?.margin, 3060 this.value?.strokeWidth, this.value?.strokeColor); 3061 } 3062 } 3063} 3064FocusBoxModifier.identity = Symbol('focusBox'); 3065const JSCallbackInfoType = { STRING: 0, NUMBER: 1, OBJECT: 2, BOOLEAN: 3, FUNCTION: 4 }; 3066const isString = (val) => typeof val === 'string'; 3067const isNumber = (val) => typeof val === 'number'; 3068const isBigint = (val) => typeof val === 'bigint'; 3069const isBoolean = (val) => typeof val === 'boolean'; 3070const isSymbol = (val) => typeof val === 'symbol'; 3071const isUndefined = (val) => typeof val === 'undefined'; 3072const isObject = (val) => typeof val === 'object'; 3073const isFunction = (val) => typeof val === 'function'; 3074const isLengthType = (val) => typeof val === 'string' || typeof val === 'number'; 3075function checkJsCallbackInfo(value, checklist) { 3076 let typeVerified = false; 3077 checklist.forEach(function (infoType) { 3078 switch (infoType) { 3079 case JSCallbackInfoType.STRING: 3080 if (isString(value)) { 3081 typeVerified = true; 3082 } 3083 break; 3084 case JSCallbackInfoType.NUMBER: 3085 if (isNumber(value)) { 3086 typeVerified = true; 3087 } 3088 break; 3089 case JSCallbackInfoType.OBJECT: 3090 if (isObject(value)) { 3091 typeVerified = true; 3092 } 3093 break; 3094 case JSCallbackInfoType.FUNCTION: 3095 if (isFunction(value)) { 3096 typeVerified = true; 3097 } 3098 break; 3099 default: 3100 break; 3101 } 3102 }); 3103 return typeVerified || checklist.length === 0; 3104} 3105function parseWithDefaultNumber(val, defaultValue) { 3106 if (isNumber(val)) { 3107 return val; 3108 } 3109 else { return defaultValue; } 3110} 3111function modifier(modifiers, modifierClass, value) { 3112 const identity = modifierClass['identity']; 3113 const item = modifiers.get(identity); 3114 if (item) { 3115 item.stageValue = value; 3116 } 3117 else { 3118 modifiers.set(identity, new modifierClass(value)); 3119 } 3120} 3121function modifierWithKey(modifiers, identity, modifierClass, value) { 3122 if (typeof modifiers.isFrameNode === 'function' && modifiers.isFrameNode()) { 3123 if (!modifierClass.instance) { 3124 modifierClass.instance = new modifierClass(value); 3125 } 3126 else { 3127 modifierClass.instance.stageValue = value; 3128 } 3129 modifiers.set(identity, modifierClass.instance); 3130 return; 3131 } 3132 const item = modifiers.get(identity); 3133 if (item) { 3134 item.stageValue = value; 3135 modifiers.set(identity, item); 3136 } 3137 else { 3138 modifiers.set(identity, new modifierClass(value)); 3139 } 3140} 3141 3142class ObservedMap { 3143 constructor() { 3144 this.map_ = new Map(); 3145 this.isFrameNode_ = false; 3146 } 3147 clear() { 3148 this.map_.clear(); 3149 } 3150 delete(key) { 3151 return this.map_.delete(key); 3152 } 3153 forEach(callbackfn, thisArg) { 3154 this.map_.forEach(callbackfn, thisArg); 3155 } 3156 get(key) { 3157 return this.map_.get(key); 3158 } 3159 has(key) { 3160 return this.map_.has(key); 3161 } 3162 set(key, value) { 3163 const _a = this.changeCallback; 3164 this.map_.set(key, value); 3165 _a === null || _a === void 0 ? void 0 : _a(key, value); 3166 return this; 3167 } 3168 get size() { 3169 return this.map_.size; 3170 } 3171 entries() { 3172 return this.map_.entries(); 3173 } 3174 keys() { 3175 return this.map_.keys(); 3176 } 3177 values() { 3178 return this.map_.values(); 3179 } 3180 [Symbol.iterator]() { 3181 return this.map_.entries(); 3182 } 3183 get [Symbol.toStringTag]() { 3184 return 'ObservedMapTag'; 3185 } 3186 setOnChange(callback) { 3187 this.changeCallback = callback; 3188 } 3189 setFrameNode(isFrameNode) { 3190 this.isFrameNode_ = isFrameNode; 3191 } 3192 isFrameNode() { 3193 return this.isFrameNode_; 3194 } 3195} 3196 3197class ArkComponent { 3198 constructor(nativePtr, classType) { 3199 this._modifiersWithKeys = new Map(); 3200 this.nativePtr = nativePtr; 3201 this._changed = false; 3202 this._classType = classType; 3203 if (classType === ModifierType.FRAME_NODE) { 3204 this._instanceId = -1; 3205 this._modifiersWithKeys = new ObservedMap(); 3206 this._modifiersWithKeys.setOnChange((key, value) => { 3207 if (this.nativePtr === undefined) { 3208 return; 3209 } 3210 if (this.nativePtr !== -1) { 3211 __JSScopeUtil__.syncInstanceId(this._instanceId); 3212 } 3213 value.applyStageImmediately(this.nativePtr, this); 3214 getUINativeModule().frameNode.propertyUpdate(this.nativePtr); 3215 if (this._instanceId !== -1) { 3216 __JSScopeUtil__.restoreInstanceId(); 3217 } 3218 }); 3219 this._modifiersWithKeys.setFrameNode(true); 3220 } else if (classType === ModifierType.EXPOSE_MODIFIER || classType === ModifierType.STATE) { 3221 this._modifiersWithKeys = new ObservedMap(); 3222 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nativePtr); 3223 } else { 3224 this._modifiersWithKeys = new Map(); 3225 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nativePtr); 3226 } 3227 this._nativePtrChanged = false; 3228 } 3229 setNodePtr(nodePtr) { 3230 this.nativePtr = nodePtr; 3231 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nodePtr); 3232 } 3233 setInstanceId(instanceId) { 3234 this._instanceId = instanceId; 3235 } 3236 getOrCreateGestureEvent() { 3237 if (this._gestureEvent !== null) { 3238 this._gestureEvent = new UIGestureEvent(); 3239 this._gestureEvent.setNodePtr(this.nativePtr); 3240 this._gestureEvent.setWeakNodePtr(this._weakPtr); 3241 this._gestureEvent.registerFrameNodeDeletedCallback(this.nativePtr); 3242 } 3243 return this._gestureEvent; 3244 } 3245 cleanStageValue(){ 3246 if (!this._modifiersWithKeys){ 3247 return; 3248 } 3249 this._modifiersWithKeys.forEach((value, key) => { 3250 value.stageValue = undefined; 3251 }); 3252 } 3253 applyStateUpdatePtr(instance) { 3254 if (this.nativePtr !== instance.nativePtr) { 3255 ArkLogConsole.info('modifier pointer changed to ' + (instance ? 3256 instance.constructor.name.toString() : 'undefined')); 3257 this.nativePtr = instance.nativePtr; 3258 this._nativePtrChanged = true; 3259 if (instance._weakPtr) { 3260 this._weakPtr = instance._weakPtr; 3261 } else { 3262 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(this.nativePtr); 3263 } 3264 } 3265 } 3266 applyModifierPatch() { 3267 let expiringItemsWithKeys = []; 3268 this._modifiersWithKeys.forEach((value, key) => { 3269 if (!this._weakPtr?.invalid() && value.applyStage(this.nativePtr, this)) { 3270 expiringItemsWithKeys.push(key); 3271 } 3272 }); 3273 expiringItemsWithKeys.forEach(key => { 3274 this._modifiersWithKeys.delete(key); 3275 }); 3276 } 3277 onGestureJudgeBegin(callback) { 3278 modifierWithKey(this._modifiersWithKeys, OnGestureJudgeBeginModifier.identity, OnGestureJudgeBeginModifier, callback); 3279 return this; 3280 } 3281 onGestureRecognizerJudgeBegin(callback) { 3282 modifierWithKey(this._modifiersWithKeys, OnGestureRecognizerJudgeBeginModifier.identity, OnGestureRecognizerJudgeBeginModifier, callback); 3283 return this; 3284 } 3285 shouldBuiltInRecognizerParallelWith(callback) { 3286 modifierWithKey(this._modifiersWithKeys, ShouldBuiltInRecognizerParallelWithModifier.identity, ShouldBuiltInRecognizerParallelWithModifier, callback); 3287 return this; 3288 } 3289 onSizeChange(callback) { 3290 modifierWithKey(this._modifiersWithKeys, OnSizeChangeModifier.identity, OnSizeChangeModifier, callback); 3291 return this; 3292 } 3293 outline(value) { 3294 modifierWithKey(this._modifiersWithKeys, OutlineModifier.identity, OutlineModifier, value); 3295 return this; 3296 } 3297 outlineColor(value) { 3298 modifierWithKey(this._modifiersWithKeys, OutlineColorModifier.identity, OutlineColorModifier, value); 3299 return this; 3300 } 3301 outlineRadius(value) { 3302 modifierWithKey(this._modifiersWithKeys, OutlineRadiusModifier.identity, OutlineRadiusModifier, value); 3303 return this; 3304 } 3305 outlineStyle(value) { 3306 modifierWithKey(this._modifiersWithKeys, OutlineStyleModifier.identity, OutlineStyleModifier, value); 3307 return this; 3308 } 3309 outlineWidth(value) { 3310 modifierWithKey(this._modifiersWithKeys, OutlineWidthModifier.identity, OutlineWidthModifier, value); 3311 return this; 3312 } 3313 width(value) { 3314 modifierWithKey(this._modifiersWithKeys, WidthModifier.identity, WidthModifier, value); 3315 return this; 3316 } 3317 height(value) { 3318 modifierWithKey(this._modifiersWithKeys, HeightModifier.identity, HeightModifier, value); 3319 return this; 3320 } 3321 expandSafeArea(types, edges) { 3322 let opts = new ArkSafeAreaExpandOpts(); 3323 if (types && types.length > 0) { 3324 let safeAreaType = ''; 3325 for (let param of types) { 3326 if (!isNumber(param) || param >= SAFE_AREA_TYPE_LIMIT) { 3327 safeAreaType = undefined; 3328 break; 3329 } 3330 if (safeAreaType) { 3331 safeAreaType += '|'; 3332 safeAreaType += param.toString(); 3333 } 3334 else { 3335 safeAreaType += param.toString(); 3336 } 3337 } 3338 opts.type = safeAreaType; 3339 } 3340 if (edges && edges.length > 0) { 3341 let safeAreaEdge = ''; 3342 for (let param of edges) { 3343 if (!isNumber(param) || param >= SAFE_AREA_EDGE_LIMIT) { 3344 safeAreaEdge = undefined; 3345 break; 3346 } 3347 if (safeAreaEdge) { 3348 safeAreaEdge += '|'; 3349 safeAreaEdge += param.toString(); 3350 } 3351 else { 3352 safeAreaEdge += param.toString(); 3353 } 3354 } 3355 opts.edges = safeAreaEdge; 3356 } 3357 if (opts.type === undefined && opts.edges === undefined) { 3358 modifierWithKey(this._modifiersWithKeys, ExpandSafeAreaModifier.identity, ExpandSafeAreaModifier, undefined); 3359 } 3360 else { 3361 modifierWithKey(this._modifiersWithKeys, ExpandSafeAreaModifier.identity, ExpandSafeAreaModifier, opts); 3362 } 3363 return this; 3364 } 3365 backgroundEffect(options) { 3366 modifierWithKey(this._modifiersWithKeys, BackgroundEffectModifier.identity, BackgroundEffectModifier, options); 3367 return this; 3368 } 3369 backgroundBrightness(params) { 3370 modifierWithKey(this._modifiersWithKeys, BackgroundBrightnessModifier.identity, BackgroundBrightnessModifier, params); 3371 return this; 3372 } 3373 backgroundBrightnessInternal(params) { 3374 modifierWithKey(this._modifiersWithKeys, BackgroundBrightnessInternalModifier.identity, BackgroundBrightnessInternalModifier, params); 3375 return this; 3376 } 3377 foregroundBrightness(params) { 3378 modifierWithKey(this._modifiersWithKeys, ForegroundBrightnessModifier.identity, ForegroundBrightnessModifier, params); 3379 return this; 3380 } 3381 dragPreviewOptions(value, options) { 3382 if (isUndefined(value)) { 3383 modifierWithKey(this._modifiersWithKeys, DragPreviewOptionsModifier.identity, DragPreviewOptionsModifier, undefined); 3384 return this; 3385 } 3386 let arkDragPreviewOptions = new ArkDragPreviewOptions(); 3387 if (typeof value === 'object') { 3388 arkDragPreviewOptions.mode = value.mode; 3389 arkDragPreviewOptions.numberBadge = value.numberBadge; 3390 } 3391 if (typeof options === 'object') { 3392 arkDragPreviewOptions.isMultiSelectionEnabled = options.isMultiSelectionEnabled; 3393 arkDragPreviewOptions.defaultAnimationBeforeLifting = options.defaultAnimationBeforeLifting; 3394 arkDragPreviewOptions.isLiftingDisabled = options.isLiftingDisabled; 3395 } 3396 modifierWithKey(this._modifiersWithKeys, DragPreviewOptionsModifier.identity, 3397 DragPreviewOptionsModifier, arkDragPreviewOptions); 3398 return this; 3399 } 3400 responseRegion(value) { 3401 modifierWithKey(this._modifiersWithKeys, ResponseRegionModifier.identity, ResponseRegionModifier, value); 3402 return this; 3403 } 3404 mouseResponseRegion(value) { 3405 modifierWithKey(this._modifiersWithKeys, MouseResponseRegionModifier.identity, MouseResponseRegionModifier, value); 3406 return this; 3407 } 3408 size(value) { 3409 modifierWithKey(this._modifiersWithKeys, SizeModifier.identity, SizeModifier, value); 3410 return this; 3411 } 3412 constraintSize(value) { 3413 modifierWithKey(this._modifiersWithKeys, ConstraintSizeModifier.identity, ConstraintSizeModifier, value); 3414 return this; 3415 } 3416 touchable(value) { 3417 if (typeof value === 'boolean') { 3418 modifierWithKey(this._modifiersWithKeys, TouchableModifier.identity, TouchableModifier, value); 3419 } 3420 else { 3421 modifierWithKey(this._modifiersWithKeys, TouchableModifier.identity, TouchableModifier, undefined); 3422 } 3423 return this; 3424 } 3425 hitTestBehavior(value) { 3426 if (value) { 3427 modifierWithKey(this._modifiersWithKeys, HitTestBehaviorModifier.identity, HitTestBehaviorModifier, value); 3428 } 3429 else { 3430 modifierWithKey(this._modifiersWithKeys, HitTestBehaviorModifier.identity, HitTestBehaviorModifier, undefined); 3431 } 3432 return this; 3433 } 3434 layoutWeight(value) { 3435 if (isNumber(value)) { 3436 modifierWithKey(this._modifiersWithKeys, LayoutWeightModifier.identity, LayoutWeightModifier, value); 3437 } 3438 else if (isString(value) && !isNaN(Number(value))) { 3439 modifierWithKey(this._modifiersWithKeys, LayoutWeightModifier.identity, LayoutWeightModifier, parseInt(value.toString())); 3440 } 3441 else { 3442 modifierWithKey(this._modifiersWithKeys, LayoutWeightModifier.identity, LayoutWeightModifier, undefined); 3443 } 3444 return this; 3445 } 3446 padding(value) { 3447 let arkValue = new ArkPadding(); 3448 if (value !== null && value !== undefined) { 3449 if (isLengthType(value) || isResource(value)) { 3450 arkValue.top = value; 3451 arkValue.right = value; 3452 arkValue.bottom = value; 3453 arkValue.left = value; 3454 } 3455 else { 3456 arkValue.top = value.top; 3457 arkValue.bottom = value.bottom; 3458 if (Object.keys(value).indexOf('right') >= 0) { 3459 arkValue.right = value.right; 3460 } 3461 if (Object.keys(value).indexOf('end') >= 0) { 3462 arkValue.right = value.end; 3463 } 3464 if (Object.keys(value).indexOf('left') >= 0) { 3465 arkValue.left = value.left; 3466 } 3467 if (Object.keys(value).indexOf('start') >= 0) { 3468 arkValue.left = value.start; 3469 } 3470 } 3471 modifierWithKey(this._modifiersWithKeys, PaddingModifier.identity, PaddingModifier, arkValue); 3472 } 3473 else { 3474 modifierWithKey(this._modifiersWithKeys, PaddingModifier.identity, PaddingModifier, undefined); 3475 } 3476 return this; 3477 } 3478 margin(value) { 3479 let arkValue = new ArkPadding(); 3480 if (value !== null && value !== undefined) { 3481 if (isLengthType(value) || isResource(value)) { 3482 arkValue.top = value; 3483 arkValue.right = value; 3484 arkValue.bottom = value; 3485 arkValue.left = value; 3486 } 3487 else { 3488 arkValue.top = value.top; 3489 arkValue.bottom = value.bottom; 3490 if (Object.keys(value).indexOf('right') >= 0) { 3491 arkValue.right = value.right; 3492 } 3493 if (Object.keys(value).indexOf('end') >= 0) { 3494 arkValue.right = value.end; 3495 } 3496 if (Object.keys(value).indexOf('left') >= 0) { 3497 arkValue.left = value.left; 3498 } 3499 if (Object.keys(value).indexOf('start') >= 0) { 3500 arkValue.left = value.start; 3501 } 3502 } 3503 modifierWithKey(this._modifiersWithKeys, MarginModifier.identity, MarginModifier, arkValue); 3504 } 3505 else { 3506 modifierWithKey(this._modifiersWithKeys, MarginModifier.identity, MarginModifier, undefined); 3507 } 3508 return this; 3509 } 3510 background(builder, options) { 3511 throw new Error('Method not implemented.'); 3512 } 3513 backgroundColor(value) { 3514 modifierWithKey(this._modifiersWithKeys, BackgroundColorModifier.identity, BackgroundColorModifier, value); 3515 return this; 3516 } 3517 backgroundImage(src, repeat) { 3518 let arkBackgroundImage = new ArkBackgroundImage(); 3519 arkBackgroundImage.src = src; 3520 arkBackgroundImage.repeat = repeat; 3521 modifierWithKey(this._modifiersWithKeys, BackgroundImageModifier.identity, BackgroundImageModifier, arkBackgroundImage); 3522 return this; 3523 } 3524 backgroundImageSize(value) { 3525 modifierWithKey(this._modifiersWithKeys, BackgroundImageSizeModifier.identity, BackgroundImageSizeModifier, value); 3526 return this; 3527 } 3528 backgroundImagePosition(value) { 3529 modifierWithKey(this._modifiersWithKeys, BackgroundImagePositionModifier.identity, BackgroundImagePositionModifier, value); 3530 return this; 3531 } 3532 backgroundImageResizable(value) { 3533 modifierWithKey(this._modifiersWithKeys, BackgroundImageResizableModifier.identity, BackgroundImageResizableModifier, value); 3534 return this; 3535 } 3536 backgroundBlurStyle(value, options) { 3537 if (isUndefined(value)) { 3538 modifierWithKey(this._modifiersWithKeys, BackgroundBlurStyleModifier.identity, BackgroundBlurStyleModifier, undefined); 3539 return this; 3540 } 3541 let arkBackgroundBlurStyle = new ArkBackgroundBlurStyle(); 3542 arkBackgroundBlurStyle.blurStyle = value; 3543 if (typeof options === 'object') { 3544 arkBackgroundBlurStyle.colorMode = options.colorMode; 3545 arkBackgroundBlurStyle.adaptiveColor = options.adaptiveColor; 3546 arkBackgroundBlurStyle.scale = options.scale; 3547 arkBackgroundBlurStyle.blurOptions = options.blurOptions; 3548 arkBackgroundBlurStyle.policy = options.policy; 3549 arkBackgroundBlurStyle.inactiveColor = options.inactiveColor; 3550 arkBackgroundBlurStyle.type = options.type; 3551 } 3552 modifierWithKey(this._modifiersWithKeys, BackgroundBlurStyleModifier.identity, BackgroundBlurStyleModifier, arkBackgroundBlurStyle); 3553 return this; 3554 } 3555 foregroundBlurStyle(value, options) { 3556 if (isUndefined(value)) { 3557 modifierWithKey(this._modifiersWithKeys, ForegroundBlurStyleModifier.identity, ForegroundBlurStyleModifier, undefined); 3558 return this; 3559 } 3560 let arkForegroundBlurStyle = new ArkForegroundBlurStyle(); 3561 arkForegroundBlurStyle.blurStyle = value; 3562 if (typeof options === 'object') { 3563 arkForegroundBlurStyle.colorMode = options.colorMode; 3564 arkForegroundBlurStyle.adaptiveColor = options.adaptiveColor; 3565 arkForegroundBlurStyle.scale = options.scale; 3566 arkForegroundBlurStyle.blurOptions = options.blurOptions; 3567 } 3568 modifierWithKey(this._modifiersWithKeys, ForegroundBlurStyleModifier.identity, ForegroundBlurStyleModifier, arkForegroundBlurStyle); 3569 return this; 3570 } 3571 opacity(value) { 3572 modifierWithKey(this._modifiersWithKeys, OpacityModifier.identity, OpacityModifier, value); 3573 return this; 3574 } 3575 border(value) { 3576 let _a, _b, _c, _d; 3577 let arkBorder = new ArkBorder(); 3578 if (isUndefined(value)) { 3579 arkBorder = undefined; 3580 } 3581 if (!isUndefined(value === null || value === void 0 ? void 0 : value.width) && (value === null || value === void 0 ? void 0 : value.width) !== null) { 3582 if (isNumber(value.width) || isString(value.width) || isResource(value.width)) { 3583 arkBorder.arkWidth.left = value.width; 3584 arkBorder.arkWidth.right = value.width; 3585 arkBorder.arkWidth.top = value.width; 3586 arkBorder.arkWidth.bottom = value.width; 3587 } 3588 else { 3589 arkBorder.arkWidth.start = value.width.start; 3590 arkBorder.arkWidth.end = value.width.end; 3591 arkBorder.arkWidth.left = value.width.left; 3592 arkBorder.arkWidth.right = value.width.right; 3593 arkBorder.arkWidth.top = value.width.top; 3594 arkBorder.arkWidth.bottom = value.width.bottom; 3595 } 3596 } 3597 if (!isUndefined(value === null || value === void 0 ? void 0 : value.color) && (value === null || value === void 0 ? void 0 : value.color) !== null) { 3598 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 3599 arkBorder.arkColor.leftColor = value.color; 3600 arkBorder.arkColor.rightColor = value.color; 3601 arkBorder.arkColor.topColor = value.color; 3602 arkBorder.arkColor.bottomColor = value.color; 3603 } 3604 else { 3605 arkBorder.arkColor.startColor = value.color.start; 3606 arkBorder.arkColor.endColor = value.color.end; 3607 arkBorder.arkColor.leftColor = value.color.left; 3608 arkBorder.arkColor.rightColor = value.color.right; 3609 arkBorder.arkColor.topColor = value.color.top; 3610 arkBorder.arkColor.bottomColor = value.color.bottom; 3611 } 3612 } 3613 if (!isUndefined(value === null || value === void 0 ? void 0 : value.radius) && (value === null || value === void 0 ? void 0 : value.radius) !== null) { 3614 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 3615 arkBorder.arkRadius.topLeft = value.radius; 3616 arkBorder.arkRadius.topRight = value.radius; 3617 arkBorder.arkRadius.bottomLeft = value.radius; 3618 arkBorder.arkRadius.bottomRight = value.radius; 3619 } 3620 else { 3621 arkBorder.arkRadius.topStart = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topStart; 3622 arkBorder.arkRadius.topEnd = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topEnd; 3623 arkBorder.arkRadius.bottomStart = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomStart; 3624 arkBorder.arkRadius.bottomEnd = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomEnd; 3625 arkBorder.arkRadius.topLeft = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topLeft; 3626 arkBorder.arkRadius.topRight = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topRight; 3627 arkBorder.arkRadius.bottomLeft = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomLeft; 3628 arkBorder.arkRadius.bottomRight = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomRight; 3629 } 3630 } 3631 if (!isUndefined(value === null || value === void 0 ? void 0 : value.style) && (value === null || value === void 0 ? void 0 : value.style) !== null) { 3632 let arkBorderStyle = new ArkBorderStyle(); 3633 if (arkBorderStyle.parseBorderStyle(value.style)) { 3634 if (!isUndefined(arkBorderStyle.style)) { 3635 arkBorder.arkStyle.top = arkBorderStyle.style; 3636 arkBorder.arkStyle.left = arkBorderStyle.style; 3637 arkBorder.arkStyle.bottom = arkBorderStyle.style; 3638 arkBorder.arkStyle.right = arkBorderStyle.style; 3639 } 3640 else { 3641 arkBorder.arkStyle.top = arkBorderStyle.top; 3642 arkBorder.arkStyle.left = arkBorderStyle.left; 3643 arkBorder.arkStyle.bottom = arkBorderStyle.bottom; 3644 arkBorder.arkStyle.right = arkBorderStyle.right; 3645 } 3646 } 3647 } 3648 if (!isUndefined(value === null || value === void 0 ? void 0 : value.dashGap) && 3649 (value === null || value === void 0 ? void 0 : value.dashGap) !== null) { 3650 if (isNumber(value.dashGap) || isString(value.dashGap) || isResource(value.dashGap) || 3651 isObject(value.dashGap) && isNumber(value.dashGap.value)) { 3652 arkBorder.arkDashGap.left = value.dashGap; 3653 arkBorder.arkDashGap.right = value.dashGap; 3654 arkBorder.arkDashGap.top = value.dashGap; 3655 arkBorder.arkDashGap.bottom = value.dashGap; 3656 } 3657 else { 3658 arkBorder.arkDashGap.left = value.dashGap.left; 3659 arkBorder.arkDashGap.right = value.dashGap.right; 3660 arkBorder.arkDashGap.top = value.dashGap.top; 3661 arkBorder.arkDashGap.bottom = value.dashGap.bottom; 3662 arkBorder.arkDashGap.start = value.dashGap.start; 3663 arkBorder.arkDashGap.end = value.dashGap.end; 3664 } 3665 } 3666 if (!isUndefined(value === null || value === void 0 ? void 0 : value.dashWidth) && 3667 (value === null || value === void 0 ? void 0 : value.dashWidth) !== null) { 3668 if (isNumber(value.dashWidth) || isString(value.dashWidth) || isResource(value.dashWidth) || 3669 isObject(value.dashWidth) && isNumber(value.dashWidth.value)) { 3670 arkBorder.arkDashWidth.left = value.dashWidth; 3671 arkBorder.arkDashWidth.right = value.dashWidth; 3672 arkBorder.arkDashWidth.top = value.dashWidth; 3673 arkBorder.arkDashWidth.bottom = value.dashWidth; 3674 } 3675 else { 3676 arkBorder.arkDashWidth.left = value.dashWidth.left; 3677 arkBorder.arkDashWidth.right = value.dashWidth.right; 3678 arkBorder.arkDashWidth.top = value.dashWidth.top; 3679 arkBorder.arkDashWidth.bottom = value.dashWidth.bottom; 3680 arkBorder.arkDashWidth.start = value.dashWidth.start; 3681 arkBorder.arkDashWidth.end = value.dashWidth.end; 3682 } 3683 } 3684 modifierWithKey(this._modifiersWithKeys, BorderModifier.identity, BorderModifier, arkBorder); 3685 return this; 3686 } 3687 borderStyle(value) { 3688 modifierWithKey(this._modifiersWithKeys, BorderStyleModifier.identity, BorderStyleModifier, value); 3689 return this; 3690 } 3691 borderWidth(value) { 3692 modifierWithKey(this._modifiersWithKeys, BorderWidthModifier.identity, BorderWidthModifier, value); 3693 return this; 3694 } 3695 borderColor(value) { 3696 modifierWithKey(this._modifiersWithKeys, BorderColorModifier.identity, BorderColorModifier, value); 3697 return this; 3698 } 3699 borderRadius(value) { 3700 modifierWithKey(this._modifiersWithKeys, BorderRadiusModifier.identity, BorderRadiusModifier, value); 3701 return this; 3702 } 3703 borderImage(value) { 3704 modifierWithKey(this._modifiersWithKeys, BorderImageModifier.identity, BorderImageModifier, value); 3705 return this; 3706 } 3707 foregroundEffect(value) { 3708 modifierWithKey(this._modifiersWithKeys, ForegroundEffectModifier.identity, ForegroundEffectModifier, value); 3709 return this; 3710 } 3711 foregroundColor(value) { 3712 modifierWithKey(this._modifiersWithKeys, ForegroundColorModifier.identity, ForegroundColorModifier, value); 3713 return this; 3714 } 3715 onClick(event) { 3716 modifierWithKey(this._modifiersWithKeys, ClickModifier.identity, ClickModifier, event); 3717 return this; 3718 } 3719 onHover(event) { 3720 modifierWithKey(this._modifiersWithKeys, OnHoverModifier.identity, OnHoverModifier, event); 3721 return this; 3722 } 3723 onHoverMove(event) { 3724 modifierWithKey(this._modifiersWithKeys, OnHoverMoveModifier.identity, OnHoverMoveModifier, event); 3725 return this; 3726 } 3727 hoverEffect(value) { 3728 modifierWithKey(this._modifiersWithKeys, HoverEffectModifier.identity, HoverEffectModifier, value); 3729 return this; 3730 } 3731 onMouse(event) { 3732 modifierWithKey(this._modifiersWithKeys, OnMouseModifier.identity, OnMouseModifier, event); 3733 return this; 3734 } 3735 onTouch(event) { 3736 modifierWithKey(this._modifiersWithKeys, OnTouchModifier.identity, OnTouchModifier, event); 3737 return this; 3738 } 3739 onKeyEvent(event) { 3740 modifierWithKey(this._modifiersWithKeys, OnKeyEventModifier.identity, OnKeyEventModifier, event); 3741 return this; 3742 } 3743 onKeyPreIme(event) { 3744 modifierWithKey(this._modifiersWithKeys, OnKeyPreImeModifier.identity, OnKeyPreImeModifier, event); 3745 return this; 3746 } 3747 onFocusAxisEvent(event) { 3748 modifierWithKey(this._modifiersWithKeys, OnFocusAxisEventModifier.identity, OnFocusAxisEventModifier, event); 3749 return this; 3750 } 3751 focusable(value) { 3752 if (typeof value === 'boolean') { 3753 modifierWithKey(this._modifiersWithKeys, FocusableModifier.identity, FocusableModifier, value); 3754 } 3755 else { 3756 modifierWithKey(this._modifiersWithKeys, FocusableModifier.identity, FocusableModifier, undefined); 3757 } 3758 return this; 3759 } 3760 tabStop(value) { 3761 if (typeof value === 'boolean') { 3762 modifierWithKey(this._modifiersWithKeys, TabStopModifier.identity, TabStopModifier, value); 3763 } 3764 else { 3765 modifierWithKey(this._modifiersWithKeys, TabStopModifier.identity, TabStopModifier, undefined); 3766 } 3767 return this; 3768 } 3769 onFocus(event) { 3770 modifierWithKey(this._modifiersWithKeys, OnFocusModifier.identity, OnFocusModifier, event); 3771 return this; 3772 } 3773 onBlur(event) { 3774 modifierWithKey(this._modifiersWithKeys, OnBlurModifier.identity, OnBlurModifier, event); 3775 return this; 3776 } 3777 tabIndex(index) { 3778 if (typeof index !== 'number') { 3779 modifierWithKey(this._modifiersWithKeys, TabIndexModifier.identity, TabIndexModifier, undefined); 3780 } 3781 else { 3782 modifierWithKey(this._modifiersWithKeys, TabIndexModifier.identity, TabIndexModifier, index); 3783 } 3784 return this; 3785 } 3786 defaultFocus(value) { 3787 if (typeof value === 'boolean') { 3788 modifierWithKey(this._modifiersWithKeys, DefaultFocusModifier.identity, DefaultFocusModifier, value); 3789 } 3790 else { 3791 modifierWithKey(this._modifiersWithKeys, DefaultFocusModifier.identity, DefaultFocusModifier, undefined); 3792 } 3793 return this; 3794 } 3795 groupDefaultFocus(value) { 3796 if (typeof value === 'boolean') { 3797 modifierWithKey(this._modifiersWithKeys, GroupDefaultFocusModifier.identity, GroupDefaultFocusModifier, value); 3798 } 3799 else { 3800 modifierWithKey(this._modifiersWithKeys, GroupDefaultFocusModifier.identity, GroupDefaultFocusModifier, undefined); 3801 } 3802 return this; 3803 } 3804 focusOnTouch(value) { 3805 if (typeof value === 'boolean') { 3806 modifierWithKey(this._modifiersWithKeys, FocusOnTouchModifier.identity, FocusOnTouchModifier, value); 3807 } 3808 else { 3809 modifierWithKey(this._modifiersWithKeys, FocusOnTouchModifier.identity, FocusOnTouchModifier, undefined); 3810 } 3811 return this; 3812 } 3813 animation(value) { 3814 throw new Error('Method not implemented.'); 3815 } 3816 transition(value) { 3817 modifierWithKey(this._modifiersWithKeys, TransitionModifier.identity, TransitionModifier, value); 3818 return this; 3819 } 3820 gesture(gesture, mask) { 3821 throw new Error('Method not implemented.'); 3822 } 3823 priorityGesture(gesture, mask) { 3824 throw new Error('Method not implemented.'); 3825 } 3826 parallelGesture(gesture, mask) { 3827 throw new Error('Method not implemented.'); 3828 } 3829 3830 chainMode(direction, style) { 3831 let arkChainMode = new ArkChainMode(); 3832 arkChainMode.direction = direction; 3833 arkChainMode.style = style; 3834 modifierWithKey(this._modifiersWithKeys, ChainModeifier.identity, ChainModeifier, arkChainMode); 3835 return this; 3836 } 3837 3838 blur(value, options) { 3839 let blur = new ArkBlurOptions(); 3840 blur.value = value; 3841 blur.options = options; 3842 modifierWithKey(this._modifiersWithKeys, BlurModifier.identity, BlurModifier, blur); 3843 return this; 3844 } 3845 linearGradientBlur(value, options) { 3846 if (isUndefined(value) || isNull(value) || isUndefined(options) || isNull(options)) { 3847 modifierWithKey(this._modifiersWithKeys, LinearGradientBlurModifier.identity, LinearGradientBlurModifier, undefined); 3848 return this; 3849 } 3850 let arkLinearGradientBlur = new ArkLinearGradientBlur(); 3851 arkLinearGradientBlur.blurRadius = value; 3852 arkLinearGradientBlur.fractionStops = options.fractionStops; 3853 arkLinearGradientBlur.direction = options.direction; 3854 modifierWithKey(this._modifiersWithKeys, LinearGradientBlurModifier.identity, LinearGradientBlurModifier, arkLinearGradientBlur); 3855 return this; 3856 } 3857 brightness(value) { 3858 if (!isNumber(value)) { 3859 modifierWithKey(this._modifiersWithKeys, BrightnessModifier.identity, BrightnessModifier, undefined); 3860 } 3861 else { 3862 modifierWithKey(this._modifiersWithKeys, BrightnessModifier.identity, BrightnessModifier, value); 3863 } 3864 return this; 3865 } 3866 contrast(value) { 3867 if (!isNumber(value)) { 3868 modifierWithKey(this._modifiersWithKeys, ContrastModifier.identity, ContrastModifier, undefined); 3869 } 3870 else { 3871 modifierWithKey(this._modifiersWithKeys, ContrastModifier.identity, ContrastModifier, value); 3872 } 3873 return this; 3874 } 3875 grayscale(value) { 3876 if (!isNumber(value)) { 3877 modifierWithKey(this._modifiersWithKeys, GrayscaleModifier.identity, GrayscaleModifier, undefined); 3878 } 3879 else { 3880 modifierWithKey(this._modifiersWithKeys, GrayscaleModifier.identity, GrayscaleModifier, value); 3881 } 3882 return this; 3883 } 3884 colorBlend(value) { 3885 modifierWithKey(this._modifiersWithKeys, ColorBlendModifier.identity, ColorBlendModifier, value); 3886 return this; 3887 } 3888 saturate(value) { 3889 if (!isNumber(value)) { 3890 modifierWithKey(this._modifiersWithKeys, SaturateModifier.identity, SaturateModifier, undefined); 3891 } 3892 else { 3893 modifierWithKey(this._modifiersWithKeys, SaturateModifier.identity, SaturateModifier, value); 3894 } 3895 return this; 3896 } 3897 sepia(value) { 3898 if (!isNumber(value)) { 3899 modifierWithKey(this._modifiersWithKeys, SepiaModifier.identity, SepiaModifier, undefined); 3900 } 3901 else { 3902 modifierWithKey(this._modifiersWithKeys, SepiaModifier.identity, SepiaModifier, value); 3903 } 3904 return this; 3905 } 3906 invert(value) { 3907 if (!isUndefined(value)) { 3908 modifierWithKey(this._modifiersWithKeys, InvertModifier.identity, InvertModifier, value); 3909 } 3910 else { 3911 modifierWithKey(this._modifiersWithKeys, InvertModifier.identity, InvertModifier, undefined); 3912 } 3913 return this; 3914 } 3915 hueRotate(value) { 3916 if (!isNumber(value) && !isString(value)) { 3917 modifierWithKey(this._modifiersWithKeys, HueRotateModifier.identity, HueRotateModifier, undefined); 3918 } 3919 else { 3920 modifierWithKey(this._modifiersWithKeys, HueRotateModifier.identity, HueRotateModifier, value); 3921 } 3922 return this; 3923 } 3924 useEffect(value, type = EffectType.DEFAULT) { 3925 let useEffectObj = new ArkUseEffect(); 3926 useEffectObj.useEffect = value; 3927 useEffectObj.effectType = type; 3928 modifierWithKey(this._modifiersWithKeys, UseEffectModifier.identity, UseEffectModifier, useEffectObj); 3929 return this; 3930 } 3931 backdropBlur(value, options) { 3932 let blur = new ArkBlurOptions(); 3933 blur.value = value; 3934 blur.options = options; 3935 modifierWithKey(this._modifiersWithKeys, BackdropBlurModifier.identity, BackdropBlurModifier, blur); 3936 return this; 3937 } 3938 renderGroup(value) { 3939 modifierWithKey(this._modifiersWithKeys, RenderGroupModifier.identity, RenderGroupModifier, value); 3940 return this; 3941 } 3942 translate(value) { 3943 modifierWithKey(this._modifiersWithKeys, TranslateModifier.identity, TranslateModifier, value); 3944 return this; 3945 } 3946 scale(value) { 3947 modifierWithKey(this._modifiersWithKeys, ScaleModifier.identity, ScaleModifier, value); 3948 return this; 3949 } 3950 gridSpan(value) { 3951 if (isNumber(value)) { 3952 modifierWithKey(this._modifiersWithKeys, GridSpanModifier.identity, GridSpanModifier, value); 3953 } 3954 else { 3955 modifierWithKey(this._modifiersWithKeys, GridSpanModifier.identity, GridSpanModifier, undefined); 3956 } 3957 return this; 3958 } 3959 gridOffset(value) { 3960 if (isNumber(value)) { 3961 modifierWithKey(this._modifiersWithKeys, GridOffsetModifier.identity, GridOffsetModifier, value); 3962 } 3963 else { 3964 modifierWithKey(this._modifiersWithKeys, GridOffsetModifier.identity, GridOffsetModifier, undefined); 3965 } 3966 return this; 3967 } 3968 rotate(value) { 3969 modifierWithKey(this._modifiersWithKeys, RotateModifier.identity, RotateModifier, value); 3970 return this; 3971 } 3972 transform(value) { 3973 modifierWithKey(this._modifiersWithKeys, TransformModifier.identity, TransformModifier, value); 3974 return this; 3975 } 3976 onAppear(event) { 3977 modifierWithKey(this._modifiersWithKeys, OnAppearModifier.identity, OnAppearModifier, event); 3978 return this; 3979 } 3980 onDisAppear(event) { 3981 modifierWithKey(this._modifiersWithKeys, OnDisappearModifier.identity, OnDisappearModifier, event); 3982 return this; 3983 } 3984 onAttach(event) { 3985 modifierWithKey(this._modifiersWithKeys, OnAttachModifier.identity, OnAttachModifier, event); 3986 return this; 3987 } 3988 onDetach(event) { 3989 modifierWithKey(this._modifiersWithKeys, OnDetachModifier.identity, OnDetachModifier, event); 3990 return this; 3991 } 3992 onAreaChange(event) { 3993 modifierWithKey(this._modifiersWithKeys, OnAreaChangeModifier.identity, OnAreaChangeModifier, event); 3994 return this; 3995 } 3996 visibility(value) { 3997 modifierWithKey(this._modifiersWithKeys, VisibilityModifier.identity, VisibilityModifier, value); 3998 return this; 3999 } 4000 flexGrow(value) { 4001 modifierWithKey(this._modifiersWithKeys, FlexGrowModifier.identity, FlexGrowModifier, value); 4002 return this; 4003 } 4004 flexShrink(value) { 4005 modifierWithKey(this._modifiersWithKeys, FlexShrinkModifier.identity, FlexShrinkModifier, value); 4006 return this; 4007 } 4008 flexBasis(value) { 4009 modifierWithKey(this._modifiersWithKeys, FlexBasisModifier.identity, FlexBasisModifier, value); 4010 return this; 4011 } 4012 alignSelf(value) { 4013 modifierWithKey(this._modifiersWithKeys, AlignSelfModifier.identity, AlignSelfModifier, value); 4014 return this; 4015 } 4016 displayPriority(value) { 4017 modifierWithKey(this._modifiersWithKeys, DisplayPriorityModifier.identity, DisplayPriorityModifier, value); 4018 return this; 4019 } 4020 zIndex(value) { 4021 if (value !== null) { 4022 let zIndex = 0; 4023 if (typeof (value) === 'number') { 4024 zIndex = value; 4025 } 4026 modifierWithKey(this._modifiersWithKeys, ZIndexModifier.identity, ZIndexModifier, zIndex); 4027 } 4028 return this; 4029 } 4030 sharedTransition(id, options) { 4031 let arkSharedTransition = new ArkSharedTransition(); 4032 if (isString(id)) { 4033 arkSharedTransition.id = id; 4034 } 4035 if (typeof options === 'object') { 4036 arkSharedTransition.options = options; 4037 } 4038 modifierWithKey(this._modifiersWithKeys, SharedTransitionModifier.identity, SharedTransitionModifier, arkSharedTransition); 4039 return this; 4040 } 4041 direction(value) { 4042 modifierWithKey(this._modifiersWithKeys, DirectionModifier.identity, DirectionModifier, value); 4043 return this; 4044 } 4045 align(value) { 4046 if (isNumber(value)) { 4047 modifierWithKey(this._modifiersWithKeys, AlignModifier.identity, AlignModifier, value); 4048 } 4049 else { 4050 modifierWithKey(this._modifiersWithKeys, AlignModifier.identity, AlignModifier, undefined); 4051 } 4052 return this; 4053 } 4054 position(value) { 4055 if (isObject(value)) { 4056 modifierWithKey(this._modifiersWithKeys, PositionModifier.identity, PositionModifier, value); 4057 } else { 4058 modifierWithKey(this._modifiersWithKeys, PositionModifier.identity, PositionModifier, undefined); 4059 } 4060 return this; 4061 } 4062 markAnchor(value) { 4063 modifierWithKey(this._modifiersWithKeys, MarkAnchorModifier.identity, MarkAnchorModifier, value); 4064 return this; 4065 } 4066 offset(value) { 4067 if (isObject(value)) { 4068 modifierWithKey(this._modifiersWithKeys, OffsetModifier.identity, OffsetModifier, value); 4069 } else { 4070 modifierWithKey(this._modifiersWithKeys, OffsetModifier.identity, OffsetModifier, undefined); 4071 } 4072 return this; 4073 } 4074 enabled(value) { 4075 if (typeof value === 'boolean') { 4076 modifierWithKey(this._modifiersWithKeys, EnabledModifier.identity, EnabledModifier, value); 4077 } 4078 else { 4079 modifierWithKey(this._modifiersWithKeys, EnabledModifier.identity, EnabledModifier, undefined); 4080 } 4081 return this; 4082 } 4083 useShadowBatching(value) { 4084 modifierWithKey(this._modifiersWithKeys, UseShadowBatchingModifier.identity, UseShadowBatchingModifier, value); 4085 return this; 4086 } 4087 monopolizeEvents(value) { 4088 modifierWithKey(this._modifiersWithKeys, MonopolizeEventsModifier.identity, MonopolizeEventsModifier, value); 4089 return this; 4090 } 4091 useSizeType(value) { 4092 throw new Error('Method not implemented.'); 4093 } 4094 alignRules(value) { 4095 if (!isObject(value) || JSON.stringify(value) === '{}') { 4096 modifierWithKey(this._modifiersWithKeys, AlignRulesModifier.identity, AlignRulesModifier, undefined); 4097 return this; 4098 } 4099 let keys = ['left', 'middle', 'right', 'top', 'center', 'bottom']; 4100 let arkValue = new ArkAlignRules(); 4101 for (let i = 0; i < keys.length; i++) { 4102 let rule = value[keys[i]]; 4103 let alignRule = ''; 4104 if (isObject(rule)) { 4105 let alignSign = false; 4106 let anchorSign = false; 4107 let align = rule.align; 4108 let anchor = rule.anchor; 4109 if (isString(anchor)) { 4110 anchorSign = true; 4111 } 4112 if (i < DIRECTION_RANGE) { 4113 if (align in HorizontalAlign) { 4114 alignSign = true; 4115 } 4116 } 4117 else { 4118 if (align in VerticalAlign) { 4119 alignSign = true; 4120 } 4121 } 4122 if (!alignSign && !anchorSign) { 4123 alignRule += ''; 4124 } 4125 else if (!anchorSign) { 4126 alignRule += align.toString(); 4127 alignRule += '|'; 4128 alignRule += '__container__'; 4129 } 4130 else if (!alignSign) { 4131 alignRule += '2'; 4132 alignRule += '|'; 4133 alignRule += anchor; 4134 } 4135 else { 4136 alignRule += align.toString(); 4137 alignRule += '|'; 4138 alignRule += anchor; 4139 } 4140 } 4141 else { 4142 alignRule += ''; 4143 } 4144 switch (keys[i]) { 4145 case 'left': 4146 arkValue.left = alignRule; 4147 break; 4148 case 'middle': 4149 arkValue.middle = alignRule; 4150 break; 4151 case 'right': 4152 arkValue.right = alignRule; 4153 break; 4154 case 'top': 4155 arkValue.top = alignRule; 4156 break; 4157 case 'center': 4158 arkValue.center = alignRule; 4159 break; 4160 case 'bottom': 4161 arkValue.bottom = alignRule; 4162 break; 4163 } 4164 } 4165 modifierWithKey(this._modifiersWithKeys, AlignRulesModifier.identity, AlignRulesModifier, arkValue); 4166 return this; 4167 } 4168 aspectRatio(value) { 4169 modifierWithKey(this._modifiersWithKeys, AspectRatioModifier.identity, AspectRatioModifier, value); 4170 return this; 4171 } 4172 clickEffect(value) { 4173 modifierWithKey(this._modifiersWithKeys, ClickEffectModifier.identity, ClickEffectModifier, value); 4174 return this; 4175 } 4176 onDragStart(event) { 4177 modifierWithKey(this._modifiersWithKeys, DragStartModifier.identity, DragStartModifier, event); 4178 return this; 4179 } 4180 onDragEnter(event) { 4181 modifierWithKey(this._modifiersWithKeys, DragEnterModifier.identity, DragEnterModifier, event); 4182 return this; 4183 } 4184 onDragMove(event) { 4185 modifierWithKey(this._modifiersWithKeys, DragMoveModifier.identity, DragMoveModifier, event); 4186 return this; 4187 } 4188 onDragLeave(event) { 4189 modifierWithKey(this._modifiersWithKeys, DragLeaveModifier.identity, DragLeaveModifier, event); 4190 return this; 4191 } 4192 onDrop(event) { 4193 modifierWithKey(this._modifiersWithKeys, DropModifier.identity, DropModifier, event); 4194 return this; 4195 } 4196 onDragEnd(event) { 4197 modifierWithKey(this._modifiersWithKeys, DragEndModifier.identity, DragEndModifier, event); 4198 return this; 4199 } 4200 onPreDrag(event) { 4201 throw new Error('Method not implemented.'); 4202 } 4203 allowDrop(value) { 4204 modifierWithKey(this._modifiersWithKeys, AllowDropModifier.identity, AllowDropModifier, value); 4205 return this; 4206 } 4207 draggable(value) { 4208 if (typeof value === 'boolean') { 4209 modifierWithKey(this._modifiersWithKeys, DraggableModifier.identity, DraggableModifier, value); 4210 } 4211 else { 4212 modifierWithKey(this._modifiersWithKeys, DraggableModifier.identity, DraggableModifier, undefined); 4213 } 4214 return this; 4215 } 4216 dragPreview(preview, config) { 4217 let arkDragPreview = new ArkDragPreview(); 4218 if (typeof config === 'object') { 4219 arkDragPreview.onlyForLifting = config.onlyForLifting; 4220 } 4221 if (typeof preview === 'string') { 4222 arkDragPreview.inspetorId = preview; 4223 modifierWithKey(this._modifiersWithKeys, DragPreviewModifier.identity, DragPreviewModifier, arkDragPreview); 4224 } else if (typeof preview === 'object') { 4225 arkDragPreview.pixelMap = preview.pixelMap; 4226 arkDragPreview.extraInfo = preview.extraInfo; 4227 if (preview.builder) { 4228 throw new Error('Builder is not supported.'); 4229 } 4230 modifierWithKey(this._modifiersWithKeys, DragPreviewModifier.identity, DragPreviewModifier, arkDragPreview); 4231 } else if (typeof preview === 'function') { 4232 throw new Error('Builder is not supported.'); 4233 } 4234 return this; 4235 } 4236 overlay(value, options) { 4237 if (typeof value === 'undefined') { 4238 modifierWithKey(this._modifiersWithKeys, OverlayModifier.identity, OverlayModifier, undefined); 4239 return this; 4240 } 4241 let arkOverlay = new ArkOverlay(); 4242 if (arkOverlay.splitOverlayValue(value, options)) { 4243 modifierWithKey(this._modifiersWithKeys, OverlayModifier.identity, OverlayModifier, arkOverlay); 4244 } 4245 else { 4246 modifierWithKey(this._modifiersWithKeys, OverlayModifier.identity, OverlayModifier, undefined); 4247 } 4248 return this; 4249 } 4250 linearGradient(value) { 4251 modifierWithKey(this._modifiersWithKeys, LinearGradientModifier.identity, LinearGradientModifier, value); 4252 return this; 4253 } 4254 sweepGradient(value) { 4255 modifierWithKey(this._modifiersWithKeys, SweepGradientModifier.identity, SweepGradientModifier, value); 4256 return this; 4257 } 4258 radialGradient(value) { 4259 modifierWithKey(this._modifiersWithKeys, RadialGradientModifier.identity, RadialGradientModifier, value); 4260 return this; 4261 } 4262 motionPath(value) { 4263 modifierWithKey(this._modifiersWithKeys, MotionPathModifier.identity, MotionPathModifier, value); 4264 return this; 4265 } 4266 motionBlur(value) { 4267 modifierWithKey(this._modifiersWithKeys, MotionBlurModifier.identity, MotionBlurModifier, value); 4268 return this; 4269 } 4270 shadow(value) { 4271 modifierWithKey(this._modifiersWithKeys, ShadowModifier.identity, ShadowModifier, value); 4272 return this; 4273 } 4274 mask(value) { 4275 modifierWithKey(this._modifiersWithKeys, MaskModifier.identity, MaskModifier, value); 4276 return this; 4277 } 4278 maskShape(value) { 4279 modifierWithKey(this._modifiersWithKeys, MaskShapeModifier.identity, MaskShapeModifier, value); 4280 return this; 4281 } 4282 key(value) { 4283 if (typeof value === 'string') { 4284 modifierWithKey(this._modifiersWithKeys, KeyModifier.identity, KeyModifier, value); 4285 } 4286 else { 4287 modifierWithKey(this._modifiersWithKeys, KeyModifier.identity, KeyModifier, undefined); 4288 } 4289 return this; 4290 } 4291 id(value) { 4292 if (typeof value === 'string') { 4293 modifierWithKey(this._modifiersWithKeys, IdModifier.identity, IdModifier, value); 4294 } 4295 else { 4296 modifierWithKey(this._modifiersWithKeys, IdModifier.identity, IdModifier, undefined); 4297 } 4298 return this; 4299 } 4300 geometryTransition(id, options) { 4301 let arkGeometryTransition = new ArkGeometryTransition(); 4302 arkGeometryTransition.id = id; 4303 arkGeometryTransition.options = options; 4304 modifierWithKey(this._modifiersWithKeys, GeometryTransitionModifier.identity, GeometryTransitionModifier, arkGeometryTransition); 4305 return this; 4306 } 4307 bindPopup(show, popup) { 4308 throw new Error('Method not implemented.'); 4309 } 4310 bindMenu(content, options) { 4311 throw new Error('Method not implemented.'); 4312 } 4313 bindContextMenu(content, responseType, options) { 4314 throw new Error('Method not implemented.'); 4315 } 4316 bindContentCover(isShow, builder, type) { 4317 throw new Error('Method not implemented.'); 4318 } 4319 blendMode(blendMode, blendApplyType) { 4320 let arkBlendMode = new ArkBlendMode(); 4321 arkBlendMode.blendMode = blendMode; 4322 arkBlendMode.blendApplyType = blendApplyType; 4323 modifierWithKey(this._modifiersWithKeys, BlendModeModifier.identity, BlendModeModifier, arkBlendMode); 4324 return this; 4325 } 4326 advancedBlendMode(blendMode, blendApplyType) { 4327 let arkBlendMode = new ArkBlendMode(); 4328 arkBlendMode.blendMode = blendMode; 4329 arkBlendMode.blendApplyType = blendApplyType; 4330 modifierWithKey(this._modifiersWithKeys, AdvancedBlendModeModifier.identity, 4331 AdvancedBlendModeModifier, arkBlendMode); 4332 return this; 4333 } 4334 clip(value) { 4335 modifierWithKey(this._modifiersWithKeys, ClipModifier.identity, ClipModifier, value); 4336 return this; 4337 } 4338 clipShape(value) { 4339 modifierWithKey(this._modifiersWithKeys, ClipShapeModifier.identity, ClipShapeModifier, value); 4340 return this; 4341 } 4342 bindSheet(isShow, builder, options) { 4343 throw new Error('Method not implemented.'); 4344 } 4345 stateStyles(value) { 4346 throw new Error('Method not implemented.'); 4347 } 4348 restoreId(value) { 4349 if (typeof value !== 'number') { 4350 modifierWithKey(this._modifiersWithKeys, RestoreIdModifier.identity, RestoreIdModifier, undefined); 4351 } 4352 else { 4353 modifierWithKey(this._modifiersWithKeys, RestoreIdModifier.identity, RestoreIdModifier, value); 4354 } 4355 return this; 4356 } 4357 onVisibleAreaChange(ratios, event) { 4358 throw new Error('Method not implemented.'); 4359 } 4360 sphericalEffect(value) { 4361 modifierWithKey(this._modifiersWithKeys, SphericalEffectModifier.identity, SphericalEffectModifier, value); 4362 return this; 4363 } 4364 lightUpEffect(value) { 4365 modifierWithKey(this._modifiersWithKeys, LightUpEffectModifier.identity, LightUpEffectModifier, value); 4366 return this; 4367 } 4368 pixelStretchEffect(options) { 4369 modifierWithKey(this._modifiersWithKeys, PixelStretchEffectModifier.identity, PixelStretchEffectModifier, options); 4370 return this; 4371 } 4372 keyboardShortcut(value, keys, action) { 4373 let keyboardShortCut = new ArkKeyBoardShortCut(); 4374 keyboardShortCut.value = value; 4375 keyboardShortCut.keys = keys; 4376 modifierWithKey(this._modifiersWithKeys, KeyBoardShortCutModifier.identity, KeyBoardShortCutModifier, keyboardShortCut); 4377 return this; 4378 } 4379 accessibilityGroup(value) { 4380 if (typeof value === 'boolean') { 4381 modifierWithKey(this._modifiersWithKeys, AccessibilityGroupModifier.identity, AccessibilityGroupModifier, value); 4382 } 4383 else { 4384 modifierWithKey(this._modifiersWithKeys, AccessibilityGroupModifier.identity, AccessibilityGroupModifier, undefined); 4385 } 4386 return this; 4387 } 4388 accessibilityText(value) { 4389 if (typeof value === 'string') { 4390 modifierWithKey(this._modifiersWithKeys, AccessibilityTextModifier.identity, AccessibilityTextModifier, value); 4391 } 4392 else { 4393 modifierWithKey(this._modifiersWithKeys, AccessibilityTextModifier.identity, AccessibilityTextModifier, undefined); 4394 } 4395 return this; 4396 } 4397 accessibilityDescription(value) { 4398 if (typeof value !== 'string') { 4399 modifierWithKey(this._modifiersWithKeys, AccessibilityDescriptionModifier.identity, AccessibilityDescriptionModifier, undefined); 4400 } 4401 else { 4402 modifierWithKey(this._modifiersWithKeys, AccessibilityDescriptionModifier.identity, AccessibilityDescriptionModifier, value); 4403 } 4404 return this; 4405 } 4406 accessibilityLevel(value) { 4407 if (typeof value !== 'string') { 4408 modifierWithKey(this._modifiersWithKeys, AccessibilityLevelModifier.identity, AccessibilityLevelModifier, undefined); 4409 } 4410 else { 4411 modifierWithKey(this._modifiersWithKeys, AccessibilityLevelModifier.identity, AccessibilityLevelModifier, value); 4412 } 4413 return this; 4414 } 4415 obscured(reasons) { 4416 modifierWithKey(this._modifiersWithKeys, ObscuredModifier.identity, ObscuredModifier, reasons); 4417 return this; 4418 } 4419 reuseId(id) { 4420 throw new Error('Method not implemented.'); 4421 } 4422 renderFit(fitMode) { 4423 modifierWithKey(this._modifiersWithKeys, RenderFitModifier.identity, RenderFitModifier, fitMode); 4424 return this; 4425 } 4426 attributeModifier(modifier) { 4427 return this; 4428 } 4429 customProperty(key, value) { 4430 let returnBool = getUINativeModule().frameNode.setCustomPropertyModiferByKey(this.nativePtr, key, value); 4431 if (!returnBool) { 4432 const property = new ArkCustomProperty(); 4433 property.key = key; 4434 property.value = value; 4435 modifierWithKey(this._modifiersWithKeys, CustomPropertyModifier.identity, CustomPropertyModifier, property); 4436 } 4437 return this; 4438 } 4439 systemBarEffect() { 4440 modifierWithKey(this._modifiersWithKeys, SystemBarEffectModifier.identity, SystemBarEffectModifier, null); 4441 return this; 4442 } 4443 focusScopeId(id, isGroup, arrowStepOut) { 4444 let arkFocusScopeId = new ArkFocusScopeId(); 4445 if (isString(id)) { 4446 arkFocusScopeId.id = id; 4447 } 4448 if (typeof isGroup === 'boolean') { 4449 arkFocusScopeId.isGroup = isGroup; 4450 } 4451 if (typeof arrowStepOut === 'boolean') { 4452 arkFocusScopeId.arrowStepOut = arrowStepOut; 4453 } 4454 modifierWithKey(this._modifiersWithKeys, FocusScopeIdModifier.identity, FocusScopeIdModifier, arkFocusScopeId); 4455 return this; 4456 } 4457 focusScopePriority(scopeId, priority) { 4458 let arkFocusScopePriority = new ArkFocusScopePriority(); 4459 if (isString(scopeId)) { 4460 arkFocusScopePriority.scopeId = scopeId; 4461 } 4462 if (typeof priority === 'number') { 4463 arkFocusScopePriority.priority = priority; 4464 } 4465 modifierWithKey( 4466 this._modifiersWithKeys, FocusScopePriorityModifier.identity, FocusScopePriorityModifier, arkFocusScopePriority); 4467 return this; 4468 } 4469 pixelRound(value) { 4470 modifierWithKey(this._modifiersWithKeys, PixelRoundModifier.identity, PixelRoundModifier, value); 4471 return this; 4472 } 4473 focusBox(value) { 4474 modifierWithKey(this._modifiersWithKeys, FocusBoxModifier.identity, FocusBoxModifier, value); 4475 return this; 4476 } 4477} 4478const isNull = (val) => typeof val === 'object' && val === null; 4479const isArray = (val) => Array.isArray(val); 4480const isDate = (val) => val instanceof Date; 4481const isRegExp = (val) => val instanceof RegExp; 4482const isError = (val) => val instanceof Error; 4483const isFloat = (val) => Number.isFinite(val) && !Number.isInteger(val); 4484const isInteger = (val) => Number.isInteger(val); 4485const isNonEmptyMap = (val) => val instanceof Map && val.size > 0; 4486const isTruthyString = (val) => typeof val === 'string' && val.trim() !== ''; 4487 4488var CommonGestureType; 4489(function (CommonGestureType) { 4490 CommonGestureType[CommonGestureType['TAP_GESTURE'] = 0] = 'TAP_GESTURE'; 4491 CommonGestureType[CommonGestureType['LONG_PRESS_GESTURE'] = 1] = 'LONG_PRESS_GESTURE'; 4492 CommonGestureType[CommonGestureType['PAN_GESTURE'] = 2] = 'PAN_GESTURE'; 4493 CommonGestureType[CommonGestureType['SWIPE_GESTURE'] = 3] = 'SWIPE_GESTURE'; 4494 CommonGestureType[CommonGestureType['PINCH_GESTURE'] = 4] = 'PINCH_GESTURE'; 4495 CommonGestureType[CommonGestureType['ROTATION_GESTURE'] = 5] = 'ROTATION_GESTURE'; 4496 CommonGestureType[CommonGestureType['GESTURE_GROUP'] = 6] = 'GESTURE_GROUP'; 4497})(CommonGestureType || (CommonGestureType = {})); 4498 4499class GestureHandler { 4500 constructor(gestureType) { 4501 this.gestureType = gestureType; 4502 } 4503} 4504 4505class TapGestureHandler extends GestureHandler { 4506 constructor(options) { 4507 super(CommonGestureType.TAP_GESTURE); 4508 if (options !== undefined) { 4509 this.fingers = options.fingers; 4510 this.count = options.count; 4511 this.limitFingerCount = options.isFingerCountLimited; 4512 } 4513 } 4514 onAction(event) { 4515 this.onActionCallback = event; 4516 return this; 4517 } 4518 tag(tag) { 4519 this.gestureTag = tag; 4520 return this; 4521 } 4522 allowedTypes(types) { 4523 this.allowedTypes = types; 4524 return this; 4525 } 4526} 4527 4528class LongPressGestureHandler extends GestureHandler { 4529 constructor(options) { 4530 super(CommonGestureType.LONG_PRESS_GESTURE); 4531 if (options !== undefined) { 4532 this.fingers = options.fingers; 4533 this.repeat = options.repeat; 4534 this.duration = options.duration; 4535 this.limitFingerCount = options.isFingerCountLimited; 4536 } 4537 } 4538 4539 onAction(event) { 4540 this.onActionCallback = event; 4541 return this; 4542 } 4543 4544 onActionEnd(event) { 4545 this.onActionEndCallback = event; 4546 return this; 4547 } 4548 4549 onActionCancel(event) { 4550 this.onActionCancelCallback = event; 4551 return this; 4552 } 4553 4554 tag(tag) { 4555 this.gestureTag = tag; 4556 return this; 4557 } 4558 4559 allowedTypes(types) { 4560 this.allowedTypes = types; 4561 return this; 4562 } 4563} 4564 4565class PanGestureHandler extends GestureHandler { 4566 constructor(options) { 4567 super(CommonGestureType.PAN_GESTURE); 4568 if (options !== undefined) { 4569 this.fingers = options.fingers; 4570 this.direction = options.direction; 4571 this.distance = options.distance; 4572 this.limitFingerCount = options.isFingerCountLimited; 4573 } 4574 } 4575 4576 onActionStart(event) { 4577 this.onActionStartCallback = event; 4578 return this; 4579 } 4580 4581 onActionUpdate(event) { 4582 this.onActionUpdateCallback = event; 4583 return this; 4584 } 4585 4586 onActionEnd(event) { 4587 this.onActionEndCallback = event; 4588 return this; 4589 } 4590 4591 onActionCancel(event) { 4592 this.onActionCancelCallback = event; 4593 return this; 4594 } 4595 4596 tag(tag) { 4597 this.gestureTag = tag; 4598 return this; 4599 } 4600 4601 allowedTypes(types) { 4602 this.allowedTypes = types; 4603 return this; 4604 } 4605} 4606 4607class SwipeGestureHandler extends GestureHandler { 4608 constructor(options) { 4609 super(CommonGestureType.SWIPE_GESTURE); 4610 if (options !== undefined) { 4611 this.fingers = options.fingers; 4612 this.direction = options.direction; 4613 this.speed = options.speed; 4614 this.limitFingerCount = options.isFingerCountLimited; 4615 } 4616 } 4617 4618 onAction(event) { 4619 this.onActionCallback = event; 4620 return this; 4621 } 4622 4623 tag(tag) { 4624 this.gestureTag = tag; 4625 return this; 4626 } 4627 4628 allowedTypes(types) { 4629 this.allowedTypes = types; 4630 return this; 4631 } 4632} 4633 4634class PinchGestureHandler extends GestureHandler { 4635 constructor(options) { 4636 super(CommonGestureType.PINCH_GESTURE); 4637 if (options !== undefined) { 4638 this.fingers = options.fingers; 4639 this.distance = options.distance; 4640 this.limitFingerCount = options.isFingerCountLimited; 4641 } 4642 } 4643 4644 onActionStart(event) { 4645 this.onActionStartCallback = event; 4646 return this; 4647 } 4648 4649 onActionUpdate(event) { 4650 this.onActionUpdateCallback = event; 4651 return this; 4652 } 4653 4654 onActionEnd(event) { 4655 this.onActionEndCallback = event; 4656 return this; 4657 } 4658 4659 onActionCancel(event) { 4660 this.onActionCancelCallback = event; 4661 return this; 4662 } 4663 4664 tag(tag) { 4665 this.gestureTag = tag; 4666 return this; 4667 } 4668 4669 allowedTypes(types) { 4670 this.allowedTypes = types; 4671 return this; 4672 } 4673} 4674 4675class RotationGestureHandler extends GestureHandler { 4676 constructor(options) { 4677 super(CommonGestureType.ROTATION_GESTURE); 4678 if (options !== undefined) { 4679 this.fingers = options.fingers; 4680 this.angle = options.angle; 4681 this.limitFingerCount = options.isFingerCountLimited; 4682 } 4683 } 4684 4685 onActionStart(event) { 4686 this.onActionStartCallback = event; 4687 return this; 4688 } 4689 4690 onActionUpdate(event) { 4691 this.onActionUpdateCallback = event; 4692 return this; 4693 } 4694 4695 onActionEnd(event) { 4696 this.onActionEndCallback = event; 4697 return this; 4698 } 4699 4700 onActionCancel(event) { 4701 this.onActionCancelCallback = event; 4702 return this; 4703 } 4704 4705 tag(tag) { 4706 this.gestureTag = tag; 4707 return this; 4708 } 4709 4710 allowedTypes(types) { 4711 this.allowedTypes = types; 4712 return this; 4713 } 4714} 4715 4716class GestureGroupHandler extends GestureHandler { 4717 constructor(options) { 4718 super(CommonGestureType.GESTURE_GROUP); 4719 if (options !== undefined) { 4720 this.mode = options.mode; 4721 this.gestures = options.gestures; 4722 } 4723 } 4724 4725 onCancel(event) { 4726 this.onCancelCallback = event; 4727 return this; 4728 } 4729 4730 tag(tag) { 4731 this.gestureTag = tag; 4732 return this; 4733 } 4734} 4735 4736class UICommonEvent { 4737 setInstanceId(instanceId) { 4738 this._instanceId = instanceId; 4739 } 4740 setNodePtr(nodePtr) { 4741 this._nodePtr = nodePtr; 4742 } 4743 // the first param is used to indicate frameNode 4744 // the second param is used to indicate the callback 4745 // the third param is used to indicate the instanceid 4746 // other options will be indicated after them 4747 setOnClick(callback) { 4748 this._clickEvent = callback; 4749 getUINativeModule().frameNode.setOnClick(this._nodePtr, callback, this._instanceId); 4750 } 4751 setOnTouch(callback) { 4752 this._touchEvent = callback; 4753 getUINativeModule().frameNode.setOnTouch(this._nodePtr, callback, this._instanceId); 4754 } 4755 setOnAppear(callback) { 4756 this._onAppearEvent = callback; 4757 getUINativeModule().frameNode.setOnAppear(this._nodePtr, callback, this._instanceId); 4758 } 4759 setOnDisappear(callback) { 4760 this._onDisappearEvent = callback; 4761 getUINativeModule().frameNode.setOnDisappear(this._nodePtr, callback, this._instanceId); 4762 } 4763 setOnAttach(callback) { 4764 this._onAttachEvent = callback; 4765 getUINativeModule().frameNode.setOnAttach(this._nodePtr, callback, this._instanceId); 4766 } 4767 setOnDetach(callback) { 4768 this._onDetachEvent = callback; 4769 getUINativeModule().frameNode.setOnDetach(this._nodePtr, callback, this._instanceId); 4770 } 4771 setOnKeyEvent(callback) { 4772 this._onKeyEvent = callback; 4773 getUINativeModule().frameNode.setOnKeyEvent(this._nodePtr, callback, this._instanceId); 4774 } 4775 setOnFocus(callback) { 4776 this._onFocusEvent = callback; 4777 getUINativeModule().frameNode.setOnFocus(this._nodePtr, callback, this._instanceId); 4778 } 4779 setOnBlur(callback) { 4780 this._onBlur = callback; 4781 getUINativeModule().frameNode.setOnBlur(this._nodePtr, callback, this._instanceId); 4782 } 4783 setOnHover(callback) { 4784 this._onHoverEvent = callback; 4785 getUINativeModule().frameNode.setOnHover(this._nodePtr, callback, this._instanceId); 4786 } 4787 setOnMouse(callback) { 4788 this._onMouseEvent = callback; 4789 getUINativeModule().frameNode.setOnMouse(this._nodePtr, callback, this._instanceId); 4790 } 4791 setOnSizeChange(callback) { 4792 this._onSizeChangeEvent = callback; 4793 getUINativeModule().frameNode.setOnSizeChange(this._nodePtr, callback, this._instanceId); 4794 } 4795 setOnVisibleAreaApproximateChange(options, callback) { 4796 this._onVisibleAreaApproximateChange = callback; 4797 getUINativeModule().frameNode.setOnVisibleAreaApproximateChange(this._nodePtr, callback, this._instanceId, options.ratios, options.expectedUpdateInterval ? options.expectedUpdateInterval : 1000); 4798 } 4799} 4800 4801function attributeModifierFunc(modifier, componentBuilder, modifierBuilder) { 4802 if (modifier === undefined || modifier === null) { 4803 ArkLogConsole.info('custom modifier is undefined'); 4804 return; 4805 } 4806 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 4807 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 4808 let component = this.createOrGetNode(elmtId, () => { 4809 return componentBuilder(nativeNode); 4810 }); 4811 if (modifier.isAttributeUpdater === true) { 4812 let modifierJS = globalThis.requireNapi('arkui.modifier'); 4813 if (modifier.modifierState === modifierJS.AttributeUpdater.StateEnum.INIT) { 4814 ArkLogConsole.info('AttributeUpdater is created for the first time in ' + (component ? 4815 component.constructor.name.toString() : 'undefined')); 4816 modifier.modifierState = modifierJS.AttributeUpdater.StateEnum.UPDATE; 4817 modifier.attribute = modifierBuilder(nativeNode, ModifierType.STATE, modifierJS); 4818 modifierJS.ModifierUtils.applySetOnChange(modifier.attribute); 4819 modifier.initializeModifier(modifier.attribute); 4820 applyUIAttributesInit(modifier, nativeNode, component); 4821 component.applyModifierPatch(); 4822 } else { 4823 modifier.attribute.applyStateUpdatePtr(component); 4824 if (modifier.attribute._nativePtrChanged) { 4825 modifier.onComponentChanged(modifier.attribute); 4826 } 4827 modifier.attribute.applyNormalAttribute(component); 4828 applyUIAttributes(modifier, nativeNode, component); 4829 component.applyModifierPatch(); 4830 } 4831 } else { 4832 applyUIAttributes(modifier, nativeNode, component); 4833 component.applyModifierPatch(); 4834 } 4835} 4836 4837function attributeModifierFuncWithoutStateStyles(modifier, componentBuilder, modifierBuilder) { 4838 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 4839 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 4840 let component = this.createOrGetNode(elmtId, () => { 4841 return componentBuilder(nativeNode); 4842 }); 4843 if (modifier.isAttributeUpdater === true) { 4844 let modifierJS = globalThis.requireNapi('arkui.modifier'); 4845 if (modifier.modifierState === modifierJS.AttributeUpdater.StateEnum.INIT) { 4846 modifier.modifierState = modifierJS.AttributeUpdater.StateEnum.UPDATE; 4847 modifier.attribute = modifierBuilder(nativeNode, ModifierType.STATE, modifierJS); 4848 modifierJS.ModifierUtils.applySetOnChange(modifier.attribute); 4849 modifier.initializeModifier(modifier.attribute); 4850 component.applyModifierPatch(); 4851 } else { 4852 modifier.attribute.applyStateUpdatePtr(component); 4853 modifier.attribute.applyNormalAttribute(component); 4854 if (modifier.applyNormalAttribute) { 4855 modifier.applyNormalAttribute(component); 4856 } 4857 component.applyModifierPatch(); 4858 } 4859 } else { 4860 if (modifier.applyNormalAttribute) { 4861 modifier.applyNormalAttribute(component); 4862 } 4863 component.applyModifierPatch(); 4864 } 4865} 4866 4867class UIGestureEvent { 4868 setNodePtr(nodePtr) { 4869 this._nodePtr = nodePtr; 4870 } 4871 setWeakNodePtr(weakNodePtr) { 4872 this._weakNodePtr = weakNodePtr; 4873 } 4874 registerFrameNodeDeletedCallback(nodePtr) { 4875 this._destructorCallback = (elementId) => { 4876 globalThis.__mapOfModifier__.delete(elementId); 4877 }; 4878 getUINativeModule().common.registerFrameNodeDestructorCallback(nodePtr, this._destructorCallback); 4879 } 4880 addGesture(gesture, priority, mask) { 4881 if (this._weakNodePtr.invalid()) { 4882 return; 4883 } 4884 if (this._gestures === undefined) { 4885 this._gestures = [gesture]; 4886 } else { 4887 this._gestures.push(gesture); 4888 } 4889 switch (gesture.gestureType) { 4890 case CommonGestureType.TAP_GESTURE: { 4891 let tapGesture = gesture; 4892 getUINativeModule().common.addTapGesture(this._nodePtr, priority, mask, tapGesture.gestureTag, 4893 tapGesture.allowedTypes, tapGesture.fingers, tapGesture.count, tapGesture.limitFingerCount, 4894 tapGesture.onActionCallback); 4895 break; 4896 } 4897 case CommonGestureType.LONG_PRESS_GESTURE: { 4898 let longPressGesture = gesture; 4899 getUINativeModule().common.addLongPressGesture(this._nodePtr, priority, mask, longPressGesture.gestureTag, 4900 longPressGesture.allowedTypes, longPressGesture.fingers, longPressGesture.repeat, longPressGesture.duration, 4901 longPressGesture.limitFingerCount, longPressGesture.onActionCallback, 4902 longPressGesture.onActionEndCallback, longPressGesture.onActionCancelCallback); 4903 break; 4904 } 4905 case CommonGestureType.PAN_GESTURE: { 4906 let panGesture = gesture; 4907 getUINativeModule().common.addPanGesture(this._nodePtr, priority, mask, panGesture.gestureTag, 4908 panGesture.allowedTypes, panGesture.fingers, panGesture.direction, panGesture.distance, 4909 panGesture.limitFingerCount, panGesture.onActionStartCallback, 4910 panGesture.onActionUpdateCallback, panGesture.onActionEndCallback, panGesture.onActionCancelCallback); 4911 break; 4912 } 4913 case CommonGestureType.SWIPE_GESTURE: { 4914 let swipeGesture = gesture; 4915 getUINativeModule().common.addSwipeGesture(this._nodePtr, priority, mask, swipeGesture.gestureTag, 4916 swipeGesture.allowedTypes, swipeGesture.fingers, swipeGesture.direction, swipeGesture.speed, 4917 swipeGesture.limitFingerCount, swipeGesture.onActionCallback); 4918 break; 4919 } 4920 case CommonGestureType.PINCH_GESTURE: { 4921 let pinchGesture = gesture; 4922 getUINativeModule().common.addPinchGesture(this._nodePtr, priority, mask, pinchGesture.gestureTag, 4923 pinchGesture.allowedTypes, pinchGesture.fingers, pinchGesture.distance, 4924 pinchGesture.limitFingerCount, pinchGesture.onActionStartCallback, 4925 pinchGesture.onActionUpdateCallback, pinchGesture.onActionEndCallback, pinchGesture.onActionCancelCallback); 4926 break; 4927 } 4928 case CommonGestureType.ROTATION_GESTURE: { 4929 let rotationGesture = gesture; 4930 getUINativeModule().common.addRotationGesture(this._nodePtr, priority, mask, rotationGesture.gestureTag, 4931 rotationGesture.allowedTypes, rotationGesture.fingers, rotationGesture.angle, 4932 rotationGesture.limitFingerCount, rotationGesture.onActionStartCallback, 4933 rotationGesture.onActionUpdateCallback, rotationGesture.onActionEndCallback, 4934 rotationGesture.onActionCancelCallback); 4935 break; 4936 } 4937 case CommonGestureType.GESTURE_GROUP: { 4938 let gestureGroup = gesture; 4939 let groupPtr = getUINativeModule().common.addGestureGroup(this._nodePtr, 4940 gestureGroup.gestureTag, gestureGroup.onCancelCallback, gestureGroup.mode); 4941 gestureGroup.gestures.forEach((item) => { 4942 addGestureToGroup(this._nodePtr, item, groupPtr); 4943 }); 4944 getUINativeModule().common.attachGestureGroup(this._nodePtr, priority, mask, groupPtr); 4945 break; 4946 } 4947 default: 4948 break; 4949 } 4950 } 4951 addParallelGesture(gesture, mask) { 4952 this.addGesture(gesture, GesturePriority.PARALLEL, mask); 4953 } 4954 removeGestureByTag(tag) { 4955 if (this._weakNodePtr.invalid()) { 4956 return; 4957 } 4958 getUINativeModule().common.removeGestureByTag(this._nodePtr, tag); 4959 for (let index = this._gestures.length - 1; index >= 0; index--) { 4960 if (this._gestures[index].gestureTag === tag) { 4961 this._gestures.splice(index, 1); 4962 continue; 4963 } 4964 if (this._gestures[index].gestureType === CommonGestureType.GESTURE_GROUP) { 4965 let gestureGroup = this._gestures[index]; 4966 removeGestureByTagInGroup(gestureGroup, tag); 4967 } 4968 } 4969 } 4970 clearGestures() { 4971 if (this._weakNodePtr.invalid()) { 4972 return; 4973 } 4974 getUINativeModule().common.clearGestures(this._nodePtr); 4975 this._gestures = []; 4976 } 4977} 4978 4979function removeGestureByTagInGroup(gestureGroup, tag) { 4980 for (let index = gestureGroup.gestures.length - 1; index >= 0; index--) { 4981 if (gestureGroup.gestures[index].gestureTag === tag) { 4982 gestureGroup.gestures.splice(index, 1); 4983 continue; 4984 } 4985 if (gestureGroup.gestures[index].gestureType === CommonGestureType.GESTURE_GROUP) { 4986 removeGestureByTagInGroup(gestureGroup.gestures[index], tag); 4987 } 4988 } 4989} 4990 4991function addGestureToGroup(nodePtr, gesture, gestureGroupPtr) { 4992 switch (gesture.gestureType) { 4993 case CommonGestureType.TAP_GESTURE: { 4994 let tapGesture = gesture; 4995 getUINativeModule().common.addTapGestureToGroup(nodePtr, tapGesture.gestureTag, tapGesture.allowedTypes, 4996 tapGesture.fingers, tapGesture.count, tapGesture.limitFingerCount, tapGesture.onActionCallback, 4997 gestureGroupPtr); 4998 break; 4999 } 5000 case CommonGestureType.LONG_PRESS_GESTURE: { 5001 let longPressGesture = gesture; 5002 getUINativeModule().common.addLongPressGestureToGroup(nodePtr, longPressGesture.gestureTag, longPressGesture.allowedTypes, 5003 longPressGesture.fingers, longPressGesture.repeat, longPressGesture.duration, longPressGesture.limitFingerCount, 5004 longPressGesture.onActionCallback, longPressGesture.onActionEndCallback, longPressGesture.onActionCancelCallback, gestureGroupPtr); 5005 break; 5006 } 5007 case CommonGestureType.PAN_GESTURE: { 5008 let panGesture = gesture; 5009 getUINativeModule().common.addPanGestureToGroup(nodePtr, panGesture.gestureTag, panGesture.allowedTypes, 5010 panGesture.fingers, panGesture.direction, panGesture.distance, 5011 panGesture.limitFingerCount, panGesture.onActionStartCallback, 5012 panGesture.onActionUpdateCallback, panGesture.onActionEndCallback, panGesture.onActionCancelCallback, gestureGroupPtr); 5013 break; 5014 } 5015 case CommonGestureType.SWIPE_GESTURE: { 5016 let swipeGesture = gesture; 5017 getUINativeModule().common.addSwipeGestureToGroup(nodePtr, swipeGesture.gestureTag, swipeGesture.allowedTypes, 5018 swipeGesture.fingers, swipeGesture.direction, swipeGesture.speed, swipeGesture.limitFingerCount, 5019 swipeGesture.onActionCallback, gestureGroupPtr); 5020 break; 5021 } 5022 case CommonGestureType.PINCH_GESTURE: { 5023 let pinchGesture = gesture; 5024 getUINativeModule().common.addPinchGestureToGroup(nodePtr, pinchGesture.gestureTag, pinchGesture.allowedTypes, 5025 pinchGesture.fingers, pinchGesture.distance, pinchGesture.limitFingerCount, pinchGesture.onActionStartCallback, 5026 pinchGesture.onActionUpdateCallback, pinchGesture.onActionEndCallback, pinchGesture.onActionCancelCallback, gestureGroupPtr); 5027 break; 5028 } 5029 case CommonGestureType.ROTATION_GESTURE: { 5030 let rotationGesture = gesture; 5031 getUINativeModule().common.addRotationGestureToGroup(nodePtr, rotationGesture.gestureTag, rotationGesture.allowedTypes, 5032 rotationGesture.fingers, rotationGesture.angle, rotationGesture.limitFingerCount, 5033 rotationGesture.onActionStartCallback, rotationGesture.onActionUpdateCallback, 5034 rotationGesture.onActionEndCallback, rotationGesture.onActionCancelCallback, gestureGroupPtr); 5035 break; 5036 } 5037 case CommonGestureType.GESTURE_GROUP: { 5038 let gestureGroup = gesture; 5039 let groupPtr = getUINativeModule().common.addGestureGroupToGroup(nodePtr, 5040 gestureGroup.gestureTag, gestureGroup.onCancelCallback, gestureGroup.mode, gestureGroupPtr); 5041 gestureGroup.gestures.forEach((item) => { 5042 addGestureToGroup(nodePtr, item, groupPtr); 5043 }); 5044 break; 5045 } 5046 default: 5047 break; 5048 } 5049} 5050 5051function applyGesture(modifier, component) { 5052 if (modifier.applyGesture !== undefined) { 5053 let gestureEvent = component.getOrCreateGestureEvent(); 5054 gestureEvent.clearGestures(); 5055 modifier.applyGesture(gestureEvent); 5056 } 5057} 5058 5059globalThis.__mapOfModifier__ = new Map(); 5060function __gestureModifier__(modifier) { 5061 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 5062 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 5063 if (globalThis.__mapOfModifier__.get(elmtId)) { 5064 let component = globalThis.__mapOfModifier__.get(elmtId); 5065 applyGesture(modifier, component); 5066 } else { 5067 let component = new ArkComponent(nativeNode); 5068 globalThis.__mapOfModifier__.set(elmtId, component); 5069 applyGesture(modifier, component); 5070 } 5071} 5072 5073const __elementIdToCustomProperties__ = new Map(); 5074 5075function __setValidCustomProperty__(nodeId, key, value) { 5076 if (!__elementIdToCustomProperties__.has(nodeId)) { 5077 __elementIdToCustomProperties__.set(nodeId, new Map()); 5078 } 5079 5080 const customProperties = __elementIdToCustomProperties__.get(nodeId); 5081 5082 if (customProperties) { 5083 customProperties.set(key, value); 5084 } 5085} 5086 5087function __removeCustomProperty__(nodeId, key) { 5088 if (__elementIdToCustomProperties__.has(nodeId)) { 5089 const customProperties = __elementIdToCustomProperties__.get(nodeId); 5090 5091 if (customProperties) { 5092 customProperties.delete(key); 5093 return customProperties.size > 0; 5094 } 5095 } 5096 5097 return false; 5098} 5099 5100function __removeCustomProperties__(nodeId) { 5101 __elementIdToCustomProperties__.delete(nodeId); 5102} 5103 5104function __getCustomProperty__(nodeId, key) { 5105 if (__elementIdToCustomProperties__.has(nodeId)) { 5106 const customProperties = __elementIdToCustomProperties__.get(nodeId); 5107 5108 if (customProperties) { 5109 return customProperties.get(key); 5110 } 5111 } 5112 5113 return undefined; 5114} 5115 5116function __getCustomPropertyString__(nodeId, key) { 5117 if (__elementIdToCustomProperties__.has(nodeId)) { 5118 const customProperties = __elementIdToCustomProperties__.get(nodeId); 5119 5120 if (customProperties) { 5121 return JSON.stringify(customProperties.get(key)); 5122 } 5123 } 5124 5125 return undefined; 5126} 5127 5128function __setCustomProperty__(nodeId, key, value) { 5129 if (value !== undefined) { 5130 __setValidCustomProperty__(nodeId, key, value); 5131 return true; 5132 } else { 5133 return __removeCustomProperty__(nodeId, key); 5134 } 5135} 5136 5137function valueToArkBorder(value) { 5138 let borderValue = new ArkBorder(); 5139 if (isUndefined(value)) { 5140 borderValue = undefined; 5141 } 5142 5143 if (!isUndefined(value?.width) && value?.width !== null) { 5144 if (isNumber(value.width) || isString(value.width) || isResource(value.width)) { 5145 borderValue.arkWidth.left = value.width; 5146 borderValue.arkWidth.right = value.width; 5147 borderValue.arkWidth.top = value.width; 5148 borderValue.arkWidth.bottom = value.width; 5149 } else { 5150 borderValue.arkWidth.start = value.width.start; 5151 borderValue.arkWidth.end = value.width.end; 5152 borderValue.arkWidth.left = value.width.left; 5153 borderValue.arkWidth.right = value.width.right; 5154 borderValue.arkWidth.top = value.width.top; 5155 borderValue.arkWidth.bottom = value.width.bottom; 5156 } 5157 } 5158 if (!isUndefined(value?.color) && value?.color !== null) { 5159 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 5160 borderValue.arkColor.leftColor = value.color; 5161 borderValue.arkColor.rightColor = value.color; 5162 borderValue.arkColor.topColor = value.color; 5163 borderValue.arkColor.bottomColor = value.color; 5164 } else { 5165 borderValue.arkColor.start = (value.color).start; 5166 borderValue.arkColor.end = (value.color).end; 5167 borderValue.arkColor.leftColor = (value.color).left; 5168 borderValue.arkColor.rightColor = (value.color).right; 5169 borderValue.arkColor.topColor = (value.color).top; 5170 borderValue.arkColor.bottomColor = (value.color).bottom; 5171 } 5172 } 5173 if (!isUndefined(value?.radius) && value?.radius !== null) { 5174 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 5175 borderValue.arkRadius.topLeft = value.radius; 5176 borderValue.arkRadius.topRight = value.radius; 5177 borderValue.arkRadius.bottomLeft = value.radius; 5178 borderValue.arkRadius.bottomRight = value.radius; 5179 } else { 5180 borderValue.arkRadius.topStart = value.radius?.topStart; 5181 borderValue.arkRadius.topEnd = value.radius?.topEnd; 5182 borderValue.arkRadius.bottomStart = value.radius?.bottomStart; 5183 borderValue.arkRadius.bottomEnd = value.radius?.bottomEnd; 5184 borderValue.arkRadius.topLeft = value.radius?.topLeft; 5185 borderValue.arkRadius.topRight = value.radius?.topRight; 5186 borderValue.arkRadius.bottomLeft = value.radius?.bottomLeft; 5187 borderValue.arkRadius.bottomRight = value.radius?.bottomRight; 5188 } 5189 } 5190 if (!isUndefined(value?.style) && value?.style !== null) { 5191 let arkBorderStyle = new ArkBorderStyle(); 5192 if (arkBorderStyle.parseBorderStyle(value.style)) { 5193 if (!isUndefined(arkBorderStyle.style)) { 5194 borderValue.arkStyle.top = arkBorderStyle.style; 5195 borderValue.arkStyle.left = arkBorderStyle.style; 5196 borderValue.arkStyle.bottom = arkBorderStyle.style; 5197 borderValue.arkStyle.right = arkBorderStyle.style; 5198 } else { 5199 borderValue.arkStyle.top = arkBorderStyle.top; 5200 borderValue.arkStyle.left = arkBorderStyle.left; 5201 borderValue.arkStyle.bottom = arkBorderStyle.bottom; 5202 borderValue.arkStyle.right = arkBorderStyle.right; 5203 } 5204 } 5205 } 5206 return borderValue; 5207} 5208 5209/// <reference path='./import.ts' /> 5210class BlankColorModifier extends ModifierWithKey { 5211 constructor(value) { 5212 super(value); 5213 } 5214 applyPeer(node, reset) { 5215 if (reset) { 5216 getUINativeModule().blank.resetColor(node); 5217 } 5218 else { 5219 getUINativeModule().blank.setColor(node, this.value); 5220 } 5221 } 5222 checkObjectDiff() { 5223 return !isBaseOrResourceEqual(this.stageValue, this.value); 5224 } 5225} 5226BlankColorModifier.identity = Symbol('blankColor'); 5227class BlankHeightModifier extends ModifierWithKey { 5228 constructor(value) { 5229 super(value); 5230 } 5231 applyPeer(node, reset) { 5232 if (reset) { 5233 getUINativeModule().blank.resetBlankHeight(node); 5234 } else { 5235 getUINativeModule().blank.setBlankHeight(node, this.value); 5236 } 5237 } 5238 checkObjectDiff() { 5239 return !isBaseOrResourceEqual(this.stageValue, this.value); 5240 } 5241} 5242BlankHeightModifier.identity = Symbol('blankHeight'); 5243 5244class BlankMinModifier extends ModifierWithKey { 5245 constructor(value) { 5246 super(value); 5247 } 5248 applyPeer(node, reset) { 5249 if (reset) { 5250 getUINativeModule().blank.resetBlankMin(node); 5251 } else { 5252 getUINativeModule().blank.setBlankMin(node, this.value); 5253 } 5254 } 5255 checkObjectDiff() { 5256 return !isBaseOrResourceEqual(this.stageValue, this.value); 5257 } 5258} 5259BlankMinModifier.identity = Symbol('blankMin'); 5260 5261class ArkBlankComponent extends ArkComponent { 5262 constructor(nativePtr, classType) { 5263 super(nativePtr, classType); 5264 } 5265 color(value) { 5266 modifierWithKey(this._modifiersWithKeys, BlankColorModifier.identity, BlankColorModifier, value); 5267 return this; 5268 } 5269 height(value) { 5270 modifierWithKey(this._modifiersWithKeys, BlankHeightModifier.identity, BlankHeightModifier, value); 5271 return this; 5272 } 5273 5274 initialize(value) { 5275 if (value[0] !== undefined) { 5276 modifierWithKey(this._modifiersWithKeys, BlankMinModifier.identity, BlankMinModifier, value[0]); 5277 } 5278 return this; 5279 } 5280 allowChildCount() { 5281 return 0; 5282 } 5283} 5284// @ts-ignore 5285if (globalThis.Blank !== undefined) { 5286 globalThis.Blank.attributeModifier = function (modifier) { 5287 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5288 return new ArkBlankComponent(nativePtr); 5289 }, (nativePtr, classType, modifierJS) => { 5290 return new modifierJS.BlankModifier(nativePtr, classType); 5291 }); 5292 }; 5293} 5294 5295globalThis.applySymbolGlyphModifierToNode = function (modifier, nodePtr) { 5296 let component = new ArkSymbolGlyphComponent(nodePtr); 5297 applyUIAttributes(modifier, nodePtr, component); 5298 component.applyModifierPatch(); 5299}; 5300 5301globalThis.applyImageModifierToNode = function (modifier, nodePtr) { 5302 let component = new ArkImageComponent(nodePtr); 5303 applyUIAttributes(modifier, nodePtr, component); 5304 component.applyModifierPatch(); 5305}; 5306 5307globalThis.applyTextModifierToNode = function (modifier, nodePtr) { 5308 let component = new ArkTextComponent(nodePtr); 5309 applyUIAttributes(modifier, nodePtr, component); 5310 component.applyModifierPatch(); 5311}; 5312 5313globalThis.applyCommonModifierToNode = function (modifier, nodePtr) { 5314 let component = new ArkComponent(nodePtr); 5315 applyUIAttributes(modifier, nodePtr, component); 5316 component.applyModifierPatch(); 5317}; 5318 5319/// <reference path='./import.ts' /> 5320class ColumnAlignItemsModifier extends ModifierWithKey { 5321 constructor(value) { 5322 super(value); 5323 } 5324 applyPeer(node, reset) { 5325 if (reset) { 5326 getUINativeModule().column.resetAlignItems(node); 5327 } 5328 else { 5329 getUINativeModule().column.setAlignItems(node, this.value); 5330 } 5331 } 5332 checkObjectDiff() { 5333 return this.stageValue !== this.value; 5334 } 5335} 5336ColumnAlignItemsModifier.identity = Symbol('columnAlignItems'); 5337class ColumnJustifyContentModifier extends ModifierWithKey { 5338 constructor(value) { 5339 super(value); 5340 } 5341 applyPeer(node, reset) { 5342 if (reset) { 5343 getUINativeModule().column.resetJustifyContent(node); 5344 } 5345 else { 5346 getUINativeModule().column.setJustifyContent(node, this.value); 5347 } 5348 } 5349 checkObjectDiff() { 5350 return this.stageValue !== this.value; 5351 } 5352} 5353ColumnJustifyContentModifier.identity = Symbol('columnJustifyContent'); 5354 5355class ColumnSpaceModifier extends ModifierWithKey { 5356 constructor(value) { 5357 super(value); 5358 } 5359 applyPeer(node, reset) { 5360 if (reset) { 5361 getUINativeModule().column.resetSpace(node); 5362 } 5363 else { 5364 getUINativeModule().column.setSpace(node, this.value); 5365 } 5366 } 5367 checkObjectDiff() { 5368 return this.stageValue !== this.value; 5369 } 5370} 5371ColumnSpaceModifier.identity = Symbol('columnSpace'); 5372 5373class ColumnPointLightModifier extends ModifierWithKey { 5374 constructor(value) { 5375 super(value); 5376 } 5377 applyPeer(node, reset) { 5378 if (reset) { 5379 getUINativeModule().common.resetPointLightStyle(node); 5380 } else { 5381 let positionX; 5382 let positionY; 5383 let positionZ; 5384 let intensity; 5385 let color; 5386 let illuminated; 5387 let bloom; 5388 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 5389 positionX = this.value.lightSource.positionX; 5390 positionY = this.value.lightSource.positionY; 5391 positionZ = this.value.lightSource.positionZ; 5392 intensity = this.value.lightSource.intensity; 5393 color = this.value.lightSource.color; 5394 } 5395 illuminated = this.value.illuminated; 5396 bloom = this.value.bloom; 5397 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 5398 illuminated, bloom); 5399 } 5400 } 5401 checkObjectDiff() { 5402 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 5403 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 5404 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 5405 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 5406 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 5407 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 5408 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 5409 } 5410} 5411ColumnPointLightModifier.identity = Symbol('columnPointLight'); 5412 5413class ColumnReverseModifier extends ModifierWithKey { 5414 constructor(value) { 5415 super(value); 5416 } 5417 applyPeer(node, reset) { 5418 if (reset) { 5419 getUINativeModule().column.resetReverse(node); 5420 } else { 5421 getUINativeModule().column.setReverse(node, this.value); 5422 } 5423 } 5424 checkObjectDiff() { 5425 return this.stageValue !== this.value; 5426 } 5427} 5428ColumnReverseModifier.identity = Symbol('columnReverse'); 5429 5430class ArkColumnComponent extends ArkComponent { 5431 constructor(nativePtr, classType) { 5432 super(nativePtr, classType); 5433 } 5434 initialize(value) { 5435 if (value[0] !== undefined) { 5436 modifierWithKey(this._modifiersWithKeys, ColumnSpaceModifier.identity, ColumnSpaceModifier, value[0].space); 5437 } 5438 return this 5439 } 5440 alignItems(value) { 5441 modifierWithKey(this._modifiersWithKeys, ColumnAlignItemsModifier.identity, ColumnAlignItemsModifier, value); 5442 return this; 5443 } 5444 justifyContent(value) { 5445 modifierWithKey(this._modifiersWithKeys, ColumnJustifyContentModifier.identity, ColumnJustifyContentModifier, value); 5446 return this; 5447 } 5448 pointLight(value) { 5449 modifierWithKey(this._modifiersWithKeys, ColumnPointLightModifier.identity, ColumnPointLightModifier, value); 5450 return this; 5451 } 5452 reverse(value) { 5453 modifierWithKey(this._modifiersWithKeys, ColumnReverseModifier.identity, ColumnReverseModifier, value); 5454 return this; 5455 } 5456} 5457// @ts-ignore 5458if (globalThis.Column !== undefined) { 5459 globalThis.Column.attributeModifier = function (modifier) { 5460 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5461 return new ArkColumnComponent(nativePtr); 5462 }, (nativePtr, classType, modifierJS) => { 5463 return new modifierJS.ColumnModifier(nativePtr, classType); 5464 }); 5465 }; 5466} 5467 5468/// <reference path='./import.ts' /> 5469class ColumnSplitDividerModifier extends ModifierWithKey { 5470 constructor(value) { 5471 super(value); 5472 } 5473 applyPeer(node, reset) { 5474 if (reset) { 5475 getUINativeModule().columnSplit.resetDivider(node); 5476 } 5477 else { 5478 getUINativeModule().columnSplit.setDivider(node, this.value.startMargin, this.value.endMargin); 5479 } 5480 } 5481 checkObjectDiff() { 5482 return !isBaseOrResourceEqual(this.stageValue.startMargin, this.value.startMargin) || 5483 !isBaseOrResourceEqual(this.stageValue.endMargin, this.value.endMargin); 5484 } 5485} 5486ColumnSplitDividerModifier.identity = Symbol('columnSplitDivider'); 5487class ColumnSplitResizeableModifier extends ModifierWithKey { 5488 constructor(value) { 5489 super(value); 5490 } 5491 applyPeer(node, reset) { 5492 if (reset) { 5493 getUINativeModule().columnSplit.resetResizeable(node); 5494 } 5495 else { 5496 getUINativeModule().columnSplit.setResizeable(node, this.value); 5497 } 5498 } 5499 checkObjectDiff() { 5500 return this.stageValue !== this.value; 5501 } 5502} 5503ColumnSplitResizeableModifier.identity = Symbol('columnSplitResizeable'); 5504class ColumnSplitClipModifier extends ModifierWithKey { 5505 constructor(value) { 5506 super(value); 5507 } 5508 applyPeer(node, reset) { 5509 if (reset) { 5510 getUINativeModule().common.resetClipWithEdge(node); 5511 } 5512 else { 5513 getUINativeModule().common.setClipWithEdge(node, this.value); 5514 } 5515 } 5516 checkObjectDiff() { 5517 return true; 5518 } 5519} 5520ColumnSplitClipModifier.identity = Symbol('columnSplitClip'); 5521class ArkColumnSplitComponent extends ArkComponent { 5522 constructor(nativePtr, classType) { 5523 super(nativePtr, classType); 5524 } 5525 resizeable(value) { 5526 modifierWithKey(this._modifiersWithKeys, ColumnSplitResizeableModifier.identity, ColumnSplitResizeableModifier, value); 5527 return this; 5528 } 5529 divider(value) { 5530 modifierWithKey(this._modifiersWithKeys, ColumnSplitDividerModifier.identity, ColumnSplitDividerModifier, value); 5531 return this; 5532 } 5533 clip(value) { 5534 modifierWithKey(this._modifiersWithKeys, ColumnSplitClipModifier.identity, ColumnSplitClipModifier, value); 5535 return this; 5536 } 5537} 5538// @ts-ignore 5539if (globalThis.ColumnSplit !== undefined) { 5540 globalThis.ColumnSplit.attributeModifier = function (modifier) { 5541 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5542 return new ArkColumnSplitComponent(nativePtr); 5543 }, (nativePtr, classType, modifierJS) => { 5544 return new modifierJS.ColumnSplitModifier(nativePtr, classType); 5545 }); 5546 }; 5547} 5548 5549/// <reference path='./import.ts' /> 5550class DividerVerticalModifier extends ModifierWithKey { 5551 constructor(value) { 5552 super(value); 5553 } 5554 applyPeer(node, reset) { 5555 if (reset) { 5556 getUINativeModule().divider.resetVertical(node); 5557 } 5558 else { 5559 getUINativeModule().divider.setVertical(node, this.value); 5560 } 5561 } 5562 checkObjectDiff() { 5563 return this.stageValue !== this.value; 5564 } 5565} 5566DividerVerticalModifier.identity = Symbol('dividerVertical'); 5567class DividerLineCapModifier extends ModifierWithKey { 5568 constructor(value) { 5569 super(value); 5570 } 5571 applyPeer(node, reset) { 5572 if (reset) { 5573 getUINativeModule().divider.resetLineCap(node); 5574 } 5575 else { 5576 getUINativeModule().divider.setLineCap(node, this.value); 5577 } 5578 } 5579 checkObjectDiff() { 5580 return this.stageValue !== this.value; 5581 } 5582} 5583DividerLineCapModifier.identity = Symbol('dividerLineCap'); 5584class DividerColorModifier extends ModifierWithKey { 5585 constructor(value) { 5586 super(value); 5587 } 5588 applyPeer(node, reset) { 5589 if (reset) { 5590 getUINativeModule().divider.resetColor(node); 5591 } 5592 else { 5593 getUINativeModule().divider.setColor(node, this.value); 5594 } 5595 } 5596 checkObjectDiff() { 5597 return !isBaseOrResourceEqual(this.stageValue, this.value); 5598 } 5599} 5600DividerColorModifier.identity = Symbol('dividerColor'); 5601class DividerStrokeWidthModifier extends ModifierWithKey { 5602 constructor(value) { 5603 super(value); 5604 } 5605 applyPeer(node, reset) { 5606 if (reset) { 5607 getUINativeModule().divider.resetStrokeWidth(node); 5608 } 5609 else { 5610 getUINativeModule().divider.setStrokeWidth(node, this.value); 5611 } 5612 } 5613 checkObjectDiff() { 5614 return this.stageValue !== this.value; 5615 } 5616} 5617DividerStrokeWidthModifier.identity = Symbol('dividerStrokeWidth'); 5618class ArkDividerComponent extends ArkComponent { 5619 constructor(nativePtr, classType) { 5620 super(nativePtr, classType); 5621 } 5622 initialize(value) { 5623 return this; 5624 } 5625 allowChildCount() { 5626 return 0; 5627 } 5628 vertical(value) { 5629 modifierWithKey(this._modifiersWithKeys, DividerVerticalModifier.identity, DividerVerticalModifier, value); 5630 return this; 5631 } 5632 color(value) { 5633 modifierWithKey(this._modifiersWithKeys, DividerColorModifier.identity, DividerColorModifier, value); 5634 return this; 5635 } 5636 strokeWidth(value) { 5637 modifierWithKey(this._modifiersWithKeys, DividerStrokeWidthModifier.identity, DividerStrokeWidthModifier, value); 5638 return this; 5639 } 5640 lineCap(value) { 5641 modifierWithKey(this._modifiersWithKeys, DividerLineCapModifier.identity, DividerLineCapModifier, value); 5642 return this; 5643 } 5644} 5645// @ts-ignore 5646if (globalThis.Divider !== undefined) { 5647 globalThis.Divider.attributeModifier = function (modifier) { 5648 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5649 return new ArkDividerComponent(nativePtr); 5650 }, (nativePtr, classType, modifierJS) => { 5651 return new modifierJS.DividerModifier(nativePtr, classType); 5652 }); 5653 }; 5654} 5655 5656/// <reference path='./import.ts' /> 5657class FlexInitializeModifier extends ModifierWithKey { 5658 constructor(value) { 5659 super(value); 5660 } 5661 applyPeer(node, reset) { 5662 if (reset) { 5663 getUINativeModule().flex.resetFlexInitialize(node); 5664 } else { 5665 getUINativeModule().flex.setFlexInitialize(node, this.value.direction, this.value.wrap, 5666 this.value.justifyContent, this.value.alignItems, this.value.alignContent, this.value?.space?.main, 5667 this.value?.space?.cross); 5668 } 5669 } 5670} 5671FlexInitializeModifier.identity = Symbol('flexInitialize'); 5672class FlexPointLightModifier extends ModifierWithKey { 5673 constructor(value) { 5674 super(value); 5675 } 5676 applyPeer(node, reset) { 5677 if (reset) { 5678 getUINativeModule().common.resetPointLightStyle(node); 5679 } else { 5680 let positionX; 5681 let positionY; 5682 let positionZ; 5683 let intensity; 5684 let color; 5685 let illuminated; 5686 let bloom; 5687 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 5688 positionX = this.value.lightSource.positionX; 5689 positionY = this.value.lightSource.positionY; 5690 positionZ = this.value.lightSource.positionZ; 5691 intensity = this.value.lightSource.intensity; 5692 color = this.value.lightSource.color; 5693 } 5694 illuminated = this.value.illuminated; 5695 bloom = this.value.bloom; 5696 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 5697 illuminated, bloom); 5698 } 5699 } 5700 checkObjectDiff() { 5701 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 5702 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 5703 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 5704 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 5705 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 5706 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 5707 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 5708 } 5709} 5710FlexPointLightModifier.identity = Symbol('flexPointLight'); 5711class ArkFlexComponent extends ArkComponent { 5712 constructor(nativePtr, classType) { 5713 super(nativePtr, classType); 5714 } 5715 pointLight(value) { 5716 modifierWithKey(this._modifiersWithKeys, FlexPointLightModifier.identity, FlexPointLightModifier, value); 5717 return this; 5718 } 5719 initialize(value) { 5720 if (value[0] !== undefined) { 5721 modifierWithKey(this._modifiersWithKeys, FlexInitializeModifier.identity, FlexInitializeModifier, value[0]); 5722 } 5723 return this; 5724 } 5725} 5726// @ts-ignore 5727if (globalThis.Flex !== undefined) { 5728 globalThis.Flex.attributeModifier = function (modifier) { 5729 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5730 return new ArkFlexComponent(nativePtr); 5731 }, (nativePtr, classType, modifierJS) => { 5732 return new modifierJS.FlexModifier(nativePtr, classType); 5733 }); 5734 }; 5735} 5736 5737/// <reference path='./import.ts' /> 5738class GridRowAlignItemsModifier extends ModifierWithKey { 5739 constructor(value) { 5740 super(value); 5741 } 5742 applyPeer(node, reset) { 5743 if (reset) { 5744 getUINativeModule().gridRow.resetAlignItems(node); 5745 } 5746 else { 5747 getUINativeModule().gridRow.setAlignItems(node, this.value); 5748 } 5749 } 5750 checkObjectDiff() { 5751 return !isBaseOrResourceEqual(this.stageValue, this.value); 5752 } 5753} 5754GridRowAlignItemsModifier.identity = Symbol('gridRowAlignItems'); 5755class GridRowOnBreakpointChangeModifier extends ModifierWithKey { 5756 constructor(value) { 5757 super(value); 5758 } 5759 applyPeer(node, reset) { 5760 if (reset) { 5761 getUINativeModule().gridRow.resetOnBreakpointChange(node); 5762 } else { 5763 getUINativeModule().gridRow.setOnBreakpointChange(node, this.value); 5764 } 5765 } 5766} 5767GridRowOnBreakpointChangeModifier.identity = Symbol('gridRowOnBreakpointChange'); 5768class SetDirectionModifier extends ModifierWithKey { 5769 constructor(value) { 5770 super(value); 5771 } 5772 applyPeer(node, reset) { 5773 if (reset) { 5774 getUINativeModule().gridRow.resetDirection(node); 5775 } 5776 else { 5777 getUINativeModule().gridRow.setDirection(node, this.value); 5778 } 5779 } 5780} 5781SetDirectionModifier.identity = Symbol('gridRowDirection'); 5782class SetBreakpointsModifier extends ModifierWithKey { 5783 constructor(value) { 5784 super(value); 5785 } 5786 applyPeer(node, reset) { 5787 if (reset) { 5788 getUINativeModule().gridRow.resetBreakpoints(node); 5789 } 5790 else { 5791 getUINativeModule().gridRow.setBreakpoints(node, this.value.value, this.value.reference); 5792 } 5793 } 5794} 5795SetBreakpointsModifier.identity = Symbol('gridRowBreakpoints'); 5796class SetColumnsModifier extends ModifierWithKey { 5797 constructor(value) { 5798 super(value); 5799 } 5800 applyPeer(node, reset) { 5801 if (reset) { 5802 getUINativeModule().gridRow.resetColumns(node); 5803 } 5804 else { 5805 if (isUndefined(this.value) || isNull(this.value)) { 5806 getUINativeModule().gridRow.resetColumns(node); 5807 } else if (isNumber(this.value)) { 5808 getUINativeModule().gridRow.setColumns(node, this.value, this.value, this.value, 5809 this.value, this.value, this.value); 5810 } else { 5811 getUINativeModule().gridRow.setColumns(node, this.value.xs, this.value.sm, this.value.md, 5812 this.value.lg, this.value.xl, this.value.xxl); 5813 } 5814 } 5815 } 5816} 5817SetColumnsModifier.identity = Symbol('gridRowColumns'); 5818class SetGutterModifier extends ModifierWithKey { 5819 constructor(value) { 5820 super(value); 5821 } 5822 applyPeer(node, reset) { 5823 if (reset) { 5824 getUINativeModule().gridRow.resetGutter(node); 5825 } 5826 else { 5827 if (isUndefined(this.value) || isNull(this.value)) { 5828 getUINativeModule().gridRow.resetGutter(node); 5829 } 5830 if (isNumber(this.value)) { 5831 getUINativeModule().gridRow.setGutter(node, this.value, 5832 this.value, this.value, this.value, this.value, this.value, 5833 this.value, this.value, this.value, this.value, this.value, this.value); 5834 } else { 5835 if (isNumber(this.value.x)) { 5836 if (isNumber(this.value.y)) { 5837 getUINativeModule().gridRow.setGutter(node, 5838 this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, 5839 this.value.y, this.value.y, this.value.y, this.value.y, this.value.y, this.value.y); 5840 } else { 5841 getUINativeModule().gridRow.setGutter(node, 5842 this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, 5843 this.value.y?.xs, this.value.y?.sm, this.value.y?.md, this.value.y?.lg, this.value.y?.xl, this.value.y?.xxl); 5844 } 5845 } else { 5846 if (isNumber(this.value.y)) { 5847 getUINativeModule().gridRow.setGutter(node, 5848 this.value.x?.xs, this.value.x?.sm, this.value.x?.md, this.value.x?.lg, this.value.x?.xl, this.value.x?.xxl, 5849 this.value.y, this.value.y, this.value.y, this.value.y, this.value.y, this.value.y); 5850 } else { 5851 getUINativeModule().gridRow.setGutter(node, 5852 this.value.x?.xs, this.value.x?.sm, this.value.x?.md, this.value.x?.lg, this.value.x?.xl, this.value.x?.xxl, 5853 this.value.y?.xs, this.value.y?.sm, this.value.y?.md, this.value.y?.lg, this.value.y?.xl, this.value.y?.xxl); 5854 } 5855 } 5856 } 5857 } 5858 } 5859} 5860SetGutterModifier.identity = Symbol('gridRowGutter'); 5861class ArkGridRowComponent extends ArkComponent { 5862 constructor(nativePtr, classType) { 5863 super(nativePtr, classType); 5864 } 5865 allowChildTypes() { 5866 return ["GridCol"]; 5867 } 5868 onBreakpointChange(callback) { 5869 modifierWithKey(this._modifiersWithKeys, GridRowOnBreakpointChangeModifier.identity, GridRowOnBreakpointChangeModifier, callback); 5870 return this; 5871 } 5872 alignItems(value) { 5873 modifierWithKey(this._modifiersWithKeys, GridRowAlignItemsModifier.identity, GridRowAlignItemsModifier, value); 5874 return this; 5875 } 5876 setDirection(value) { 5877 modifierWithKey(this._modifiersWithKeys, SetDirectionModifier.identity, SetDirectionModifier, value); 5878 return this; 5879 } 5880 setBreakpoints(value) { 5881 modifierWithKey(this._modifiersWithKeys, SetBreakpointsModifier.identity, SetBreakpointsModifier, value); 5882 return this; 5883 } 5884 setColumns(value) { 5885 modifierWithKey(this._modifiersWithKeys, SetColumnsModifier.identity, SetColumnsModifier, value); 5886 return this; 5887 } 5888 setGutter(value) { 5889 modifierWithKey(this._modifiersWithKeys, SetGutterModifier.identity, SetGutterModifier, value); 5890 return this; 5891 } 5892 initialize(value) { 5893 if (value[0] !== undefined) { 5894 this.setGutter(value[0].gutter); 5895 this.setColumns(value[0].columns); 5896 this.setBreakpoints(value[0].breakpoints); 5897 this.setDirection(value[0].direction); 5898 } else { 5899 this.setGutter(null); 5900 this.setColumns(null); 5901 this.setBreakpoints(null); 5902 this.setDirection(null); 5903 } 5904 return this; 5905 } 5906} 5907// @ts-ignore 5908if (globalThis.GridRow !== undefined) { 5909 globalThis.GridRow.attributeModifier = function (modifier) { 5910 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5911 return new ArkGridRowComponent(nativePtr); 5912 }, (nativePtr, classType, modifierJS) => { 5913 return new modifierJS.GridRowModifier(nativePtr, classType); 5914 }); 5915 }; 5916} 5917 5918class ClipContentModifier extends ModifierWithKey { 5919 constructor(value) { 5920 super(value); 5921 } 5922 applyPeer(node, reset) { 5923 if (reset) { 5924 getUINativeModule().scrollable.resetContentClip(node); 5925 } else { 5926 getUINativeModule().scrollable.setContentClip(node, this.value); 5927 } 5928 } 5929} 5930ClipContentModifier.identity = Symbol('clipContent'); 5931 5932class OnReachStartModifier extends ModifierWithKey { 5933 constructor(value) { 5934 super(value); 5935 } 5936 applyPeer(node, reset) { 5937 if (reset) { 5938 getUINativeModule().scrollable.resetOnReachStart(node); 5939 } else { 5940 getUINativeModule().scrollable.setOnReachStart(node, this.value); 5941 } 5942 } 5943} 5944OnReachStartModifier.identity = Symbol('onReachStart'); 5945 5946class OnReachEndModifier extends ModifierWithKey { 5947 constructor(value) { 5948 super(value); 5949 } 5950 applyPeer(node, reset) { 5951 if (reset) { 5952 getUINativeModule().scrollable.resetOnReachEnd(node); 5953 } else { 5954 getUINativeModule().scrollable.setOnReachEnd(node, this.value); 5955 } 5956 } 5957} 5958OnReachStartModifier.identity = Symbol('onReachEnd'); 5959 5960class BackToTopModifier extends ModifierWithKey { 5961 constructor(value) { 5962 super(value); 5963 } 5964 applyPeer(node, reset) { 5965 if (reset) { 5966 getUINativeModule().scrollable.resetBackToTop(node); 5967 } 5968 else { 5969 getUINativeModule().scrollable.setBackToTop(node, this.value); 5970 } 5971 } 5972} 5973BackToTopModifier.identity = Symbol('backToTop'); 5974 5975class ArkScrollable extends ArkComponent { 5976 constructor(nativePtr, classType) { 5977 super(nativePtr, classType); 5978 } 5979 clipContent(clip) { 5980 modifierWithKey(this._modifiersWithKeys, ClipContentModifier.identity, ClipContentModifier, clip); 5981 return this; 5982 } 5983 onReachStart(event) { 5984 modifierWithKey(this._modifiersWithKeys, OnReachStartModifier.identity, OnReachStartModifier, event); 5985 return this; 5986 } 5987 5988 onReachEnd(event) { 5989 modifierWithKey(this._modifiersWithKeys, OnReachEndModifier.identity, OnReachEndModifier, event); 5990 return this; 5991 } 5992 5993 backToTop(value) { 5994 modifierWithKey(this._modifiersWithKeys, BackToTopModifier.identity, BackToTopModifier, value); 5995 return this; 5996 } 5997} 5998 5999/// <reference path='./import.ts' /> 6000class ArkGridComponent extends ArkScrollable { 6001 constructor(nativePtr, classType) { 6002 super(nativePtr, classType); 6003 } 6004 allowChildTypes() { 6005 return ['GridItem']; 6006 } 6007 initialize(value) { 6008 if (value.length === 1 && isObject(value[0])) { 6009 modifierWithKey(this._modifiersWithKeys, GridScrollerModifier.identity, GridScrollerModifier, value[0]); 6010 modifierWithKey(this._modifiersWithKeys, GridLayoutOptionsModifier.identity, GridLayoutOptionsModifier, undefined); 6011 } 6012 else if (value.length === 2 && isObject(value[0]) && isObject(value[1])) { 6013 modifierWithKey(this._modifiersWithKeys, GridScrollerModifier.identity, GridScrollerModifier, value[0]); 6014 modifierWithKey(this._modifiersWithKeys, GridLayoutOptionsModifier.identity, GridLayoutOptionsModifier, value[1]); 6015 } 6016 else { 6017 modifierWithKey(this._modifiersWithKeys, GridScrollerModifier.identity, GridScrollerModifier, undefined); 6018 modifierWithKey(this._modifiersWithKeys, GridLayoutOptionsModifier.identity, GridLayoutOptionsModifier, undefined); 6019 } 6020 return this; 6021 } 6022 columnsTemplate(value) { 6023 modifierWithKey(this._modifiersWithKeys, GridColumnsTemplateModifier.identity, GridColumnsTemplateModifier, value); 6024 return this; 6025 } 6026 rowsTemplate(value) { 6027 modifierWithKey(this._modifiersWithKeys, GridRowsTemplateModifier.identity, GridRowsTemplateModifier, value); 6028 return this; 6029 } 6030 columnsGap(value) { 6031 modifierWithKey(this._modifiersWithKeys, GridColumnsGapModifier.identity, GridColumnsGapModifier, value); 6032 return this; 6033 } 6034 rowsGap(value) { 6035 modifierWithKey(this._modifiersWithKeys, GridRowsGapModifier.identity, GridRowsGapModifier, value); 6036 return this; 6037 } 6038 scrollBarWidth(value) { 6039 modifierWithKey(this._modifiersWithKeys, GridScrollBarWidthModifier.identity, GridScrollBarWidthModifier, value); 6040 return this; 6041 } 6042 scrollBarColor(value) { 6043 modifierWithKey(this._modifiersWithKeys, GridScrollBarColorModifier.identity, GridScrollBarColorModifier, value); 6044 return this; 6045 } 6046 scrollBar(value) { 6047 modifierWithKey(this._modifiersWithKeys, GridScrollBarModifier.identity, GridScrollBarModifier, value); 6048 return this; 6049 } 6050 onScrollBarUpdate(event) { 6051 throw new Error('Method not implemented.'); 6052 } 6053 onScrollIndex(event) { 6054 throw new Error('Method not implemented.'); 6055 } 6056 cachedCount(count, show) { 6057 let opt = new ArkScrollableCacheOptions(count, show ? show : false); 6058 modifierWithKey(this._modifiersWithKeys, GridCachedCountModifier.identity, GridCachedCountModifier, opt); 6059 return this; 6060 } 6061 editMode(value) { 6062 modifierWithKey(this._modifiersWithKeys, GridEditModeModifier.identity, GridEditModeModifier, value); 6063 return this; 6064 } 6065 multiSelectable(value) { 6066 modifierWithKey(this._modifiersWithKeys, GridMultiSelectableModifier.identity, GridMultiSelectableModifier, value); 6067 return this; 6068 } 6069 maxCount(value) { 6070 modifierWithKey(this._modifiersWithKeys, GridMaxCountModifier.identity, GridMaxCountModifier, value); 6071 return this; 6072 } 6073 minCount(value) { 6074 modifierWithKey(this._modifiersWithKeys, GridMinCountModifier.identity, GridMinCountModifier, value); 6075 return this; 6076 } 6077 cellLength(value) { 6078 modifierWithKey(this._modifiersWithKeys, GridCellLengthModifier.identity, GridCellLengthModifier, value); 6079 return this; 6080 } 6081 layoutDirection(value) { 6082 modifierWithKey(this._modifiersWithKeys, GridLayoutDirectionModifier.identity, GridLayoutDirectionModifier, value); 6083 return this; 6084 } 6085 supportAnimation(value) { 6086 modifierWithKey(this._modifiersWithKeys, GridSupportAnimationModifier.identity, GridSupportAnimationModifier, value); 6087 return this; 6088 } 6089 onItemDragStart(event) { 6090 throw new Error('Method not implemented.'); 6091 } 6092 onItemDragEnter(event) { 6093 throw new Error('Method not implemented.'); 6094 } 6095 onItemDragMove(event) { 6096 throw new Error('Method not implemented.'); 6097 } 6098 onItemDragLeave(event) { 6099 throw new Error('Method not implemented.'); 6100 } 6101 onItemDrop(event) { 6102 throw new Error('Method not implemented.'); 6103 } 6104 edgeEffect(value, options) { 6105 let effect = new ArkGridEdgeEffect(); 6106 effect.value = value; 6107 effect.options = options; 6108 modifierWithKey(this._modifiersWithKeys, GridEdgeEffectModifier.identity, GridEdgeEffectModifier, effect); 6109 return this; 6110 } 6111 fadingEdge(value, options) { 6112 let fadingEdge = new ArkFadingEdge(); 6113 fadingEdge.value = value; 6114 fadingEdge.options = options; 6115 modifierWithKey(this._modifiersWithKeys, GridFadingEdgeModifier.identity, GridFadingEdgeModifier, fadingEdge); 6116 return this; 6117 } 6118 nestedScroll(value) { 6119 modifierWithKey(this._modifiersWithKeys, GridNestedScrollModifier.identity, GridNestedScrollModifier, value); 6120 return this; 6121 } 6122 enableScrollInteraction(value) { 6123 modifierWithKey(this._modifiersWithKeys, GridEnableScrollModifier.identity, GridEnableScrollModifier, value); 6124 return this; 6125 } 6126 friction(value) { 6127 modifierWithKey(this._modifiersWithKeys, GridFrictionModifier.identity, GridFrictionModifier, value); 6128 return this; 6129 } 6130 onScroll(event) { 6131 throw new Error('Method not implemented.'); 6132 } 6133 onReachStart(event) { 6134 throw new Error('Method not implemented.'); 6135 } 6136 onReachEnd(event) { 6137 throw new Error('Method not implemented.'); 6138 } 6139 onScrollStart(event) { 6140 throw new Error('Method not implemented.'); 6141 } 6142 onScrollStop(event) { 6143 throw new Error('Method not implemented.'); 6144 } 6145 onScrollFrameBegin(event) { 6146 throw new Error('Method not implemented.'); 6147 } 6148 clip(value) { 6149 modifierWithKey(this._modifiersWithKeys, GridClipModifier.identity, GridClipModifier, value); 6150 return this; 6151 } 6152 flingSpeedLimit(value) { 6153 modifierWithKey(this._modifiersWithKeys, GridFlingSpeedLimitModifier.identity, GridFlingSpeedLimitModifier, value); 6154 return this; 6155 } 6156 alignItems(value) { 6157 modifierWithKey(this._modifiersWithKeys, GridAlignItemsModifier.identity, GridAlignItemsModifier, value); 6158 return this; 6159 } 6160} 6161class GridScrollerModifier extends ModifierWithKey { 6162 constructor(value) { 6163 super(value); 6164 } 6165 applyPeer(node, reset) { 6166 if (reset) { 6167 getUINativeModule().grid.setGridScroller(node, undefined); 6168 } 6169 else { 6170 getUINativeModule().grid.setGridScroller(node, this.value); 6171 } 6172 } 6173 checkObjectDiff() { 6174 return !isBaseOrResourceEqual(this.stageValue, this.value); 6175 } 6176} 6177GridScrollerModifier.identity = Symbol('gridScroller'); 6178class GridLayoutOptionsModifier extends ModifierWithKey { 6179 constructor(value) { 6180 super(value); 6181 } 6182 applyPeer(node, reset) { 6183 let _a, _b, _c, _d; 6184 if (reset) { 6185 getUINativeModule().grid.setGridLayoutOptions(node, undefined, undefined, undefined, undefined, undefined); 6186 } 6187 else { 6188 getUINativeModule().grid.setGridLayoutOptions(node, isArray(this.value.regularSize) ? this.value.regularSize : undefined, 6189 isArray((_a = this.value) === null || _a === void 0 ? void 0 : _a.irregularIndexes) ? this.value.irregularIndexes : undefined, 6190 isArray((_b = this.value) === null || _b === void 0 ? void 0 : _b.irregularIndexes) ? this.value.irregularIndexes.length : undefined, 6191 isFunction((_c = this.value) === null || _c === void 0 ? void 0 : _c.onGetIrregularSizeByIndex) ? this.value.onGetIrregularSizeByIndex : undefined, 6192 isFunction((_d = this.value) === null || _d === void 0 ? void 0 : _d.onGetRectByIndex) ? this.value.onGetRectByIndex : undefined); 6193 } 6194 } 6195 checkObjectDiff() { 6196 let _a, _b, _c, _d, _e, _f, _g, _h; 6197 return !isBaseOrResourceEqual((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.regularSize, 6198 (_b = this.value) === null || _b === void 0 ? void 0 : _b.regularSize) || 6199 !isBaseOrResourceEqual((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.irregularIndexes, 6200 (_d = this.value) === null || _d === void 0 ? void 0 : _d.irregularIndexes) || 6201 !isBaseOrResourceEqual((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.onGetIrregularSizeByIndex, 6202 (_f = this.value) === null || _f === void 0 ? void 0 : _f.onGetIrregularSizeByIndex) || 6203 !isBaseOrResourceEqual((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.onGetRectByIndex, 6204 (_h = this.value) === null || _h === void 0 ? void 0 : _h.onGetRectByIndex); 6205 } 6206} 6207GridLayoutOptionsModifier.identity = Symbol('gridLayoutOptions'); 6208class GridColumnsTemplateModifier extends ModifierWithKey { 6209 constructor(value) { 6210 super(value); 6211 } 6212 applyPeer(node, reset) { 6213 if (reset) { 6214 getUINativeModule().grid.resetColumnsTemplate(node); 6215 } 6216 else { 6217 getUINativeModule().grid.setColumnsTemplate(node, this.value); 6218 } 6219 } 6220} 6221GridColumnsTemplateModifier.identity = Symbol('gridColumnsTemplate'); 6222class GridRowsTemplateModifier extends ModifierWithKey { 6223 constructor(value) { 6224 super(value); 6225 } 6226 applyPeer(node, reset) { 6227 if (reset) { 6228 getUINativeModule().grid.resetRowsTemplate(node); 6229 } 6230 else { 6231 getUINativeModule().grid.setRowsTemplate(node, this.value); 6232 } 6233 } 6234} 6235GridRowsTemplateModifier.identity = Symbol('gridRowsTemplate'); 6236class GridColumnsGapModifier extends ModifierWithKey { 6237 constructor(value) { 6238 super(value); 6239 } 6240 applyPeer(node, reset) { 6241 if (reset) { 6242 getUINativeModule().grid.resetColumnsGap(node); 6243 } 6244 else { 6245 getUINativeModule().grid.setColumnsGap(node, this.value); 6246 } 6247 } 6248 checkObjectDiff() { 6249 return !isBaseOrResourceEqual(this.stageValue, this.value); 6250 } 6251} 6252GridColumnsGapModifier.identity = Symbol('gridColumnsGap'); 6253class GridRowsGapModifier extends ModifierWithKey { 6254 constructor(value) { 6255 super(value); 6256 } 6257 applyPeer(node, reset) { 6258 if (reset) { 6259 getUINativeModule().grid.resetRowsGap(node); 6260 } 6261 else { 6262 getUINativeModule().grid.setRowsGap(node, this.value); 6263 } 6264 } 6265 checkObjectDiff() { 6266 return !isBaseOrResourceEqual(this.stageValue, this.value); 6267 } 6268} 6269GridRowsGapModifier.identity = Symbol('gridRowsGap'); 6270class GridScrollBarWidthModifier extends ModifierWithKey { 6271 constructor(value) { 6272 super(value); 6273 } 6274 applyPeer(node, reset) { 6275 if (reset) { 6276 getUINativeModule().grid.resetScrollBarWidth(node); 6277 } 6278 else { 6279 getUINativeModule().grid.setScrollBarWidth(node, this.value); 6280 } 6281 } 6282} 6283GridScrollBarWidthModifier.identity = Symbol('gridScrollBarWidth'); 6284class GridScrollBarModifier extends ModifierWithKey { 6285 constructor(value) { 6286 super(value); 6287 } 6288 applyPeer(node, reset) { 6289 if (reset) { 6290 getUINativeModule().grid.resetScrollBar(node); 6291 } 6292 else { 6293 getUINativeModule().grid.setScrollBar(node, this.value); 6294 } 6295 } 6296} 6297GridScrollBarModifier.identity = Symbol('gridScrollBar'); 6298class GridScrollBarColorModifier extends ModifierWithKey { 6299 constructor(value) { 6300 super(value); 6301 } 6302 applyPeer(node, reset) { 6303 if (reset) { 6304 getUINativeModule().grid.resetScrollBarColor(node); 6305 } 6306 else { 6307 getUINativeModule().grid.setScrollBarColor(node, this.value); 6308 } 6309 } 6310} 6311GridScrollBarColorModifier.identity = Symbol('gridScrollBarColor'); 6312class GridEditModeModifier extends ModifierWithKey { 6313 constructor(value) { 6314 super(value); 6315 } 6316 applyPeer(node, reset) { 6317 if (reset) { 6318 getUINativeModule().grid.resetEditMode(node); 6319 } 6320 else { 6321 getUINativeModule().grid.setEditMode(node, this.value); 6322 } 6323 } 6324} 6325GridEditModeModifier.identity = Symbol('gridEditMode'); 6326class GridCachedCountModifier extends ModifierWithKey { 6327 constructor(value) { 6328 super(value); 6329 } 6330 applyPeer(node, reset) { 6331 if (reset) { 6332 getUINativeModule().grid.resetCachedCount(node); 6333 } 6334 else { 6335 getUINativeModule().grid.setCachedCount(node, this.value.count, this.value.show); 6336 } 6337 } 6338} 6339GridCachedCountModifier.identity = Symbol('gridCachedCount'); 6340class GridMultiSelectableModifier extends ModifierWithKey { 6341 constructor(value) { 6342 super(value); 6343 } 6344 applyPeer(node, reset) { 6345 if (reset) { 6346 getUINativeModule().grid.resetMultiSelectable(node); 6347 } 6348 else { 6349 getUINativeModule().grid.setMultiSelectable(node, this.value); 6350 } 6351 } 6352} 6353GridMultiSelectableModifier.identity = Symbol('gridMultiSelectable'); 6354class GridEdgeEffectModifier extends ModifierWithKey { 6355 constructor(value) { 6356 super(value); 6357 } 6358 applyPeer(node, reset) { 6359 let _a, _b; 6360 if (reset) { 6361 getUINativeModule().grid.resetEdgeEffect(node); 6362 } 6363 else { 6364 getUINativeModule().grid.setEdgeEffect(node, (_a = this.value) === null || 6365 _a === void 0 ? void 0 : _a.value, (_b = this.value.options) === null || 6366 _b === void 0 ? void 0 : _b.alwaysEnabled); 6367 } 6368 } 6369 checkObjectDiff() { 6370 return !((this.stageValue.value === this.value.value) && 6371 (this.stageValue.options === this.value.options)); 6372 } 6373} 6374GridEdgeEffectModifier.identity = Symbol('gridEdgeEffect'); 6375class GridFadingEdgeModifier extends ModifierWithKey { 6376 constructor(value) { 6377 super(value); 6378 } 6379 applyPeer(node, reset) { 6380 if (reset) { 6381 getUINativeModule().grid.resetFadingEdge(node); 6382 } 6383 else { 6384 getUINativeModule().grid.setFadingEdge(node, this.value.value, this.value.options?.fadingEdgeLength); 6385 } 6386 } 6387 checkObjectDiff() { 6388 return !((this.stageValue.value === this.value.value) && 6389 (this.stageValue.options === this.value.options)); 6390 } 6391} 6392GridFadingEdgeModifier.identity = Symbol('gridFadingEdge'); 6393class GridNestedScrollModifier extends ModifierWithKey { 6394 constructor(value) { 6395 super(value); 6396 } 6397 applyPeer(node, reset) { 6398 let _a, _b; 6399 if (reset) { 6400 getUINativeModule().grid.resetNestedScroll(node); 6401 } 6402 else { 6403 getUINativeModule().grid.setNestedScroll(node, (_a = this.value) === null || 6404 _a === void 0 ? void 0 : _a.scrollForward, (_b = this.value) === null || 6405 _b === void 0 ? void 0 : _b.scrollBackward); 6406 } 6407 } 6408 checkObjectDiff() { 6409 return !((this.stageValue.scrollForward === this.value.scrollForward) && 6410 (this.stageValue.scrollBackward === this.value.scrollBackward)); 6411 } 6412} 6413GridNestedScrollModifier.identity = Symbol('gridNestedScroll'); 6414class GridEnableScrollModifier extends ModifierWithKey { 6415 constructor(value) { 6416 super(value); 6417 } 6418 applyPeer(node, reset) { 6419 if (reset) { 6420 getUINativeModule().grid.resetEnableScroll(node); 6421 } 6422 else { 6423 getUINativeModule().grid.setEnableScroll(node, this.value); 6424 } 6425 } 6426} 6427GridEnableScrollModifier.identity = Symbol('gridEnableScroll'); 6428class GridFrictionModifier extends ModifierWithKey { 6429 constructor(value) { 6430 super(value); 6431 } 6432 applyPeer(node, reset) { 6433 if (reset) { 6434 getUINativeModule().grid.resetFriction(node); 6435 } 6436 else { 6437 getUINativeModule().grid.setFriction(node, this.value); 6438 } 6439 } 6440 checkObjectDiff() { 6441 return !isBaseOrResourceEqual(this.stageValue, this.value); 6442 } 6443} 6444GridFrictionModifier.identity = Symbol('gridFriction'); 6445class GridMaxCountModifier extends ModifierWithKey { 6446 constructor(value) { 6447 super(value); 6448 } 6449 applyPeer(node, reset) { 6450 if (reset) { 6451 getUINativeModule().grid.resetMaxCount(node); 6452 } 6453 else { 6454 getUINativeModule().grid.setMaxCount(node, this.value); 6455 } 6456 } 6457} 6458GridMaxCountModifier.identity = Symbol('gridMaxCount'); 6459class GridMinCountModifier extends ModifierWithKey { 6460 constructor(value) { 6461 super(value); 6462 } 6463 applyPeer(node, reset) { 6464 if (reset) { 6465 getUINativeModule().grid.resetMinCount(node); 6466 } 6467 else { 6468 getUINativeModule().grid.setMinCount(node, this.value); 6469 } 6470 } 6471} 6472GridMinCountModifier.identity = Symbol('gridMinCount'); 6473class GridCellLengthModifier extends ModifierWithKey { 6474 constructor(value) { 6475 super(value); 6476 } 6477 applyPeer(node, reset) { 6478 if (reset) { 6479 getUINativeModule().grid.resetCellLength(node); 6480 } 6481 else { 6482 getUINativeModule().grid.setCellLength(node, this.value); 6483 } 6484 } 6485} 6486GridCellLengthModifier.identity = Symbol('gridCellLength'); 6487class GridLayoutDirectionModifier extends ModifierWithKey { 6488 constructor(value) { 6489 super(value); 6490 } 6491 applyPeer(node, reset) { 6492 if (reset) { 6493 getUINativeModule().grid.resetLayoutDirection(node); 6494 } 6495 else { 6496 getUINativeModule().grid.setLayoutDirection(node, this.value); 6497 } 6498 } 6499} 6500GridLayoutDirectionModifier.identity = Symbol('gridLayoutDirection'); 6501class GridSupportAnimationModifier extends ModifierWithKey { 6502 constructor(value) { 6503 super(value); 6504 } 6505 applyPeer(node, reset) { 6506 if (reset) { 6507 getUINativeModule().grid.resetSupportAnimation(node); 6508 } 6509 else { 6510 getUINativeModule().grid.setSupportAnimation(node, this.value); 6511 } 6512 } 6513} 6514GridSupportAnimationModifier.identity = Symbol('gridSupportAnimation'); 6515class GridClipModifier extends ModifierWithKey { 6516 constructor(value) { 6517 super(value); 6518 } 6519 applyPeer(node, reset) { 6520 if (reset) { 6521 getUINativeModule().common.resetClipWithEdge(node); 6522 } 6523 else { 6524 getUINativeModule().common.setClipWithEdge(node, this.value); 6525 } 6526 } 6527 checkObjectDiff() { 6528 return true; 6529 } 6530} 6531GridClipModifier.identity = Symbol('gridClip'); 6532class GridFlingSpeedLimitModifier extends ModifierWithKey { 6533 constructor(value) { 6534 super(value); 6535 } 6536 applyPeer(node, reset) { 6537 if (reset) { 6538 getUINativeModule().grid.resetFlingSpeedLimit(node); 6539 } 6540 else { 6541 getUINativeModule().grid.setFlingSpeedLimit(node, this.value); 6542 } 6543 } 6544} 6545GridFlingSpeedLimitModifier.identity = Symbol('gridFlingSpeedLimit'); 6546class GridAlignItemsModifier extends ModifierWithKey { 6547 constructor(value) { 6548 super(value); 6549 } 6550 applyPeer(node, reset) { 6551 if (reset) { 6552 getUINativeModule().grid.resetAlignItems(node); 6553 } 6554 else { 6555 getUINativeModule().grid.setAlignItems(node, this.value); 6556 } 6557 } 6558} 6559GridAlignItemsModifier.identity = Symbol('gridAlignItems'); 6560// @ts-ignore 6561if (globalThis.Grid !== undefined) { 6562 globalThis.Grid.attributeModifier = function (modifier) { 6563 attributeModifierFunc.call(this, modifier, (nativePtr) => { 6564 return new ArkGridComponent(nativePtr); 6565 }, (nativePtr, classType, modifierJS) => { 6566 return new modifierJS.GridModifier(nativePtr, classType); 6567 }); 6568 }; 6569} 6570 6571/// <reference path='./import.ts' /> 6572class GridColSpanModifier extends ModifierWithKey { 6573 constructor(value) { 6574 super(value); 6575 } 6576 applyPeer(node, reset) { 6577 if (reset) { 6578 getUINativeModule().gridCol.resetSpan(node); 6579 } 6580 else { 6581 if (isNumber(this.value)) { 6582 getUINativeModule().gridCol.setSpan(node, this.value, this.value, this.value, this.value, this.value, this.value); 6583 } 6584 else { 6585 getUINativeModule().gridCol.setSpan(node, this.value.xs, this.value.sm, this.value.md, this.value.lg, this.value.xl, this.value.xxl); 6586 } 6587 } 6588 } 6589 checkObjectDiff() { 6590 if (isNumber(this.stageValue) && isNumber(this.value)) { 6591 return this.stageValue !== this.value; 6592 } 6593 else if (isObject(this.stageValue) && isObject(this.value)) { 6594 return this.stageValue?.xs !== this.value?.xs || 6595 this.stageValue?.sm !== this.value?.sm || 6596 this.stageValue?.md !== this.value?.md || 6597 this.stageValue?.lg !== this.value?.lg || 6598 this.stageValue?.xl !== this.value?.xl || 6599 this.stageValue?.xxl !== this.value?.xxl; 6600 } 6601 else { 6602 return true; 6603 } 6604 } 6605} 6606GridColSpanModifier.identity = Symbol('gridColSpan'); 6607class GridColOffsetModifier extends ModifierWithKey { 6608 constructor(value) { 6609 super(value); 6610 } 6611 applyPeer(node, reset) { 6612 if (reset) { 6613 getUINativeModule().gridCol.resetGridColOffset(node); 6614 } 6615 else { 6616 if (isNumber(this.value)) { 6617 getUINativeModule().gridCol.setGridColOffset(node, this.value, this.value, this.value, this.value, this.value, this.value); 6618 } 6619 else { 6620 getUINativeModule().gridCol.setGridColOffset(node, this.value.xs, this.value.sm, this.value.md, this.value.lg, this.value.xl, this.value.xxl); 6621 } 6622 } 6623 } 6624 checkObjectDiff() { 6625 if (isNumber(this.stageValue) && isNumber(this.value)) { 6626 return this.stageValue !== this.value; 6627 } 6628 else if (isObject(this.stageValue) && isObject(this.value)) { 6629 return this.stageValue?.xs !== this.value?.xs || 6630 this.stageValue?.sm !== this.value?.sm || 6631 this.stageValue?.md !== this.value?.md || 6632 this.stageValue?.lg !== this.value?.lg || 6633 this.stageValue?.xl !== this.value?.xl || 6634 this.stageValue?.xxl !== this.value?.xxl; 6635 } 6636 else { 6637 return true; 6638 } 6639 } 6640} 6641GridColOffsetModifier.identity = Symbol('gridColOffset'); 6642class GridColOrderModifier extends ModifierWithKey { 6643 constructor(value) { 6644 super(value); 6645 } 6646 applyPeer(node, reset) { 6647 if (reset) { 6648 getUINativeModule().gridCol.resetOrder(node); 6649 } 6650 else { 6651 if (isNumber(this.value)) { 6652 getUINativeModule().gridCol.setOrder(node, this.value, this.value, this.value, this.value, this.value, this.value); 6653 } 6654 else { 6655 getUINativeModule().gridCol.setOrder(node, this.value.xs, this.value.sm, this.value.md, this.value.lg, this.value.xl, this.value.xxl); 6656 } 6657 } 6658 } 6659 checkObjectDiff() { 6660 if (isNumber(this.stageValue) && isNumber(this.value)) { 6661 return this.stageValue !== this.value; 6662 } 6663 else if (isObject(this.stageValue) && isObject(this.value)) { 6664 return this.stageValue?.xs !== this.value?.xs || 6665 this.stageValue?.sm !== this.value?.sm || 6666 this.stageValue?.md !== this.value?.md || 6667 this.stageValue?.lg !== this.value?.lg || 6668 this.stageValue?.xl !== this.value?.xl || 6669 this.stageValue?.xxl !== this.value?.xxl; 6670 } 6671 else { 6672 return true; 6673 } 6674 } 6675} 6676GridColOrderModifier.identity = Symbol('gridColOrder'); 6677class ArkGridColComponent extends ArkComponent { 6678 constructor(nativePtr, classType) { 6679 super(nativePtr, classType); 6680 } 6681 allowChildCount() { 6682 return 1; 6683 } 6684 span(value) { 6685 modifierWithKey(this._modifiersWithKeys, GridColSpanModifier.identity, GridColSpanModifier, value); 6686 return this; 6687 } 6688 gridColOffset(value) { 6689 modifierWithKey(this._modifiersWithKeys, GridColOffsetModifier.identity, GridColOffsetModifier, value); 6690 return this; 6691 } 6692 order(value) { 6693 modifierWithKey(this._modifiersWithKeys, GridColOrderModifier.identity, GridColOrderModifier, value); 6694 return this; 6695 } 6696 initialize(value) { 6697 if (value[0] !== undefined) { 6698 modifierWithKey(this._modifiersWithKeys, GridColSpanModifier.identity, GridColSpanModifier, value[0].span); 6699 modifierWithKey(this._modifiersWithKeys, GridColOffsetModifier.identity, GridColOffsetModifier, value[0].offset); 6700 modifierWithKey(this._modifiersWithKeys, GridColOrderModifier.identity, GridColOrderModifier, value[0].order); 6701 } else { 6702 modifierWithKey(this._modifiersWithKeys, GridColSpanModifier.identity, GridColSpanModifier, null); 6703 modifierWithKey(this._modifiersWithKeys, GridColOffsetModifier.identity, GridColOffsetModifier, null); 6704 modifierWithKey(this._modifiersWithKeys, GridColOrderModifier.identity, GridColOrderModifier, null); 6705 } 6706 return this; 6707 } 6708} 6709// @ts-ignore 6710if (globalThis.GridCol !== undefined) { 6711 globalThis.GridCol.attributeModifier = function (modifier) { 6712 attributeModifierFunc.call(this, modifier, (nativePtr) => { 6713 return new ArkGridColComponent(nativePtr); 6714 }, (nativePtr, classType, modifierJS) => { 6715 return new modifierJS.GridColModifier(nativePtr, classType); 6716 }); 6717 }; 6718} 6719 6720/// <reference path='./import.ts' /> 6721class ImageColorFilterModifier extends ModifierWithKey { 6722 constructor(value) { 6723 super(value); 6724 } 6725 applyPeer(node, reset) { 6726 if (reset) { 6727 getUINativeModule().image.resetColorFilter(node); 6728 } 6729 else { 6730 getUINativeModule().image.setColorFilter(node, this.value); 6731 } 6732 } 6733 checkObjectDiff() { 6734 return true; 6735 } 6736} 6737ImageColorFilterModifier.identity = Symbol('imageColorFilter'); 6738class ImageFillColorModifier extends ModifierWithKey { 6739 constructor(value) { 6740 super(value); 6741 } 6742 applyPeer(node, reset) { 6743 if (reset) { 6744 getUINativeModule().image.resetFillColor(node); 6745 } 6746 else { 6747 if (this.value && ((typeof this.value) === 'string')) { 6748 ArkLogConsole.info('ImageFillColorModifier set color ' + this.value); 6749 } 6750 getUINativeModule().image.setFillColor(node, this.value); 6751 } 6752 } 6753 checkObjectDiff() { 6754 return !isBaseOrResourceEqual(this.stageValue, this.value); 6755 } 6756} 6757ImageFillColorModifier.identity = Symbol('imageFillColor'); 6758class ImageAltModifier extends ModifierWithKey { 6759 constructor(value) { 6760 super(value); 6761 } 6762 applyPeer(node, reset) { 6763 if (reset) { 6764 getUINativeModule().image.resetAlt(node); 6765 } 6766 else { 6767 getUINativeModule().image.setAlt(node, this.value); 6768 } 6769 } 6770 checkObjectDiff() { 6771 return !isBaseOrResourceEqual(this.stageValue, this.value); 6772 } 6773} 6774ImageAltModifier.identity = Symbol('imageAlt'); 6775class ImageCopyOptionModifier extends ModifierWithKey { 6776 constructor(value) { 6777 super(value); 6778 } 6779 applyPeer(node, reset) { 6780 if (reset) { 6781 getUINativeModule().image.resetCopyOption(node); 6782 } 6783 else { 6784 getUINativeModule().image.setCopyOption(node, this.value); 6785 } 6786 } 6787 checkObjectDiff() { 6788 return this.stageValue !== this.value; 6789 } 6790} 6791ImageCopyOptionModifier.identity = Symbol('imageCopyOption'); 6792class ImageAutoResizeModifier extends ModifierWithKey { 6793 constructor(value) { 6794 super(value); 6795 } 6796 applyPeer(node, reset) { 6797 if (reset) { 6798 getUINativeModule().image.resetAutoResize(node); 6799 } 6800 else { 6801 getUINativeModule().image.setAutoResize(node, this.value); 6802 } 6803 } 6804 checkObjectDiff() { 6805 return this.stageValue !== this.value; 6806 } 6807} 6808ImageAutoResizeModifier.identity = Symbol('imageAutoResize'); 6809class ImageFitOriginalSizeModifier extends ModifierWithKey { 6810 constructor(value) { 6811 super(value); 6812 } 6813 applyPeer(node, reset) { 6814 if (reset) { 6815 getUINativeModule().image.resetFitOriginalSize(node); 6816 } 6817 else { 6818 getUINativeModule().image.setFitOriginalSize(node, this.value); 6819 } 6820 } 6821 checkObjectDiff() { 6822 return this.stageValue !== this.value; 6823 } 6824} 6825ImageFitOriginalSizeModifier.identity = Symbol('imageFitOriginalSize'); 6826class ImageDraggableModifier extends ModifierWithKey { 6827 constructor(value) { 6828 super(value); 6829 } 6830 applyPeer(node, reset) { 6831 if (reset) { 6832 getUINativeModule().image.resetDraggable(node); 6833 } 6834 else { 6835 getUINativeModule().image.setDraggable(node, this.value); 6836 } 6837 } 6838 checkObjectDiff() { 6839 return this.stageValue !== this.value; 6840 } 6841} 6842ImageDraggableModifier.identity = Symbol('imageDraggable'); 6843class ImageInterpolationModifier extends ModifierWithKey { 6844 constructor(value) { 6845 super(value); 6846 } 6847 applyPeer(node, reset) { 6848 if (reset) { 6849 getUINativeModule().image.resetImageInterpolation(node); 6850 } 6851 else { 6852 getUINativeModule().image.setImageInterpolation(node, this.value); 6853 } 6854 } 6855 checkObjectDiff() { 6856 return this.stageValue !== this.value; 6857 } 6858} 6859ImageInterpolationModifier.identity = Symbol('imageInterpolation'); 6860class ImageSourceSizeModifier extends ModifierWithKey { 6861 constructor(value) { 6862 super(value); 6863 } 6864 applyPeer(node, reset) { 6865 if (reset) { 6866 getUINativeModule().image.resetSourceSize(node); 6867 } 6868 else { 6869 getUINativeModule().image.setSourceSize(node, this.value.width, this.value.height); 6870 } 6871 } 6872 checkObjectDiff() { 6873 return this.stageValue.width !== this.value.width || 6874 this.stageValue.height !== this.value.height; 6875 } 6876} 6877ImageSourceSizeModifier.identity = Symbol('imageSourceSize'); 6878class ImageMatchTextDirectionModifier extends ModifierWithKey { 6879 constructor(value) { 6880 super(value); 6881 } 6882 applyPeer(node, reset) { 6883 if (reset) { 6884 getUINativeModule().image.resetMatchTextDirection(node); 6885 } 6886 else { 6887 getUINativeModule().image.setMatchTextDirection(node, this.value); 6888 } 6889 } 6890 checkObjectDiff() { 6891 return this.stageValue !== this.value; 6892 } 6893} 6894ImageMatchTextDirectionModifier.identity = Symbol('imageMatchTextDirection'); 6895class ImageObjectRepeatModifier extends ModifierWithKey { 6896 constructor(value) { 6897 super(value); 6898 } 6899 applyPeer(node, reset) { 6900 if (reset) { 6901 getUINativeModule().image.resetObjectRepeat(node); 6902 } 6903 else { 6904 getUINativeModule().image.setObjectRepeat(node, this.value); 6905 } 6906 } 6907 checkObjectDiff() { 6908 return this.stageValue !== this.value; 6909 } 6910} 6911ImageObjectRepeatModifier.identity = Symbol('imageObjectRepeat'); 6912class ImageRenderModeModifier extends ModifierWithKey { 6913 constructor(value) { 6914 super(value); 6915 } 6916 applyPeer(node, reset) { 6917 if (reset) { 6918 getUINativeModule().image.resetRenderMode(node); 6919 } 6920 else { 6921 getUINativeModule().image.setRenderMode(node, this.value); 6922 } 6923 } 6924 checkObjectDiff() { 6925 return this.stageValue !== this.value; 6926 } 6927} 6928ImageRenderModeModifier.identity = Symbol('imageRenderMode'); 6929class ImageSyncLoadModifier extends ModifierWithKey { 6930 constructor(value) { 6931 super(value); 6932 } 6933 applyPeer(node, reset) { 6934 if (reset) { 6935 getUINativeModule().image.resetSyncLoad(node); 6936 } 6937 else { 6938 getUINativeModule().image.setSyncLoad(node, this.value); 6939 } 6940 } 6941 checkObjectDiff() { 6942 return this.stageValue !== this.value; 6943 } 6944} 6945ImageSyncLoadModifier.identity = Symbol('imageSyncLoad'); 6946class ImageeEdgeAntialiasingModifier extends ModifierWithKey { 6947 constructor(value) { 6948 super(value); 6949 } 6950 applyPeer(node, reset) { 6951 if (reset) { 6952 getUINativeModule().image.resetEdgeAntialiasing(node); 6953 } else { 6954 getUINativeModule().image.setEdgeAntialiasing(node, this.value); 6955 } 6956 } 6957} 6958ImageeEdgeAntialiasingModifier.identity = Symbol('edgeAntialiasing'); 6959class ImageObjectFitModifier extends ModifierWithKey { 6960 constructor(value) { 6961 super(value); 6962 } 6963 applyPeer(node, reset) { 6964 if (reset) { 6965 getUINativeModule().image.resetObjectFit(node); 6966 } 6967 else { 6968 getUINativeModule().image.setObjectFit(node, this.value); 6969 } 6970 } 6971 checkObjectDiff() { 6972 return this.stageValue !== this.value; 6973 } 6974} 6975ImageObjectFitModifier.identity = Symbol('imageObjectFit'); 6976class ImageMatrixModifier extends ModifierWithKey { 6977 constructor(value) { 6978 super(value); 6979 } 6980 applyPeer(node, reset) { 6981 if (reset) { 6982 getUINativeModule().image.resetImageMatrix(node); 6983 } else { 6984 getUINativeModule().image.setImageMatrix(node, this.value.matrix4x4); 6985 } 6986 } 6987 checkObjectDiff() { 6988 return !deepCompareArrays(this.stageValue.matrix4x4, this.value.matrix4x4); 6989 } 6990} 6991ImageMatrixModifier.identity = Symbol('imageMatrix'); 6992class ImageBorderRadiusModifier extends ModifierWithKey { 6993 constructor(value) { 6994 super(value); 6995 } 6996 applyPeer(node, reset) { 6997 if (reset) { 6998 getUINativeModule().image.resetBorderRadius(node); 6999 } 7000 else { 7001 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 7002 getUINativeModule().image.setBorderRadius(node, this.value, this.value, this.value, this.value); 7003 } 7004 else { 7005 getUINativeModule().image.setBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 7006 } 7007 } 7008 } 7009 checkObjectDiff() { 7010 if (isResource(this.stageValue) && isResource(this.value)) { 7011 return !isResourceEqual(this.stageValue, this.value); 7012 } 7013 else if (!isResource(this.stageValue) && !isResource(this.value)) { 7014 return !(this.stageValue.topLeft === this.value.topLeft && 7015 this.stageValue.topRight === this.value.topRight && 7016 this.stageValue.bottomLeft === this.value.bottomLeft && 7017 this.stageValue.bottomRight === this.value.bottomRight); 7018 } 7019 else { 7020 return true; 7021 } 7022 } 7023} 7024ImageBorderRadiusModifier.identity = Symbol('imageBorderRadius'); 7025class ImageBorderModifier extends ModifierWithKey { 7026 constructor(value) { 7027 super(value); 7028 } 7029 applyPeer(node, reset) { 7030 if (reset) { 7031 getUINativeModule().image.resetImageBorder(node); 7032 } else { 7033 let widthLeft; 7034 let widthRight; 7035 let widthTop; 7036 let widthBottom; 7037 if (!isUndefined(this.value.width) && this.value.width != null) { 7038 if (isNumber(this.value.width) || isString(this.value.width) || isResource(this.value.width)) { 7039 widthLeft = this.value.width; 7040 widthRight = this.value.width; 7041 widthTop = this.value.width; 7042 widthBottom = this.value.width; 7043 } else { 7044 widthLeft = this.value.width.left; 7045 widthRight = this.value.width.right; 7046 widthTop = this.value.width.top; 7047 widthBottom = this.value.width.bottom; 7048 } 7049 } 7050 let leftColor; 7051 let rightColor; 7052 let topColor; 7053 let bottomColor; 7054 if (!isUndefined(this.value.color) && this.value.color !== null) { 7055 if (isNumber(this.value.color) || isString(this.value.color) || isResource(this.value.color)) { 7056 leftColor = this.value.color; 7057 rightColor = this.value.color; 7058 topColor = this.value.color; 7059 bottomColor = this.value.color; 7060 } else { 7061 leftColor = this.value.color.left; 7062 rightColor = this.value.color.right; 7063 topColor = this.value.color.top; 7064 bottomColor = this.value.color.bottom; 7065 } 7066 } 7067 let topLeft; 7068 let topRight; 7069 let bottomLeft; 7070 let bottomRight; 7071 if (!isUndefined(this.value.radius) && this.value.radius !== null) { 7072 if (isNumber(this.value.radius) || isString(this.value.radius) || isResource(this.value.radius)) { 7073 topLeft = this.value.radius; 7074 topRight = this.value.radius; 7075 bottomLeft = this.value.radius; 7076 bottomRight = this.value.radius; 7077 } else { 7078 topLeft = this.value.radius.topLeft; 7079 topRight = this.value.radius.topRight; 7080 bottomLeft = this.value.radius.bottomLeft; 7081 bottomRight = this.value.radius.bottomRight; 7082 } 7083 } 7084 let styleTop; 7085 let styleRight; 7086 let styleBottom; 7087 let styleLeft; 7088 if (!isUndefined(this.value.style) && this.value.style !== null) { 7089 if (isNumber(this.value.style) || isString(this.value.style) || isResource(this.value.style)) { 7090 styleTop = this.value.style; 7091 styleRight = this.value.style; 7092 styleBottom = this.value.style; 7093 styleLeft = this.value.style; 7094 } else { 7095 styleTop = this.value.style.top; 7096 styleRight = this.value.style.right; 7097 styleBottom = this.value.style.bottom; 7098 styleLeft = this.value.style.left; 7099 } 7100 } 7101 getUINativeModule().image.setImageBorder( 7102 node, 7103 widthLeft, 7104 widthRight, 7105 widthTop, 7106 widthBottom, 7107 leftColor, 7108 rightColor, 7109 topColor, 7110 bottomColor, 7111 topLeft, 7112 topRight, 7113 bottomLeft, 7114 bottomRight, 7115 styleTop, 7116 styleRight, 7117 styleBottom, 7118 styleLeft 7119 ); 7120 } 7121 } 7122 checkObjectDiff() { 7123 return ( 7124 !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 7125 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 7126 !isBaseOrResourceEqual(this.stageValue.radius, this.value.radius) || 7127 !isBaseOrResourceEqual(this.stageValue.style, this.value.style) 7128 ); 7129 } 7130} 7131ImageBorderModifier.identity = Symbol('imageBorder'); 7132class ImageOpacityModifier extends ModifierWithKey { 7133 constructor(value) { 7134 super(value); 7135 } 7136 applyPeer(node, reset) { 7137 if (reset) { 7138 getUINativeModule().image.resetImageOpacity(node); 7139 } else { 7140 getUINativeModule().image.setImageOpacity(node, this.value); 7141 } 7142 } 7143 checkObjectDiff() { 7144 return !isBaseOrResourceEqual(this.stageValue, this.value); 7145 } 7146} 7147ImageOpacityModifier.identity = Symbol('imageOpacity'); 7148class ImageTransitionModifier extends ModifierWithKey { 7149 constructor(value) { 7150 super(value); 7151 } 7152 applyPeer(node, reset) { 7153 if (reset) { 7154 getUINativeModule().image.resetImageTransition(node); 7155 } else { 7156 getUINativeModule().image.setImageTransition(node, this.value); 7157 } 7158 } 7159} 7160ImageTransitionModifier.identity = Symbol('imageTransition'); 7161class ImagePointLightModifier extends ModifierWithKey { 7162 constructor(value) { 7163 super(value); 7164 } 7165 applyPeer(node, reset) { 7166 if (reset) { 7167 getUINativeModule().common.resetPointLightStyle(node); 7168 } else { 7169 let positionX; 7170 let positionY; 7171 let positionZ; 7172 let intensity; 7173 let color; 7174 let illuminated; 7175 let bloom; 7176 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 7177 positionX = this.value.lightSource.positionX; 7178 positionY = this.value.lightSource.positionY; 7179 positionZ = this.value.lightSource.positionZ; 7180 intensity = this.value.lightSource.intensity; 7181 color = this.value.lightSource.color; 7182 } 7183 illuminated = this.value.illuminated; 7184 bloom = this.value.bloom; 7185 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 7186 illuminated, bloom); 7187 } 7188 } 7189 checkObjectDiff() { 7190 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 7191 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 7192 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 7193 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 7194 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 7195 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 7196 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 7197 } 7198} 7199ImagePointLightModifier.identity = Symbol('imagePointLight'); 7200class ImageeResizableModifier extends ModifierWithKey { 7201 constructor(value) { 7202 super(value); 7203 } 7204 applyPeer(node, reset) { 7205 if (reset) { 7206 getUINativeModule().image.resetResizable(node); 7207 } else { 7208 if (!isUndefined(this.value.lattice)) { 7209 getUINativeModule().image.setResizableLattice(node, this.value.lattice); 7210 } 7211 let sliceTop; 7212 let sliceRight; 7213 let sliceBottom; 7214 let sliceLeft; 7215 if (!isUndefined(this.value.slice)) { 7216 let tmpSlice = this.value.slice; 7217 sliceTop = tmpSlice.top; 7218 sliceRight = tmpSlice.right; 7219 sliceBottom = tmpSlice.bottom; 7220 sliceLeft = tmpSlice.left; 7221 } 7222 getUINativeModule().image.setResizable(node, sliceTop, sliceRight, sliceBottom, sliceLeft); 7223 } 7224 } 7225} 7226ImageeResizableModifier.identity = Symbol('resizable'); 7227class ImageSrcModifier extends ModifierWithKey { 7228 constructor(value) { 7229 super(value); 7230 } 7231 applyPeer(node, reset) { 7232 if (reset) { 7233 getUINativeModule().image.setImageShowSrc(node, ''); 7234 } 7235 else { 7236 getUINativeModule().image.setImageShowSrc(node, this.value); 7237 } 7238 } 7239} 7240ImageSrcModifier.identity = Symbol('imageShowSrc'); 7241class ImageDynamicRangeModeModifier extends ModifierWithKey { 7242 constructor(value) { 7243 super(value); 7244 } 7245 applyPeer(node, reset) { 7246 if (reset) { 7247 getUINativeModule().image.resetDynamicRangeMode(node); 7248 } 7249 else { 7250 getUINativeModule().image.setDynamicRangeMode(node, this.value); 7251 } 7252 } 7253 checkObjectDiff() { 7254 return this.stageValue !== this.value; 7255 } 7256} 7257ImageDynamicRangeModeModifier.identity = Symbol('dynamicRangeMode'); 7258class ImageRotateOrientationModifier extends ModifierWithKey { 7259 constructor(value) { 7260 super(value); 7261 } 7262 applyPeer(node, reset) { 7263 if (reset) { 7264 getUINativeModule().image.resetOrientation(node); 7265 } else { 7266 getUINativeModule().image.setOrientation(node, this.value); 7267 } 7268 } 7269} 7270ImageRotateOrientationModifier.identity = Symbol('imageOrientaion'); 7271class ImageEnhancedImageQualityModifier extends ModifierWithKey { 7272 constructor(value) { 7273 super(value); 7274 } 7275 applyPeer(node, reset) { 7276 if (reset) { 7277 getUINativeModule().image.resetEnhancedImageQuality(node); 7278 } 7279 else { 7280 getUINativeModule().image.setEnhancedImageQuality(node, this.value); 7281 } 7282 } 7283 checkObjectDiff() { 7284 return this.stageValue !== this.value; 7285 } 7286} 7287ImageObjectFitModifier.identity = Symbol('enhancedImageQuality'); 7288 7289class ImageEnableAnalyzerModifier extends ModifierWithKey { 7290 constructor(value) { 7291 super(value); 7292 } 7293 applyPeer(node, reset) { 7294 if (reset) { 7295 getUINativeModule().image.enableAnalyzer(node, ''); 7296 } else { 7297 getUINativeModule().image.enableAnalyzer(node, this.value); 7298 } 7299 } 7300} 7301ImageEnableAnalyzerModifier.identity = Symbol('enableAnalyzer'); 7302 7303class ImageAnalyzerConfigModifier extends ModifierWithKey { 7304 constructor(value) { 7305 super(value); 7306 } 7307 applyPeer(node, reset) { 7308 if (reset) { 7309 getUINativeModule().image.analyzerConfig(node, ''); 7310 } 7311 else { 7312 getUINativeModule().image.analyzerConfig(node, this.value); 7313 } 7314 } 7315} 7316ImageAnalyzerConfigModifier.identity = Symbol('analyzerConfig'); 7317 7318class ImagePrivacySensitiveModifier extends ModifierWithKey { 7319 constructor(value) { 7320 super(value); 7321 } 7322 applyPeer(node, reset) { 7323 if (reset) { 7324 getUINativeModule().image.resetPrivacySensitive(node); 7325 } 7326 else { 7327 getUINativeModule().image.setPrivacySensitive(node, this.value); 7328 } 7329 } 7330 checkObjectDiff() { 7331 return !isBaseOrResourceEqual(this.stageValue, this.value); 7332 } 7333} 7334ImagePrivacySensitiveModifier.identity = Symbol('imagePrivacySensitive'); 7335 7336class ImageOnCompleteModifier extends ModifierWithKey { 7337 constructor(value) { 7338 super(value); 7339 } 7340 applyPeer(node, reset) { 7341 if (reset) { 7342 getUINativeModule().image.resetOnComplete(node); 7343 } else { 7344 getUINativeModule().image.setOnComplete(node, this.value); 7345 } 7346 } 7347} 7348ImageOnCompleteModifier.identity = Symbol('imageOnComplete'); 7349 7350class ImageOnErrorModifier extends ModifierWithKey { 7351 constructor(value) { 7352 super(value); 7353 } 7354 applyPeer(node, reset) { 7355 if (reset) { 7356 getUINativeModule().image.resetOnError(node); 7357 } 7358 else { 7359 getUINativeModule().image.setOnError(node, this.value); 7360 } 7361 } 7362} 7363ImageOnErrorModifier.identity = Symbol('imageOnError'); 7364 7365class ImageOnFinishModifier extends ModifierWithKey { 7366 constructor(value) { 7367 super(value); 7368 } 7369 applyPeer(node, reset) { 7370 if (reset) { 7371 getUINativeModule().image.resetOnFinish(node); 7372 } else { 7373 getUINativeModule().image.setOnFinish(node, this.value); 7374 } 7375 } 7376} 7377ImageOnFinishModifier.identity = Symbol('imageOnFinish'); 7378 7379class ArkImageComponent extends ArkComponent { 7380 constructor(nativePtr, classType) { 7381 super(nativePtr, classType); 7382 } 7383 initialize(value) { 7384 modifierWithKey(this._modifiersWithKeys, ImageSrcModifier.identity, ImageSrcModifier, value[0]); 7385 return this; 7386 } 7387 allowChildCount() { 7388 return 0; 7389 } 7390 draggable(value) { 7391 modifierWithKey(this._modifiersWithKeys, ImageDraggableModifier.identity, ImageDraggableModifier, value); 7392 return this; 7393 } 7394 edgeAntialiasing(value) { 7395 modifierWithKey(this._modifiersWithKeys, ImageeEdgeAntialiasingModifier.identity, ImageeEdgeAntialiasingModifier, value); 7396 return this; 7397 } 7398 resizable(value) { 7399 modifierWithKey(this._modifiersWithKeys, ImageeResizableModifier.identity, ImageeResizableModifier, value); 7400 return this; 7401 } 7402 alt(value) { 7403 modifierWithKey(this._modifiersWithKeys, ImageAltModifier.identity, ImageAltModifier, value); 7404 return this; 7405 } 7406 matchTextDirection(value) { 7407 modifierWithKey(this._modifiersWithKeys, ImageMatchTextDirectionModifier.identity, ImageMatchTextDirectionModifier, value); 7408 return this; 7409 } 7410 fitOriginalSize(value) { 7411 modifierWithKey(this._modifiersWithKeys, ImageFitOriginalSizeModifier.identity, ImageFitOriginalSizeModifier, value); 7412 return this; 7413 } 7414 fillColor(value) { 7415 modifierWithKey(this._modifiersWithKeys, ImageFillColorModifier.identity, ImageFillColorModifier, value); 7416 return this; 7417 } 7418 objectFit(value) { 7419 modifierWithKey(this._modifiersWithKeys, ImageObjectFitModifier.identity, ImageObjectFitModifier, value); 7420 return this; 7421 } 7422 imageMatrix(value) { 7423 modifierWithKey(this._modifiersWithKeys, ImageMatrixModifier.identity, ImageMatrixModifier, value); 7424 return this; 7425 } 7426 objectRepeat(value) { 7427 modifierWithKey(this._modifiersWithKeys, ImageObjectRepeatModifier.identity, ImageObjectRepeatModifier, value); 7428 return this; 7429 } 7430 autoResize(value) { 7431 modifierWithKey(this._modifiersWithKeys, ImageAutoResizeModifier.identity, ImageAutoResizeModifier, value); 7432 return this; 7433 } 7434 renderMode(value) { 7435 modifierWithKey(this._modifiersWithKeys, ImageRenderModeModifier.identity, ImageRenderModeModifier, value); 7436 return this; 7437 } 7438 orientation(value) { 7439 modifierWithKey(this._modifiersWithKeys, ImageRotateOrientationModifier.identity, ImageRotateOrientationModifier, value); 7440 return this; 7441 } 7442 interpolation(value) { 7443 modifierWithKey(this._modifiersWithKeys, ImageInterpolationModifier.identity, ImageInterpolationModifier, value); 7444 return this; 7445 } 7446 pointLight(value) { 7447 modifierWithKey(this._modifiersWithKeys, ImagePointLightModifier.identity, ImagePointLightModifier, value); 7448 return this; 7449 } 7450 sourceSize(value) { 7451 modifierWithKey(this._modifiersWithKeys, ImageSourceSizeModifier.identity, ImageSourceSizeModifier, value); 7452 return this; 7453 } 7454 syncLoad(value) { 7455 modifierWithKey(this._modifiersWithKeys, ImageSyncLoadModifier.identity, ImageSyncLoadModifier, value); 7456 return this; 7457 } 7458 colorFilter(value) { 7459 modifierWithKey(this._modifiersWithKeys, ImageColorFilterModifier.identity, ImageColorFilterModifier, value); 7460 return this; 7461 } 7462 copyOption(value) { 7463 modifierWithKey(this._modifiersWithKeys, ImageCopyOptionModifier.identity, ImageCopyOptionModifier, value); 7464 return this; 7465 } 7466 borderRadius(value) { 7467 modifierWithKey(this._modifiersWithKeys, ImageBorderRadiusModifier.identity, ImageBorderRadiusModifier, value); 7468 return this; 7469 } 7470 onComplete(callback) { 7471 modifierWithKey(this._modifiersWithKeys, ImageOnCompleteModifier.identity, ImageOnCompleteModifier, callback); 7472 return this; 7473 } 7474 onError(callback) { 7475 modifierWithKey(this._modifiersWithKeys, ImageOnErrorModifier.identity, ImageOnErrorModifier, callback); 7476 return this; 7477 } 7478 onFinish(event) { 7479 modifierWithKey(this._modifiersWithKeys, ImageOnFinishModifier.identity, ImageOnFinishModifier, event); 7480 return this; 7481 } 7482 border(value) { 7483 modifierWithKey(this._modifiersWithKeys, ImageBorderModifier.identity, ImageBorderModifier, value); 7484 return this; 7485 } 7486 opacity(value) { 7487 modifierWithKey(this._modifiersWithKeys, ImageOpacityModifier.identity, ImageOpacityModifier, value); 7488 return this; 7489 } 7490 transition(value) { 7491 modifierWithKey(this._modifiersWithKeys, ImageTransitionModifier.identity, ImageTransitionModifier, value); 7492 return this; 7493 } 7494 dynamicRangeMode(value) { 7495 modifierWithKey( 7496 this._modifiersWithKeys, ImageDynamicRangeModeModifier.identity, ImageDynamicRangeModeModifier, value); 7497 return this; 7498 } 7499 enhancedImageQuality(value) { 7500 modifierWithKey( 7501 this._modifiersWithKeys, ImageEnhancedImageQualityModifier.identity, ImageEnhancedImageQualityModifier, value); 7502 return this; 7503 } 7504 enableAnalyzer(value) { 7505 modifierWithKey( 7506 this._modifiersWithKeys, ImageEnableAnalyzerModifier.identity, ImageEnableAnalyzerModifier, value); 7507 return this; 7508 } 7509 privacySensitive(value) { 7510 modifierWithKey( 7511 this._modifiersWithKeys, ImagePrivacySensitiveModifier.identity, ImagePrivacySensitiveModifier, value); 7512 return this; 7513 } 7514 analyzerConfig(value) { 7515 modifierWithKey( 7516 this._modifiersWithKeys, ImageAnalyzerConfigModifier.identity, ImageAnalyzerConfigModifier, value); 7517 return this; 7518 } 7519} 7520// @ts-ignore 7521if (globalThis.Image !== undefined) { 7522 globalThis.Image.attributeModifier = function (modifier) { 7523 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7524 return new ArkImageComponent(nativePtr); 7525 }, (nativePtr, classType, modifierJS) => { 7526 return new modifierJS.ImageModifier(nativePtr, classType); 7527 }); 7528 }; 7529} 7530 7531/// <reference path='./import.ts' /> 7532class ImageAnimatorImagesModifier extends ModifierWithKey { 7533 constructor(value) { 7534 super(value); 7535 } 7536 applyPeer(node, reset) { 7537 if (reset) { 7538 getUINativeModule().imageAnimator.resetImages(node); 7539 } 7540 else { 7541 let arkImageFrame = this.convertImageFrames(this.value); 7542 if (!arkImageFrame) { 7543 getUINativeModule().imageAnimator.resetImages(node); 7544 } 7545 else { 7546 getUINativeModule().imageAnimator.setImages(node, arkImageFrame.arrSrc, 7547 arkImageFrame.arrWidth, arkImageFrame.arrHeight, arkImageFrame.arrTop, 7548 arkImageFrame.arrLeft, arkImageFrame.arrDuration, arkImageFrame.arrSrc.length); 7549 } 7550 } 7551 } 7552 checkObjectDiff() { 7553 let checkDiff = true; 7554 if (this.value && this.value.length > 0 && 7555 this.stageValue && this.stageValue.length > 0 && 7556 this.value.length === this.stageValue.length) { 7557 let checkItemEqual = false; 7558 for (let i = 0; i < this.value.length; i++) { 7559 checkItemEqual = this.isEqual(this.stageValue[i], this.value[i]); 7560 if (!checkItemEqual) { 7561 checkDiff = !checkItemEqual; 7562 break; 7563 } 7564 } 7565 } 7566 return checkDiff; 7567 } 7568 isEqual(one, another) { 7569 if (!(one.width === another.width && 7570 one.height === another.height && 7571 one.top === another.top && 7572 one.left === another.left && 7573 one.duration === another.duration)) { 7574 return true; 7575 } 7576 else { 7577 return !isBaseOrResourceEqual(one.src, another.src); 7578 } 7579 } 7580 convertImageFrames(value) { 7581 if (value && value.length > 0) { 7582 let isFlag = true; 7583 for (let item of value) { 7584 if (item.src === undefined || item.src === null) { 7585 isFlag = false; 7586 break; 7587 } 7588 } 7589 if (isFlag) { 7590 let array = new ArkImageFrameInfoToArray(); 7591 for (let item of value) { 7592 array.arrSrc.push(item.src); 7593 array.arrWidth.push((item.width === undefined || item.width === null) ? 0 : item.width); 7594 array.arrHeight.push((item.height === undefined || item.height === null) ? 0 : item.height); 7595 array.arrTop.push((item.top === undefined || item.top === null) ? 0 : item.top); 7596 array.arrLeft.push((item.left === undefined || item.left === null) ? 0 : item.left); 7597 array.arrDuration.push((item.duration === undefined || item.duration === null) ? 0 : item.duration); 7598 } 7599 return array; 7600 } 7601 else { 7602 return undefined; 7603 } 7604 } 7605 else { 7606 return undefined; 7607 } 7608 } 7609} 7610ImageAnimatorImagesModifier.identity = Symbol('imageAnimatorImages'); 7611class ImageAnimatorDurationModifier extends ModifierWithKey { 7612 constructor(value) { 7613 super(value); 7614 } 7615 applyPeer(node, reset) { 7616 if (reset) { 7617 getUINativeModule().imageAnimator.resetDuration(node); 7618 } 7619 else { 7620 getUINativeModule().imageAnimator.setDuration(node, this.value); 7621 } 7622 } 7623 checkObjectDiff() { 7624 return this.stageValue !== this.value; 7625 } 7626} 7627ImageAnimatorDurationModifier.identity = Symbol('imageAnimatorDuration'); 7628class ImageAnimatorReverseModifier extends ModifierWithKey { 7629 constructor(value) { 7630 super(value); 7631 } 7632 applyPeer(node, reset) { 7633 if (reset) { 7634 getUINativeModule().imageAnimator.resetReverse(node); 7635 } 7636 else { 7637 getUINativeModule().imageAnimator.setReverse(node, this.value); 7638 } 7639 } 7640 checkObjectDiff() { 7641 return this.stageValue !== this.value; 7642 } 7643} 7644ImageAnimatorReverseModifier.identity = Symbol('imageAnimatorReverse'); 7645class ImageAnimatorStateModifier extends ModifierWithKey { 7646 constructor(value) { 7647 super(value); 7648 } 7649 applyPeer(node, reset) { 7650 if (reset) { 7651 getUINativeModule().imageAnimator.resetState(node); 7652 } 7653 else { 7654 getUINativeModule().imageAnimator.setState(node, this.value); 7655 } 7656 } 7657 checkObjectDiff() { 7658 return this.stageValue !== this.value; 7659 } 7660} 7661ImageAnimatorStateModifier.identity = Symbol('imageAnimatorState'); 7662class ImageAnimatorFixedSizeModifier extends ModifierWithKey { 7663 constructor(value) { 7664 super(value); 7665 } 7666 applyPeer(node, reset) { 7667 if (reset) { 7668 getUINativeModule().imageAnimator.resetFixedSize(node); 7669 } 7670 else { 7671 getUINativeModule().imageAnimator.setFixedSize(node, this.value); 7672 } 7673 } 7674 checkObjectDiff() { 7675 return this.stageValue !== this.value; 7676 } 7677} 7678ImageAnimatorFixedSizeModifier.identity = Symbol('imageAnimatorFixedSize'); 7679class ImageAnimatorFillModeModifier extends ModifierWithKey { 7680 constructor(value) { 7681 super(value); 7682 } 7683 applyPeer(node, reset) { 7684 if (reset) { 7685 getUINativeModule().imageAnimator.resetFillMode(node); 7686 } 7687 else { 7688 getUINativeModule().imageAnimator.setFillMode(node, this.value); 7689 } 7690 } 7691 checkObjectDiff() { 7692 return this.stageValue !== this.value; 7693 } 7694} 7695ImageAnimatorFillModeModifier.identity = Symbol('imageAnimatorFillMode'); 7696class ImageAnimatorIterationsModeModifier extends ModifierWithKey { 7697 constructor(value) { 7698 super(value); 7699 } 7700 applyPeer(node, reset) { 7701 if (reset) { 7702 getUINativeModule().imageAnimator.resetIterations(node); 7703 } 7704 else { 7705 getUINativeModule().imageAnimator.setIterations(node, this.value); 7706 } 7707 } 7708 checkObjectDiff() { 7709 return this.stageValue !== this.value; 7710 } 7711} 7712ImageAnimatorIterationsModeModifier.identity = Symbol('imageAnimatorIterationsMode'); 7713class ArkImageAnimatorComponent extends ArkComponent { 7714 constructor(nativePtr, classType) { 7715 super(nativePtr, classType); 7716 } 7717 images(value) { 7718 modifierWithKey(this._modifiersWithKeys, ImageAnimatorImagesModifier.identity, ImageAnimatorImagesModifier, value); 7719 return this; 7720 } 7721 state(value) { 7722 modifierWithKey(this._modifiersWithKeys, ImageAnimatorStateModifier.identity, ImageAnimatorStateModifier, value); 7723 return this; 7724 } 7725 duration(value) { 7726 modifierWithKey(this._modifiersWithKeys, ImageAnimatorDurationModifier.identity, ImageAnimatorDurationModifier, value); 7727 return this; 7728 } 7729 reverse(value) { 7730 modifierWithKey(this._modifiersWithKeys, ImageAnimatorReverseModifier.identity, ImageAnimatorReverseModifier, value); 7731 return this; 7732 } 7733 fixedSize(value) { 7734 modifierWithKey(this._modifiersWithKeys, ImageAnimatorFixedSizeModifier.identity, ImageAnimatorFixedSizeModifier, value); 7735 return this; 7736 } 7737 preDecode(value) { 7738 throw new Error('Method not implemented.'); 7739 } 7740 fillMode(value) { 7741 modifierWithKey(this._modifiersWithKeys, ImageAnimatorFillModeModifier.identity, ImageAnimatorFillModeModifier, value); 7742 return this; 7743 } 7744 iterations(value) { 7745 modifierWithKey(this._modifiersWithKeys, ImageAnimatorIterationsModeModifier.identity, ImageAnimatorIterationsModeModifier, value); 7746 return this; 7747 } 7748 onStart(event) { 7749 throw new Error('Method not implemented.'); 7750 } 7751 onPause(event) { 7752 throw new Error('Method not implemented.'); 7753 } 7754 onRepeat(event) { 7755 throw new Error('Method not implemented.'); 7756 } 7757 onCancel(event) { 7758 throw new Error('Method not implemented.'); 7759 } 7760 onFinish(event) { 7761 throw new Error('Method not implemented.'); 7762 } 7763} 7764// @ts-ignore 7765if (globalThis.ImageAnimator !== undefined) { 7766 globalThis.ImageAnimator.attributeModifier = function (modifier) { 7767 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7768 return new ArkImageAnimatorComponent(nativePtr); 7769 }, (nativePtr, classType, modifierJS) => { 7770 return new modifierJS.ImageAnimatorModifier(nativePtr, classType); 7771 }); 7772 }; 7773} 7774 7775/// <reference path='./import.ts' /> 7776class ImageSpanObjectFitModifier extends ModifierWithKey { 7777 constructor(value) { 7778 super(value); 7779 } 7780 applyPeer(node, reset) { 7781 if (reset) { 7782 getUINativeModule().imageSpan.resetObjectFit(node); 7783 } 7784 else { 7785 getUINativeModule().imageSpan.setObjectFit(node, this.value); 7786 } 7787 } 7788 checkObjectDiff() { 7789 return this.stageValue !== this.value; 7790 } 7791} 7792ImageSpanObjectFitModifier.identity = Symbol('imageSpanObjectFit'); 7793class ImageSpanVerticalAlignModifier extends ModifierWithKey { 7794 constructor(value) { 7795 super(value); 7796 } 7797 applyPeer(node, reset) { 7798 if (reset) { 7799 getUINativeModule().imageSpan.resetVerticalAlign(node); 7800 } 7801 else { 7802 getUINativeModule().imageSpan.setVerticalAlign(node, this.value); 7803 } 7804 } 7805 checkObjectDiff() { 7806 return this.stageValue !== this.value; 7807 } 7808} 7809ImageSpanVerticalAlignModifier.identity = Symbol('imageSpanVerticalAlign'); 7810class ImageSpanTextBackgroundStyleModifier extends ModifierWithKey { 7811 constructor(value) { 7812 super(value); 7813 } 7814 applyPeer(node, reset) { 7815 if (reset) { 7816 getUINativeModule().imageSpan.resetTextBackgroundStyle(node); 7817 } 7818 else { 7819 let textBackgroundStyle = new ArkTextBackGroundStyle(); 7820 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value)) { 7821 getUINativeModule().imageSpan.resetTextBackgroundStyle(node); 7822 } 7823 else { 7824 getUINativeModule().imageSpan.setTextBackgroundStyle(node, textBackgroundStyle.color, textBackgroundStyle.radius.topLeft, textBackgroundStyle.radius.topRight, textBackgroundStyle.radius.bottomLeft, textBackgroundStyle.radius.bottomRight); 7825 } 7826 } 7827 } 7828 checkObjectDiff() { 7829 let textBackgroundStyle = new ArkTextBackGroundStyle(); 7830 let stageTextBackGroundStyle = new ArkTextBackGroundStyle(); 7831 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value) || !stageTextBackGroundStyle.convertTextBackGroundStyleOptions(this.stageValue)) { 7832 return false; 7833 } 7834 else { 7835 return textBackgroundStyle.checkObjectDiff(stageTextBackGroundStyle); 7836 } 7837 } 7838} 7839ImageSpanTextBackgroundStyleModifier.identity = Symbol('imageSpanTextBackgroundStyle'); 7840class ImageSpanBaselineOffsetModifier extends ModifierWithKey { 7841 constructor(value) { 7842 super(value); 7843 } 7844 applyPeer(node, reset) { 7845 if (reset) { 7846 getUINativeModule().imageSpan.resetBaselineOffset(node); 7847 } 7848 else { 7849 getUINativeModule().imageSpan.setBaselineOffset(node, this.value); 7850 } 7851 } 7852} 7853ImageSpanBaselineOffsetModifier.identity = Symbol('imagespanBaselineOffset'); 7854class ImageSpanAltModifier extends ModifierWithKey { 7855 constructor(value) { 7856 super(value); 7857 } 7858 applyPeer(node, reset) { 7859 if (reset) { 7860 getUINativeModule().imageSpan.resetAlt(node); 7861 } 7862 else { 7863 getUINativeModule().imageSpan.setAlt(node, this.value); 7864 } 7865 } 7866} 7867ImageSpanAltModifier.identity = Symbol('imagespanAlt'); 7868class ImageSpanOnCompleteModifier extends ModifierWithKey { 7869 constructor(value) { 7870 super(value); 7871 } 7872 applyPeer(node, reset) { 7873 if (reset) { 7874 getUINativeModule().imageSpan.resetOnComplete(node); 7875 } 7876 else { 7877 getUINativeModule().imageSpan.setOnComplete(node, this.value); 7878 } 7879 } 7880} 7881ImageSpanOnCompleteModifier.identity = Symbol('imageSpanOnComplete'); 7882class ImageSpanOnErrorModifier extends ModifierWithKey { 7883 constructor(value) { 7884 super(value); 7885 } 7886 applyPeer(node, reset) { 7887 if (reset) { 7888 getUINativeModule().imageSpan.resetOnError(node); 7889 } 7890 else { 7891 getUINativeModule().imageSpan.setOnError(node, this.value); 7892 } 7893 } 7894} 7895ImageSpanOnErrorModifier.identity = Symbol('imageSpanOnError'); 7896 7897class ImageSpanBorderRadiusModifier extends ModifierWithKey { 7898 constructor(value) { 7899 super(value); 7900 } 7901 applyPeer(node, reset) { 7902 if (reset) { 7903 getUINativeModule().imageSpan.resetBorderRadius(node); 7904 } else { 7905 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 7906 getUINativeModule().imageSpan.setBorderRadius(node, this.value, this.value, this.value, this.value); 7907 } else { 7908 getUINativeModule().imageSpan.setBorderRadius(node, this.value.topLeft, this.value.topRight, 7909 this.value.bottomLeft, this.value.bottomRight); 7910 } 7911 } 7912 } 7913 checkObjectDiff() { 7914 if (isResource(this.stageValue) && isResource(this.value)) { 7915 return !isResourceEqual(this.stageValue, this.value); 7916 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 7917 return !(this.stageValue.topLeft === this.value.topLeft && 7918 this.stageValue.topRight === this.value.topRight && 7919 this.stageValue.bottomLeft === this.value.bottomLeft && 7920 this.stageValue.bottomRight === this.value.bottomRight); 7921 } else { 7922 return true; 7923 } 7924 } 7925} 7926ImageSpanBorderRadiusModifier.identity = Symbol('imageSpanBorderRadius'); 7927 7928class ImageSpanColorFilterModifier extends ModifierWithKey { 7929 constructor(value) { 7930 super(value); 7931 } 7932 applyPeer(node, reset) { 7933 if (reset) { 7934 getUINativeModule().imageSpan.resetColorFilter(node); 7935 } else { 7936 getUINativeModule().imageSpan.setColorFilter(node, this.value); 7937 } 7938 } 7939 checkObjectDiff() { 7940 return true; 7941 } 7942} 7943 7944ImageSpanColorFilterModifier.identity = Symbol('ImageSpanColorFilter'); 7945 7946class ArkImageSpanComponent extends ArkComponent { 7947 constructor(nativePtr, classType) { 7948 super(nativePtr, classType); 7949 } 7950 objectFit(value) { 7951 modifierWithKey(this._modifiersWithKeys, ImageSpanObjectFitModifier.identity, ImageSpanObjectFitModifier, value); 7952 return this; 7953 } 7954 verticalAlign(value) { 7955 modifierWithKey(this._modifiersWithKeys, ImageSpanVerticalAlignModifier.identity, ImageSpanVerticalAlignModifier, value); 7956 return this; 7957 } 7958 textBackgroundStyle(value) { 7959 modifierWithKey(this._modifiersWithKeys, ImageSpanTextBackgroundStyleModifier.identity, ImageSpanTextBackgroundStyleModifier, value); 7960 return this; 7961 } 7962 baselineOffset(value) { 7963 modifierWithKey(this._modifiersWithKeys, ImageSpanBaselineOffsetModifier.identity, ImageSpanBaselineOffsetModifier, value); 7964 return this; 7965 } 7966 alt(value) { 7967 modifierWithKey(this._modifiersWithKeys, ImageSpanAltModifier.identity, ImageSpanAltModifier, value); 7968 return this; 7969 } 7970 onComplete(callback) { 7971 modifierWithKey(this._modifiersWithKeys, ImageSpanOnCompleteModifier.identity, ImageSpanOnCompleteModifier, callback); 7972 return this; 7973 } 7974 onError(callback) { 7975 modifierWithKey(this._modifiersWithKeys, ImageSpanOnErrorModifier.identity, ImageSpanOnErrorModifier, callback); 7976 return this; 7977 } 7978 borderRadius(value) { 7979 modifierWithKey( 7980 this._modifiersWithKeys, ImageSpanBorderRadiusModifier.identity, ImageSpanBorderRadiusModifier, value); 7981 return this; 7982 } 7983 colorFilter(value) { 7984 modifierWithKey(this._modifiersWithKeys, ImageSpanColorFilterModifier.identity, ImageSpanColorFilterModifier, value); 7985 return this; 7986 } 7987} 7988// @ts-ignore 7989if (globalThis.ImageSpan !== undefined) { 7990 globalThis.ImageSpan.attributeModifier = function (modifier) { 7991 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7992 return new ArkImageSpanComponent(nativePtr); 7993 }, (nativePtr, classType, modifierJS) => { 7994 return new modifierJS.ImageSpanModifier(nativePtr, classType); 7995 }); 7996 }; 7997} 7998 7999/// <reference path='./import.ts' /> 8000class PatternLockActiveColorModifier extends ModifierWithKey { 8001 constructor(value) { 8002 super(value); 8003 } 8004 applyPeer(node, reset) { 8005 if (reset) { 8006 getUINativeModule().patternLock.resetActiveColor(node); 8007 } 8008 else { 8009 getUINativeModule().patternLock.setActiveColor(node, this.value); 8010 } 8011 } 8012 checkObjectDiff() { 8013 return !isBaseOrResourceEqual(this.stageValue, this.value); 8014 } 8015} 8016PatternLockActiveColorModifier.identity = Symbol('patternLockActiveColor'); 8017class PatternLockSelectedColorModifier extends ModifierWithKey { 8018 constructor(value) { 8019 super(value); 8020 } 8021 applyPeer(node, reset) { 8022 if (reset) { 8023 getUINativeModule().patternLock.resetSelectedColor(node); 8024 } 8025 else { 8026 getUINativeModule().patternLock.setSelectedColor(node, this.value); 8027 } 8028 } 8029 checkObjectDiff() { 8030 return !isBaseOrResourceEqual(this.stageValue, this.value); 8031 } 8032} 8033PatternLockSelectedColorModifier.identity = Symbol('patternLockSelectedColor'); 8034class PatternLockPathColorModifier extends ModifierWithKey { 8035 constructor(value) { 8036 super(value); 8037 } 8038 applyPeer(node, reset) { 8039 if (reset) { 8040 getUINativeModule().patternLock.resetPathColor(node); 8041 } 8042 else { 8043 getUINativeModule().patternLock.setPathColor(node, this.value); 8044 } 8045 } 8046 checkObjectDiff() { 8047 return !isBaseOrResourceEqual(this.stageValue, this.value); 8048 } 8049} 8050PatternLockPathColorModifier.identity = Symbol('patternLockPathColor'); 8051class PatternLockRegularColorModifier extends ModifierWithKey { 8052 constructor(value) { 8053 super(value); 8054 } 8055 applyPeer(node, reset) { 8056 if (reset) { 8057 getUINativeModule().patternLock.resetRegularColor(node); 8058 } 8059 else { 8060 getUINativeModule().patternLock.setRegularColor(node, this.value); 8061 } 8062 } 8063 checkObjectDiff() { 8064 return !isBaseOrResourceEqual(this.stageValue, this.value); 8065 } 8066} 8067PatternLockRegularColorModifier.identity = Symbol('patternLockRegularColor'); 8068class PatternLockSideLengthModifier extends ModifierWithKey { 8069 constructor(value) { 8070 super(value); 8071 } 8072 applyPeer(node, reset) { 8073 if (reset) { 8074 getUINativeModule().patternLock.resetSideLength(node); 8075 } 8076 else { 8077 getUINativeModule().patternLock.setSideLength(node, this.value); 8078 } 8079 } 8080 checkObjectDiff() { 8081 return !isBaseOrResourceEqual(this.stageValue, this.value); 8082 } 8083} 8084PatternLockSideLengthModifier.identity = Symbol('patternLockSideLength'); 8085class PatternLockPathStrokeModifier extends ModifierWithKey { 8086 constructor(value) { 8087 super(value); 8088 } 8089 applyPeer(node, reset) { 8090 if (reset) { 8091 getUINativeModule().patternLock.resetPathStrokeWidth(node); 8092 } 8093 else { 8094 getUINativeModule().patternLock.setPathStrokeWidth(node, this.value); 8095 } 8096 } 8097 checkObjectDiff() { 8098 return this.stageValue !== this.value; 8099 } 8100} 8101PatternLockPathStrokeModifier.identity = Symbol('patternLockPathStroke'); 8102class PatternLockCircleRadiusModifier extends ModifierWithKey { 8103 constructor(value) { 8104 super(value); 8105 } 8106 applyPeer(node, reset) { 8107 if (reset) { 8108 getUINativeModule().patternLock.resetCircleRadius(node); 8109 } 8110 else { 8111 getUINativeModule().patternLock.setCircleRadius(node, this.value); 8112 } 8113 } 8114 checkObjectDiff() { 8115 return !isBaseOrResourceEqual(this.stageValue, this.value); 8116 } 8117} 8118PatternLockCircleRadiusModifier.identity = Symbol('patternLockCircleRadius'); 8119class PatternLockAutoResetModifier extends ModifierWithKey { 8120 constructor(value) { 8121 super(value); 8122 } 8123 applyPeer(node, reset) { 8124 if (reset) { 8125 getUINativeModule().patternLock.resetAutoReset(node); 8126 } 8127 else { 8128 getUINativeModule().patternLock.setAutoReset(node, this.value); 8129 } 8130 } 8131 checkObjectDiff() { 8132 return this.stageValue !== this.value; 8133 } 8134} 8135PatternLockAutoResetModifier.identity = Symbol('patternlockautoreset'); 8136class PatternLockActivateCircleStyleModifier extends ModifierWithKey { 8137 constructor(value) { 8138 super(value); 8139 } 8140 applyPeer(node, reset) { 8141 if (reset) { 8142 getUINativeModule().patternLock.resetActivateCircleStyle(node); 8143 } 8144 else { 8145 getUINativeModule().patternLock.setActivateCircleStyle(node, this.value); 8146 } 8147 } 8148 checkObjectDiff() { 8149 return !isBaseOrResourceEqual(this.stageValue, this.value); 8150 } 8151} 8152PatternLockActivateCircleStyleModifier.identity = Symbol('patternLockActivateCircleStyle'); 8153class PatternLockSkipUnselectedPointModifier extends ModifierWithKey { 8154 constructor(value) { 8155 super(value); 8156 } 8157 applyPeer(node, reset) { 8158 if (reset) { 8159 getUINativeModule().patternLock.resetSkipUnselectedPoint(node); 8160 } 8161 else { 8162 getUINativeModule().patternLock.setSkipUnselectedPoint(node, this.value); 8163 } 8164 } 8165 checkObjectDiff() { 8166 return this.stageValue !== this.value; 8167 } 8168} 8169PatternLockSkipUnselectedPointModifier.identity = Symbol('patternlockSkipUnselectedPoint'); 8170class ArkPatternLockComponent extends ArkComponent { 8171 constructor(nativePtr, classType) { 8172 super(nativePtr, classType); 8173 } 8174 sideLength(value) { 8175 modifierWithKey(this._modifiersWithKeys, PatternLockSideLengthModifier.identity, PatternLockSideLengthModifier, value); 8176 return this; 8177 } 8178 circleRadius(value) { 8179 modifierWithKey(this._modifiersWithKeys, PatternLockCircleRadiusModifier.identity, PatternLockCircleRadiusModifier, value); 8180 return this; 8181 } 8182 regularColor(value) { 8183 modifierWithKey(this._modifiersWithKeys, PatternLockRegularColorModifier.identity, PatternLockRegularColorModifier, value); 8184 return this; 8185 } 8186 selectedColor(value) { 8187 modifierWithKey(this._modifiersWithKeys, PatternLockSelectedColorModifier.identity, PatternLockSelectedColorModifier, value); 8188 return this; 8189 } 8190 activeColor(value) { 8191 modifierWithKey(this._modifiersWithKeys, PatternLockActiveColorModifier.identity, PatternLockActiveColorModifier, value); 8192 return this; 8193 } 8194 pathColor(value) { 8195 modifierWithKey(this._modifiersWithKeys, PatternLockPathColorModifier.identity, PatternLockPathColorModifier, value); 8196 return this; 8197 } 8198 pathStrokeWidth(value) { 8199 modifierWithKey(this._modifiersWithKeys, PatternLockPathStrokeModifier.identity, PatternLockPathStrokeModifier, value); 8200 return this; 8201 } 8202 autoReset(value) { 8203 modifierWithKey(this._modifiersWithKeys, PatternLockAutoResetModifier.identity, PatternLockAutoResetModifier, value); 8204 return this; 8205 } 8206 activateCircleStyle(value) { 8207 modifierWithKey(this._modifiersWithKeys, PatternLockActivateCircleStyleModifier.identity, PatternLockActivateCircleStyleModifier, value); 8208 return this; 8209 } 8210 skipUnselectedPoint(value) { 8211 modifierWithKey(this._modifiersWithKeys, PatternLockSkipUnselectedPointModifier.identity, PatternLockSkipUnselectedPointModifier, value); 8212 return this; 8213 } 8214 onPatternComplete(callback) { 8215 throw new Error('Method not implemented.'); 8216 } 8217 onDotConnect(callback) { 8218 throw new Error('Method not implemented.'); 8219 } 8220} 8221// @ts-ignore 8222if (globalThis.PatternLock !== undefined) { 8223 globalThis.PatternLock.attributeModifier = function (modifier) { 8224 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8225 return new ArkPatternLockComponent(nativePtr); 8226 }, (nativePtr, classType, modifierJS) => { 8227 return new modifierJS.PatternLockModifier(nativePtr, classType); 8228 }); 8229 }; 8230} 8231 8232/// <reference path='./import.ts' /> 8233class RichEditorEnableDataDetectorModifier extends ModifierWithKey { 8234 constructor(value) { 8235 super(value); 8236 } 8237 applyPeer(node, reset) { 8238 if (reset) { 8239 getUINativeModule().richEditor.resetEnableDataDetector(node); 8240 } 8241 else { 8242 getUINativeModule().richEditor.setEnableDataDetector(node, this.value); 8243 } 8244 } 8245 checkObjectDiff() { 8246 return !isBaseOrResourceEqual(this.stageValue, this.value); 8247 } 8248} 8249RichEditorEnableDataDetectorModifier.identity = Symbol('richEditorEnableDataDetector'); 8250 8251class RichEditorDataDetectorConfigModifier extends ModifierWithKey { 8252 constructor(value) { 8253 super(value); 8254 } 8255 applyPeer(node, reset) { 8256 if (reset) { 8257 getUINativeModule().richEditor.resetDataDetectorConfig(node); 8258 } else { 8259 getUINativeModule().richEditor.setDataDetectorConfig(node, this.value.types, this.value.onDetectResultUpdate, 8260 this.value.color, this.value.decorationType, this.value.decorationColor, this.value.decorationStyle); 8261 } 8262 } 8263 checkObjectDiff() { 8264 return !isBaseOrResourceEqual(this.stageValue.types, this.value.types) || 8265 !isBaseOrResourceEqual(this.stageValue.onDetectResultUpdate, this.value.onDetectResultUpdate) || 8266 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 8267 !isBaseOrResourceEqual(this.stageValue.decorationType, this.value.decorationType) || 8268 !isBaseOrResourceEqual(this.stageValue.decorationColor, this.value.decorationColor) || 8269 !isBaseOrResourceEqual(this.stageValue.decorationStyle, this.value.decorationStyle); 8270 } 8271} 8272RichEditorDataDetectorConfigModifier.identity = Symbol('richEditorDataDetectorConfig'); 8273 8274class RichEditorOnIMEInputCompleteModifier extends ModifierWithKey { 8275 constructor(value) { 8276 super(value); 8277 } 8278 applyPeer(node, reset) { 8279 if (reset) { 8280 getUINativeModule().richEditor.resetOnIMEInputComplete(node); 8281 } else { 8282 getUINativeModule().richEditor.setOnIMEInputComplete(node, this.value); 8283 } 8284 } 8285} 8286RichEditorOnIMEInputCompleteModifier.identity = Symbol('richEditorOnIMEInputComplete'); 8287 8288class RichEditorCopyOptionsModifier extends ModifierWithKey { 8289 constructor(value) { 8290 super(value); 8291 } 8292 applyPeer(node, reset) { 8293 if (reset) { 8294 getUINativeModule().richEditor.resetCopyOptions(node); 8295 } 8296 else { 8297 getUINativeModule().richEditor.setCopyOptions(node, this.value); 8298 } 8299 } 8300 checkObjectDiff() { 8301 return this.stageValue !== this.value; 8302 } 8303} 8304RichEditorCopyOptionsModifier.identity = Symbol('richEditorCopyOptions'); 8305 8306class RichEditorCaretColorModifier extends ModifierWithKey { 8307 constructor(value) { 8308 super(value); 8309 } 8310 applyPeer(node, reset) { 8311 if (reset) { 8312 getUINativeModule().richEditor.resetCaretColor(node); 8313 } 8314 else { 8315 getUINativeModule().richEditor.setCaretColor(node, this.value); 8316 } 8317 } 8318 checkObjectDiff() { 8319 return this.stageValue !== this.value; 8320 } 8321} 8322RichEditorCaretColorModifier.identity = Symbol('richEditorCaretColor'); 8323 8324class RichEditorOnSelectionChangeModifier extends ModifierWithKey { 8325 constructor(value) { 8326 super(value); 8327 } 8328 applyPeer(node, reset) { 8329 if (reset) { 8330 getUINativeModule().richEditor.resetOnSelectionChange(node); 8331 } else { 8332 getUINativeModule().richEditor.setOnSelectionChange(node, this.value); 8333 } 8334 } 8335} 8336RichEditorOnSelectionChangeModifier.identity = Symbol('richEditorOnSelectionChange'); 8337 8338class RichEditorOnSubmitModifier extends ModifierWithKey { 8339 constructor(value) { 8340 super(value); 8341 } 8342 applyPeer(node, reset) { 8343 if (reset) { 8344 getUINativeModule().richEditor.resetOnSubmit(node); 8345 } else { 8346 getUINativeModule().richEditor.setOnSubmit(node, this.value); 8347 } 8348 } 8349} 8350RichEditorOnSubmitModifier.identity = Symbol('richEditorOnSubmit'); 8351 8352class RichEditorAboutToIMEInputModifier extends ModifierWithKey { 8353 constructor(value) { 8354 super(value); 8355 } 8356 applyPeer(node, reset) { 8357 if (reset) { 8358 getUINativeModule().richEditor.resetAboutToIMEInput(node); 8359 } else { 8360 getUINativeModule().richEditor.setAboutToIMEInput(node, this.value); 8361 } 8362 } 8363} 8364RichEditorAboutToIMEInputModifier.identity = Symbol('richEditorAboutToIMEInput'); 8365 8366class RichEditorSelectedBackgroundColorModifier extends ModifierWithKey { 8367 constructor(value) { 8368 super(value); 8369 } 8370 applyPeer(node, reset) { 8371 if (reset) { 8372 getUINativeModule().richEditor.resetSelectedBackgroundColor(node); 8373 } 8374 else { 8375 getUINativeModule().richEditor.setSelectedBackgroundColor(node, this.value); 8376 } 8377 } 8378 checkObjectDiff() { 8379 return this.stageValue !== this.value; 8380 } 8381} 8382RichEditorSelectedBackgroundColorModifier.identity = Symbol('richEditorSelectedBackgroundColor'); 8383 8384class RichEditorOnSelectModifier extends ModifierWithKey { 8385 constructor(value) { 8386 super(value); 8387 } 8388 applyPeer(node, reset) { 8389 if (reset) { 8390 getUINativeModule().richEditor.resetOnSelect(node); 8391 } else { 8392 getUINativeModule().richEditor.setOnSelect(node, this.value); 8393 } 8394 } 8395} 8396RichEditorOnSelectModifier.identity = Symbol('richEditorOnSelect'); 8397 8398class RichEditorOnReadyModifier extends ModifierWithKey { 8399 constructor(value) { 8400 super(value); 8401 } 8402 applyPeer(node, reset) { 8403 if (reset) { 8404 getUINativeModule().richEditor.resetOnReady(node); 8405 } else { 8406 getUINativeModule().richEditor.setOnReady(node, this.value); 8407 } 8408 } 8409} 8410RichEditorOnReadyModifier.identity = Symbol('richEditorOnReady'); 8411 8412class RichEditorOnDeleteCompleteModifier extends ModifierWithKey { 8413 constructor(value) { 8414 super(value); 8415 } 8416 applyPeer(node, reset) { 8417 if (reset) { 8418 getUINativeModule().richEditor.resetOnDeleteComplete(node); 8419 } else { 8420 getUINativeModule().richEditor.setOnDeleteComplete(node, this.value); 8421 } 8422 } 8423} 8424RichEditorOnDeleteCompleteModifier.identity = Symbol('richEditorOnDeleteComplete'); 8425 8426class RichEditorOnEditingChangeModifier extends ModifierWithKey { 8427 constructor(value) { 8428 super(value); 8429 } 8430 applyPeer(node, reset) { 8431 if (reset) { 8432 getUINativeModule().richEditor.resetOnEditingChange(node); 8433 } else { 8434 getUINativeModule().richEditor.setOnEditingChange(node, this.value); 8435 } 8436 } 8437} 8438RichEditorOnEditingChangeModifier.identity = Symbol('richEditorOnEditingChange'); 8439 8440class RichEditorOnPasteModifier extends ModifierWithKey { 8441 constructor(value) { 8442 super(value); 8443 } 8444 applyPeer(node, reset) { 8445 if (reset) { 8446 getUINativeModule().richEditor.resetOnPaste(node); 8447 } else { 8448 getUINativeModule().richEditor.setOnPaste(node, this.value); 8449 } 8450 } 8451} 8452RichEditorOnPasteModifier.identity = Symbol('richEditorOnPaste'); 8453 8454class RichEditorOnCutModifier extends ModifierWithKey { 8455 constructor(value) { 8456 super(value); 8457 } 8458 applyPeer(node, reset) { 8459 if (reset) { 8460 getUINativeModule().richEditor.resetOnCut(node); 8461 } else { 8462 getUINativeModule().richEditor.setOnCut(node, this.value); 8463 } 8464 } 8465} 8466RichEditorOnCutModifier.identity = Symbol('richEditorOnCut'); 8467 8468class RichEditorOnCopyModifier extends ModifierWithKey { 8469 constructor(value) { 8470 super(value); 8471 } 8472 applyPeer(node, reset) { 8473 if (reset) { 8474 getUINativeModule().richEditor.resetOnCopy(node); 8475 } else { 8476 getUINativeModule().richEditor.setOnCopy(node, this.value); 8477 } 8478 } 8479} 8480RichEditorOnCopyModifier.identity = Symbol('richEditorOnCopy'); 8481 8482class RichEditorEnterKeyTypeModifier extends ModifierWithKey { 8483 constructor(value) { 8484 super(value); 8485 } 8486 applyPeer(node, reset) { 8487 if (reset) { 8488 getUINativeModule().richEditor.resetEnterKeyType(node); 8489 } 8490 else { 8491 getUINativeModule().richEditor.setEnterKeyType(node, this.value); 8492 } 8493 } 8494 checkObjectDiff() { 8495 return this.stageValue !== this.value; 8496 } 8497} 8498RichEditorEnterKeyTypeModifier.identity = Symbol('richEditorEnterKeyType'); 8499 8500class RichEditorKeyboardAppearanceModifier extends ModifierWithKey { 8501 constructor(value) { 8502 super(value); 8503 } 8504 applyPeer(node, reset) { 8505 if (reset) { 8506 getUINativeModule().richEditor.resetKeyboardAppearance(node); 8507 } 8508 else { 8509 getUINativeModule().richEditor.setKeyboardAppearance(node, this.value); 8510 } 8511 } 8512 checkObjectDiff() { 8513 return !isBaseOrResourceEqual(this.stageValue, this.value); 8514 } 8515} 8516RichEditorKeyboardAppearanceModifier.identity = Symbol('richEditorKeyboardAppearance'); 8517 8518class ArkRichEditorComponent extends ArkComponent { 8519 constructor(nativePtr, classType) { 8520 super(nativePtr, classType); 8521 } 8522 enableDataDetector(value) { 8523 modifierWithKey(this._modifiersWithKeys, RichEditorEnableDataDetectorModifier.identity, RichEditorEnableDataDetectorModifier, value); 8524 return this; 8525 } 8526 dataDetectorConfig(config) { 8527 if (config === undefined || config === null) { 8528 return this; 8529 } 8530 let detectorConfig = new TextDataDetectorConfig(); 8531 detectorConfig.types = config.types; 8532 detectorConfig.onDetectResultUpdate = config.onDetectResultUpdate; 8533 detectorConfig.color = config.color; 8534 if (config.decoration) { 8535 detectorConfig.decorationType = config.decoration.type; 8536 detectorConfig.decorationColor = config.decoration.color; 8537 detectorConfig.decorationStyle = config.decoration.style; 8538 } 8539 modifierWithKey(this._modifiersWithKeys, RichEditorDataDetectorConfigModifier.identity, RichEditorDataDetectorConfigModifier, detectorConfig); 8540 return this; 8541 } 8542 copyOptions(value) { 8543 modifierWithKey(this._modifiersWithKeys, RichEditorCopyOptionsModifier.identity, RichEditorCopyOptionsModifier, value); 8544 return this; 8545 } 8546 8547 caretColor(value) { 8548 modifierWithKey(this._modifiersWithKeys, RichEditorCaretColorModifier.identity, RichEditorCaretColorModifier, value); 8549 return this; 8550 } 8551 8552 onSelectionChange(callback) { 8553 modifierWithKey(this._modifiersWithKeys, RichEditorOnSelectionChangeModifier.identity, RichEditorOnSelectionChangeModifier, callback); 8554 return this; 8555 } 8556 8557 selectedBackgroundColor(value) { 8558 modifierWithKey(this._modifiersWithKeys, RichEditorSelectedBackgroundColorModifier.identity, RichEditorSelectedBackgroundColorModifier, value); 8559 return this; 8560 } 8561 8562 enterKeyType(value) { 8563 modifierWithKey(this._modifiersWithKeys, RichEditorEnterKeyTypeModifier.identity, RichEditorEnterKeyTypeModifier, value); 8564 return this; 8565 } 8566 8567 onPaste(callback) { 8568 modifierWithKey(this._modifiersWithKeys, RichEditorOnPasteModifier.identity, RichEditorOnPasteModifier, callback); 8569 return this; 8570 } 8571 onReady(callback) { 8572 modifierWithKey(this._modifiersWithKeys, RichEditorOnReadyModifier.identity, RichEditorOnReadyModifier, callback); 8573 return this; 8574 } 8575 onSelect(callback) { 8576 modifierWithKey(this._modifiersWithKeys, RichEditorOnSelectModifier.identity, RichEditorOnSelectModifier, callback); 8577 return this; 8578 } 8579 onSubmit(callback) { 8580 modifierWithKey(this._modifiersWithKeys, RichEditorOnSubmitModifier.identity, RichEditorOnSubmitModifier, callback); 8581 return this; 8582 } 8583 aboutToIMEInput(callback) { 8584 modifierWithKey(this._modifiersWithKeys, RichEditorAboutToIMEInputModifier.identity, RichEditorAboutToIMEInputModifier, callback); 8585 return this; 8586 } 8587 onIMEInputComplete(callback) { 8588 modifierWithKey(this._modifiersWithKeys, RichEditorOnIMEInputCompleteModifier.identity, RichEditorOnIMEInputCompleteModifier, callback); 8589 return this; 8590 } 8591 aboutToDelete(callback) { 8592 throw new Error('Method not implemented.'); 8593 } 8594 onDeleteComplete(callback) { 8595 modifierWithKey(this._modifiersWithKeys, RichEditorOnDeleteCompleteModifier.identity, RichEditorOnDeleteCompleteModifier, callback); 8596 return this; 8597 } 8598 bindSelectionMenu(spanType, content, responseType, options) { 8599 throw new Error('Method not implemented.'); 8600 } 8601 customKeyboard(value) { 8602 throw new Error('Method not implemented.'); 8603 } 8604 onEditingChange(callback) { 8605 modifierWithKey(this._modifiersWithKeys, RichEditorOnEditingChangeModifier.identity, RichEditorOnEditingChangeModifier, callback); 8606 return this; 8607 } 8608 onCut(callback) { 8609 modifierWithKey(this._modifiersWithKeys, RichEditorOnCutModifier.identity, RichEditorOnCutModifier, callback); 8610 return this; 8611 } 8612 onCopy(callback) { 8613 modifierWithKey(this._modifiersWithKeys, RichEditorOnCopyModifier.identity, RichEditorOnCopyModifier, callback); 8614 return this; 8615 } 8616 keyboardAppearance(value) { 8617 modifierWithKey(this._modifiersWithKeys, RichEditorKeyboardAppearanceModifier.identity, RichEditorKeyboardAppearanceModifier, value); 8618 return this; 8619 } 8620} 8621// @ts-ignore 8622if (globalThis.RichEditor !== undefined) { 8623 globalThis.RichEditor.attributeModifier = function (modifier) { 8624 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8625 return new ArkRichEditorComponent(nativePtr); 8626 }, (nativePtr, classType, modifierJS) => { 8627 return new modifierJS.RichEditorModifier(nativePtr, classType); 8628 }); 8629 }; 8630} 8631 8632/// <reference path='./import.ts' /> 8633class RowAlignItemsModifier extends ModifierWithKey { 8634 constructor(value) { 8635 super(value); 8636 } 8637 applyPeer(node, reset) { 8638 if (reset) { 8639 getUINativeModule().row.resetAlignItems(node); 8640 } 8641 else { 8642 getUINativeModule().row.setAlignItems(node, this.value); 8643 } 8644 } 8645 checkObjectDiff() { 8646 return this.stageValue !== this.value; 8647 } 8648} 8649RowAlignItemsModifier.identity = Symbol('rowAlignItems'); 8650class RowJustifyContentlModifier extends ModifierWithKey { 8651 constructor(value) { 8652 super(value); 8653 } 8654 applyPeer(node, reset) { 8655 if (reset) { 8656 getUINativeModule().row.resetJustifyContent(node); 8657 } 8658 else { 8659 getUINativeModule().row.setJustifyContent(node, this.value); 8660 } 8661 } 8662 checkObjectDiff() { 8663 return this.stageValue !== this.value; 8664 } 8665} 8666RowJustifyContentlModifier.identity = Symbol('rowJustifyContent'); 8667 8668class RowSpaceModifier extends ModifierWithKey { 8669 constructor(value) { 8670 super(value); 8671 } 8672 applyPeer(node, reset) { 8673 if (reset) { 8674 getUINativeModule().row.resetSpace(node); 8675 } 8676 else { 8677 getUINativeModule().row.setSpace(node, this.value); 8678 } 8679 } 8680 checkObjectDiff() { 8681 return this.stageValue !== this.value; 8682 } 8683} 8684RowSpaceModifier.identity = Symbol('rowSpace'); 8685 8686class RowPointLightModifier extends ModifierWithKey { 8687 constructor(value) { 8688 super(value); 8689 } 8690 applyPeer(node, reset) { 8691 if (reset) { 8692 getUINativeModule().common.resetPointLightStyle(node); 8693 } else { 8694 let positionX; 8695 let positionY; 8696 let positionZ; 8697 let intensity; 8698 let color; 8699 let illuminated; 8700 let bloom; 8701 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 8702 positionX = this.value.lightSource.positionX; 8703 positionY = this.value.lightSource.positionY; 8704 positionZ = this.value.lightSource.positionZ; 8705 intensity = this.value.lightSource.intensity; 8706 color = this.value.lightSource.color; 8707 } 8708 illuminated = this.value.illuminated; 8709 bloom = this.value.bloom; 8710 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 8711 illuminated, bloom); 8712 } 8713 } 8714 checkObjectDiff() { 8715 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 8716 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 8717 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 8718 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 8719 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 8720 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 8721 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 8722 } 8723} 8724RowPointLightModifier.identity = Symbol('rowPointLight'); 8725 8726class RowReverseModifier extends ModifierWithKey { 8727 constructor(value) { 8728 super(value); 8729 } 8730 applyPeer(node, reset) { 8731 if (reset) { 8732 getUINativeModule().row.resetReverse(node); 8733 } else { 8734 getUINativeModule().row.setReverse(node, this.value); 8735 } 8736 } 8737 checkObjectDiff() { 8738 return this.stageValue !== this.value; 8739 } 8740} 8741RowReverseModifier.identity = Symbol('rowReverse'); 8742 8743class ArkRowComponent extends ArkComponent { 8744 constructor(nativePtr, classType) { 8745 super(nativePtr, classType); 8746 } 8747 initialize(value) { 8748 if (value[0] !== undefined) { 8749 modifierWithKey(this._modifiersWithKeys, RowSpaceModifier.identity, RowSpaceModifier, value[0].space); 8750 } 8751 return this 8752 } 8753 alignItems(value) { 8754 modifierWithKey(this._modifiersWithKeys, RowAlignItemsModifier.identity, RowAlignItemsModifier, value); 8755 return this; 8756 } 8757 justifyContent(value) { 8758 modifierWithKey(this._modifiersWithKeys, RowJustifyContentlModifier.identity, RowJustifyContentlModifier, value); 8759 return this; 8760 } 8761 pointLight(value) { 8762 modifierWithKey(this._modifiersWithKeys, RowPointLightModifier.identity, RowPointLightModifier, value); 8763 return this; 8764 } 8765 reverse(value) { 8766 modifierWithKey(this._modifiersWithKeys, RowReverseModifier.identity, RowReverseModifier, value); 8767 return this; 8768 } 8769} 8770// @ts-ignore 8771if (globalThis.Row !== undefined) { 8772 globalThis.Row.attributeModifier = function (modifier) { 8773 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8774 return new ArkRowComponent(nativePtr); 8775 }, (nativePtr, classType, modifierJS) => { 8776 return new modifierJS.RowModifier(nativePtr, classType); 8777 }); 8778 }; 8779} 8780 8781/// <reference path='./import.ts' /> 8782class RowSplitResizeableModifier extends ModifierWithKey { 8783 constructor(value) { 8784 super(value); 8785 } 8786 applyPeer(node, reset) { 8787 if (reset) { 8788 getUINativeModule().rowSplit.resetResizeable(node); 8789 } 8790 else { 8791 getUINativeModule().rowSplit.setResizeable(node, this.value); 8792 } 8793 } 8794} 8795RowSplitResizeableModifier.identity = Symbol('rowSplitResizeable'); 8796class RowSplitClipModifier extends ModifierWithKey { 8797 constructor(value) { 8798 super(value); 8799 } 8800 applyPeer(node, reset) { 8801 if (reset) { 8802 getUINativeModule().common.resetClipWithEdge(node); 8803 } 8804 else { 8805 getUINativeModule().common.setClipWithEdge(node, this.value); 8806 } 8807 } 8808 checkObjectDiff() { 8809 return true; 8810 } 8811} 8812RowSplitClipModifier.identity = Symbol('rowSplitClip'); 8813class ArkRowSplitComponent extends ArkComponent { 8814 constructor(nativePtr, classType) { 8815 super(nativePtr, classType); 8816 } 8817 resizeable(value) { 8818 modifierWithKey(this._modifiersWithKeys, RowSplitResizeableModifier.identity, RowSplitResizeableModifier, value); 8819 return this; 8820 } 8821 clip(value) { 8822 modifierWithKey(this._modifiersWithKeys, RowSplitClipModifier.identity, RowSplitClipModifier, value); 8823 return this; 8824 } 8825} 8826// @ts-ignore 8827if (globalThis.RowSplit !== undefined) { 8828 globalThis.RowSplit.attributeModifier = function (modifier) { 8829 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8830 return new ArkRowSplitComponent(nativePtr); 8831 }, (nativePtr, classType, modifierJS) => { 8832 return new modifierJS.RowSplitModifier(nativePtr, classType); 8833 }); 8834 }; 8835} 8836 8837/// <reference path='./import.ts' /> 8838class SearchSelectionMenuHiddenModifier extends ModifierWithKey { 8839 constructor(value) { 8840 super(value); 8841 } 8842 applyPeer(node, reset) { 8843 if (reset) { 8844 getUINativeModule().search.resetSelectionMenuHidden(node); 8845 } 8846 else { 8847 getUINativeModule().search.setSelectionMenuHidden(node, this.value); 8848 } 8849 } 8850 checkObjectDiff() { 8851 return this.stageValue !== this.value; 8852 } 8853} 8854SearchSelectionMenuHiddenModifier.identity = Symbol('searchSelectionMenuHidden'); 8855class SearchCaretStyleModifier extends ModifierWithKey { 8856 constructor(value) { 8857 super(value); 8858 } 8859 applyPeer(node, reset) { 8860 if (reset) { 8861 getUINativeModule().search.resetCaretStyle(node); 8862 } 8863 else { 8864 getUINativeModule().search.setCaretStyle(node, this.value.width, this.value.color); 8865 } 8866 } 8867 checkObjectDiff() { 8868 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 8869 !isBaseOrResourceEqual(this.stageValue.color, this.value.color); 8870 } 8871} 8872SearchCaretStyleModifier.identity = Symbol('searchCaretStyle'); 8873class SearchEnableKeyboardOnFocusModifier extends ModifierWithKey { 8874 constructor(value) { 8875 super(value); 8876 } 8877 applyPeer(node, reset) { 8878 if (reset) { 8879 getUINativeModule().search.resetEnableKeyboardOnFocus(node); 8880 } 8881 else { 8882 getUINativeModule().search.setEnableKeyboardOnFocus(node, this.value); 8883 } 8884 } 8885 checkObjectDiff() { 8886 return this.stageValue !== this.value; 8887 } 8888} 8889SearchEnableKeyboardOnFocusModifier.identity = Symbol('searchEnableKeyboardOnFocus'); 8890class SearchSearchIconModifier extends ModifierWithKey { 8891 constructor(value) { 8892 super(value); 8893 } 8894 applyPeer(node, reset) { 8895 if (reset) { 8896 getUINativeModule().search.resetSearchIcon(node); 8897 } 8898 else { 8899 getUINativeModule().search.setSearchIcon(node, this.value.size, this.value.color, this.value.src); 8900 } 8901 } 8902 checkObjectDiff() { 8903 return !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 8904 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 8905 !isBaseOrResourceEqual(this.stageValue.src, this.value.src); 8906 } 8907} 8908SearchSearchIconModifier.identity = Symbol('searchSearchIcon'); 8909class SearchPlaceholderFontModifier extends ModifierWithKey { 8910 constructor(value) { 8911 super(value); 8912 } 8913 applyPeer(node, reset) { 8914 if (reset) { 8915 getUINativeModule().search.resetPlaceholderFont(node); 8916 } 8917 else { 8918 getUINativeModule().search.setPlaceholderFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 8919 } 8920 } 8921 checkObjectDiff() { 8922 return this.stageValue.weight !== this.value.weight || 8923 this.stageValue.style !== this.value.style || 8924 !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 8925 !isBaseOrResourceEqual(this.stageValue.family, this.value.family); 8926 } 8927} 8928SearchPlaceholderFontModifier.identity = Symbol('searchPlaceholderFont'); 8929class SearchSearchButtonModifier extends ModifierWithKey { 8930 constructor(value) { 8931 super(value); 8932 } 8933 applyPeer(node, reset) { 8934 if (reset) { 8935 getUINativeModule().search.resetSearchButton(node); 8936 } 8937 else { 8938 getUINativeModule().search.setSearchButton(node, this.value.value, this.value.fontSize, this.value.fontColor); 8939 } 8940 } 8941 checkObjectDiff() { 8942 return this.stageValue.value !== this.value.value || 8943 !isBaseOrResourceEqual(this.stageValue.fontSize, this.value.fontSize) || 8944 !isBaseOrResourceEqual(this.stageValue.fontColor, this.value.fontColor); 8945 } 8946} 8947SearchSearchButtonModifier.identity = Symbol('searchSearchButton'); 8948class SearchFontColorModifier extends ModifierWithKey { 8949 constructor(value) { 8950 super(value); 8951 } 8952 applyPeer(node, reset) { 8953 if (reset) { 8954 getUINativeModule().search.resetFontColor(node); 8955 } 8956 else { 8957 getUINativeModule().search.setFontColor(node, this.value); 8958 } 8959 } 8960 checkObjectDiff() { 8961 return !isBaseOrResourceEqual(this.stageValue, this.value); 8962 } 8963} 8964SearchFontColorModifier.identity = Symbol('searchFontColor'); 8965class SearchFontFeatureModifier extends ModifierWithKey { 8966 constructor(value) { 8967 super(value); 8968 } 8969 applyPeer(node, reset) { 8970 if (reset) { 8971 getUINativeModule().search.resetFontFeature(node); 8972 } else { 8973 getUINativeModule().search.setFontFeature(node, this.value); 8974 } 8975 } 8976 checkObjectDiff() { 8977 return !isBaseOrResourceEqual(this.stageValue, this.value); 8978 } 8979} 8980SearchFontFeatureModifier.identity = Symbol('searchFontFeature'); 8981class SearchCopyOptionModifier extends ModifierWithKey { 8982 constructor(value) { 8983 super(value); 8984 } 8985 applyPeer(node, reset) { 8986 if (reset) { 8987 getUINativeModule().search.resetCopyOption(node); 8988 } 8989 else { 8990 getUINativeModule().search.setCopyOption(node, this.value); 8991 } 8992 } 8993 checkObjectDiff() { 8994 return this.stageValue !== this.value; 8995 } 8996} 8997SearchCopyOptionModifier.identity = Symbol('searchCopyOption'); 8998class SearchTextFontModifier extends ModifierWithKey { 8999 constructor(value) { 9000 super(value); 9001 } 9002 applyPeer(node, reset) { 9003 if (reset) { 9004 getUINativeModule().search.resetTextFont(node); 9005 } 9006 else { 9007 getUINativeModule().search.setTextFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 9008 } 9009 } 9010 checkObjectDiff() { 9011 return this.stageValue.weight !== this.value.weight || 9012 this.stageValue.style !== this.value.style || 9013 !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 9014 !isBaseOrResourceEqual(this.stageValue.family, this.value.family); 9015 } 9016} 9017SearchTextFontModifier.identity = Symbol('searchTextFont'); 9018class SearchPlaceholderColorModifier extends ModifierWithKey { 9019 constructor(value) { 9020 super(value); 9021 } 9022 applyPeer(node, reset) { 9023 if (reset) { 9024 getUINativeModule().search.resetPlaceholderColor(node); 9025 } 9026 else { 9027 getUINativeModule().search.setPlaceholderColor(node, this.value); 9028 } 9029 } 9030 checkObjectDiff() { 9031 return !isBaseOrResourceEqual(this.stageValue, this.value); 9032 } 9033} 9034SearchPlaceholderColorModifier.identity = Symbol('searchPlaceholderColor'); 9035class SearchCancelButtonModifier extends ModifierWithKey { 9036 constructor(value) { 9037 super(value); 9038 } 9039 applyPeer(node, reset) { 9040 let _a, _b, _c; 9041 if (reset) { 9042 getUINativeModule().search.resetCancelButton(node); 9043 } 9044 else { 9045 getUINativeModule().search.setCancelButton(node, this.value.style, 9046 (_a = this.value.icon) === null || _a === void 0 ? void 0 : _a.size, 9047 (_b = this.value.icon) === null || _b === void 0 ? void 0 : _b.color, 9048 (_c = this.value.icon) === null || _c === void 0 ? void 0 : _c.src); 9049 } 9050 } 9051 checkObjectDiff() { 9052 let _a, _b, _c, _d, _e, _f; 9053 return this.stageValue.style !== this.value.style || 9054 !isBaseOrResourceEqual((_a = this.stageValue.icon) === null || _a === void 0 ? void 0 : _a.size, (_b = this.value.icon) === null || _b === void 0 ? void 0 : _b.size) || 9055 !isBaseOrResourceEqual((_c = this.stageValue.icon) === null || _c === void 0 ? void 0 : _c.color, (_d = this.value.icon) === null || _d === void 0 ? void 0 : _d.color) || 9056 !isBaseOrResourceEqual((_e = this.stageValue.icon) === null || _e === void 0 ? void 0 : _e.src, (_f = this.value.icon) === null || _f === void 0 ? void 0 : _f.src); 9057 } 9058} 9059SearchCancelButtonModifier.identity = Symbol('searchCancelButton'); 9060class SearchTextAlignModifier extends ModifierWithKey { 9061 constructor(value) { 9062 super(value); 9063 } 9064 applyPeer(node, reset) { 9065 if (reset) { 9066 getUINativeModule().search.resetTextAlign(node); 9067 } 9068 else { 9069 getUINativeModule().search.setTextAlign(node, this.value); 9070 } 9071 } 9072 checkObjectDiff() { 9073 return this.stageValue !== this.value; 9074 } 9075} 9076SearchTextAlignModifier.identity = Symbol('searchTextAlign'); 9077class SearchEnterKeyTypeModifier extends ModifierWithKey { 9078 constructor(value) { 9079 super(value); 9080 } 9081 applyPeer(node, reset) { 9082 if (reset) { 9083 getUINativeModule().search.resetSearchEnterKeyType(node); 9084 } else { 9085 getUINativeModule().search.setSearchEnterKeyType(node, this.value); 9086 } 9087 } 9088 checkObjectDiff() { 9089 return !isBaseOrResourceEqual(this.stageValue, this.value); 9090 } 9091} 9092SearchEnterKeyTypeModifier.identity = Symbol('searchEnterKeyType'); 9093class SearchHeightModifier extends ModifierWithKey { 9094 constructor(value) { 9095 super(value); 9096 } 9097 applyPeer(node, reset) { 9098 if (reset) { 9099 getUINativeModule().search.resetSearchHeight(node); 9100 } else { 9101 getUINativeModule().search.setSearchHeight(node, this.value); 9102 } 9103 } 9104 checkObjectDiff() { 9105 return !isBaseOrResourceEqual(this.stageValue, this.value); 9106 } 9107} 9108SearchHeightModifier.identity = Symbol('searchHeight'); 9109class SearchDecorationModifier extends ModifierWithKey { 9110 constructor(value) { 9111 super(value); 9112 } 9113 applyPeer(node, reset) { 9114 if (reset) { 9115 getUINativeModule().search.resetDecoration(node); 9116 } 9117 else { 9118 getUINativeModule().search.setDecoration(node, this.value.type, this.value.color, this.value.style); 9119 } 9120 } 9121 checkObjectDiff() { 9122 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 9123 return true; 9124 } 9125 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 9126 return !isResourceEqual(this.stageValue.color, this.value.color); 9127 } 9128 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 9129 return !(this.stageValue.color === this.value.color); 9130 } 9131 else { 9132 return true; 9133 } 9134 } 9135} 9136SearchDecorationModifier.identity = Symbol('searchDecoration'); 9137class SearchLetterSpacingModifier extends ModifierWithKey { 9138 constructor(value) { 9139 super(value); 9140 } 9141 applyPeer(node, reset) { 9142 if (reset) { 9143 getUINativeModule().search.resetLetterSpacing(node); 9144 } 9145 else { 9146 getUINativeModule().search.setLetterSpacing(node, this.value); 9147 } 9148 } 9149 checkObjectDiff() { 9150 return !isBaseOrResourceEqual(this.stageValue, this.value); 9151 } 9152} 9153SearchLetterSpacingModifier.identity = Symbol('searchLetterSpacing'); 9154class SearchLineHeightModifier extends ModifierWithKey { 9155 constructor(value) { 9156 super(value); 9157 } 9158 applyPeer(node, reset) { 9159 if (reset) { 9160 getUINativeModule().search.resetLineHeight(node); 9161 } 9162 else { 9163 getUINativeModule().search.setLineHeight(node, this.value); 9164 } 9165 } 9166 checkObjectDiff() { 9167 return !isBaseOrResourceEqual(this.stageValue, this.value); 9168 } 9169} 9170SearchLineHeightModifier.identity = Symbol('searchLineHeight'); 9171class SearchMinFontSizeModifier extends ModifierWithKey { 9172 constructor(value) { 9173 super(value); 9174 } 9175 applyPeer(node, reset) { 9176 if (reset) { 9177 getUINativeModule().search.resetSearchMinFontSize(node); 9178 } 9179 else { 9180 getUINativeModule().search.setSearchMinFontSize(node, this.value); 9181 } 9182 } 9183 checkObjectDiff() { 9184 return !isBaseOrResourceEqual(this.stageValue, this.value); 9185 } 9186} 9187SearchMinFontSizeModifier.identity = Symbol('searchMinFontSize'); 9188class SearchMaxFontSizeModifier extends ModifierWithKey { 9189 constructor(value) { 9190 super(value); 9191 } 9192 applyPeer(node, reset) { 9193 if (reset) { 9194 getUINativeModule().search.resetSearchMaxFontSize(node); 9195 } 9196 else { 9197 getUINativeModule().search.setSearchMaxFontSize(node, this.value); 9198 } 9199 } 9200 checkObjectDiff() { 9201 return !isBaseOrResourceEqual(this.stageValue, this.value); 9202 } 9203} 9204SearchMaxFontSizeModifier.identity = Symbol('searchMaxFontSize'); 9205class SearchInputFilterModifier extends ModifierWithKey { 9206 constructor(value) { 9207 super(value); 9208 } 9209 applyPeer(node, reset) { 9210 if (reset) { 9211 getUINativeModule().search.resetInputFilter(node); 9212 } else { 9213 getUINativeModule().search.setInputFilter(node, this.value.value, this.value.error); 9214 } 9215 } 9216} 9217SearchInputFilterModifier.identity = Symbol('searchInputFilter'); 9218class SearchSelectedBackgroundColorModifier extends ModifierWithKey { 9219 constructor(value) { 9220 super(value); 9221 } 9222 applyPeer(node, reset) { 9223 if (reset) { 9224 getUINativeModule().search.resetSelectedBackgroundColor(node); 9225 } else { 9226 getUINativeModule().search.setSelectedBackgroundColor(node, this.value); 9227 } 9228 } 9229 checkObjectDiff() { 9230 return !isBaseOrResourceEqual(this.stageValue, this.value); 9231 } 9232} 9233SearchSelectedBackgroundColorModifier.identity = Symbol('searchSelectedBackgroundColor'); 9234class SearchTextIndentModifier extends ModifierWithKey { 9235 constructor(value) { 9236 super(value); 9237 } 9238 applyPeer(node, reset) { 9239 if (reset) { 9240 getUINativeModule().search.resetTextIndent(node); 9241 } else { 9242 getUINativeModule().search.setTextIndent(node, this.value); 9243 } 9244 } 9245 checkObjectDiff() { 9246 return !isBaseOrResourceEqual(this.stageValue, this.value); 9247 } 9248} 9249SearchTextIndentModifier.identity = Symbol('searchTextIndent'); 9250class SearchMaxLengthModifier extends ModifierWithKey { 9251 constructor(value) { 9252 super(value); 9253 } 9254 applyPeer(node, reset) { 9255 if (reset) { 9256 getUINativeModule().search.resetMaxLength(node); 9257 } else { 9258 getUINativeModule().search.setMaxLength(node, this.value); 9259 } 9260 } 9261 checkObjectDiff() { 9262 return !isBaseOrResourceEqual(this.stageValue, this.value); 9263 } 9264} 9265SearchMaxLengthModifier.identity = Symbol('searchMaxLength'); 9266class SearchTypeModifier extends ModifierWithKey { 9267 constructor(value) { 9268 super(value); 9269 } 9270 applyPeer(node, reset) { 9271 if (reset) { 9272 getUINativeModule().search.resetType(node); 9273 } else { 9274 getUINativeModule().search.setType(node, this.value); 9275 } 9276 } 9277 checkObjectDiff() { 9278 return !isBaseOrResourceEqual(this.stageValue, this.value); 9279 } 9280} 9281SearchTypeModifier.identity = Symbol('searchType'); 9282class SearchOnEditChangeModifier extends ModifierWithKey { 9283 constructor(value) { 9284 super(value); 9285 } 9286 applyPeer(node, reset) { 9287 if (reset) { 9288 getUINativeModule().search.resetOnEditChange(node); 9289 } else { 9290 getUINativeModule().search.setOnEditChange(node, this.value); 9291 } 9292 } 9293} 9294SearchOnEditChangeModifier.identity = Symbol('searchOnEditChange'); 9295class SearchOnSubmitModifier extends ModifierWithKey { 9296 constructor(value) { 9297 super(value); 9298 } 9299 applyPeer(node, reset) { 9300 if (reset) { 9301 getUINativeModule().search.resetOnSubmit(node); 9302 } else { 9303 getUINativeModule().search.setOnSubmit(node, this.value); 9304 } 9305 } 9306} 9307SearchOnSubmitModifier.identity = Symbol('searchOnSubmit'); 9308class SearchOnCopyModifier extends ModifierWithKey { 9309 constructor(value) { 9310 super(value); 9311 } 9312 applyPeer(node, reset) { 9313 if (reset) { 9314 getUINativeModule().search.resetOnCopy(node); 9315 } else { 9316 getUINativeModule().search.setOnCopy(node, this.value); 9317 } 9318 } 9319} 9320SearchOnCopyModifier.identity = Symbol('searchOnCopy'); 9321class SearchOnCutModifier extends ModifierWithKey { 9322 constructor(value) { 9323 super(value); 9324 } 9325 applyPeer(node, reset) { 9326 if (reset) { 9327 getUINativeModule().search.resetOnCut(node); 9328 } else { 9329 getUINativeModule().search.setOnCut(node, this.value); 9330 } 9331 } 9332} 9333SearchOnCutModifier.identity = Symbol('searchOnCut'); 9334class SearchOnPasteModifier extends ModifierWithKey { 9335 constructor(value) { 9336 super(value); 9337 } 9338 static identity = Symbol('searchOnPaste'); 9339 applyPeer(node, reset) { 9340 if (reset) { 9341 getUINativeModule().search.resetOnPaste(node); 9342 } else { 9343 getUINativeModule().search.setOnPaste(node, this.value); 9344 } 9345 } 9346} 9347SearchOnPasteModifier.identity = Symbol('searchOnPaste'); 9348class SearchOnChangeModifier extends ModifierWithKey { 9349 constructor(value) { 9350 super(value); 9351 } 9352 applyPeer(node, reset) { 9353 if (reset) { 9354 getUINativeModule().search.resetOnChange(node); 9355 } else { 9356 getUINativeModule().search.setOnChange(node, this.value); 9357 } 9358 } 9359} 9360SearchOnChangeModifier.identity = Symbol('searchOnChange'); 9361class SearchOnTextSelectionChangeModifier extends ModifierWithKey { 9362 constructor(value) { 9363 super(value); 9364 } 9365 applyPeer(node, reset) { 9366 if (reset) { 9367 getUINativeModule().search.resetOnTextSelectionChange(node); 9368 } else { 9369 getUINativeModule().search.setOnTextSelectionChange(node, this.value); 9370 } 9371 } 9372} 9373SearchOnTextSelectionChangeModifier.identity = Symbol('searchOnTextSelectionChange'); 9374class SearchOnContentScrollModifier extends ModifierWithKey { 9375 constructor(value) { 9376 super(value); 9377 } 9378 applyPeer(node, reset) { 9379 if (reset) { 9380 getUINativeModule().search.resetOnContentScroll(node); 9381 } else { 9382 getUINativeModule().search.setOnContentScroll(node, this.value); 9383 } 9384 } 9385} 9386SearchOnContentScrollModifier.identity = Symbol('searchOnContentScroll'); 9387class SearchShowCounterModifier extends ModifierWithKey { 9388 constructor(value) { 9389 super(value); 9390 } 9391 applyPeer(node, reset) { 9392 if (reset) { 9393 getUINativeModule().search.resetShowCounter(node); 9394 } 9395 else { 9396 getUINativeModule().search.setShowCounter(node, this.value.value, this.value.highlightBorder, this.value.thresholdPercentage); 9397 } 9398 } 9399 checkObjectDiff() { 9400 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 9401 !isBaseOrResourceEqual(this.stageValue.highlightBorder, this.value.highlightBorder) || 9402 !isBaseOrResourceEqual(this.stageValue.thresholdPercentage, this.value.thresholdPercentage); 9403 } 9404} 9405SearchShowCounterModifier.identity = Symbol('searchShowCounter'); 9406class SearchInitializeModifier extends ModifierWithKey { 9407 constructor(value) { 9408 super(value); 9409 } 9410 applyPeer(node, reset) { 9411 if (reset) { 9412 getUINativeModule().search.resetSearchInitialize(node); 9413 } else { 9414 getUINativeModule().search.setSearchInitialize(node, this.value.value, 9415 this.value.placeholder, this.value.icon, this.value.controller); 9416 } 9417 } 9418} 9419SearchInitializeModifier.identity = Symbol('searchInitialize'); 9420class SearchOnWillChangeModifier extends ModifierWithKey { 9421 constructor(value) { 9422 super(value); 9423 } 9424 applyPeer(node, reset) { 9425 if (reset) { 9426 getUINativeModule().search.resetOnWillChange(node); 9427 } else { 9428 getUINativeModule().search.setOnWillChange(node, this.value); 9429 } 9430 } 9431} 9432SearchOnWillChangeModifier.identity = Symbol('searchOnWillChange'); 9433class SearchOnWillInsertModifier extends ModifierWithKey { 9434 constructor(value) { 9435 super(value); 9436 } 9437 applyPeer(node, reset) { 9438 if (reset) { 9439 getUINativeModule().search.resetOnWillInsert(node); 9440 } else { 9441 getUINativeModule().search.setOnWillInsert(node, this.value); 9442 } 9443 } 9444} 9445SearchOnWillInsertModifier.identity = Symbol('searchOnWillInsert'); 9446class SearchOnDidInsertModifier extends ModifierWithKey { 9447 constructor(value) { 9448 super(value); 9449 } 9450 applyPeer(node, reset) { 9451 if (reset) { 9452 getUINativeModule().search.resetOnDidInsert(node); 9453 } else { 9454 getUINativeModule().search.setOnDidInsert(node, this.value); 9455 } 9456 } 9457} 9458SearchOnDidInsertModifier.identity = Symbol('searchOnDidInsert'); 9459class SearchOnWillDeleteModifier extends ModifierWithKey { 9460 constructor(value) { 9461 super(value); 9462 } 9463 applyPeer(node, reset) { 9464 if (reset) { 9465 getUINativeModule().search.resetOnWillDelete(node); 9466 } else { 9467 getUINativeModule().search.setOnWillDelete(node, this.value); 9468 } 9469 } 9470} 9471SearchOnWillDeleteModifier.identity = Symbol('searchOnWillDelete'); 9472class SearchOnDidDeleteModifier extends ModifierWithKey { 9473 constructor(value) { 9474 super(value); 9475 } 9476 applyPeer(node, reset) { 9477 if (reset) { 9478 getUINativeModule().search.resetOnDidDelete(node); 9479 } else { 9480 getUINativeModule().search.setOnDidDelete(node, this.value); 9481 } 9482 } 9483} 9484SearchOnDidDeleteModifier.identity = Symbol('searchOnDidDelete'); 9485class SearchEnablePreviewTextModifier extends ModifierWithKey { 9486 constructor(value) { 9487 super(value); 9488 } 9489 applyPeer(node, reset) { 9490 if (reset) { 9491 getUINativeModule().search.resetEnablePreviewText(node); 9492 } 9493 else { 9494 getUINativeModule().search.setEnablePreviewText(node, this.value); 9495 } 9496 } 9497 checkObjectDiff() { 9498 return !isBaseOrResourceEqual(this.stageValue, this.value); 9499 } 9500} 9501SearchEnablePreviewTextModifier.identity = Symbol('searchEnablePreviewText'); 9502class SearchIdModifier extends ModifierWithKey { 9503 constructor(value) { 9504 super(value); 9505 } 9506 applyPeer(node, reset) { 9507 if (reset) { 9508 getUINativeModule().search.resetSearchInspectorId(node); 9509 } else { 9510 getUINativeModule().search.setSearchInspectorId(node, this.value); 9511 } 9512 } 9513 9514 checkObjectDiff() { 9515 return !isBaseOrResourceEqual(this.stageValue, this.value); 9516 } 9517} 9518SearchIdModifier.identity = Symbol('searchId'); 9519class SearchEditMenuOptionsModifier extends ModifierWithKey { 9520 constructor(value) { 9521 super(value); 9522 } 9523 applyPeer(node, reset) { 9524 if (reset) { 9525 getUINativeModule().search.resetSelectionMenuOptions(node); 9526 } else { 9527 getUINativeModule().search.setSelectionMenuOptions(node, this.value); 9528 } 9529 } 9530} 9531SearchEditMenuOptionsModifier.identity = Symbol('searchEditMenuOptions'); 9532class SearchEnableHapticFeedbackModifier extends ModifierWithKey { 9533 constructor(value) { 9534 super(value); 9535 } 9536 applyPeer(node, reset) { 9537 if (reset) { 9538 getUINativeModule().search.resetEnableHapticFeedback(node); 9539 } 9540 else { 9541 getUINativeModule().search.setEnableHapticFeedback(node, this.value); 9542 } 9543 } 9544 checkObjectDiff() { 9545 return !isBaseOrResourceEqual(this.stageValue, this.value); 9546 } 9547} 9548SearchEnableHapticFeedbackModifier.identity = Symbol('searchEnableHapticFeedback'); 9549 9550class SearchStopBackPressModifier extends ModifierWithKey { 9551 constructor(value) { 9552 super(value); 9553 } 9554 applyPeer(node, reset) { 9555 if (reset) { 9556 getUINativeModule().search.resetStopBackPress(node); 9557 } 9558 else { 9559 getUINativeModule().search.setStopBackPress(node, this.value); 9560 } 9561 } 9562 checkObjectDiff() { 9563 return !isBaseOrResourceEqual(this.stageValue, this.value); 9564 } 9565} 9566SearchStopBackPressModifier.identity = Symbol('searchStopBackPress'); 9567 9568class SearchKeyboardAppearanceModifier extends ModifierWithKey { 9569 constructor(value) { 9570 super(value); 9571 } 9572 applyPeer(node, reset) { 9573 if (reset) { 9574 getUINativeModule().search.resetKeyboardAppearance(node); 9575 } 9576 else { 9577 getUINativeModule().search.setKeyboardAppearance(node, this.value); 9578 } 9579 } 9580 checkObjectDiff() { 9581 return !isBaseOrResourceEqual(this.stageValue, this.value); 9582 } 9583} 9584SearchKeyboardAppearanceModifier.identity = Symbol('searchKeyboardAppearance'); 9585 9586class ArkSearchComponent extends ArkComponent { 9587 constructor(nativePtr, classType) { 9588 super(nativePtr, classType); 9589 } 9590 initialize(value) { 9591 if (value[0] !== undefined) { 9592 modifierWithKey(this._modifiersWithKeys, SearchInitializeModifier.identity, SearchInitializeModifier, value[0]); 9593 } else { 9594 modifierWithKey(this._modifiersWithKeys, SearchInitializeModifier.identity, SearchInitializeModifier, null); 9595 } 9596 return this; 9597 } 9598 onEditChange(callback) { 9599 modifierWithKey(this._modifiersWithKeys, SearchOnEditChangeModifier.identity, SearchOnEditChangeModifier, callback); 9600 return this; 9601 } 9602 type(value) { 9603 modifierWithKey(this._modifiersWithKeys, SearchTypeModifier.identity, SearchTypeModifier, value); 9604 return this; 9605 } 9606 maxLength(value) { 9607 modifierWithKey(this._modifiersWithKeys, SearchMaxLengthModifier.identity, SearchMaxLengthModifier, value); 9608 return this; 9609 } 9610 onEditChanged(callback) { 9611 modifierWithKey(this._modifiersWithKeys, SearchOnEditChangeModifier.identity, SearchOnEditChangeModifier, callback); 9612 return this; 9613 } 9614 customKeyboard(event) { 9615 throw new Error('Method not implemented.'); 9616 } 9617 showUnit(event) { 9618 throw new Error('Method not implemented.'); 9619 } 9620 onContentScroll(callback) { 9621 modifierWithKey(this._modifiersWithKeys, SearchOnContentScrollModifier.identity, 9622 SearchOnContentScrollModifier, callback); 9623 return this; 9624 } 9625 onChange(callback) { 9626 modifierWithKey(this._modifiersWithKeys, SearchOnChangeModifier.identity, SearchOnChangeModifier, callback); 9627 return this; 9628 } 9629 onTextSelectionChange(callback) { 9630 modifierWithKey(this._modifiersWithKeys, SearchOnTextSelectionChangeModifier.identity, 9631 SearchOnTextSelectionChangeModifier, callback); 9632 return this; 9633 } 9634 onCopy(callback) { 9635 modifierWithKey(this._modifiersWithKeys, SearchOnCopyModifier.identity, SearchOnCopyModifier, callback); 9636 return this; 9637 } 9638 onCut(callback) { 9639 modifierWithKey(this._modifiersWithKeys, SearchOnCutModifier.identity, SearchOnCutModifier, callback); 9640 return this; 9641 } 9642 onSubmit(callback) { 9643 modifierWithKey(this._modifiersWithKeys, SearchOnSubmitModifier.identity, SearchOnSubmitModifier, callback); 9644 return this; 9645 } 9646 onPaste(callback) { 9647 modifierWithKey(this._modifiersWithKeys, SearchOnPasteModifier.identity, SearchOnPasteModifier, callback); 9648 return this; 9649 } 9650 showCounter(value) { 9651 let arkValue = new ArkTextFieldShowCounter(); 9652 arkValue.value = value; 9653 arkValue.highlightBorder = options?.highlightBorder; 9654 arkValue.thresholdPercentage = options?.thresholdPercentage; 9655 modifierWithKey(this._modifiersWithKeys, SearchShowCounterModifier.identity, 9656 SearchShowCounterModifier, arkValue); 9657 return this; 9658 } 9659 searchButton(value, option) { 9660 let searchButton = new ArkSearchButton(); 9661 searchButton.value = value; 9662 searchButton.fontColor = option === null || option === void 0 ? void 0 : option.fontColor; 9663 searchButton.fontSize = option === null || option === void 0 ? void 0 : option.fontSize; 9664 modifierWithKey(this._modifiersWithKeys, SearchSearchButtonModifier.identity, SearchSearchButtonModifier, searchButton); 9665 return this; 9666 } 9667 selectionMenuHidden(value) { 9668 modifierWithKey(this._modifiersWithKeys, SearchSelectionMenuHiddenModifier.identity, SearchSelectionMenuHiddenModifier, value); 9669 return this; 9670 } 9671 enableKeyboardOnFocus(value) { 9672 modifierWithKey(this._modifiersWithKeys, SearchEnableKeyboardOnFocusModifier.identity, SearchEnableKeyboardOnFocusModifier, value); 9673 return this; 9674 } 9675 caretStyle(value) { 9676 modifierWithKey(this._modifiersWithKeys, SearchCaretStyleModifier.identity, SearchCaretStyleModifier, value); 9677 return this; 9678 } 9679 cancelButton(value) { 9680 modifierWithKey(this._modifiersWithKeys, SearchCancelButtonModifier.identity, SearchCancelButtonModifier, value); 9681 return this; 9682 } 9683 searchIcon(value) { 9684 modifierWithKey(this._modifiersWithKeys, SearchSearchIconModifier.identity, SearchSearchIconModifier, value); 9685 return this; 9686 } 9687 fontColor(value) { 9688 modifierWithKey(this._modifiersWithKeys, SearchFontColorModifier.identity, SearchFontColorModifier, value); 9689 return this; 9690 } 9691 fontFeature(value) { 9692 modifierWithKey(this._modifiersWithKeys, SearchFontFeatureModifier.identity, SearchFontFeatureModifier, value); 9693 return this; 9694 } 9695 placeholderColor(value) { 9696 modifierWithKey(this._modifiersWithKeys, SearchPlaceholderColorModifier.identity, SearchPlaceholderColorModifier, value); 9697 return this; 9698 } 9699 placeholderFont(value) { 9700 modifierWithKey(this._modifiersWithKeys, SearchPlaceholderFontModifier.identity, SearchPlaceholderFontModifier, value); 9701 return this; 9702 } 9703 textFont(value) { 9704 modifierWithKey(this._modifiersWithKeys, SearchTextFontModifier.identity, SearchTextFontModifier, value); 9705 return this; 9706 } 9707 copyOption(value) { 9708 modifierWithKey(this._modifiersWithKeys, SearchCopyOptionModifier.identity, SearchCopyOptionModifier, value); 9709 return this; 9710 } 9711 textAlign(value) { 9712 modifierWithKey(this._modifiersWithKeys, SearchTextAlignModifier.identity, SearchTextAlignModifier, value); 9713 return this; 9714 } 9715 enterKeyType(value) { 9716 modifierWithKey(this._modifiersWithKeys, SearchEnterKeyTypeModifier.identity, SearchEnterKeyTypeModifier, value); 9717 return this; 9718 } 9719 height(value) { 9720 modifierWithKey(this._modifiersWithKeys, SearchHeightModifier.identity, SearchHeightModifier, value); 9721 return this; 9722 } 9723 decoration(value) { 9724 modifierWithKey(this._modifiersWithKeys, SearchDecorationModifier.identity, SearchDecorationModifier, value); 9725 return this; 9726 } 9727 letterSpacing(value) { 9728 modifierWithKey(this._modifiersWithKeys, SearchLetterSpacingModifier.identity, SearchLetterSpacingModifier, value); 9729 return this; 9730 } 9731 lineHeight(value) { 9732 modifierWithKey(this._modifiersWithKeys, SearchLineHeightModifier.identity, SearchLineHeightModifier, value); 9733 return this; 9734 } 9735 id(value) { 9736 modifierWithKey(this._modifiersWithKeys, SearchIdModifier.identity, SearchIdModifier, value); 9737 return this; 9738 } 9739 key(value) { 9740 modifierWithKey(this._modifiersWithKeys, SearchIdModifier.identity, SearchIdModifier, value); 9741 return this; 9742 } 9743 minFontSize(value) { 9744 modifierWithKey(this._modifiersWithKeys, SearchMinFontSizeModifier.identity, SearchMinFontSizeModifier, value); 9745 return this; 9746 } 9747 maxFontSize(value) { 9748 modifierWithKey(this._modifiersWithKeys, SearchMaxFontSizeModifier.identity, SearchMaxFontSizeModifier, value); 9749 return this; 9750 } 9751 inputFilter(value, error) { 9752 let searchInputFilter = new ArkSearchInputFilter(); 9753 searchInputFilter.value = value; 9754 searchInputFilter.error = error; 9755 9756 modifierWithKey(this._modifiersWithKeys, SearchInputFilterModifier.identity, SearchInputFilterModifier, searchInputFilter); 9757 return this; 9758 } 9759 selectedBackgroundColor(value) { 9760 modifierWithKey(this._modifiersWithKeys, SearchSelectedBackgroundColorModifier.identity, SearchSelectedBackgroundColorModifier, value); 9761 return this; 9762 } 9763 textIndent(value) { 9764 modifierWithKey(this._modifiersWithKeys, SearchTextIndentModifier.identity, SearchTextIndentModifier, value); 9765 return this; 9766 } 9767 onWillChange(callback) { 9768 modifierWithKey(this._modifiersWithKeys, SearchOnWillChangeModifier.identity, SearchOnWillChangeModifier, callback); 9769 return this; 9770 } 9771 onWillInsert(callback) { 9772 modifierWithKey(this._modifiersWithKeys, SearchOnWillInsertModifier.identity, SearchOnWillInsertModifier, callback); 9773 return this; 9774 } 9775 onDidInsert(callback) { 9776 modifierWithKey(this._modifiersWithKeys, SearchOnDidInsertModifier.identity, SearchOnDidInsertModifier, callback); 9777 return this; 9778 } 9779 onWillDelete(callback) { 9780 modifierWithKey(this._modifiersWithKeys, SearchOnWillDeleteModifier.identity, SearchOnWillDeleteModifier, callback); 9781 return this; 9782 } 9783 onDidDelete(callback) { 9784 modifierWithKey(this._modifiersWithKeys, SearchOnDidDeleteModifier.identity, SearchOnDidDeleteModifier, callback); 9785 return this; 9786 } 9787 enablePreviewText(value) { 9788 modifierWithKey(this._modifiersWithKeys, SearchEnablePreviewTextModifier.identity, SearchEnablePreviewTextModifier, value); 9789 return this; 9790 } 9791 editMenuOptions(value) { 9792 modifierWithKey(this._modifiersWithKeys, SearchEditMenuOptionsModifier.identity, 9793 SearchEditMenuOptionsModifier, value); 9794 return this; 9795 } 9796 enableHapticFeedback(value) { 9797 modifierWithKey(this._modifiersWithKeys, SearchEnableHapticFeedbackModifier.identity, SearchEnableHapticFeedbackModifier, value); 9798 return this; 9799 } 9800 stopBackPress(value) { 9801 modifierWithKey(this._modifiersWithKeys, SearchStopBackPressModifier.identity, SearchStopBackPressModifier, value); 9802 return this; 9803 } 9804 keyboardAppearance(value) { 9805 modifierWithKey(this._modifiersWithKeys, SearchKeyboardAppearanceModifier.identity, SearchKeyboardAppearanceModifier, value); 9806 return this; 9807 } 9808} 9809// @ts-ignore 9810if (globalThis.Search !== undefined) { 9811 globalThis.Search.attributeModifier = function (modifier) { 9812 attributeModifierFunc.call(this, modifier, (nativePtr) => { 9813 return new ArkSearchComponent(nativePtr); 9814 }, (nativePtr, classType, modifierJS) => { 9815 return new modifierJS.SearchModifier(nativePtr, classType); 9816 }); 9817 }; 9818} 9819 9820/// <reference path='./import.ts' /> 9821class SpanFontSizeModifier extends ModifierWithKey { 9822 constructor(value) { 9823 super(value); 9824 } 9825 applyPeer(node, reset) { 9826 if (reset) { 9827 getUINativeModule().span.resetFontSize(node); 9828 } 9829 else { 9830 getUINativeModule().span.setFontSize(node, this.value); 9831 } 9832 } 9833 checkObjectDiff() { 9834 return !isBaseOrResourceEqual(this.stageValue, this.value); 9835 } 9836} 9837SpanFontSizeModifier.identity = Symbol('spanFontSize'); 9838class SpanFontFamilyModifier extends ModifierWithKey { 9839 constructor(value) { 9840 super(value); 9841 } 9842 applyPeer(node, reset) { 9843 if (reset) { 9844 getUINativeModule().span.resetFontFamily(node); 9845 } 9846 else { 9847 getUINativeModule().span.setFontFamily(node, this.value); 9848 } 9849 } 9850 checkObjectDiff() { 9851 return !isBaseOrResourceEqual(this.stageValue, this.value); 9852 } 9853} 9854SpanFontFamilyModifier.identity = Symbol('spanFontFamily'); 9855class SpanLineHeightModifier extends ModifierWithKey { 9856 constructor(value) { 9857 super(value); 9858 } 9859 applyPeer(node, reset) { 9860 if (reset) { 9861 getUINativeModule().span.resetLineHeight(node); 9862 } 9863 else { 9864 getUINativeModule().span.setLineHeight(node, this.value); 9865 } 9866 } 9867 checkObjectDiff() { 9868 return !isBaseOrResourceEqual(this.stageValue, this.value); 9869 } 9870} 9871SpanLineHeightModifier.identity = Symbol('spanLineHeight'); 9872class SpanFontStyleModifier extends ModifierWithKey { 9873 constructor(value) { 9874 super(value); 9875 } 9876 applyPeer(node, reset) { 9877 if (reset) { 9878 getUINativeModule().span.resetFontStyle(node); 9879 } 9880 else { 9881 getUINativeModule().span.setFontStyle(node, this.value); 9882 } 9883 } 9884 checkObjectDiff() { 9885 return !isBaseOrResourceEqual(this.stageValue, this.value); 9886 } 9887} 9888SpanFontStyleModifier.identity = Symbol('spanFontStyle'); 9889class SpanTextCaseModifier extends ModifierWithKey { 9890 constructor(value) { 9891 super(value); 9892 } 9893 applyPeer(node, reset) { 9894 if (reset) { 9895 getUINativeModule().span.resetTextCase(node); 9896 } 9897 else { 9898 getUINativeModule().span.setTextCase(node, this.value); 9899 } 9900 } 9901 checkObjectDiff() { 9902 return !isBaseOrResourceEqual(this.stageValue, this.value); 9903 } 9904} 9905SpanTextCaseModifier.identity = Symbol('spanTextCase'); 9906class SpanTextBackgroundStyleModifier extends ModifierWithKey { 9907 constructor(value) { 9908 super(value); 9909 } 9910 applyPeer(node, reset) { 9911 if (reset) { 9912 getUINativeModule().span.resetTextBackgroundStyle(node); 9913 } 9914 else { 9915 let textBackgroundStyle = new ArkTextBackGroundStyle(); 9916 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value)) { 9917 getUINativeModule().span.resetTextBackgroundStyle(node); 9918 } 9919 else { 9920 getUINativeModule().span.setTextBackgroundStyle(node, textBackgroundStyle.color, textBackgroundStyle.radius.topLeft, textBackgroundStyle.radius.topRight, textBackgroundStyle.radius.bottomLeft, textBackgroundStyle.radius.bottomRight); 9921 } 9922 } 9923 } 9924 checkObjectDiff() { 9925 let textBackgroundStyle = new ArkTextBackGroundStyle(); 9926 let stageTextBackGroundStyle = new ArkTextBackGroundStyle(); 9927 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value) || !stageTextBackGroundStyle.convertTextBackGroundStyleOptions(this.stageValue)) { 9928 return false; 9929 } 9930 else { 9931 return textBackgroundStyle.checkObjectDiff(stageTextBackGroundStyle); 9932 } 9933 } 9934} 9935SpanTextBackgroundStyleModifier.identity = Symbol('spanTextBackgroundStyle'); 9936class SpanTextShadowModifier extends ModifierWithKey { 9937 constructor(value) { 9938 super(value); 9939 } 9940 applyPeer(node, reset) { 9941 if (reset) { 9942 getUINativeModule().span.resetTextShadow(node); 9943 } 9944 else { 9945 let shadow = new ArkShadowInfoToArray(); 9946 if (!shadow.convertShadowOptions(this.value)) { 9947 getUINativeModule().span.resetTextShadow(node); 9948 } 9949 else { 9950 getUINativeModule().span.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 9951 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 9952 } 9953 } 9954 } 9955 checkObjectDiff() { 9956 let checkDiff = true; 9957 let arkShadow = new ArkShadowInfoToArray(); 9958 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 9959 Object.getPrototypeOf(this.value).constructor === Object) { 9960 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 9961 } 9962 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 9963 Object.getPrototypeOf(this.value).constructor === Array && 9964 this.stageValue.length === this.value.length) { 9965 let isDiffItem = false; 9966 for (let i = 0; i < this.value.length; i++) { 9967 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 9968 isDiffItem = true; 9969 break; 9970 } 9971 } 9972 if (!isDiffItem) { 9973 checkDiff = false; 9974 } 9975 } 9976 return checkDiff; 9977 } 9978} 9979SpanTextShadowModifier.identity = Symbol('spanTextShadow'); 9980class SpanFontColorModifier extends ModifierWithKey { 9981 constructor(value) { 9982 super(value); 9983 } 9984 applyPeer(node, reset) { 9985 if (reset) { 9986 getUINativeModule().span.resetFontColor(node); 9987 } 9988 else { 9989 getUINativeModule().span.setFontColor(node, this.value); 9990 } 9991 } 9992 checkObjectDiff() { 9993 return !isBaseOrResourceEqual(this.stageValue, this.value); 9994 } 9995} 9996SpanFontColorModifier.identity = Symbol('spanFontColor'); 9997class SpanLetterSpacingModifier extends ModifierWithKey { 9998 constructor(value) { 9999 super(value); 10000 } 10001 applyPeer(node, reset) { 10002 if (reset) { 10003 getUINativeModule().span.resetLetterSpacing(node); 10004 } 10005 else { 10006 getUINativeModule().span.setLetterSpacing(node, this.value); 10007 } 10008 } 10009} 10010SpanLetterSpacingModifier.identity = Symbol('spanLetterSpacing'); 10011class SpanBaselineOffsetModifier extends ModifierWithKey { 10012 constructor(value) { 10013 super(value); 10014 } 10015 applyPeer(node, reset) { 10016 if (reset) { 10017 getUINativeModule().span.resetBaselineOffset(node); 10018 } 10019 else { 10020 getUINativeModule().span.setBaselineOffset(node, this.value); 10021 } 10022 } 10023} 10024SpanBaselineOffsetModifier.identity = Symbol('spanBaselineOffset'); 10025class SpanFontModifier extends ModifierWithKey { 10026 constructor(value) { 10027 super(value); 10028 } 10029 applyPeer(node, reset) { 10030 if (reset) { 10031 getUINativeModule().span.resetFont(node); 10032 } 10033 else { 10034 getUINativeModule().span.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 10035 } 10036 } 10037 checkObjectDiff() { 10038 if (this.stageValue.weight !== this.value.weight || this.stageValue.style !== this.value.style || 10039 this.stageValue.enableVariableFontWeight !== this.value.enableVariableFontWeight) { 10040 return true; 10041 } 10042 if (((isResource(this.stageValue.size) && isResource(this.value.size) && 10043 isResourceEqual(this.stageValue.size, this.value.size)) || 10044 (!isResource(this.stageValue.size) && !isResource(this.value.size) && 10045 this.stageValue.size === this.value.size)) && 10046 ((isResource(this.stageValue.family) && isResource(this.value.family) && 10047 isResourceEqual(this.stageValue.family, this.value.family)) || 10048 (!isResource(this.stageValue.family) && !isResource(this.value.family) && 10049 this.stageValue.family === this.value.family))) { 10050 return false; 10051 } 10052 else { 10053 return true; 10054 } 10055 } 10056} 10057SpanFontModifier.identity = Symbol('spanFont'); 10058class SpanDecorationModifier extends ModifierWithKey { 10059 constructor(value) { 10060 super(value); 10061 } 10062 applyPeer(node, reset) { 10063 if (reset) { 10064 getUINativeModule().span.resetDecoration(node); 10065 } 10066 else { 10067 getUINativeModule().span.setDecoration(node, this.value.type, this.value.color, this.value.style); 10068 } 10069 } 10070 checkObjectDiff() { 10071 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 10072 return true; 10073 } 10074 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 10075 return !isResourceEqual(this.stageValue.color, this.value.color); 10076 } 10077 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 10078 return !(this.stageValue.color === this.value.color); 10079 } 10080 else { 10081 return true; 10082 } 10083 } 10084} 10085SpanDecorationModifier.identity = Symbol('spanDecoration'); 10086class SpanFontWeightModifier extends ModifierWithKey { 10087 constructor(value) { 10088 super(value); 10089 } 10090 applyPeer(node, reset) { 10091 if (reset) { 10092 getUINativeModule().span.resetFontWeight(node); 10093 } 10094 else { 10095 getUINativeModule().span.setFontWeight(node, this.value); 10096 } 10097 } 10098} 10099SpanFontWeightModifier.identity = Symbol('spanfontweight'); 10100class SpanInputModifier extends ModifierWithKey { 10101 constructor(value) { 10102 super(value); 10103 } 10104 applyPeer(node, reset) { 10105 if (reset) { 10106 getUINativeModule().span.setSpanSrc(node, ''); 10107 } 10108 else { 10109 getUINativeModule().span.setSpanSrc(node, this.value); 10110 } 10111 } 10112} 10113SpanInputModifier.identity = Symbol('spanInput'); 10114class SpanAccessibilityTextModifier extends ModifierWithKey { 10115 constructor(value) { 10116 super(value); 10117 } 10118 applyPeer(node, reset) { 10119 if (reset) { 10120 getUINativeModule().span.resetAccessibilityText(node); 10121 } else { 10122 getUINativeModule().span.setAccessibilityText(node, this.value); 10123 } 10124 } 10125} 10126SpanAccessibilityTextModifier.identity = Symbol('spanAccessibilityText'); 10127class SpanAccessibilityDescriptionModifier extends ModifierWithKey { 10128 constructor(value) { 10129 super(value); 10130 } 10131 applyPeer(node, reset) { 10132 if (reset) { 10133 getUINativeModule().span.resetAccessibilityDescription(node); 10134 } else { 10135 getUINativeModule().span.setAccessibilityDescription(node, this.value); 10136 } 10137 } 10138} 10139SpanAccessibilityDescriptionModifier.identity = Symbol('spanAccessibilityDescription'); 10140class SpanAccessibilityLevelModifier extends ModifierWithKey { 10141 constructor(value) { 10142 super(value); 10143 } 10144 applyPeer(node, reset) { 10145 if (reset) { 10146 getUINativeModule().span.resetAccessibilityLevel(node); 10147 } else { 10148 getUINativeModule().span.setAccessibilityLevel(node, this.value); 10149 } 10150 } 10151} 10152SpanAccessibilityLevelModifier.identity = Symbol('spanAccessibilityLevel'); 10153class ArkSpanComponent { 10154 constructor(nativePtr, classType) { 10155 this._modifiersWithKeys = new Map(); 10156 this.nativePtr = nativePtr; 10157 this._changed = false; 10158 this._classType = classType; 10159 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nativePtr); 10160 this._nativePtrChanged = false; 10161 } 10162 initialize(value) { 10163 modifierWithKey(this._modifiersWithKeys, SpanInputModifier.identity, SpanInputModifier, value[0]); 10164 return this; 10165 } 10166 applyModifierPatch() { 10167 let expiringItemsWithKeys = []; 10168 this._modifiersWithKeys.forEach((value, key) => { 10169 if (value.applyStage(this.nativePtr)) { 10170 expiringItemsWithKeys.push(key); 10171 } 10172 }); 10173 expiringItemsWithKeys.forEach(key => { 10174 this._modifiersWithKeys.delete(key); 10175 }); 10176 } 10177 cleanStageValue() { 10178 if (!this._modifiersWithKeys) { 10179 return; 10180 } 10181 this._modifiersWithKeys.forEach((value, key) => { 10182 value.stageValue = undefined; 10183 }); 10184 } 10185 applyStateUpdatePtr(instance) { 10186 if (this.nativePtr !== instance.nativePtr) { 10187 this.nativePtr = instance.nativePtr; 10188 this._nativePtrChanged = true; 10189 if (instance._weakPtr) { 10190 this._weakPtr = instance._weakPtr; 10191 } else { 10192 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(this.nativePtr); 10193 } 10194 } 10195 } 10196 onGestureJudgeBegin(callback) { 10197 throw new Error('Method not implemented.'); 10198 } 10199 outline(value) { 10200 throw new Error('Method not implemented.'); 10201 } 10202 outlineColor(value) { 10203 throw new Error('Method not implemented.'); 10204 } 10205 outlineRadius(value) { 10206 throw new Error('Method not implemented.'); 10207 } 10208 outlineStyle(value) { 10209 throw new Error('Method not implemented.'); 10210 } 10211 outlineWidth(value) { 10212 throw new Error('Method not implemented.'); 10213 } 10214 width(value) { 10215 throw new Error('Method not implemented.'); 10216 } 10217 height(value) { 10218 throw new Error('Method not implemented.'); 10219 } 10220 expandSafeArea(types, edges) { 10221 throw new Error('Method not implemented.'); 10222 } 10223 responseRegion(value) { 10224 throw new Error('Method not implemented.'); 10225 } 10226 mouseResponseRegion(value) { 10227 throw new Error('Method not implemented.'); 10228 } 10229 size(value) { 10230 throw new Error('Method not implemented.'); 10231 } 10232 constraintSize(value) { 10233 throw new Error('Method not implemented.'); 10234 } 10235 touchable(value) { 10236 throw new Error('Method not implemented.'); 10237 } 10238 hitTestBehavior(value) { 10239 throw new Error('Method not implemented.'); 10240 } 10241 layoutWeight(value) { 10242 throw new Error('Method not implemented.'); 10243 } 10244 padding(value) { 10245 throw new Error('Method not implemented.'); 10246 } 10247 margin(value) { 10248 throw new Error('Method not implemented.'); 10249 } 10250 background(builder, options) { 10251 throw new Error('Method not implemented.'); 10252 } 10253 backgroundColor(value) { 10254 throw new Error('Method not implemented.'); 10255 } 10256 backgroundImage(src, repeat) { 10257 throw new Error('Method not implemented.'); 10258 } 10259 backgroundImageSize(value) { 10260 throw new Error('Method not implemented.'); 10261 } 10262 backgroundImagePosition(value) { 10263 throw new Error('Method not implemented.'); 10264 } 10265 backgroundBlurStyle(value, options) { 10266 throw new Error('Method not implemented.'); 10267 } 10268 foregroundBlurStyle(value, options) { 10269 throw new Error('Method not implemented.'); 10270 } 10271 opacity(value) { 10272 throw new Error('Method not implemented.'); 10273 } 10274 border(value) { 10275 throw new Error('Method not implemented.'); 10276 } 10277 borderStyle(value) { 10278 throw new Error('Method not implemented.'); 10279 } 10280 borderWidth(value) { 10281 throw new Error('Method not implemented.'); 10282 } 10283 borderColor(value) { 10284 throw new Error('Method not implemented.'); 10285 } 10286 borderRadius(value) { 10287 throw new Error('Method not implemented.'); 10288 } 10289 borderImage(value) { 10290 throw new Error('Method not implemented.'); 10291 } 10292 foregroundColor(value) { 10293 throw new Error('Method not implemented.'); 10294 } 10295 onClick(event) { 10296 modifierWithKey(this._modifiersWithKeys, ClickModifier.identity, ClickModifier, event); 10297 return this; 10298 } 10299 onHover(event) { 10300 throw new Error('Method not implemented.'); 10301 } 10302 hoverEffect(value) { 10303 throw new Error('Method not implemented.'); 10304 } 10305 onMouse(event) { 10306 throw new Error('Method not implemented.'); 10307 } 10308 onTouch(event) { 10309 throw new Error('Method not implemented.'); 10310 } 10311 onKeyEvent(event) { 10312 throw new Error('Method not implemented.'); 10313 } 10314 focusable(value) { 10315 throw new Error('Method not implemented.'); 10316 } 10317 onFocus(event) { 10318 throw new Error('Method not implemented.'); 10319 } 10320 onBlur(event) { 10321 throw new Error('Method not implemented.'); 10322 } 10323 tabIndex(index) { 10324 throw new Error('Method not implemented.'); 10325 } 10326 defaultFocus(value) { 10327 throw new Error('Method not implemented.'); 10328 } 10329 groupDefaultFocus(value) { 10330 throw new Error('Method not implemented.'); 10331 } 10332 focusOnTouch(value) { 10333 throw new Error('Method not implemented.'); 10334 } 10335 animation(value) { 10336 throw new Error('Method not implemented.'); 10337 } 10338 transition(value) { 10339 throw new Error('Method not implemented.'); 10340 } 10341 gesture(gesture, mask) { 10342 throw new Error('Method not implemented.'); 10343 } 10344 priorityGesture(gesture, mask) { 10345 throw new Error('Method not implemented.'); 10346 } 10347 parallelGesture(gesture, mask) { 10348 throw new Error('Method not implemented.'); 10349 } 10350 blur(value) { 10351 throw new Error('Method not implemented.'); 10352 } 10353 linearGradientBlur(value, options) { 10354 throw new Error('Method not implemented.'); 10355 } 10356 brightness(value) { 10357 throw new Error('Method not implemented.'); 10358 } 10359 contrast(value) { 10360 throw new Error('Method not implemented.'); 10361 } 10362 grayscale(value) { 10363 throw new Error('Method not implemented.'); 10364 } 10365 colorBlend(value) { 10366 throw new Error('Method not implemented.'); 10367 } 10368 saturate(value) { 10369 throw new Error('Method not implemented.'); 10370 } 10371 sepia(value) { 10372 throw new Error('Method not implemented.'); 10373 } 10374 invert(value) { 10375 throw new Error('Method not implemented.'); 10376 } 10377 hueRotate(value) { 10378 throw new Error('Method not implemented.'); 10379 } 10380 useEffect(value) { 10381 throw new Error('Method not implemented.'); 10382 } 10383 backdropBlur(value) { 10384 throw new Error('Method not implemented.'); 10385 } 10386 renderGroup(value) { 10387 throw new Error('Method not implemented.'); 10388 } 10389 translate(value) { 10390 throw new Error('Method not implemented.'); 10391 } 10392 scale(value) { 10393 throw new Error('Method not implemented.'); 10394 } 10395 gridSpan(value) { 10396 throw new Error('Method not implemented.'); 10397 } 10398 gridOffset(value) { 10399 throw new Error('Method not implemented.'); 10400 } 10401 rotate(value) { 10402 throw new Error('Method not implemented.'); 10403 } 10404 transform(value) { 10405 throw new Error('Method not implemented.'); 10406 } 10407 onAppear(event) { 10408 throw new Error('Method not implemented.'); 10409 } 10410 onDisAppear(event) { 10411 throw new Error('Method not implemented.'); 10412 } 10413 onAttach(event) { 10414 throw new Error('Method not implemented.'); 10415 } 10416 onDetach(event) { 10417 throw new Error('Method not implemented.'); 10418 } 10419 onAreaChange(event) { 10420 throw new Error('Method not implemented.'); 10421 } 10422 visibility(value) { 10423 throw new Error('Method not implemented.'); 10424 } 10425 flexGrow(value) { 10426 throw new Error('Method not implemented.'); 10427 } 10428 flexShrink(value) { 10429 throw new Error('Method not implemented.'); 10430 } 10431 flexBasis(value) { 10432 throw new Error('Method not implemented.'); 10433 } 10434 alignSelf(value) { 10435 throw new Error('Method not implemented.'); 10436 } 10437 displayPriority(value) { 10438 throw new Error('Method not implemented.'); 10439 } 10440 zIndex(value) { 10441 throw new Error('Method not implemented.'); 10442 } 10443 sharedTransition(id, options) { 10444 throw new Error('Method not implemented.'); 10445 } 10446 direction(value) { 10447 throw new Error('Method not implemented.'); 10448 } 10449 align(value) { 10450 throw new Error('Method not implemented.'); 10451 } 10452 position(value) { 10453 throw new Error('Method not implemented.'); 10454 } 10455 markAnchor(value) { 10456 throw new Error('Method not implemented.'); 10457 } 10458 offset(value) { 10459 throw new Error('Method not implemented.'); 10460 } 10461 enabled(value) { 10462 throw new Error('Method not implemented.'); 10463 } 10464 useSizeType(value) { 10465 throw new Error('Method not implemented.'); 10466 } 10467 alignRules(value) { 10468 throw new Error('Method not implemented.'); 10469 } 10470 aspectRatio(value) { 10471 throw new Error('Method not implemented.'); 10472 } 10473 clickEffect(value) { 10474 throw new Error('Method not implemented.'); 10475 } 10476 onDragStart(event) { 10477 throw new Error('Method not implemented.'); 10478 } 10479 onDragEnter(event) { 10480 throw new Error('Method not implemented.'); 10481 } 10482 onDragMove(event) { 10483 throw new Error('Method not implemented.'); 10484 } 10485 onDragLeave(event) { 10486 throw new Error('Method not implemented.'); 10487 } 10488 onDrop(event) { 10489 throw new Error('Method not implemented.'); 10490 } 10491 onDragEnd(event) { 10492 throw new Error('Method not implemented.'); 10493 } 10494 allowDrop(value) { 10495 throw new Error('Method not implemented.'); 10496 } 10497 draggable(value) { 10498 throw new Error('Method not implemented.'); 10499 } 10500 overlay(value, options) { 10501 throw new Error('Method not implemented.'); 10502 } 10503 linearGradient(value) { 10504 throw new Error('Method not implemented.'); 10505 } 10506 sweepGradient(value) { 10507 throw new Error('Method not implemented.'); 10508 } 10509 radialGradient(value) { 10510 throw new Error('Method not implemented.'); 10511 } 10512 motionPath(value) { 10513 throw new Error('Method not implemented.'); 10514 } 10515 motionBlur(value) { 10516 throw new Error('Method not implemented.'); 10517 } 10518 shadow(value) { 10519 throw new Error('Method not implemented.'); 10520 } 10521 mask(value) { 10522 throw new Error('Method not implemented.'); 10523 } 10524 key(value) { 10525 throw new Error('Method not implemented.'); 10526 } 10527 id(value) { 10528 throw new Error('Method not implemented.'); 10529 } 10530 geometryTransition(id) { 10531 throw new Error('Method not implemented.'); 10532 } 10533 bindPopup(show, popup) { 10534 throw new Error('Method not implemented.'); 10535 } 10536 bindMenu(content, options) { 10537 throw new Error('Method not implemented.'); 10538 } 10539 bindContextMenu(content, responseType, options) { 10540 throw new Error('Method not implemented.'); 10541 } 10542 bindContentCover(isShow, builder, type) { 10543 throw new Error('Method not implemented.'); 10544 } 10545 blendMode(value) { 10546 throw new Error('Method not implemented.'); 10547 } 10548 clip(value) { 10549 throw new Error('Method not implemented.'); 10550 } 10551 bindSheet(isShow, builder, options) { 10552 throw new Error('Method not implemented.'); 10553 } 10554 stateStyles(value) { 10555 throw new Error('Method not implemented.'); 10556 } 10557 restoreId(value) { 10558 throw new Error('Method not implemented.'); 10559 } 10560 onVisibleAreaChange(ratios, event) { 10561 throw new Error('Method not implemented.'); 10562 } 10563 sphericalEffect(value) { 10564 throw new Error('Method not implemented.'); 10565 } 10566 lightUpEffect(value) { 10567 throw new Error('Method not implemented.'); 10568 } 10569 pixelStretchEffect(options) { 10570 throw new Error('Method not implemented.'); 10571 } 10572 keyboardShortcut(value, keys, action) { 10573 throw new Error('Method not implemented.'); 10574 } 10575 accessibilityGroup(value) { 10576 throw new Error('Method not implemented.'); 10577 } 10578 accessibilityText(value) { 10579 if (typeof value === 'string') { 10580 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityTextModifier.identity, SpanAccessibilityTextModifier, value); 10581 } 10582 else { 10583 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityTextModifier.identity, SpanAccessibilityTextModifier, undefined); 10584 } 10585 return this; 10586 } 10587 accessibilityDescription(value) { 10588 if (typeof value === 'string') { 10589 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityDescriptionModifier.identity, SpanAccessibilityDescriptionModifier, value); 10590 } 10591 else { 10592 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityDescriptionModifier.identity, SpanAccessibilityDescriptionModifier, undefined); 10593 } 10594 return this; 10595 } 10596 accessibilityLevel(value) { 10597 if (typeof value === 'string') { 10598 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityLevelModifier.identity, SpanAccessibilityLevelModifier, value); 10599 } 10600 else { 10601 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityLevelModifier.identity, SpanAccessibilityLevelModifier, undefined); 10602 } 10603 return this; 10604 } 10605 obscured(reasons) { 10606 throw new Error('Method not implemented.'); 10607 } 10608 reuseId(id) { 10609 throw new Error('Method not implemented.'); 10610 } 10611 renderFit(fitMode) { 10612 throw new Error('Method not implemented.'); 10613 } 10614 attributeModifier(modifier) { 10615 return this; 10616 } 10617 decoration(value) { 10618 modifierWithKey(this._modifiersWithKeys, SpanDecorationModifier.identity, SpanDecorationModifier, value); 10619 return this; 10620 } 10621 font(value) { 10622 modifierWithKey(this._modifiersWithKeys, SpanFontSizeModifier.identity, SpanFontSizeModifier, 10623 value === null || value === void 0 ? void 0 : value.size); 10624 modifierWithKey(this._modifiersWithKeys, SpanFontWeightModifier.identity, SpanFontWeightModifier, 10625 value === null || value === void 0 ? void 0 : value.weight); 10626 modifierWithKey(this._modifiersWithKeys, SpanFontFamilyModifier.identity, SpanFontFamilyModifier, 10627 value === null || value === void 0 ? void 0 : value.family); 10628 modifierWithKey(this._modifiersWithKeys, SpanFontStyleModifier.identity, SpanFontStyleModifier, 10629 value === null || value === void 0 ? void 0 : value.style); 10630 return this; 10631 } 10632 lineHeight(value) { 10633 modifierWithKey(this._modifiersWithKeys, SpanLineHeightModifier.identity, SpanLineHeightModifier, value); 10634 return this; 10635 } 10636 fontSize(value) { 10637 modifierWithKey(this._modifiersWithKeys, SpanFontSizeModifier.identity, SpanFontSizeModifier, value); 10638 return this; 10639 } 10640 fontColor(value) { 10641 modifierWithKey(this._modifiersWithKeys, SpanFontColorModifier.identity, SpanFontColorModifier, value); 10642 return this; 10643 } 10644 fontStyle(value) { 10645 modifierWithKey(this._modifiersWithKeys, SpanFontStyleModifier.identity, SpanFontStyleModifier, value); 10646 return this; 10647 } 10648 fontWeight(value) { 10649 modifierWithKey(this._modifiersWithKeys, SpanFontWeightModifier.identity, SpanFontWeightModifier, value); 10650 return this; 10651 } 10652 fontFamily(value) { 10653 modifierWithKey(this._modifiersWithKeys, SpanFontFamilyModifier.identity, SpanFontFamilyModifier, value); 10654 return this; 10655 } 10656 letterSpacing(value) { 10657 modifierWithKey(this._modifiersWithKeys, SpanLetterSpacingModifier.identity, SpanLetterSpacingModifier, value); 10658 return this; 10659 } 10660 baselineOffset(value) { 10661 modifierWithKey(this._modifiersWithKeys, SpanBaselineOffsetModifier.identity, SpanBaselineOffsetModifier, value); 10662 return this; 10663 } 10664 textCase(value) { 10665 modifierWithKey(this._modifiersWithKeys, SpanTextCaseModifier.identity, SpanTextCaseModifier, value); 10666 return this; 10667 } 10668 textBackgroundStyle(value) { 10669 modifierWithKey(this._modifiersWithKeys, SpanTextBackgroundStyleModifier.identity, SpanTextBackgroundStyleModifier, value); 10670 return this; 10671 } 10672 textShadow(value) { 10673 modifierWithKey(this._modifiersWithKeys, SpanTextShadowModifier.identity, SpanTextShadowModifier, value); 10674 return this; 10675 } 10676} 10677// @ts-ignore 10678if (globalThis.Span !== undefined) { 10679 globalThis.Span.attributeModifier = function (modifier) { 10680 attributeModifierFuncWithoutStateStyles.call(this, modifier, (nativePtr) => { 10681 return new ArkSpanComponent(nativePtr); 10682 }, (nativePtr, classType, modifierJS) => { 10683 return new modifierJS.SpanModifier(nativePtr, classType); 10684 }); 10685 }; 10686} 10687 10688/// <reference path='./import.ts' /> 10689class SideBarContainerPositionModifier extends ModifierWithKey { 10690 constructor(value) { 10691 super(value); 10692 } 10693 applyPeer(node, reset) { 10694 if (reset) { 10695 getUINativeModule().sideBarContainer.resetSideBarPosition(node); 10696 } 10697 else { 10698 getUINativeModule().sideBarContainer.setSideBarPosition(node, this.value); 10699 } 10700 } 10701 checkObjectDiff() { 10702 return !isBaseOrResourceEqual(this.stageValue, this.value); 10703 } 10704} 10705SideBarContainerPositionModifier.identity = Symbol('sideBarContainerPosition'); 10706class SideBarContainerAutoHideModifier extends ModifierWithKey { 10707 constructor(value) { 10708 super(value); 10709 } 10710 applyPeer(node, reset) { 10711 if (reset) { 10712 getUINativeModule().sideBarContainer.resetAutoHide(node); 10713 } 10714 else { 10715 getUINativeModule().sideBarContainer.setAutoHide(node, this.value); 10716 } 10717 } 10718 checkObjectDiff() { 10719 return !isBaseOrResourceEqual(this.stageValue, this.value); 10720 } 10721} 10722SideBarContainerAutoHideModifier.identity = Symbol('sideBarContainerautoHide'); 10723class SideBarContainerShowSideBarModifier extends ModifierWithKey { 10724 constructor(value) { 10725 super(value); 10726 } 10727 applyPeer(node, reset) { 10728 if (reset) { 10729 getUINativeModule().sideBarContainer.resetShowSideBar(node); 10730 } 10731 else { 10732 getUINativeModule().sideBarContainer.setShowSideBar(node, this.value); 10733 } 10734 } 10735 checkObjectDiff() { 10736 return !isBaseOrResourceEqual(this.stageValue, this.value); 10737 } 10738} 10739SideBarContainerShowSideBarModifier.identity = Symbol('sideBarContainerShowSideBar'); 10740class SideBarContainerMaxSideBarWidthModifier extends ModifierWithKey { 10741 constructor(value) { 10742 super(value); 10743 } 10744 applyPeer(node, reset) { 10745 if (reset) { 10746 getUINativeModule().sideBarContainer.resetMaxSideBarWidth(node); 10747 } 10748 else { 10749 getUINativeModule().sideBarContainer.setMaxSideBarWidth(node, this.value); 10750 } 10751 } 10752 checkObjectDiff() { 10753 return !isBaseOrResourceEqual(this.stageValue, this.value); 10754 } 10755} 10756SideBarContainerMaxSideBarWidthModifier.identity = Symbol('sideBarContainerMaxSideBarWidth'); 10757class SideBarContainerWidthModifier extends ModifierWithKey { 10758 constructor(value) { 10759 super(value); 10760 } 10761 applyPeer(node, reset) { 10762 if (reset) { 10763 getUINativeModule().sideBarContainer.resetSideBarWidth(node); 10764 } 10765 else { 10766 getUINativeModule().sideBarContainer.setSideBarWidth(node, this.value); 10767 } 10768 } 10769 checkObjectDiff() { 10770 return !isBaseOrResourceEqual(this.stageValue, this.value); 10771 } 10772} 10773SideBarContainerWidthModifier.identity = Symbol('sideBarContainerWidth'); 10774class SideBarContainerMinContentWidthModifier extends ModifierWithKey { 10775 constructor(value) { 10776 super(value); 10777 } 10778 applyPeer(node, reset) { 10779 if (reset) { 10780 getUINativeModule().sideBarContainer.resetMinContentWidth(node); 10781 } 10782 else { 10783 getUINativeModule().sideBarContainer.setMinContentWidth(node, this.value); 10784 } 10785 } 10786 checkObjectDiff() { 10787 return !isBaseOrResourceEqual(this.stageValue, this.value); 10788 } 10789} 10790SideBarContainerMinContentWidthModifier.identity = Symbol('sideBarContainerMinContentWidth'); 10791class SideBarContainerShowControlButtonModifier extends ModifierWithKey { 10792 constructor(value) { 10793 super(value); 10794 } 10795 applyPeer(node, reset) { 10796 if (reset) { 10797 getUINativeModule().sideBarContainer.resetShowControlButton(node); 10798 } 10799 else { 10800 getUINativeModule().sideBarContainer.setShowControlButton(node, this.value); 10801 } 10802 } 10803 checkObjectDiff() { 10804 return !isBaseOrResourceEqual(this.stageValue, this.value); 10805 } 10806} 10807SideBarContainerShowControlButtonModifier.identity = Symbol('sideBarContainerShowControlButton'); 10808class SideBarContainerMinSideBarWidthModifier extends ModifierWithKey { 10809 constructor(value) { 10810 super(value); 10811 } 10812 applyPeer(node, reset) { 10813 if (reset) { 10814 getUINativeModule().sideBarContainer.resetMinSideBarWidth(node); 10815 } 10816 else { 10817 getUINativeModule().sideBarContainer.setMinSideBarWidth(node, this.value); 10818 } 10819 } 10820 checkObjectDiff() { 10821 return !isBaseOrResourceEqual(this.stageValue, this.value); 10822 } 10823} 10824SideBarContainerMinSideBarWidthModifier.identity = Symbol('sideBarContainerMinSideBarWidth'); 10825class SideBarContainerControlButtonModifier extends ModifierWithKey { 10826 constructor(value) { 10827 super(value); 10828 } 10829 applyPeer(node, reset) { 10830 let _a, _b, _c; 10831 if (reset) { 10832 getUINativeModule().sideBarContainer.resetControlButton(node); 10833 } 10834 else { 10835 getUINativeModule().sideBarContainer.setControlButton(node, this.value.left, 10836 this.value.top, this.value.width, this.value.height, (_a = this.value.icons) === null || 10837 _a === void 0 ? void 0 : _a.shown, (_b = this.value.icons) === null || 10838 _b === void 0 ? void 0 : _b.hidden, (_c = this.value.icons) === null || 10839 _c === void 0 ? void 0 : _c.switching); 10840 } 10841 } 10842 checkObjectDiff() { 10843 let _a, _b, _c, _d, _e, _f; 10844 if (!(this.stageValue.left === this.value.left && 10845 this.stageValue.top === this.value.top && 10846 this.stageValue.width === this.value.width && 10847 this.stageValue.height === this.value.height)) { 10848 return true; 10849 } 10850 else { 10851 return !isBaseOrResourceEqual((_a = this.stageValue.icons) === null || _a === void 0 ? void 0 : _a.shown, (_b = this.value.icons) === null || 10852 _b === void 0 ? void 0 : _b.shown) || 10853 !isBaseOrResourceEqual((_c = this.stageValue.icons) === null || _c === void 0 ? void 0 : _c.hidden, (_d = this.value.icons) === null || 10854 _d === void 0 ? void 0 : _d.hidden) || 10855 !isBaseOrResourceEqual((_e = this.stageValue.icons) === null || _e === void 0 ? void 0 : _e.switching, (_f = this.value.icons) === null || 10856 _f === void 0 ? void 0 : _f.switching); 10857 } 10858 } 10859} 10860SideBarContainerControlButtonModifier.identity = Symbol('sideBarContainercontrolButton'); 10861class SideBarContainerDividerModifier extends ModifierWithKey { 10862 constructor(value) { 10863 super(value); 10864 } 10865 applyPeer(node, reset) { 10866 if (reset) { 10867 getUINativeModule().sideBarContainer.resetDivider(node); 10868 } 10869 else { 10870 if (!this.value || !isObject(this.value) || !this.value.strokeWidth) { 10871 getUINativeModule().sideBarContainer.resetDivider(node); 10872 } 10873 else { 10874 getUINativeModule().sideBarContainer.setDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 10875 } 10876 } 10877 } 10878 checkObjectDiff() { 10879 return !isBaseOrResourceEqual(this.stageValue.strokeWidth, this.value.strokeWidth) || 10880 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 10881 !isBaseOrResourceEqual(this.stageValue.startMargin, this.value.startMargin) || 10882 !isBaseOrResourceEqual(this.stageValue.endMargin, this.value.endMargin); 10883 } 10884} 10885SideBarContainerDividerModifier.identity = Symbol('sideBarContainerdivider'); 10886class ArkSideBarContainerComponent extends ArkComponent { 10887 constructor(nativePtr, classType) { 10888 super(nativePtr, classType); 10889 } 10890 onChange(callback) { 10891 throw new Error('Method not implemented.'); 10892 } 10893 autoHide(value) { 10894 modifierWithKey(this._modifiersWithKeys, SideBarContainerAutoHideModifier.identity, SideBarContainerAutoHideModifier, value); 10895 return this; 10896 } 10897 showSideBar(value) { 10898 modifierWithKey(this._modifiersWithKeys, SideBarContainerShowSideBarModifier.identity, SideBarContainerShowSideBarModifier, value); 10899 return this; 10900 } 10901 maxSideBarWidth(value) { 10902 modifierWithKey(this._modifiersWithKeys, SideBarContainerMaxSideBarWidthModifier.identity, SideBarContainerMaxSideBarWidthModifier, value); 10903 return this; 10904 } 10905 minSideBarWidth(value) { 10906 modifierWithKey(this._modifiersWithKeys, SideBarContainerMinSideBarWidthModifier.identity, SideBarContainerMinSideBarWidthModifier, value); 10907 return this; 10908 } 10909 minContentWidth(value) { 10910 modifierWithKey(this._modifiersWithKeys, SideBarContainerMinContentWidthModifier.identity, SideBarContainerMinContentWidthModifier, value); 10911 return this; 10912 } 10913 controlButton(value) { 10914 modifierWithKey(this._modifiersWithKeys, SideBarContainerControlButtonModifier.identity, SideBarContainerControlButtonModifier, value); 10915 return this; 10916 } 10917 divider(value) { 10918 modifierWithKey(this._modifiersWithKeys, SideBarContainerDividerModifier.identity, SideBarContainerDividerModifier, value); 10919 return this; 10920 } 10921 sideBarPosition(value) { 10922 modifierWithKey(this._modifiersWithKeys, SideBarContainerPositionModifier.identity, SideBarContainerPositionModifier, value); 10923 return this; 10924 } 10925 sideBarWidth(value) { 10926 modifierWithKey(this._modifiersWithKeys, SideBarContainerWidthModifier.identity, SideBarContainerWidthModifier, value); 10927 return this; 10928 } 10929 showControlButton(value) { 10930 modifierWithKey(this._modifiersWithKeys, SideBarContainerShowControlButtonModifier.identity, SideBarContainerShowControlButtonModifier, value); 10931 return this; 10932 } 10933} 10934// @ts-ignore 10935if (globalThis.SideBarContainer !== undefined) { 10936 globalThis.SideBarContainer.attributeModifier = function (modifier) { 10937 attributeModifierFunc.call(this, modifier, (nativePtr) => { 10938 return new ArkSideBarContainerComponent(nativePtr); 10939 }, (nativePtr, classType, modifierJS) => { 10940 return new modifierJS.SideBarContainerModifier(nativePtr, classType); 10941 }); 10942 }; 10943} 10944 10945/// <reference path='./import.ts' /> 10946class ArkStackComponent extends ArkComponent { 10947 constructor(nativePtr, classType) { 10948 super(nativePtr, classType); 10949 } 10950 initialize(value) { 10951 if (value[0] !== undefined) { 10952 this.alignContent(value[0].alignContent); 10953 } 10954 return this 10955 } 10956 alignContent(value) { 10957 modifierWithKey(this._modifiersWithKeys, StackAlignContentModifier.identity, StackAlignContentModifier, value); 10958 return this; 10959 } 10960 align(value) { 10961 modifierWithKey(this._modifiersWithKeys, StackAlignContentModifier.identity, StackAlignContentModifier, value); 10962 return this; 10963 } 10964 pointLight(value) { 10965 modifierWithKey(this._modifiersWithKeys, StackPointLightModifier.identity, StackPointLightModifier, value); 10966 return this; 10967 } 10968} 10969class StackPointLightModifier extends ModifierWithKey { 10970 constructor(value) { 10971 super(value); 10972 } 10973 applyPeer(node, reset) { 10974 if (reset) { 10975 getUINativeModule().common.resetPointLightStyle(node); 10976 } else { 10977 let positionX; 10978 let positionY; 10979 let positionZ; 10980 let intensity; 10981 let color; 10982 let illuminated; 10983 let bloom; 10984 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 10985 positionX = this.value.lightSource.positionX; 10986 positionY = this.value.lightSource.positionY; 10987 positionZ = this.value.lightSource.positionZ; 10988 intensity = this.value.lightSource.intensity; 10989 color = this.value.lightSource.color; 10990 } 10991 illuminated = this.value.illuminated; 10992 bloom = this.value.bloom; 10993 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 10994 illuminated, bloom); 10995 } 10996 } 10997 checkObjectDiff() { 10998 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 10999 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 11000 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 11001 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 11002 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 11003 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 11004 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 11005 } 11006} 11007StackPointLightModifier.identity = Symbol('stackPointLight'); 11008class StackAlignContentModifier extends ModifierWithKey { 11009 constructor(value) { 11010 super(value); 11011 } 11012 applyPeer(node, reset) { 11013 if (reset) { 11014 getUINativeModule().stack.resetAlignContent(node); 11015 } 11016 else { 11017 getUINativeModule().stack.setAlignContent(node, this.value); 11018 } 11019 } 11020 checkObjectDiff() { 11021 return this.stageValue !== this.value; 11022 } 11023} 11024StackAlignContentModifier.identity = Symbol('stackAlignContent'); 11025// @ts-ignore 11026if (globalThis.Stack !== undefined) { 11027 globalThis.Stack.attributeModifier = function (modifier) { 11028 attributeModifierFunc.call(this, modifier, (nativePtr) => { 11029 return new ArkStackComponent(nativePtr); 11030 }, (nativePtr, classType, modifierJS) => { 11031 return new modifierJS.StackModifier(nativePtr, classType); 11032 }); 11033 }; 11034} 11035 11036/// <reference path='./import.ts' /> 11037class ArkFolderStackComponent extends ArkComponent { 11038 constructor(nativePtr, classType) { 11039 super(nativePtr, classType); 11040 } 11041 alignContent(value) { 11042 modifierWithKey(this._modifiersWithKeys, FolderStackAlignContentModifier.identity, FolderStackAlignContentModifier, value); 11043 return this; 11044 } 11045 enableAnimation(value) { 11046 modifierWithKey(this._modifiersWithKeys, FolderStackEnableAnimationModifier.identity, FolderStackEnableAnimationModifier, value); 11047 return this; 11048 } 11049 autoHalfFold(value) { 11050 modifierWithKey(this._modifiersWithKeys, FolderStackAutoHalfFoldModifier.identity, FolderStackAutoHalfFoldModifier, value); 11051 return this; 11052 } 11053} 11054 11055class FolderStackAlignContentModifier extends ModifierWithKey { 11056 constructor(value) { 11057 super(value); 11058 } 11059 applyPeer(node, reset) { 11060 if (reset) { 11061 getUINativeModule().stack.resetAlignContent(node); 11062 } else { 11063 getUINativeModule().stack.setAlignContent(node, this.value); 11064 } 11065 } 11066} 11067FolderStackAlignContentModifier.identity = Symbol('folderStackAlignContent'); 11068 11069class FolderStackEnableAnimationModifier extends ModifierWithKey { 11070 constructor(value) { 11071 super(value); 11072 } 11073 applyPeer(node, reset) { 11074 if (reset) { 11075 getUINativeModule().folderStack.resetEnableAnimation(node); 11076 } else { 11077 getUINativeModule().folderStack.setEnableAnimation(node, this.value); 11078 } 11079 } 11080} 11081FolderStackEnableAnimationModifier.identity = Symbol('folderStackEnableAnimation'); 11082 11083class FolderStackAutoHalfFoldModifier extends ModifierWithKey { 11084 constructor(value) { 11085 super(value); 11086 } 11087 applyPeer(node, reset) { 11088 if (reset) { 11089 getUINativeModule().folderStack.resetAutoHalfFold(node); 11090 } else { 11091 getUINativeModule().folderStack.setAutoHalfFold(node, this.value); 11092 } 11093 } 11094} 11095FolderStackAutoHalfFoldModifier.identity = Symbol('folderStackAutoHalfFold'); 11096 11097// @ts-ignore 11098if (globalThis.FolderStack !== undefined) { 11099 globalThis.FolderStack.attributeModifier = function (modifier) { 11100 attributeModifierFunc.call(this, modifier, (nativePtr) => { 11101 return new ArkFolderStackComponent(nativePtr); 11102 }, (nativePtr, classType, modifierJS) => { 11103 return new modifierJS.FolderStackModifier(nativePtr, classType); 11104 }); 11105 }; 11106} 11107 11108/// <reference path='./import.ts' /> 11109class TextEnableDataDetectorModifier extends ModifierWithKey { 11110 constructor(value) { 11111 super(value); 11112 } 11113 applyPeer(node, reset) { 11114 if (reset) { 11115 getUINativeModule().text.resetEnableDataDetector(node); 11116 } 11117 else { 11118 getUINativeModule().text.setEnableDataDetector(node, this.value); 11119 } 11120 } 11121 checkObjectDiff() { 11122 return !isBaseOrResourceEqual(this.stageValue, this.value); 11123 } 11124} 11125TextEnableDataDetectorModifier.identity = Symbol('textEnableDataDetector'); 11126class FontColorModifier extends ModifierWithKey { 11127 constructor(value) { 11128 super(value); 11129 } 11130 applyPeer(node, reset) { 11131 if (reset) { 11132 getUINativeModule().text.resetFontColor(node); 11133 } 11134 else { 11135 getUINativeModule().text.setFontColor(node, this.value); 11136 } 11137 } 11138 checkObjectDiff() { 11139 return !isBaseOrResourceEqual(this.stageValue, this.value); 11140 } 11141} 11142FontColorModifier.identity = Symbol('textFontColor'); 11143class TextForegroundColorModifier extends ModifierWithKey { 11144 constructor(value) { 11145 super(value); 11146 } 11147 applyPeer(node, reset) { 11148 if (reset) { 11149 getUINativeModule().text.resetTextForegroundColor(node); 11150 } 11151 else { 11152 getUINativeModule().text.setTextForegroundColor(node, this.value); 11153 } 11154 } 11155 checkObjectDiff() { 11156 return !isBaseOrResourceEqual(this.stageValue, this.value); 11157 } 11158} 11159TextForegroundColorModifier.identity = Symbol('textForegroundColor'); 11160class FontSizeModifier extends ModifierWithKey { 11161 constructor(value) { 11162 super(value); 11163 } 11164 applyPeer(node, reset) { 11165 if (reset) { 11166 getUINativeModule().text.resetFontSize(node); 11167 } 11168 else { 11169 getUINativeModule().text.setFontSize(node, this.value); 11170 } 11171 } 11172 checkObjectDiff() { 11173 return !isBaseOrResourceEqual(this.stageValue, this.value); 11174 } 11175} 11176FontSizeModifier.identity = Symbol('textFontSize'); 11177class FontWeightModifier extends ModifierWithKey { 11178 constructor(value) { 11179 super(value); 11180 } 11181 applyPeer(node, reset) { 11182 if (reset) { 11183 getUINativeModule().text.resetFontWeight(node); 11184 } 11185 else { 11186 getUINativeModule().text.setFontWeight(node, this.value.value, this.value.enableVariableFontWeight); 11187 } 11188 } 11189} 11190FontWeightModifier.identity = Symbol('textFontWeight'); 11191class FontStyleModifier extends ModifierWithKey { 11192 constructor(value) { 11193 super(value); 11194 } 11195 applyPeer(node, reset) { 11196 if (reset) { 11197 getUINativeModule().text.resetFontStyle(node); 11198 } 11199 else { 11200 getUINativeModule().text.setFontStyle(node, this.value); 11201 } 11202 } 11203} 11204FontStyleModifier.identity = Symbol('textFontStyle'); 11205class TextAlignModifier extends ModifierWithKey { 11206 constructor(value) { 11207 super(value); 11208 } 11209 applyPeer(node, reset) { 11210 if (reset) { 11211 getUINativeModule().text.resetTextAlign(node); 11212 } 11213 else { 11214 getUINativeModule().text.setTextAlign(node, this.value); 11215 } 11216 } 11217} 11218TextAlignModifier.identity = Symbol('textAlign'); 11219class TextHeightAdaptivePolicyModifier extends ModifierWithKey { 11220 constructor(value) { 11221 super(value); 11222 } 11223 applyPeer(node, reset) { 11224 if (reset) { 11225 getUINativeModule().text.resetHeightAdaptivePolicy(node); 11226 } 11227 else { 11228 getUINativeModule().text.setHeightAdaptivePolicy(node, this.value); 11229 } 11230 } 11231 checkObjectDiff() { 11232 return !isBaseOrResourceEqual(this.stageValue, this.value); 11233 } 11234} 11235TextHeightAdaptivePolicyModifier.identity = Symbol('textHeightAdaptivePolicy'); 11236class TextDraggableModifier extends ModifierWithKey { 11237 constructor(value) { 11238 super(value); 11239 } 11240 applyPeer(node, reset) { 11241 if (reset) { 11242 getUINativeModule().text.resetDraggable(node); 11243 } 11244 else { 11245 getUINativeModule().text.setDraggable(node, this.value); 11246 } 11247 } 11248 checkObjectDiff() { 11249 return !isBaseOrResourceEqual(this.stageValue, this.value); 11250 } 11251} 11252TextDraggableModifier.identity = Symbol('textDraggable'); 11253class TextPrivacySensitiveModifier extends ModifierWithKey { 11254 constructor(value) { 11255 super(value); 11256 } 11257 applyPeer(node, reset) { 11258 if (reset) { 11259 getUINativeModule().text.resetPrivacySensitive(node); 11260 } 11261 else { 11262 getUINativeModule().text.setPrivacySensitive(node, this.value); 11263 } 11264 } 11265 checkObjectDiff() { 11266 return !isBaseOrResourceEqual(this.stageValue, this.value); 11267 } 11268} 11269TextPrivacySensitiveModifier.identity = Symbol('textPrivacySensitive'); 11270class TextWordBreakModifier extends ModifierWithKey { 11271 constructor(value) { 11272 super(value); 11273 } 11274 applyPeer(node, reset) { 11275 if (reset) { 11276 getUINativeModule().text.resetWordBreak(node); 11277 } 11278 else { 11279 getUINativeModule().text.setWordBreak(node, this.value); 11280 } 11281 } 11282 checkObjectDiff() { 11283 return !isBaseOrResourceEqual(this.stageValue, this.value); 11284 } 11285} 11286TextWordBreakModifier.identity = Symbol('textWordBreak'); 11287 11288class TextLineBreakStrategyModifier extends ModifierWithKey { 11289 constructor(value) { 11290 super(value); 11291 } 11292 applyPeer(node, reset) { 11293 if (reset) { 11294 getUINativeModule().text.resetLineBreakStrategy(node); 11295 } 11296 else { 11297 getUINativeModule().text.setLineBreakStrategy(node, this.value); 11298 } 11299 } 11300 checkObjectDiff() { 11301 return !isBaseOrResourceEqual(this.stageValue, this.value); 11302 } 11303} 11304TextLineBreakStrategyModifier.identity = Symbol('textLineBreakStrategy'); 11305 11306class TextFontFeatureModifier extends ModifierWithKey { 11307 constructor(value) { 11308 super(value); 11309 } 11310 applyPeer(node, reset) { 11311 if (reset) { 11312 getUINativeModule().text.resetFontFeature(node); 11313 } else { 11314 getUINativeModule().text.setFontFeature(node, this.value); 11315 } 11316 } 11317 checkObjectDiff() { 11318 return !isBaseOrResourceEqual(this.stageValue, this.value); 11319 } 11320} 11321TextFontFeatureModifier.identity = Symbol('textFontFeature'); 11322 11323class TextEllipsisModeModifier extends ModifierWithKey { 11324 constructor(value) { 11325 super(value); 11326 } 11327 applyPeer(node, reset) { 11328 if (reset) { 11329 getUINativeModule().text.resetEllipsisMode(node); 11330 } 11331 else { 11332 getUINativeModule().text.setEllipsisMode(node, this.value); 11333 } 11334 } 11335 checkObjectDiff() { 11336 return !isBaseOrResourceEqual(this.stageValue, this.value); 11337 } 11338} 11339TextEllipsisModeModifier.identity = Symbol('textEllipsisMode'); 11340class TextMinFontSizeModifier extends ModifierWithKey { 11341 constructor(value) { 11342 super(value); 11343 } 11344 applyPeer(node, reset) { 11345 if (reset) { 11346 getUINativeModule().text.resetMinFontSize(node); 11347 } 11348 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 11349 getUINativeModule().text.resetMinFontSize(node); 11350 } 11351 else { 11352 getUINativeModule().text.setMinFontSize(node, this.value); 11353 } 11354 } 11355 checkObjectDiff() { 11356 return !isBaseOrResourceEqual(this.stageValue, this.value); 11357 } 11358} 11359TextMinFontSizeModifier.identity = Symbol('textMinFontSize'); 11360class TextMaxFontSizeModifier extends ModifierWithKey { 11361 constructor(value) { 11362 super(value); 11363 } 11364 applyPeer(node, reset) { 11365 if (reset) { 11366 getUINativeModule().text.resetMaxFontSize(node); 11367 } 11368 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 11369 getUINativeModule().text.resetMaxFontSize(node); 11370 } 11371 else { 11372 getUINativeModule().text.setMaxFontSize(node, this.value); 11373 } 11374 } 11375 checkObjectDiff() { 11376 return !isBaseOrResourceEqual(this.stageValue, this.value); 11377 } 11378} 11379TextMaxFontSizeModifier.identity = Symbol('textMaxFontSize'); 11380class TextMinFontScaleModifier extends ModifierWithKey { 11381 constructor(value) { 11382 super(value); 11383 } 11384 applyPeer(node, reset) { 11385 if (reset) { 11386 getUINativeModule().text.resetMinFontScale(node); 11387 } 11388 else if (!isNumber(this.value) && !isResource(this.value)) { 11389 getUINativeModule().text.resetMinFontScale(node); 11390 } 11391 else { 11392 getUINativeModule().text.setMinFontScale(node, this.value); 11393 } 11394 } 11395 checkObjectDiff() { 11396 return !isBaseOrResourceEqual(this.stageValue, this.value); 11397 } 11398} 11399TextMinFontScaleModifier.identity = Symbol('textMinFontScale'); 11400class TextMaxFontScaleModifier extends ModifierWithKey { 11401 constructor(value) { 11402 super(value); 11403 } 11404 applyPeer(node, reset) { 11405 if (reset) { 11406 getUINativeModule().text.resetMaxFontScale(node); 11407 } 11408 else if (!isNumber(this.value) && !isResource(this.value)) { 11409 getUINativeModule().text.resetMaxFontScale(node); 11410 } 11411 else { 11412 getUINativeModule().text.setMaxFontScale(node, this.value); 11413 } 11414 } 11415 checkObjectDiff() { 11416 return !isBaseOrResourceEqual(this.stageValue, this.value); 11417 } 11418} 11419TextMaxFontScaleModifier.identity = Symbol('textMaxFontScale'); 11420class TextLineHeightModifier extends ModifierWithKey { 11421 constructor(value) { 11422 super(value); 11423 } 11424 applyPeer(node, reset) { 11425 if (reset) { 11426 getUINativeModule().text.resetLineHeight(node); 11427 } 11428 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 11429 getUINativeModule().text.resetLineHeight(node); 11430 } 11431 else { 11432 getUINativeModule().text.setLineHeight(node, this.value); 11433 } 11434 } 11435 checkObjectDiff() { 11436 return !isBaseOrResourceEqual(this.stageValue, this.value); 11437 } 11438} 11439TextLineHeightModifier.identity = Symbol('textLineHeight'); 11440class TextCopyOptionModifier extends ModifierWithKey { 11441 constructor(value) { 11442 super(value); 11443 } 11444 applyPeer(node, reset) { 11445 if (reset) { 11446 getUINativeModule().text.resetCopyOption(node); 11447 } 11448 else { 11449 getUINativeModule().text.setCopyOption(node, this.value); 11450 } 11451 } 11452 checkObjectDiff() { 11453 return !isBaseOrResourceEqual(this.stageValue, this.value); 11454 } 11455} 11456TextCopyOptionModifier.identity = Symbol('textCopyOption'); 11457class TextFontFamilyModifier extends ModifierWithKey { 11458 constructor(value) { 11459 super(value); 11460 } 11461 applyPeer(node, reset) { 11462 if (reset) { 11463 getUINativeModule().text.resetFontFamily(node); 11464 } 11465 else if (!isString(this.value) && !isResource(this.value)) { 11466 getUINativeModule().text.resetFontFamily(node); 11467 } 11468 else { 11469 getUINativeModule().text.setFontFamily(node, this.value); 11470 } 11471 } 11472 checkObjectDiff() { 11473 return !isBaseOrResourceEqual(this.stageValue, this.value); 11474 } 11475} 11476TextFontFamilyModifier.identity = Symbol('textFontFamily'); 11477class TextMaxLinesModifier extends ModifierWithKey { 11478 constructor(value) { 11479 super(value); 11480 } 11481 applyPeer(node, reset) { 11482 if (reset) { 11483 getUINativeModule().text.resetMaxLines(node); 11484 } 11485 else if (!isNumber(this.value)) { 11486 getUINativeModule().text.resetMaxLines(node); 11487 } 11488 else { 11489 getUINativeModule().text.setMaxLines(node, this.value); 11490 } 11491 } 11492 checkObjectDiff() { 11493 return !isBaseOrResourceEqual(this.stageValue, this.value); 11494 } 11495} 11496TextMaxLinesModifier.identity = Symbol('textMaxLines'); 11497class TextLetterSpacingModifier extends ModifierWithKey { 11498 constructor(value) { 11499 super(value); 11500 } 11501 applyPeer(node, reset) { 11502 if (reset) { 11503 getUINativeModule().text.resetLetterSpacing(node); 11504 } 11505 else if (!isNumber(this.value) && !isString(this.value)) { 11506 getUINativeModule().text.resetLetterSpacing(node); 11507 } 11508 else { 11509 getUINativeModule().text.setLetterSpacing(node, this.value); 11510 } 11511 } 11512 checkObjectDiff() { 11513 return !isBaseOrResourceEqual(this.stageValue, this.value); 11514 } 11515} 11516TextLetterSpacingModifier.identity = Symbol('textLetterSpacing'); 11517class TextLineSpacingModifier extends ModifierWithKey { 11518 constructor(value) { 11519 super(value); 11520 } 11521 applyPeer(node, reset) { 11522 if (reset) { 11523 getUINativeModule().text.resetLineSpacing(node); 11524 } 11525 else if (!isObject(this.value)) { 11526 getUINativeModule().text.resetLineSpacing(node); 11527 } 11528 else { 11529 getUINativeModule().text.setLineSpacing(node, this.value); 11530 } 11531 } 11532 checkObjectDiff() { 11533 return !isBaseOrResourceEqual(this.stageValue, this.value); 11534 } 11535} 11536TextLineSpacingModifier.identity = Symbol('textLineSpacing'); 11537class TextTextOverflowModifier extends ModifierWithKey { 11538 constructor(value) { 11539 super(value); 11540 } 11541 applyPeer(node, reset) { 11542 if (reset) { 11543 getUINativeModule().text.resetTextOverflow(node); 11544 } 11545 else { 11546 getUINativeModule().text.setTextOverflow(node, this.value.overflow); 11547 } 11548 } 11549 checkObjectDiff() { 11550 return !isBaseOrResourceEqual(this.stageValue.overflow, this.value.overflow); 11551 } 11552} 11553TextTextOverflowModifier.identity = Symbol('textTextOverflow'); 11554class TextBaselineOffsetModifier extends ModifierWithKey { 11555 constructor(value) { 11556 super(value); 11557 } 11558 applyPeer(node, reset) { 11559 if (reset) { 11560 getUINativeModule().text.resetBaselineOffset(node); 11561 } 11562 else if (!isNumber(this.value) && !isString(this.value)) { 11563 getUINativeModule().text.resetBaselineOffset(node); 11564 } 11565 else { 11566 getUINativeModule().text.setBaselineOffset(node, this.value); 11567 } 11568 } 11569 checkObjectDiff() { 11570 return !isBaseOrResourceEqual(this.stageValue, this.value); 11571 } 11572} 11573TextBaselineOffsetModifier.identity = Symbol('textBaselineOffset'); 11574class TextTextCaseModifier extends ModifierWithKey { 11575 constructor(value) { 11576 super(value); 11577 } 11578 applyPeer(node, reset) { 11579 if (reset) { 11580 getUINativeModule().text.resetTextCase(node); 11581 } 11582 else { 11583 getUINativeModule().text.setTextCase(node, this.value); 11584 } 11585 } 11586 checkObjectDiff() { 11587 return !isBaseOrResourceEqual(this.stageValue, this.value); 11588 } 11589} 11590TextTextCaseModifier.identity = Symbol('textTextCase'); 11591class TextTextIndentModifier extends ModifierWithKey { 11592 constructor(value) { 11593 super(value); 11594 } 11595 applyPeer(node, reset) { 11596 if (reset) { 11597 getUINativeModule().text.resetTextIndent(node); 11598 } 11599 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 11600 getUINativeModule().text.resetTextIndent(node); 11601 } 11602 else { 11603 getUINativeModule().text.setTextIndent(node, this.value); 11604 } 11605 } 11606 checkObjectDiff() { 11607 return !isBaseOrResourceEqual(this.stageValue, this.value); 11608 } 11609} 11610TextTextIndentModifier.identity = Symbol('textTextIndent'); 11611class TextTextShadowModifier extends ModifierWithKey { 11612 constructor(value) { 11613 super(value); 11614 } 11615 applyPeer(node, reset) { 11616 if (reset) { 11617 getUINativeModule().text.resetTextShadow(node); 11618 } 11619 else { 11620 let shadow = new ArkShadowInfoToArray(); 11621 if (!shadow.convertShadowOptions(this.value)) { 11622 getUINativeModule().text.resetTextShadow(node); 11623 } 11624 else { 11625 getUINativeModule().text.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 11626 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 11627 } 11628 } 11629 } 11630 checkObjectDiff() { 11631 let checkDiff = true; 11632 let arkShadow = new ArkShadowInfoToArray(); 11633 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 11634 Object.getPrototypeOf(this.value).constructor === Object) { 11635 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 11636 } 11637 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 11638 Object.getPrototypeOf(this.value).constructor === Array && 11639 this.stageValue.length === this.value.length) { 11640 let isDiffItem = false; 11641 for (let i = 0; i < this.value.length; i++) { 11642 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 11643 isDiffItem = true; 11644 break; 11645 } 11646 } 11647 if (!isDiffItem) { 11648 checkDiff = false; 11649 } 11650 } 11651 return checkDiff; 11652 } 11653} 11654TextTextShadowModifier.identity = Symbol('textTextShadow'); 11655class TextDecorationModifier extends ModifierWithKey { 11656 constructor(value) { 11657 super(value); 11658 } 11659 applyPeer(node, reset) { 11660 if (reset) { 11661 getUINativeModule().text.resetDecoration(node); 11662 } 11663 else { 11664 getUINativeModule().text.setDecoration(node, this.value.type, this.value.color, this.value.style); 11665 } 11666 } 11667 checkObjectDiff() { 11668 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 11669 return true; 11670 } 11671 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 11672 return !isResourceEqual(this.stageValue.color, this.value.color); 11673 } 11674 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 11675 return !(this.stageValue.color === this.value.color); 11676 } 11677 else { 11678 return true; 11679 } 11680 } 11681} 11682TextDecorationModifier.identity = Symbol('textDecoration'); 11683class TextFontModifier extends ModifierWithKey { 11684 constructor(value) { 11685 super(value); 11686 } 11687 applyPeer(node, reset) { 11688 if (reset) { 11689 getUINativeModule().text.resetFont(node); 11690 } 11691 else { 11692 getUINativeModule().text.setFont(node, this.value.value.size, this.value.value.weight, this.value.value.family, 11693 this.value.value.style, this.value.enableVariableFontWeight); 11694 } 11695 } 11696 checkObjectDiff() { 11697 if (this.stageValue.weight !== this.value.weight || this.stageValue.style !== this.value.style || 11698 this.stageValue.enableVariableFontWeight !== this.value.enableVariableFontWeight) { 11699 return true; 11700 } 11701 if (((isResource(this.stageValue.size) && isResource(this.value.size) && 11702 isResourceEqual(this.stageValue.size, this.value.size)) || 11703 (!isResource(this.stageValue.size) && !isResource(this.value.size) && 11704 this.stageValue.size === this.value.size)) && 11705 ((isResource(this.stageValue.family) && isResource(this.value.family) && 11706 isResourceEqual(this.stageValue.family, this.value.family)) || 11707 (!isResource(this.stageValue.family) && !isResource(this.value.family) && 11708 this.stageValue.family === this.value.family))) { 11709 return false; 11710 } 11711 else { 11712 return true; 11713 } 11714 } 11715} 11716TextFontModifier.identity = Symbol('textFont'); 11717class TextClipModifier extends ModifierWithKey { 11718 constructor(value) { 11719 super(value); 11720 } 11721 applyPeer(node, reset) { 11722 if (reset) { 11723 getUINativeModule().common.resetClipWithEdge(node); 11724 } 11725 else { 11726 getUINativeModule().common.setClipWithEdge(node, this.value); 11727 } 11728 } 11729 checkObjectDiff() { 11730 return true; 11731 } 11732} 11733TextClipModifier.identity = Symbol('textClip'); 11734class TextContentModifier extends ModifierWithKey { 11735 constructor(value) { 11736 super(value); 11737 } 11738 applyPeer(node, reset) { 11739 if (reset) { 11740 getUINativeModule().text.setContent(node, ''); 11741 } 11742 else { 11743 getUINativeModule().text.setContent(node, this.value); 11744 } 11745 } 11746} 11747TextContentModifier.identity = Symbol('textContent'); 11748class TextSelectionModifier extends ModifierWithKey { 11749 constructor(value) { 11750 super(value); 11751 } 11752 applyPeer(node, reset) { 11753 if (reset) { 11754 getUINativeModule().text.resetSelection(node); 11755 } else { 11756 getUINativeModule().text.setSelection(node, this.value.selectionStart, this.value.selectionEnd); 11757 } 11758 } 11759 checkObjectDiff() { 11760 return !isBaseOrResourceEqual(this.stageValue.selectionStart, this.value.selectionStart) || 11761 !isBaseOrResourceEqual(this.stageValue.selectionEnd, this.value.selectionEnd); 11762 } 11763} 11764TextSelectionModifier.identity = Symbol('textSelection'); 11765class TextSelectableModifier extends ModifierWithKey { 11766 constructor(value) { 11767 super(value); 11768 } 11769 applyPeer(node, reset) { 11770 if (reset) { 11771 getUINativeModule().text.resetTextSelectableMode(node); 11772 } else { 11773 getUINativeModule().text.setTextSelectableMode(node, this.value); 11774 } 11775 } 11776 checkObjectDiff() { 11777 return !isBaseOrResourceEqual(this.stageValue, this.value); 11778 } 11779} 11780TextSelectableModifier.identity = Symbol('textTextSelectable'); 11781class TextCaretColorModifier extends ModifierWithKey { 11782 constructor(value) { 11783 super(value); 11784 } 11785 applyPeer(node, reset) { 11786 if (reset) { 11787 getUINativeModule().text.resetCaretColor(node); 11788 } else { 11789 getUINativeModule().text.setCaretColor(node, this.value); 11790 } 11791 } 11792 checkObjectDiff() { 11793 return !isBaseOrResourceEqual(this.stageValue, this.value); 11794 } 11795} 11796TextCaretColorModifier.identity = Symbol('textCaretColor'); 11797class TextSelectedBackgroundColorModifier extends ModifierWithKey { 11798 constructor(value) { 11799 super(value); 11800 } 11801 applyPeer(node, reset) { 11802 if (reset) { 11803 getUINativeModule().text.resetSelectedBackgroundColor(node); 11804 } else { 11805 getUINativeModule().text.setSelectedBackgroundColor(node, this.value); 11806 } 11807 } 11808 checkObjectDiff() { 11809 return !isBaseOrResourceEqual(this.stageValue, this.value); 11810 } 11811} 11812TextSelectedBackgroundColorModifier.identity = Symbol('textSelectedBackgroundColor'); 11813class TextDataDetectorConfigModifier extends ModifierWithKey { 11814 constructor(value) { 11815 super(value); 11816 } 11817 applyPeer(node, reset) { 11818 if (reset) { 11819 getUINativeModule().text.resetDataDetectorConfig(node); 11820 } else { 11821 getUINativeModule().text.setDataDetectorConfig(node, this.value.types, this.value.onDetectResultUpdate, 11822 this.value.color, this.value.decorationType, this.value.decorationColor, this.value.decorationStyle); 11823 } 11824 } 11825 checkObjectDiff() { 11826 return !isBaseOrResourceEqual(this.stageValue.types, this.value.types) || 11827 !isBaseOrResourceEqual(this.stageValue.onDetectResultUpdate, this.value.onDetectResultUpdate) || 11828 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 11829 !isBaseOrResourceEqual(this.stageValue.decorationType, this.value.decorationType) || 11830 !isBaseOrResourceEqual(this.stageValue.decorationColor, this.value.decorationColor) || 11831 !isBaseOrResourceEqual(this.stageValue.decorationStyle, this.value.decorationStyle); 11832 } 11833} 11834TextDataDetectorConfigModifier.identity = Symbol('textDataDetectorConfig'); 11835class TextOnCopyModifier extends ModifierWithKey { 11836 constructor(value) { 11837 super(value); 11838 } 11839 applyPeer(node, reset) { 11840 if (reset) { 11841 getUINativeModule().text.resetOnCopy(node); 11842 } else { 11843 getUINativeModule().text.setOnCopy(node, this.value); 11844 } 11845 } 11846} 11847TextOnCopyModifier.identity = Symbol('textOnCopy'); 11848class TextOnTextSelectionChangeModifier extends ModifierWithKey { 11849 constructor(value) { 11850 super(value); 11851 } 11852 applyPeer(node, reset) { 11853 if (reset) { 11854 getUINativeModule().text.resetOnTextSelectionChange(node); 11855 } else { 11856 getUINativeModule().text.setOnTextSelectionChange(node, this.value); 11857 } 11858 } 11859} 11860TextOnTextSelectionChangeModifier.identity = Symbol('textOnTextSelectionChange'); 11861 11862class TextControllerModifier extends ModifierWithKey { 11863 constructor(value) { 11864 super(value); 11865 } 11866 applyPeer(node, reset) { 11867 if (reset) { 11868 getUINativeModule().text.setTextController(node, ''); 11869 } 11870 else { 11871 getUINativeModule().text.setTextController(node, this.value); 11872 } 11873 } 11874} 11875TextControllerModifier.identity = Symbol('textController'); 11876 11877class TextEditMenuOptionsModifier extends ModifierWithKey { 11878 constructor(value) { 11879 super(value); 11880 } 11881 applyPeer(node, reset) { 11882 if (reset) { 11883 getUINativeModule().text.resetSelectionMenuOptions(node); 11884 } else { 11885 getUINativeModule().text.setSelectionMenuOptions(node, this.value); 11886 } 11887 } 11888} 11889TextEditMenuOptionsModifier.identity = Symbol('textEditMenuOptions'); 11890 11891class TextHalfLeadingModifier extends ModifierWithKey { 11892 constructor(value) { 11893 super(value); 11894 } 11895 applyPeer(node, reset) { 11896 if (reset) { 11897 getUINativeModule().text.resetHalfLeading(node); 11898 } 11899 else { 11900 getUINativeModule().text.setHalfLeading(node, this.value); 11901 } 11902 } 11903 checkObjectDiff() { 11904 return !isBaseOrResourceEqual(this.stageValue, this.value); 11905 } 11906} 11907TextHalfLeadingModifier.identity = Symbol('textHalfLeading'); 11908 11909class TextOnClickModifier extends ModifierWithKey { 11910 constructor(value) { 11911 super(value); 11912 } 11913 applyPeer(node, reset) { 11914 if (reset) { 11915 getUINativeModule().text.resetOnClick(node); 11916 } 11917 else { 11918 getUINativeModule().text.setOnClick(node, this.value); 11919 } 11920 } 11921 checkObjectDiff() { 11922 return !isBaseOrResourceEqual(this.stageValue, this.value); 11923 } 11924} 11925TextOnClickModifier.identity = Symbol('textOnClick'); 11926 11927class TextResponseRegionModifier extends ModifierWithKey { 11928 constructor(value) { 11929 super(value); 11930 } 11931 applyPeer(node, reset) { 11932 let _a, _b, _c, _d, _e, _f, _g, _h; 11933 if (reset) { 11934 getUINativeModule().text.resetResponseRegion(node); 11935 } 11936 else { 11937 let responseRegion = []; 11938 if (Array.isArray(this.value)) { 11939 for (let i = 0; i < this.value.length; i++) { 11940 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 11941 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 11942 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 11943 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 11944 } 11945 } 11946 else { 11947 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 11948 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 11949 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 11950 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 11951 } 11952 getUINativeModule().text.setResponseRegion(node, responseRegion, responseRegion.length); 11953 } 11954 } 11955 checkObjectDiff() { 11956 return !isBaseOrResourceEqual(this.stageValue, this.value); 11957 } 11958} 11959TextResponseRegionModifier.identity = Symbol('textResponseRegion'); 11960 11961class ArkTextComponent extends ArkComponent { 11962 constructor(nativePtr, classType) { 11963 super(nativePtr, classType); 11964 } 11965 initialize(content) { 11966 modifierWithKey(this._modifiersWithKeys, TextContentModifier.identity, TextContentModifier, content[0]); 11967 modifierWithKey(this._modifiersWithKeys, TextControllerModifier.identity, TextControllerModifier, content[1]); 11968 return this; 11969 } 11970 allowChildTypes() { 11971 return ["Span", "ImageSpan", "SymbolSpan", "ContainerSpan"]; 11972 } 11973 enableDataDetector(value) { 11974 modifierWithKey(this._modifiersWithKeys, TextEnableDataDetectorModifier.identity, TextEnableDataDetectorModifier, value); 11975 return this; 11976 } 11977 dataDetectorConfig(config) { 11978 if (config === undefined || config === null) { 11979 return this; 11980 } 11981 let detectorConfig = new TextDataDetectorConfig(); 11982 detectorConfig.types = config.types; 11983 detectorConfig.onDetectResultUpdate = config.onDetectResultUpdate; 11984 detectorConfig.color = config.color; 11985 if (config.decoration) { 11986 detectorConfig.decorationType = config.decoration.type; 11987 detectorConfig.decorationColor = config.decoration.color; 11988 detectorConfig.decorationStyle = config.decoration.style; 11989 } 11990 modifierWithKey(this._modifiersWithKeys, TextDataDetectorConfigModifier.identity, TextDataDetectorConfigModifier, detectorConfig); 11991 return this; 11992 } 11993 font(value, options) { 11994 if (value === undefined || value === null) { 11995 return this; 11996 } 11997 let arkTextFont = new ArkTextFont(); 11998 arkTextFont.value = value; 11999 arkTextFont.enableVariableFontWeight = options?.enableVariableFontWeight; 12000 modifierWithKey(this._modifiersWithKeys, TextFontModifier.identity, TextFontModifier, arkTextFont); 12001 return this; 12002 } 12003 fontColor(value) { 12004 modifierWithKey(this._modifiersWithKeys, FontColorModifier.identity, FontColorModifier, value); 12005 return this; 12006 } 12007 fontSize(value) { 12008 modifierWithKey(this._modifiersWithKeys, FontSizeModifier.identity, FontSizeModifier, value); 12009 return this; 12010 } 12011 minFontSize(value) { 12012 modifierWithKey(this._modifiersWithKeys, TextMinFontSizeModifier.identity, TextMinFontSizeModifier, value); 12013 return this; 12014 } 12015 maxFontSize(value) { 12016 modifierWithKey(this._modifiersWithKeys, TextMaxFontSizeModifier.identity, TextMaxFontSizeModifier, value); 12017 return this; 12018 } 12019 minFontScale(value) { 12020 modifierWithKey(this._modifiersWithKeys, TextMinFontScaleModifier.identity, TextMinFontScaleModifier, value); 12021 return this; 12022 } 12023 maxFontScale(value) { 12024 modifierWithKey(this._modifiersWithKeys, TextMaxFontScaleModifier.identity, TextMaxFontScaleModifier, value); 12025 return this; 12026 } 12027 fontStyle(value) { 12028 modifierWithKey(this._modifiersWithKeys, FontStyleModifier.identity, FontStyleModifier, value); 12029 return this; 12030 } 12031 fontWeight(value, options) { 12032 let arkFontWeight = new ArkFontWeight(); 12033 arkFontWeight.value = value; 12034 arkFontWeight.enableVariableFontWeight = options?.enableVariableFontWeight; 12035 modifierWithKey(this._modifiersWithKeys, FontWeightModifier.identity, FontWeightModifier, arkFontWeight); 12036 return this; 12037 } 12038 textAlign(value) { 12039 modifierWithKey(this._modifiersWithKeys, TextAlignModifier.identity, TextAlignModifier, value); 12040 return this; 12041 } 12042 lineHeight(value) { 12043 modifierWithKey(this._modifiersWithKeys, TextLineHeightModifier.identity, TextLineHeightModifier, value); 12044 return this; 12045 } 12046 textOverflow(value) { 12047 modifierWithKey(this._modifiersWithKeys, TextTextOverflowModifier.identity, TextTextOverflowModifier, value); 12048 return this; 12049 } 12050 fontFamily(value) { 12051 modifierWithKey(this._modifiersWithKeys, TextFontFamilyModifier.identity, TextFontFamilyModifier, value); 12052 return this; 12053 } 12054 maxLines(value) { 12055 modifierWithKey(this._modifiersWithKeys, TextMaxLinesModifier.identity, TextMaxLinesModifier, value); 12056 return this; 12057 } 12058 decoration(value) { 12059 modifierWithKey(this._modifiersWithKeys, TextDecorationModifier.identity, TextDecorationModifier, value); 12060 return this; 12061 } 12062 letterSpacing(value) { 12063 modifierWithKey(this._modifiersWithKeys, TextLetterSpacingModifier.identity, TextLetterSpacingModifier, value); 12064 return this; 12065 } 12066 lineSpacing(value) { 12067 modifierWithKey(this._modifiersWithKeys, TextLineSpacingModifier.identity, TextLineSpacingModifier, value); 12068 return this; 12069 } 12070 textCase(value) { 12071 modifierWithKey(this._modifiersWithKeys, TextTextCaseModifier.identity, TextTextCaseModifier, value); 12072 return this; 12073 } 12074 baselineOffset(value) { 12075 modifierWithKey(this._modifiersWithKeys, TextBaselineOffsetModifier.identity, TextBaselineOffsetModifier, value); 12076 return this; 12077 } 12078 copyOption(value) { 12079 modifierWithKey(this._modifiersWithKeys, TextCopyOptionModifier.identity, TextCopyOptionModifier, value); 12080 return this; 12081 } 12082 draggable(value) { 12083 modifierWithKey(this._modifiersWithKeys, TextDraggableModifier.identity, TextDraggableModifier, value); 12084 return this; 12085 } 12086 privacySensitive(value) { 12087 modifierWithKey(this._modifiersWithKeys, TextPrivacySensitiveModifier.identity, TextPrivacySensitiveModifier, value); 12088 return this; 12089 } 12090 textShadow(value) { 12091 modifierWithKey(this._modifiersWithKeys, TextTextShadowModifier.identity, TextTextShadowModifier, value); 12092 return this; 12093 } 12094 heightAdaptivePolicy(value) { 12095 modifierWithKey(this._modifiersWithKeys, TextHeightAdaptivePolicyModifier.identity, TextHeightAdaptivePolicyModifier, value); 12096 return this; 12097 } 12098 textIndent(value) { 12099 modifierWithKey(this._modifiersWithKeys, TextTextIndentModifier.identity, TextTextIndentModifier, value); 12100 return this; 12101 } 12102 wordBreak(value) { 12103 modifierWithKey(this._modifiersWithKeys, TextWordBreakModifier.identity, TextWordBreakModifier, value); 12104 return this; 12105 } 12106 lineBreakStrategy(value) { 12107 modifierWithKey(this._modifiersWithKeys, TextLineBreakStrategyModifier.identity, 12108 TextLineBreakStrategyModifier, value); 12109 return this; 12110 } 12111 fontFeature(value) { 12112 modifierWithKey(this._modifiersWithKeys, TextFontFeatureModifier.identity, TextFontFeatureModifier, value); 12113 return this; 12114 } 12115 onCopy(callback) { 12116 modifierWithKey(this._modifiersWithKeys, TextOnCopyModifier.identity, 12117 TextOnCopyModifier, callback); 12118 return this; 12119 } 12120 selection(selectionStart, selectionEnd) { 12121 let arkSelection = new ArkSelection(); 12122 arkSelection.selectionStart = selectionStart; 12123 arkSelection.selectionEnd = selectionEnd; 12124 modifierWithKey(this._modifiersWithKeys, TextSelectionModifier.identity, TextSelectionModifier, arkSelection); 12125 return this; 12126 } 12127 textSelectable(value) { 12128 modifierWithKey(this._modifiersWithKeys, TextSelectableModifier.identity, TextSelectableModifier, value); 12129 return this; 12130 } 12131 caretColor(value) { 12132 modifierWithKey(this._modifiersWithKeys, TextCaretColorModifier.identity, TextCaretColorModifier, value); 12133 return this; 12134 } 12135 selectedBackgroundColor(value) { 12136 modifierWithKey(this._modifiersWithKeys, TextSelectedBackgroundColorModifier.identity, 12137 TextSelectedBackgroundColorModifier, value); 12138 return this; 12139 } 12140 ellipsisMode(value) { 12141 modifierWithKey(this._modifiersWithKeys, TextEllipsisModeModifier.identity, TextEllipsisModeModifier, value); 12142 return this; 12143 } 12144 clip(value) { 12145 modifierWithKey(this._modifiersWithKeys, TextClipModifier.identity, TextClipModifier, value); 12146 return this; 12147 } 12148 foregroundColor(value) { 12149 modifierWithKey( 12150 this._modifiersWithKeys, TextForegroundColorModifier.identity, TextForegroundColorModifier, value); 12151 return this; 12152 } 12153 onTextSelectionChange(callback) { 12154 modifierWithKey(this._modifiersWithKeys, TextOnTextSelectionChangeModifier.identity, 12155 TextOnTextSelectionChangeModifier, callback); 12156 return this; 12157 } 12158 editMenuOptions(value) { 12159 modifierWithKey(this._modifiersWithKeys, TextEditMenuOptionsModifier.identity, 12160 TextEditMenuOptionsModifier, value); 12161 return this; 12162 } 12163 halfLeading(value) { 12164 modifierWithKey(this._modifiersWithKeys, TextHalfLeadingModifier.identity, TextHalfLeadingModifier, value); 12165 return this; 12166 } 12167 onClick(value) { 12168 modifierWithKey(this._modifiersWithKeys, TextOnClickModifier.identity, TextOnClickModifier, value); 12169 return this; 12170 } 12171 responseRegion(value) { 12172 modifierWithKey(this._modifiersWithKeys, TextResponseRegionModifier.identity, TextResponseRegionModifier, value); 12173 return this; 12174 } 12175} 12176// @ts-ignore 12177if (globalThis.Text !== undefined) { 12178 globalThis.Text.attributeModifier = function (modifier) { 12179 attributeModifierFunc.call(this, modifier, (nativePtr) => { 12180 return new ArkTextComponent(nativePtr); 12181 }, (nativePtr, classType, modifierJS) => { 12182 return new modifierJS.TextModifier(nativePtr, classType); 12183 }); 12184 }; 12185} 12186 12187/// <reference path='./import.ts' /> 12188class TextAreaFontStyleModifier extends ModifierWithKey { 12189 constructor(value) { 12190 super(value); 12191 } 12192 applyPeer(node, reset) { 12193 if (reset) { 12194 getUINativeModule().textArea.resetFontStyle(node); 12195 } 12196 else { 12197 getUINativeModule().textArea.setFontStyle(node, this.value); 12198 } 12199 } 12200 checkObjectDiff() { 12201 return !isBaseOrResourceEqual(this.stageValue, this.value); 12202 } 12203} 12204TextAreaFontStyleModifier.identity = Symbol('textAreaFontStyle'); 12205class TextAreaDecorationModifier extends ModifierWithKey { 12206 constructor(value) { 12207 super(value); 12208 } 12209 applyPeer(node, reset) { 12210 if (reset) { 12211 getUINativeModule().textArea.resetDecoration(node); 12212 } 12213 else { 12214 getUINativeModule().textArea.setDecoration(node, this.value.type, this.value.color, this.value.style); 12215 } 12216 } 12217 checkObjectDiff() { 12218 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 12219 return true; 12220 } 12221 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 12222 return !isResourceEqual(this.stageValue.color, this.value.color); 12223 } 12224 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 12225 return !(this.stageValue.color === this.value.color); 12226 } 12227 else { 12228 return true; 12229 } 12230 } 12231} 12232TextAreaDecorationModifier.identity = Symbol('textAreaDecoration'); 12233class TextAreaLetterSpacingModifier extends ModifierWithKey { 12234 constructor(value) { 12235 super(value); 12236 } 12237 applyPeer(node, reset) { 12238 if (reset) { 12239 getUINativeModule().textArea.resetLetterSpacing(node); 12240 } 12241 else { 12242 getUINativeModule().textArea.setLetterSpacing(node, this.value); 12243 } 12244 } 12245 checkObjectDiff() { 12246 return !isBaseOrResourceEqual(this.stageValue, this.value); 12247 } 12248} 12249TextAreaLetterSpacingModifier.identity = Symbol('textAreaLetterSpacing'); 12250class TextAreaLineSpacingModifier extends ModifierWithKey { 12251 constructor(value) { 12252 super(value); 12253 } 12254 applyPeer(node, reset) { 12255 if (reset) { 12256 getUINativeModule().textArea.resetLineSpacing(node); 12257 } 12258 else if (!isObject(this.value)) { 12259 getUINativeModule().textArea.resetLineSpacing(node); 12260 } 12261 else { 12262 getUINativeModule().textArea.setLineSpacing(node, this.value); 12263 } 12264 } 12265 checkObjectDiff() { 12266 return !isBaseOrResourceEqual(this.stageValue, this.value); 12267 } 12268} 12269TextAreaLineSpacingModifier.identity = Symbol('textAreaLineSpacing'); 12270class TextAreaLineHeightModifier extends ModifierWithKey { 12271 constructor(value) { 12272 super(value); 12273 } 12274 applyPeer(node, reset) { 12275 if (reset) { 12276 getUINativeModule().textArea.resetLineHeight(node); 12277 } 12278 else { 12279 getUINativeModule().textArea.setLineHeight(node, this.value); 12280 } 12281 } 12282 checkObjectDiff() { 12283 return !isBaseOrResourceEqual(this.stageValue, this.value); 12284 } 12285} 12286TextAreaLineHeightModifier.identity = Symbol('textAreaLineHeight'); 12287class TextAreaWordBreakModifier extends ModifierWithKey { 12288 constructor(value) { 12289 super(value); 12290 } 12291 applyPeer(node, reset) { 12292 if (reset) { 12293 getUINativeModule().textArea.resetWordBreak(node); 12294 } 12295 else { 12296 getUINativeModule().textArea.setWordBreak(node, this.value); 12297 } 12298 } 12299 checkObjectDiff() { 12300 return !isBaseOrResourceEqual(this.stageValue, this.value); 12301 } 12302} 12303TextAreaWordBreakModifier.identity = Symbol('textAreaWordBreak'); 12304 12305class TextAreaLineBreakStrategyModifier extends ModifierWithKey { 12306 constructor(value) { 12307 super(value); 12308 } 12309 applyPeer(node, reset) { 12310 if (reset) { 12311 getUINativeModule().textArea.resetLineBreakStrategy(node); 12312 } 12313 else { 12314 getUINativeModule().textArea.setLineBreakStrategy(node, this.value); 12315 } 12316 } 12317 checkObjectDiff() { 12318 return !isBaseOrResourceEqual(this.stageValue, this.value); 12319 } 12320} 12321TextAreaLineBreakStrategyModifier.identity = Symbol('textAreaLineBreakStrategy'); 12322class TextAreaSelectedBackgroundColorModifier extends ModifierWithKey { 12323 constructor(value) { 12324 super(value); 12325 } 12326 applyPeer(node, reset) { 12327 if (reset) { 12328 getUINativeModule().textArea.resetSelectedBackgroundColor(node); 12329 } else { 12330 getUINativeModule().textArea.setSelectedBackgroundColor(node, this.value); 12331 } 12332 } 12333 checkObjectDiff() { 12334 return !isBaseOrResourceEqual(this.stageValue, this.value); 12335 } 12336} 12337TextAreaSelectedBackgroundColorModifier.identity = Symbol('textAreaSelectedBackgroundColor'); 12338class TextAreaCaretStyleModifier extends ModifierWithKey { 12339 constructor(value) { 12340 super(value); 12341 } 12342 applyPeer(node, reset) { 12343 if (reset) { 12344 getUINativeModule().textArea.resetCaretStyle(node); 12345 } else { 12346 getUINativeModule().textArea.setCaretStyle(node, this.value.width, this.value.color); 12347 } 12348 } 12349 checkObjectDiff() { 12350 return this.stageValue !== this.value; 12351 } 12352} 12353TextAreaCaretStyleModifier.identity = Symbol('textAreaCaretStyle'); 12354class TextAreaTextOverflowModifier extends ModifierWithKey { 12355 constructor(value) { 12356 super(value); 12357 } 12358 applyPeer(node, reset) { 12359 if (reset) { 12360 getUINativeModule().textArea.resetTextOverflow(node); 12361 } else { 12362 getUINativeModule().textArea.setTextOverflow(node, this.value); 12363 } 12364 } 12365 checkObjectDiff() { 12366 return this.stageValue !== this.value; 12367 } 12368} 12369TextAreaTextOverflowModifier.identity = Symbol('textAreaTextOverflow'); 12370class TextAreaTextIndentModifier extends ModifierWithKey { 12371 constructor(value) { 12372 super(value); 12373 } 12374 applyPeer(node, reset) { 12375 if (reset) { 12376 getUINativeModule().textArea.resetTextIndent(node); 12377 } else { 12378 getUINativeModule().textArea.setTextIndent(node, this.value); 12379 } 12380 } 12381 checkObjectDiff() { 12382 return !isBaseOrResourceEqual(this.stageValue, this.value); 12383 } 12384} 12385TextAreaTextIndentModifier.identity = Symbol('textAreaTextIndent'); 12386class TextAreaCopyOptionModifier extends ModifierWithKey { 12387 constructor(value) { 12388 super(value); 12389 } 12390 applyPeer(node, reset) { 12391 if (reset) { 12392 getUINativeModule().textArea.resetCopyOption(node); 12393 } 12394 else { 12395 getUINativeModule().textArea.setCopyOption(node, this.value); 12396 } 12397 } 12398 checkObjectDiff() { 12399 return !isBaseOrResourceEqual(this.stageValue, this.value); 12400 } 12401} 12402TextAreaCopyOptionModifier.identity = Symbol('textAreaCopyOption'); 12403class TextAreaMaxLinesModifier extends ModifierWithKey { 12404 constructor(value) { 12405 super(value); 12406 } 12407 applyPeer(node, reset) { 12408 if (reset) { 12409 getUINativeModule().textArea.resetMaxLines(node); 12410 } 12411 else { 12412 getUINativeModule().textArea.setMaxLines(node, this.value); 12413 } 12414 } 12415 checkObjectDiff() { 12416 return !isBaseOrResourceEqual(this.stageValue, this.value); 12417 } 12418} 12419TextAreaMaxLinesModifier.identity = Symbol('textAreaMaxLines'); 12420class TextAreaMinFontSizeModifier extends ModifierWithKey { 12421 constructor(value) { 12422 super(value); 12423 } 12424 applyPeer(node, reset) { 12425 if (reset) { 12426 getUINativeModule().textArea.resetMinFontSize(node); 12427 } 12428 else { 12429 getUINativeModule().textArea.setMinFontSize(node, this.value); 12430 } 12431 } 12432 checkObjectDiff() { 12433 return !isBaseOrResourceEqual(this.stageValue, this.value); 12434 } 12435} 12436TextAreaMinFontSizeModifier.identity = Symbol('textAreaMinFontSize'); 12437class TextAreaMaxFontSizeModifier extends ModifierWithKey { 12438 constructor(value) { 12439 super(value); 12440 } 12441 applyPeer(node, reset) { 12442 if (reset) { 12443 getUINativeModule().textArea.resetMaxFontSize(node); 12444 } 12445 else { 12446 getUINativeModule().textArea.setMaxFontSize(node, this.value); 12447 } 12448 } 12449 checkObjectDiff() { 12450 return !isBaseOrResourceEqual(this.stageValue, this.value); 12451 } 12452} 12453TextAreaMaxFontSizeModifier.identity = Symbol('textAreaMaxFontSize'); 12454class TextAreaHeightAdaptivePolicyModifier extends ModifierWithKey { 12455 constructor(value) { 12456 super(value); 12457 } 12458 applyPeer(node, reset) { 12459 if (reset) { 12460 getUINativeModule().textArea.resetHeightAdaptivePolicy(node); 12461 } 12462 else { 12463 getUINativeModule().textArea.setHeightAdaptivePolicy(node, this.value); 12464 } 12465 } 12466 checkObjectDiff() { 12467 return !isBaseOrResourceEqual(this.stageValue, this.value); 12468 } 12469} 12470TextAreaHeightAdaptivePolicyModifier.identity = Symbol('textAreaHeightAdaptivePolicy'); 12471class TextAreaFontSizeModifier extends ModifierWithKey { 12472 constructor(value) { 12473 super(value); 12474 } 12475 applyPeer(node, reset) { 12476 if (reset) { 12477 getUINativeModule().textArea.resetFontSize(node); 12478 } 12479 else { 12480 getUINativeModule().textArea.setFontSize(node, this.value); 12481 } 12482 } 12483 checkObjectDiff() { 12484 return !isBaseOrResourceEqual(this.stageValue, this.value); 12485 } 12486} 12487TextAreaFontSizeModifier.identity = Symbol('textAreaFontSize'); 12488class TextAreaPlaceholderColorModifier extends ModifierWithKey { 12489 constructor(value) { 12490 super(value); 12491 } 12492 applyPeer(node, reset) { 12493 if (reset) { 12494 getUINativeModule().textArea.resetPlaceholderColor(node); 12495 } 12496 else { 12497 getUINativeModule().textArea.setPlaceholderColor(node, this.value); 12498 } 12499 } 12500 checkObjectDiff() { 12501 return !isBaseOrResourceEqual(this.stageValue, this.value); 12502 } 12503} 12504TextAreaPlaceholderColorModifier.identity = Symbol('textAreaPlaceholderColor'); 12505class TextAreaFontColorModifier extends ModifierWithKey { 12506 constructor(value) { 12507 super(value); 12508 } 12509 applyPeer(node, reset) { 12510 if (reset) { 12511 getUINativeModule().textArea.resetFontColor(node); 12512 } 12513 else { 12514 getUINativeModule().textArea.setFontColor(node, this.value); 12515 } 12516 } 12517 checkObjectDiff() { 12518 return !isBaseOrResourceEqual(this.stageValue, this.value); 12519 } 12520} 12521TextAreaFontColorModifier.identity = Symbol('textAreaFontColor'); 12522class TextAreaFontWeightModifier extends ModifierWithKey { 12523 constructor(value) { 12524 super(value); 12525 } 12526 applyPeer(node, reset) { 12527 if (reset) { 12528 getUINativeModule().textArea.resetFontWeight(node); 12529 } 12530 else { 12531 getUINativeModule().textArea.setFontWeight(node, this.value); 12532 } 12533 } 12534 checkObjectDiff() { 12535 return !isBaseOrResourceEqual(this.stageValue, this.value); 12536 } 12537} 12538TextAreaFontWeightModifier.identity = Symbol('textAreaFontWeight'); 12539class TextAreaBarStateModifier extends ModifierWithKey { 12540 constructor(value) { 12541 super(value); 12542 } 12543 applyPeer(node, reset) { 12544 if (reset) { 12545 getUINativeModule().textArea.resetBarState(node); 12546 } 12547 else { 12548 getUINativeModule().textArea.setBarState(node, this.value); 12549 } 12550 } 12551 checkObjectDiff() { 12552 return !isBaseOrResourceEqual(this.stageValue, this.value); 12553 } 12554} 12555TextAreaBarStateModifier.identity = Symbol('textAreaBarState'); 12556class TextAreaEnableKeyboardOnFocusModifier extends ModifierWithKey { 12557 constructor(value) { 12558 super(value); 12559 } 12560 applyPeer(node, reset) { 12561 if (reset) { 12562 getUINativeModule().textArea.resetEnableKeyboardOnFocus(node); 12563 } 12564 else { 12565 getUINativeModule().textArea.setEnableKeyboardOnFocus(node, this.value); 12566 } 12567 } 12568 checkObjectDiff() { 12569 return !isBaseOrResourceEqual(this.stageValue, this.value); 12570 } 12571} 12572TextAreaEnableKeyboardOnFocusModifier.identity = Symbol('textAreaEnableKeyboardOnFocus'); 12573class TextAreaFontFamilyModifier extends ModifierWithKey { 12574 constructor(value) { 12575 super(value); 12576 } 12577 applyPeer(node, reset) { 12578 if (reset) { 12579 getUINativeModule().textArea.resetFontFamily(node); 12580 } 12581 else { 12582 getUINativeModule().textArea.setFontFamily(node, this.value); 12583 } 12584 } 12585 checkObjectDiff() { 12586 return !isBaseOrResourceEqual(this.stageValue, this.value); 12587 } 12588} 12589TextAreaFontFamilyModifier.identity = Symbol('textAreaFontFamily'); 12590class TextAreaFontFeatureModifier extends ModifierWithKey { 12591 constructor(value) { 12592 super(value); 12593 } 12594 applyPeer(node, reset) { 12595 if (reset) { 12596 getUINativeModule().textArea.resetFontFeature(node); 12597 } else { 12598 getUINativeModule().textArea.setFontFeature(node, this.value); 12599 } 12600 } 12601 checkObjectDiff() { 12602 return !isBaseOrResourceEqual(this.stageValue, this.value); 12603 } 12604} 12605TextAreaFontFeatureModifier.identity = Symbol('textAreaFontFeature'); 12606class TextAreaCaretColorModifier extends ModifierWithKey { 12607 constructor(value) { 12608 super(value); 12609 } 12610 applyPeer(node, reset) { 12611 if (reset) { 12612 getUINativeModule().textArea.resetCaretColor(node); 12613 } 12614 else { 12615 getUINativeModule().textArea.setCaretColor(node, this.value); 12616 } 12617 } 12618 checkObjectDiff() { 12619 return !isBaseOrResourceEqual(this.stageValue, this.value); 12620 } 12621} 12622TextAreaCaretColorModifier.identity = Symbol('textAreaCaretColor'); 12623class TextAreaMaxLengthModifier extends ModifierWithKey { 12624 constructor(value) { 12625 super(value); 12626 } 12627 applyPeer(node, reset) { 12628 if (reset) { 12629 getUINativeModule().textArea.resetMaxLength(node); 12630 } 12631 else { 12632 getUINativeModule().textArea.setMaxLength(node, this.value); 12633 } 12634 } 12635 checkObjectDiff() { 12636 return !isBaseOrResourceEqual(this.stageValue, this.value); 12637 } 12638} 12639TextAreaMaxLengthModifier.identity = Symbol('textAreaMaxLength'); 12640class TextAreaStyleModifier extends ModifierWithKey { 12641 constructor(value) { 12642 super(value); 12643 } 12644 applyPeer(node, reset) { 12645 if (reset) { 12646 getUINativeModule().textArea.resetStyle(node); 12647 } 12648 else { 12649 getUINativeModule().textArea.setStyle(node, this.value); 12650 } 12651 } 12652 checkObjectDiff() { 12653 return !isBaseOrResourceEqual(this.stageValue, this.value); 12654 } 12655} 12656TextAreaStyleModifier.identity = Symbol('textAreaStyle'); 12657class TextAreaSelectionMenuHiddenModifier extends ModifierWithKey { 12658 constructor(value) { 12659 super(value); 12660 } 12661 applyPeer(node, reset) { 12662 if (reset) { 12663 getUINativeModule().textArea.resetSelectionMenuHidden(node); 12664 } 12665 else { 12666 getUINativeModule().textArea.setSelectionMenuHidden(node, this.value); 12667 } 12668 } 12669 checkObjectDiff() { 12670 return !isBaseOrResourceEqual(this.stageValue, this.value); 12671 } 12672} 12673TextAreaSelectionMenuHiddenModifier.identity = Symbol('textAreaSelectionMenuHidden'); 12674class TextAreaPlaceholderFontModifier extends ModifierWithKey { 12675 constructor(value) { 12676 super(value); 12677 } 12678 applyPeer(node, reset) { 12679 if (reset) { 12680 getUINativeModule().textArea.resetPlaceholderFont(node); 12681 } 12682 else { 12683 getUINativeModule().textArea.setPlaceholderFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 12684 } 12685 } 12686 checkObjectDiff() { 12687 if (!(this.stageValue.weight === this.value.weight && 12688 this.stageValue.style === this.value.style)) { 12689 return true; 12690 } 12691 else { 12692 return !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 12693 !isBaseOrResourceEqual(this.stageValue.family, this.value.family); 12694 } 12695 } 12696} 12697TextAreaPlaceholderFontModifier.identity = Symbol('textAreaPlaceholderFont'); 12698class TextAreaTextAlignModifier extends ModifierWithKey { 12699 constructor(value) { 12700 super(value); 12701 } 12702 applyPeer(node, reset) { 12703 if (reset) { 12704 getUINativeModule().textArea.resetTextAlign(node); 12705 } 12706 else { 12707 getUINativeModule().textArea.setTextAlign(node, this.value); 12708 } 12709 } 12710 checkObjectDiff() { 12711 return !isBaseOrResourceEqual(this.stageValue, this.value); 12712 } 12713} 12714TextAreaTextAlignModifier.identity = Symbol('textAreaTextAlign'); 12715class TextAreaShowCounterModifier extends ModifierWithKey { 12716 constructor(value) { 12717 super(value); 12718 } 12719 applyPeer(node, reset) { 12720 if (reset) { 12721 getUINativeModule().textArea.resetShowCounter(node); 12722 } 12723 else { 12724 getUINativeModule().textArea.setShowCounter(node, this.value.value, this.value.highlightBorder, this.value.thresholdPercentage); 12725 } 12726 } 12727 checkObjectDiff() { 12728 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 12729 !isBaseOrResourceEqual(this.stageValue.highlightBorder, this.value.highlightBorder) || 12730 !isBaseOrResourceEqual(this.stageValue.thresholdPercentage, this.value.thresholdPercentage); 12731 } 12732} 12733TextAreaShowCounterModifier.identity = Symbol('textAreaShowCounter'); 12734class TextAreaOnChangeModifier extends ModifierWithKey { 12735 constructor(value) { 12736 super(value); 12737 } 12738 applyPeer(node, reset) { 12739 if (reset) { 12740 getUINativeModule().textArea.resetOnChange(node); 12741 } else { 12742 getUINativeModule().textArea.setOnChange(node, this.value); 12743 } 12744 } 12745} 12746TextAreaOnChangeModifier.identity = Symbol('textAreaOnChange'); 12747class TextAreaEnterKeyTypeModifier extends ModifierWithKey { 12748 constructor(value) { 12749 super(value); 12750 } 12751 applyPeer(node, reset) { 12752 if (reset) { 12753 getUINativeModule().textArea.resetEnterKeyType(node); 12754 } else { 12755 getUINativeModule().textArea.setEnterKeyType(node, this.value); 12756 } 12757 } 12758 12759 checkObjectDiff() { 12760 return !isBaseOrResourceEqual(this.stageValue, this.value); 12761 } 12762} 12763TextAreaEnterKeyTypeModifier.identity = Symbol('textAreaEnterKeyType'); 12764class TextAreaInputFilterModifier extends ModifierWithKey { 12765 constructor(value) { 12766 super(value); 12767 } 12768 applyPeer(node, reset) { 12769 if (reset) { 12770 getUINativeModule().textArea.resetInputFilter(node); 12771 } 12772 else { 12773 getUINativeModule().textArea.setInputFilter(node, this.value.value, this.value.error); 12774 } 12775 } 12776 checkObjectDiff() { 12777 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 12778 !isBaseOrResourceEqual(this.stageValue.error, this.value.error); 12779 } 12780} 12781TextAreaInputFilterModifier.identity = Symbol('textAreaInputFilter'); 12782class TextAreaOnTextSelectionChangeModifier extends ModifierWithKey { 12783 constructor(value) { 12784 super(value); 12785 } 12786 applyPeer(node, reset) { 12787 if (reset) { 12788 getUINativeModule().textArea.resetOnTextSelectionChange(node); 12789 } else { 12790 getUINativeModule().textArea.setOnTextSelectionChange(node, this.value); 12791 } 12792 } 12793} 12794TextAreaOnTextSelectionChangeModifier.identity = Symbol('textAreaOnTextSelectionChange'); 12795 12796class TextAreaOnContentScrollModifier extends ModifierWithKey { 12797 constructor(value) { 12798 super(value); 12799 } 12800 applyPeer(node, reset) { 12801 if (reset) { 12802 getUINativeModule().textArea.resetOnContentScroll(node); 12803 } else { 12804 getUINativeModule().textArea.setOnContentScroll(node, this.value); 12805 } 12806 } 12807} 12808TextAreaOnContentScrollModifier.identity = Symbol('textAreaOnContentScroll'); 12809class TextAreaOnEditChangeModifier extends ModifierWithKey { 12810 constructor(value) { 12811 super(value); 12812 } 12813 applyPeer(node, reset) { 12814 if (reset) { 12815 getUINativeModule().textArea.resetOnEditChange(node); 12816 } else { 12817 getUINativeModule().textArea.setOnEditChange(node, this.value); 12818 } 12819 } 12820} 12821TextAreaOnEditChangeModifier.identity = Symbol('textAreaOnEditChange'); 12822class TextAreaOnCopyModifier extends ModifierWithKey { 12823 constructor(value) { 12824 super(value); 12825 } 12826 applyPeer(node, reset) { 12827 if (reset) { 12828 getUINativeModule().textArea.resetOnCopy(node); 12829 } else { 12830 getUINativeModule().textArea.setOnCopy(node, this.value); 12831 } 12832 } 12833} 12834TextAreaOnCopyModifier.identity = Symbol('textAreaOnCopy'); 12835class TextAreaOnCutModifier extends ModifierWithKey { 12836 constructor(value) { 12837 super(value); 12838 } 12839 applyPeer(node, reset) { 12840 if (reset) { 12841 getUINativeModule().textArea.resetOnCut(node); 12842 } else { 12843 getUINativeModule().textArea.setOnCut(node, this.value); 12844 } 12845 } 12846} 12847TextAreaOnCutModifier.identity = Symbol('textAreaOnCut'); 12848class TextAreaOnPasteModifier extends ModifierWithKey { 12849 constructor(value) { 12850 super(value); 12851 } 12852 applyPeer(node, reset) { 12853 if (reset) { 12854 getUINativeModule().textArea.resetOnPaste(node); 12855 } else { 12856 getUINativeModule().textArea.setOnPaste(node, this.value); 12857 } 12858 } 12859} 12860TextAreaOnPasteModifier.identity = Symbol('textAreaOnPaste'); 12861class TextAreaTypeModifier extends ModifierWithKey { 12862 constructor(value) { 12863 super(value); 12864 } 12865 applyPeer(node, reset) { 12866 if (reset) { 12867 getUINativeModule().textArea.resetType(node); 12868 } 12869 else { 12870 getUINativeModule().textArea.setType(node, this.value); 12871 } 12872 } 12873 checkObjectDiff() { 12874 return !isBaseOrResourceEqual(this.stageValue, this.value); 12875 } 12876} 12877TextAreaTypeModifier.identity = Symbol('textAreaType'); 12878class TextAreaPaddingModifier extends ModifierWithKey { 12879 constructor(value) { 12880 super(value); 12881 } 12882 applyPeer(node, reset) { 12883 if (reset) { 12884 getUINativeModule().textArea.resetPadding(node); 12885 } 12886 else { 12887 getUINativeModule().textArea.setPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 12888 } 12889 } 12890 checkObjectDiff() { 12891 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 12892 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 12893 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 12894 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 12895 } 12896} 12897TextAreaPaddingModifier.identity = Symbol('textAreaPadding'); 12898class TextAreaOnSubmitModifier extends ModifierWithKey { 12899 constructor(value) { 12900 super(value); 12901 } 12902 applyPeer(node, reset) { 12903 if (reset) { 12904 getUINativeModule().textArea.resetOnSubmit(node); 12905 } else { 12906 getUINativeModule().textArea.setOnSubmit(node, this.value); 12907 } 12908 } 12909} 12910TextAreaOnSubmitModifier.identity = Symbol('textAreaOnSubmit'); 12911class TextAreaContentTypeModifier extends ModifierWithKey { 12912 constructor(value) { 12913 super(value); 12914 } 12915 applyPeer(node, reset) { 12916 if (reset) { 12917 getUINativeModule().textArea.resetContentType(node); 12918 } 12919 else { 12920 getUINativeModule().textArea.setContentType(node, this.value); 12921 } 12922 } 12923 checkObjectDiff() { 12924 return !isBaseOrResourceEqual(this.stageValue, this.value); 12925 } 12926} 12927TextAreaContentTypeModifier.identity = Symbol('textAreaContentType'); 12928class TextAreaEnableAutoFillModifier extends ModifierWithKey { 12929 constructor(value) { 12930 super(value); 12931 } 12932 applyPeer(node, reset) { 12933 if (reset) { 12934 getUINativeModule().textArea.resetEnableAutoFill(node); 12935 } else { 12936 getUINativeModule().textArea.setEnableAutoFill(node, this.value); 12937 } 12938 } 12939 checkObjectDiff() { 12940 return !isBaseOrResourceEqual(this.stageValue, this.value); 12941 } 12942} 12943TextAreaEnableAutoFillModifier.identity = Symbol('textAreaEnableAutoFill'); 12944class TextAreaBorderModifier extends ModifierWithKey { 12945 constructor(value) { 12946 super(value); 12947 } 12948 applyPeer(node, reset) { 12949 if (reset) { 12950 getUINativeModule().textArea.resetBorder(node); 12951 } else { 12952 getUINativeModule().textArea.setBorder(node, 12953 this.value.arkWidth.left, this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 12954 this.value.arkColor.leftColor, this.value.arkColor.rightColor, this.value.arkColor.topColor, this.value.arkColor.bottomColor, 12955 this.value.arkRadius.topLeft, this.value.arkRadius.topRight, this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, 12956 this.value.arkStyle.top, this.value.arkStyle.right, this.value.arkStyle.bottom, this.value.arkStyle.left); 12957 } 12958 } 12959 checkObjectDiff() { 12960 return this.value.checkObjectDiff(this.stageValue); 12961 } 12962} 12963TextAreaBorderModifier.identity = Symbol('textAreaBorder'); 12964class TextAreaBorderWidthModifier extends ModifierWithKey { 12965 constructor(value) { 12966 super(value); 12967 } 12968 applyPeer(node, reset) { 12969 if (reset) { 12970 getUINativeModule().textArea.resetBorderWidth(node); 12971 } else { 12972 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 12973 getUINativeModule().textArea.setBorderWidth(node, this.value, this.value, this.value, this.value); 12974 } else { 12975 getUINativeModule().textArea.setBorderWidth(node, this.value.top, this.value.right, 12976 this.value.bottom, this.value.left); 12977 } 12978 } 12979 } 12980 checkObjectDiff() { 12981 if (isResource(this.stageValue) && isResource(this.value)) { 12982 return !isResourceEqual(this.stageValue, this.value); 12983 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 12984 return !(this.stageValue.left === this.value.left && 12985 this.stageValue.right === this.value.right && 12986 this.stageValue.top === this.value.top && 12987 this.stageValue.bottom === this.value.bottom); 12988 } else { 12989 return true; 12990 } 12991 } 12992} 12993TextAreaBorderWidthModifier.identity = Symbol('textAreaBorderWidth'); 12994class TextAreaBorderColorModifier extends ModifierWithKey { 12995 constructor(value) { 12996 super(value); 12997 } 12998 applyPeer(node, reset) { 12999 if (reset) { 13000 getUINativeModule().textArea.resetBorderColor(node); 13001 } else { 13002 const valueType = typeof this.value; 13003 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 13004 getUINativeModule().textArea.setBorderColor(node, this.value, this.value, this.value, this.value); 13005 } else { 13006 getUINativeModule().textArea.setBorderColor(node, this.value.top, 13007 this.value.right, this.value.bottom, 13008 this.value.left); 13009 } 13010 } 13011 } 13012 checkObjectDiff() { 13013 if (isResource(this.stageValue) && isResource(this.value)) { 13014 return !isResourceEqual(this.stageValue, this.value); 13015 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 13016 return !(this.stageValue.left === this.value.left && 13017 this.stageValue.right === this.value.right && 13018 this.stageValue.top === this.value.top && 13019 this.stageValue.bottom === his.value.bottom); 13020 } else { 13021 return true; 13022 } 13023 } 13024} 13025TextAreaBorderColorModifier.identity = Symbol('textAreaBorderColor'); 13026class TextAreaBorderStyleModifier extends ModifierWithKey { 13027 constructor(value) { 13028 super(value); 13029 } 13030 applyPeer(node, reset) { 13031 if (reset) { 13032 getUINativeModule().textArea.resetBorderStyle(node); 13033 } else { 13034 let type; 13035 let style; 13036 let top; 13037 let right; 13038 let bottom; 13039 let left; 13040 if (isNumber(this.value)) { 13041 style = this.value; 13042 type = true; 13043 } else if (isObject(this.value)) { 13044 top = this.value?.top; 13045 right = this.value?.right; 13046 bottom = this.value?.bottom; 13047 left = this.value?.left; 13048 type = true; 13049 } 13050 if (type === true) { 13051 getUINativeModule().textArea.setBorderStyle(node, type, style, top, right, bottom, left); 13052 } else { 13053 getUINativeModule().textArea.resetBorderStyle(node); 13054 } 13055 } 13056 } 13057 checkObjectDiff() { 13058 return !(this.value?.top === this.stageValue?.top && 13059 this.value?.right === this.stageValue?.right && 13060 this.value?.bottom === this.stageValue?.bottom && 13061 this.value?.left === this.stageValue?.left); 13062 } 13063} 13064TextAreaBorderStyleModifier.identity = Symbol('textAreaBorderStyle'); 13065class TextAreaBorderRadiusModifier extends ModifierWithKey { 13066 constructor(value) { 13067 super(value); 13068 } 13069 applyPeer(node, reset) { 13070 if (reset) { 13071 getUINativeModule().textArea.resetBorderRadius(node); 13072 } else { 13073 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 13074 getUINativeModule().textArea.setBorderRadius(node, this.value, this.value, this.value, this.value); 13075 } else { 13076 getUINativeModule().textArea.setBorderRadius(node, this.value.topLeft, this.value.topRight, 13077 this.value.bottomLeft, this.value.bottomRight); 13078 } 13079 } 13080 } 13081 checkObjectDiff() { 13082 if (isResource(this.stageValue) && isResource(this.value)) { 13083 return !isResourceEqual(this.stageValue, this.value); 13084 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 13085 return !(this.stageValue.topLeft === this.value.topLeft && 13086 this.stageValue.topRight === this.value.topRight && 13087 this.stageValue.bottomLeft === this.value.bottomLeft && 13088 this.stageValue.bottomRight === this.value.bottomRight); 13089 } else { 13090 return true; 13091 } 13092 } 13093} 13094TextAreaBorderRadiusModifier.identity = Symbol('textAreaBorderRadius'); 13095class TextAreaBackgroundColorModifier extends ModifierWithKey { 13096 constructor(value) { 13097 super(value); 13098 } 13099 applyPeer(node, reset) { 13100 if (reset) { 13101 getUINativeModule().textArea.resetBackgroundColor(node); 13102 } else { 13103 getUINativeModule().textArea.setBackgroundColor(node, this.value); 13104 } 13105 } 13106 13107 checkObjectDiff() { 13108 return !isBaseOrResourceEqual(this.stageValue, this.value); 13109 } 13110} 13111TextAreaBackgroundColorModifier.identity = Symbol('textAreaBackgroundColor'); 13112class TextAreaMarginModifier extends ModifierWithKey { 13113 constructor(value) { 13114 super(value); 13115 } 13116 applyPeer(node, reset) { 13117 if (reset) { 13118 getUINativeModule().textArea.resetMargin(node); 13119 } 13120 else { 13121 getUINativeModule().textArea.setMargin(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 13122 } 13123 } 13124 checkObjectDiff() { 13125 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 13126 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 13127 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 13128 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 13129 } 13130} 13131TextAreaMarginModifier.identity = Symbol('textAreaMargin'); 13132class TextAreaOnWillChangeModifier extends ModifierWithKey { 13133 constructor(value) { 13134 super(value); 13135 } 13136 applyPeer(node, reset) { 13137 if (reset) { 13138 getUINativeModule().textArea.resetOnWillChange(node); 13139 } else { 13140 getUINativeModule().textArea.setOnWillChange(node, this.value); 13141 } 13142 } 13143} 13144TextAreaOnWillChangeModifier.identity = Symbol('textAreaOnWillChange'); 13145class TextAreaOnWillInsertModifier extends ModifierWithKey { 13146 constructor(value) { 13147 super(value); 13148 } 13149 applyPeer(node, reset) { 13150 if (reset) { 13151 getUINativeModule().textArea.resetOnWillInsert(node); 13152 } else { 13153 getUINativeModule().textArea.setOnWillInsert(node, this.value); 13154 } 13155 } 13156} 13157TextAreaOnWillInsertModifier.identity = Symbol('textAreaOnWillInsert'); 13158class TextAreaOnDidInsertModifier extends ModifierWithKey { 13159 constructor(value) { 13160 super(value); 13161 } 13162 applyPeer(node, reset) { 13163 if (reset) { 13164 getUINativeModule().textArea.resetOnDidInsert(node); 13165 } else { 13166 getUINativeModule().textArea.setOnDidInsert(node, this.value); 13167 } 13168 } 13169} 13170TextAreaOnDidInsertModifier.identity = Symbol('textAreaOnDidInsert'); 13171class TextAreaOnWillDeleteModifier extends ModifierWithKey { 13172 constructor(value) { 13173 super(value); 13174 } 13175 applyPeer(node, reset) { 13176 if (reset) { 13177 getUINativeModule().textArea.resetOnWillDelete(node); 13178 } else { 13179 getUINativeModule().textArea.setOnWillDelete(node, this.value); 13180 } 13181 } 13182} 13183TextAreaOnWillDeleteModifier.identity = Symbol('textAreaOnWillDelete'); 13184class TextAreaOnDidDeleteModifier extends ModifierWithKey { 13185 constructor(value) { 13186 super(value); 13187 } 13188 applyPeer(node, reset) { 13189 if (reset) { 13190 getUINativeModule().textArea.resetOnDidDelete(node); 13191 } else { 13192 getUINativeModule().textArea.setOnDidDelete(node, this.value); 13193 } 13194 } 13195} 13196TextAreaOnDidDeleteModifier.identity = Symbol('textAreaOnDidDelete'); 13197class TextAreaEnablePreviewTextModifier extends ModifierWithKey { 13198 constructor(value) { 13199 super(value); 13200 } 13201 applyPeer(node, reset) { 13202 if (reset) { 13203 getUINativeModule().textArea.resetEnablePreviewText(node); 13204 } 13205 else { 13206 getUINativeModule().textArea.setEnablePreviewText(node, this.value); 13207 } 13208 } 13209 checkObjectDiff() { 13210 return !isBaseOrResourceEqual(this.stageValue, this.value); 13211 } 13212} 13213TextAreaEnablePreviewTextModifier.identity = Symbol('textAreaEnablePreviewText'); 13214class TextAreaEditMenuOptionsModifier extends ModifierWithKey { 13215 constructor(value) { 13216 super(value); 13217 } 13218 applyPeer(node, reset) { 13219 if (reset) { 13220 getUINativeModule().textArea.resetSelectionMenuOptions(node); 13221 } else { 13222 getUINativeModule().textArea.setSelectionMenuOptions(node, this.value); 13223 } 13224 } 13225} 13226TextAreaEditMenuOptionsModifier.identity = Symbol('textAreaEditMenuOptions'); 13227class TextAreaInitializeModifier extends ModifierWithKey { 13228 constructor(value) { 13229 super(value); 13230 } 13231 applyPeer(node, reset) { 13232 var _a, _b, _c; 13233 if (reset) { 13234 getUINativeModule().textArea.setTextAreaInitialize(node, undefined, undefined, undefined); 13235 } 13236 else { 13237 getUINativeModule().textArea.setTextAreaInitialize(node, 13238 (_a = this.value) === null || _a === void 0 ? void 0 : _a.placeholder, 13239 (_b = this.value) === null || _b === void 0 ? void 0 : _b.text, 13240 (_c = this.value) === null || _c === void 0 ? void 0 : _c.controller); 13241 } 13242 } 13243 checkObjectDiff() { 13244 var _a, _b, _c, _d, _e, _f; 13245 return !isBaseOrResourceEqual((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.placeholder, 13246 (_b = this.value) === null || _b === void 0 ? void 0 : _b.placeholder) || 13247 !isBaseOrResourceEqual((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.text, 13248 (_d = this.value) === null || _d === void 0 ? void 0 : _d.text) || 13249 !isBaseOrResourceEqual((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.controller, 13250 (_f = this.value) === null || _f === void 0 ? void 0 : _f.controller); 13251 } 13252} 13253TextAreaInitializeModifier.identity = Symbol('textAreaInitialize'); 13254class TextAreaWidthModifier extends ModifierWithKey { 13255 constructor(value) { 13256 super(value); 13257 } 13258 applyPeer(node, reset) { 13259 if (reset) { 13260 getUINativeModule().textArea.resetWidth(node); 13261 } else { 13262 getUINativeModule().textArea.setWidth(node, this.value); 13263 } 13264 } 13265} 13266TextAreaWidthModifier.identity = Symbol('textAreaWidth'); 13267class TextAreaEnableHapticFeedbackModifier extends ModifierWithKey { 13268 constructor(value) { 13269 super(value); 13270 } 13271 applyPeer(node, reset) { 13272 if (reset) { 13273 getUINativeModule().textArea.resetEnableHapticFeedback(node); 13274 } 13275 else { 13276 getUINativeModule().textArea.setEnableHapticFeedback(node, this.value); 13277 } 13278 } 13279 checkObjectDiff() { 13280 return !isBaseOrResourceEqual(this.stageValue, this.value); 13281 } 13282} 13283TextAreaEnableHapticFeedbackModifier.identity = Symbol('textAreaEnableHapticFeedback'); 13284 13285class TextAreaKeyboardAppearanceModifier extends ModifierWithKey { 13286 constructor(value) { 13287 super(value); 13288 } 13289 applyPeer(node, reset) { 13290 if (reset) { 13291 getUINativeModule().textArea.resetKeyboardAppearance(node); 13292 } 13293 else { 13294 getUINativeModule().textArea.setKeyboardAppearance(node, this.value); 13295 } 13296 } 13297 checkObjectDiff() { 13298 return !isBaseOrResourceEqual(this.stageValue, this.value); 13299 } 13300} 13301TextAreaKeyboardAppearanceModifier.identity = Symbol('textAreaKeyboardAppearance'); 13302 13303class TextAreaStopBackPressModifier extends ModifierWithKey { 13304 constructor(value) { 13305 super(value); 13306 } 13307 applyPeer(node, reset) { 13308 if (reset) { 13309 getUINativeModule().textArea.resetStopBackPress(node); 13310 } 13311 else { 13312 getUINativeModule().textArea.setStopBackPress(node, this.value); 13313 } 13314 } 13315 checkObjectDiff() { 13316 return !isBaseOrResourceEqual(this.stageValue, this.value); 13317 } 13318} 13319TextAreaStopBackPressModifier.identity = Symbol('textAreaStopBackPress'); 13320 13321class ArkTextAreaComponent extends ArkComponent { 13322 constructor(nativePtr, classType) { 13323 super(nativePtr, classType); 13324 } 13325 allowChildCount() { 13326 return 0; 13327 } 13328 initialize(value) { 13329 if (value.length === 1 && isObject(value[0])) { 13330 modifierWithKey(this._modifiersWithKeys, TextAreaInitializeModifier.identity, TextAreaInitializeModifier, value[0]); 13331 } 13332 return this; 13333 } 13334 type(value) { 13335 modifierWithKey(this._modifiersWithKeys, TextAreaTypeModifier.identity, TextAreaTypeModifier, value); 13336 return this; 13337 } 13338 placeholderColor(value) { 13339 modifierWithKey(this._modifiersWithKeys, TextAreaPlaceholderColorModifier.identity, TextAreaPlaceholderColorModifier, value); 13340 return this; 13341 } 13342 placeholderFont(value) { 13343 modifierWithKey(this._modifiersWithKeys, TextAreaPlaceholderFontModifier.identity, TextAreaPlaceholderFontModifier, value); 13344 return this; 13345 } 13346 textAlign(value) { 13347 modifierWithKey(this._modifiersWithKeys, TextAreaTextAlignModifier.identity, TextAreaTextAlignModifier, value); 13348 return this; 13349 } 13350 caretColor(value) { 13351 modifierWithKey(this._modifiersWithKeys, TextAreaCaretColorModifier.identity, TextAreaCaretColorModifier, value); 13352 return this; 13353 } 13354 fontColor(value) { 13355 modifierWithKey(this._modifiersWithKeys, TextAreaFontColorModifier.identity, TextAreaFontColorModifier, value); 13356 return this; 13357 } 13358 fontSize(value) { 13359 modifierWithKey(this._modifiersWithKeys, TextAreaFontSizeModifier.identity, TextAreaFontSizeModifier, value); 13360 return this; 13361 } 13362 fontStyle(value) { 13363 modifierWithKey(this._modifiersWithKeys, TextAreaFontStyleModifier.identity, TextAreaFontStyleModifier, value); 13364 return this; 13365 } 13366 fontWeight(value) { 13367 modifierWithKey(this._modifiersWithKeys, TextAreaFontWeightModifier.identity, TextAreaFontWeightModifier, value); 13368 return this; 13369 } 13370 fontFamily(value) { 13371 modifierWithKey(this._modifiersWithKeys, TextAreaFontFamilyModifier.identity, TextAreaFontFamilyModifier, value); 13372 return this; 13373 } 13374 fontFeature(value) { 13375 modifierWithKey(this._modifiersWithKeys, TextAreaFontFeatureModifier.identity, TextAreaFontFeatureModifier, value); 13376 return this; 13377 } 13378 inputFilter(value, error) { 13379 let arkValue = new ArkTextInputFilter(); 13380 arkValue.value = value; 13381 arkValue.error = error; 13382 modifierWithKey(this._modifiersWithKeys, TextAreaInputFilterModifier.identity, TextAreaInputFilterModifier, arkValue); 13383 return this; 13384 } 13385 onChange(callback) { 13386 modifierWithKey(this._modifiersWithKeys, TextAreaOnChangeModifier.identity, TextAreaOnChangeModifier, callback); 13387 return this; 13388 } 13389 onTextSelectionChange(callback) { 13390 modifierWithKey(this._modifiersWithKeys, TextAreaOnTextSelectionChangeModifier.identity, TextAreaOnTextSelectionChangeModifier, callback); 13391 return this; 13392 } 13393 onContentScroll(callback) { 13394 modifierWithKey(this._modifiersWithKeys, TextAreaOnContentScrollModifier.identity, TextAreaOnContentScrollModifier, callback); 13395 return this; 13396 } 13397 onEditChange(callback) { 13398 modifierWithKey(this._modifiersWithKeys, TextAreaOnEditChangeModifier.identity, TextAreaOnEditChangeModifier, callback); 13399 return this; 13400 } 13401 onCopy(callback) { 13402 modifierWithKey(this._modifiersWithKeys, TextAreaOnCopyModifier.identity, TextAreaOnCopyModifier, callback); 13403 return this; 13404 } 13405 onCut(callback) { 13406 modifierWithKey(this._modifiersWithKeys, TextAreaOnCutModifier.identity, TextAreaOnCutModifier, callback); 13407 return this; 13408 } 13409 onPaste(callback) { 13410 modifierWithKey(this._modifiersWithKeys, TextAreaOnPasteModifier.identity, TextAreaOnPasteModifier, callback); 13411 return this; 13412 } 13413 copyOption(value) { 13414 modifierWithKey(this._modifiersWithKeys, TextAreaCopyOptionModifier.identity, TextAreaCopyOptionModifier, value); 13415 return this; 13416 } 13417 enableKeyboardOnFocus(value) { 13418 modifierWithKey(this._modifiersWithKeys, TextAreaEnableKeyboardOnFocusModifier.identity, TextAreaEnableKeyboardOnFocusModifier, value); 13419 return this; 13420 } 13421 maxLength(value) { 13422 modifierWithKey(this._modifiersWithKeys, TextAreaMaxLengthModifier.identity, TextAreaMaxLengthModifier, value); 13423 return this; 13424 } 13425 showCounter(value, options) { 13426 let arkValue = new ArkTextFieldShowCounter(); 13427 arkValue.value = value; 13428 arkValue.highlightBorder = options?.highlightBorder; 13429 arkValue.thresholdPercentage = options?.thresholdPercentage; 13430 modifierWithKey(this._modifiersWithKeys, TextAreaShowCounterModifier.identity, TextAreaShowCounterModifier, arkValue); 13431 return this; 13432 } 13433 style(value) { 13434 modifierWithKey(this._modifiersWithKeys, TextAreaStyleModifier.identity, TextAreaStyleModifier, value); 13435 return this; 13436 } 13437 barState(value) { 13438 modifierWithKey(this._modifiersWithKeys, TextAreaBarStateModifier.identity, TextAreaBarStateModifier, value); 13439 return this; 13440 } 13441 selectionMenuHidden(value) { 13442 modifierWithKey(this._modifiersWithKeys, TextAreaSelectionMenuHiddenModifier.identity, TextAreaSelectionMenuHiddenModifier, value); 13443 return this; 13444 } 13445 maxLines(value) { 13446 modifierWithKey(this._modifiersWithKeys, TextAreaMaxLinesModifier.identity, TextAreaMaxLinesModifier, value); 13447 return this; 13448 } 13449 customKeyboard(value) { 13450 throw new Error('Method not implemented.'); 13451 } 13452 decoration(value) { 13453 modifierWithKey(this._modifiersWithKeys, TextAreaDecorationModifier.identity, TextAreaDecorationModifier, value); 13454 return this; 13455 } 13456 letterSpacing(value) { 13457 modifierWithKey(this._modifiersWithKeys, TextAreaLetterSpacingModifier.identity, TextAreaLetterSpacingModifier, value); 13458 return this; 13459 } 13460 lineSpacing(value) { 13461 modifierWithKey(this._modifiersWithKeys, TextAreaLineSpacingModifier.identity, TextAreaLineSpacingModifier, value); 13462 return this; 13463 } 13464 lineHeight(value) { 13465 modifierWithKey(this._modifiersWithKeys, TextAreaLineHeightModifier.identity, TextAreaLineHeightModifier, value); 13466 return this; 13467 } 13468 wordBreak(value) { 13469 modifierWithKey(this._modifiersWithKeys, TextAreaWordBreakModifier.identity, TextAreaWordBreakModifier, value); 13470 return this; 13471 } 13472 lineBreakStrategy(value) { 13473 modifierWithKey(this._modifiersWithKeys, TextAreaLineBreakStrategyModifier.identity, 13474 TextAreaLineBreakStrategyModifier, value); 13475 return this; 13476 } 13477 minFontSize(value) { 13478 modifierWithKey(this._modifiersWithKeys, TextAreaMinFontSizeModifier.identity, TextAreaMinFontSizeModifier, value); 13479 return this; 13480 } 13481 maxFontSize(value) { 13482 modifierWithKey(this._modifiersWithKeys, TextAreaMaxFontSizeModifier.identity, TextAreaMaxFontSizeModifier, value); 13483 return this; 13484 } 13485 heightAdaptivePolicy(value) { 13486 modifierWithKey(this._modifiersWithKeys, TextAreaHeightAdaptivePolicyModifier.identity, TextAreaHeightAdaptivePolicyModifier, value); 13487 return this; 13488 } 13489 selectedBackgroundColor(value) { 13490 modifierWithKey(this._modifiersWithKeys, TextAreaSelectedBackgroundColorModifier.identity, TextAreaSelectedBackgroundColorModifier, value); 13491 return this; 13492 } 13493 caretStyle(value) { 13494 modifierWithKey(this._modifiersWithKeys, TextAreaCaretStyleModifier.identity, TextAreaCaretStyleModifier, value); 13495 return this; 13496 } 13497 textOverflow(value) { 13498 modifierWithKey(this._modifiersWithKeys, TextAreaTextOverflowModifier.identity, TextAreaTextOverflowModifier, value); 13499 return this; 13500 } 13501 textIndent(value) { 13502 modifierWithKey(this._modifiersWithKeys, TextAreaTextIndentModifier.identity, TextAreaTextIndentModifier, value); 13503 return this; 13504 } 13505 enterKeyType(value) { 13506 modifierWithKey(this._modifiersWithKeys, TextAreaEnterKeyTypeModifier.identity, TextAreaEnterKeyTypeModifier, value); 13507 return this; 13508 } 13509 padding(value) { 13510 let arkValue = new ArkPadding(); 13511 if (value !== null && value !== undefined) { 13512 if (isLengthType(value) || isResource(value)) { 13513 arkValue.top = value; 13514 arkValue.right = value; 13515 arkValue.bottom = value; 13516 arkValue.left = value; 13517 } 13518 else { 13519 arkValue.top = value.top; 13520 arkValue.right = value.right; 13521 arkValue.bottom = value.bottom; 13522 arkValue.left = value.left; 13523 } 13524 modifierWithKey(this._modifiersWithKeys, TextAreaPaddingModifier.identity, TextAreaPaddingModifier, arkValue); 13525 } 13526 else { 13527 modifierWithKey(this._modifiersWithKeys, TextAreaPaddingModifier.identity, TextAreaPaddingModifier, undefined); 13528 } 13529 return this; 13530 } 13531 onSubmit(callback) { 13532 modifierWithKey(this._modifiersWithKeys, TextAreaOnSubmitModifier.identity, TextAreaOnSubmitModifier, callback); 13533 return this; 13534 } 13535 contentType(value) { 13536 modifierWithKey(this._modifiersWithKeys, TextAreaContentTypeModifier.identity, 13537 TextAreaContentTypeModifier, value); 13538 return this; 13539 } 13540 enableAutoFill(value) { 13541 modifierWithKey(this._modifiersWithKeys, TextAreaEnableAutoFillModifier.identity, 13542 TextAreaEnableAutoFillModifier, value); 13543 return this; 13544 } 13545 border(value) { 13546 let arkBorder = valueToArkBorder(value); 13547 modifierWithKey(this._modifiersWithKeys, TextAreaBorderModifier.identity, TextAreaBorderModifier, arkBorder); 13548 return this; 13549 } 13550 borderWidth(value) { 13551 modifierWithKey(this._modifiersWithKeys, TextAreaBorderWidthModifier.identity, TextAreaBorderWidthModifier, value); 13552 return this; 13553 } 13554 borderColor(value) { 13555 modifierWithKey(this._modifiersWithKeys, TextAreaBorderColorModifier.identity, TextAreaBorderColorModifier, value); 13556 return this; 13557 } 13558 borderStyle(value) { 13559 modifierWithKey(this._modifiersWithKeys, TextAreaBorderStyleModifier.identity, TextAreaBorderStyleModifier, value); 13560 return this; 13561 } 13562 borderRadius(value) { 13563 modifierWithKey(this._modifiersWithKeys, TextAreaBorderRadiusModifier.identity, TextAreaBorderRadiusModifier, value); 13564 return this; 13565 } 13566 backgroundColor(value) { 13567 modifierWithKey(this._modifiersWithKeys, TextAreaBackgroundColorModifier.identity, TextAreaBackgroundColorModifier, value); 13568 return this; 13569 } 13570 margin(value) { 13571 let arkValue = new ArkPadding(); 13572 if (value !== null && value !== undefined) { 13573 if (isLengthType(value) || isResource(value)) { 13574 arkValue.top = value; 13575 arkValue.right = value; 13576 arkValue.bottom = value; 13577 arkValue.left = value; 13578 } 13579 else { 13580 arkValue.top = value.top; 13581 arkValue.right = value.right; 13582 arkValue.bottom = value.bottom; 13583 arkValue.left = value.left; 13584 } 13585 modifierWithKey(this._modifiersWithKeys, TextAreaMarginModifier.identity, TextAreaMarginModifier, arkValue); 13586 } 13587 else { 13588 modifierWithKey(this._modifiersWithKeys, TextAreaMarginModifier.identity, TextAreaMarginModifier, undefined); 13589 } 13590 return this; 13591 } 13592 onWillChange(callback) { 13593 modifierWithKey(this._modifiersWithKeys, TextAreaOnWillChangeModifier.identity, TextAreaOnWillChangeModifier, callback); 13594 return this; 13595 } 13596 onWillInsert(callback) { 13597 modifierWithKey(this._modifiersWithKeys, TextAreaOnWillInsertModifier.identity, TextAreaOnWillInsertModifier, callback); 13598 return this; 13599 } 13600 onDidInsert(callback) { 13601 modifierWithKey(this._modifiersWithKeys, TextAreaOnDidInsertModifier.identity, TextAreaOnDidInsertModifier, callback); 13602 return this; 13603 } 13604 onWillDelete(callback) { 13605 modifierWithKey(this._modifiersWithKeys, TextAreaOnWillDeleteModifier.identity, TextAreaOnWillDeleteModifier, callback); 13606 return this; 13607 } 13608 onDidDelete(callback) { 13609 modifierWithKey(this._modifiersWithKeys, TextAreaOnDidDeleteModifier.identity, TextAreaOnDidDeleteModifier, callback); 13610 return this; 13611 } 13612 enablePreviewText(value) { 13613 modifierWithKey(this._modifiersWithKeys, TextAreaEnablePreviewTextModifier.identity, TextAreaEnablePreviewTextModifier, value); 13614 return this; 13615 } 13616 editMenuOptions(value) { 13617 modifierWithKey(this._modifiersWithKeys, TextAreaEditMenuOptionsModifier.identity, 13618 TextAreaEditMenuOptionsModifier, value); 13619 return this; 13620 } 13621 width(value) { 13622 modifierWithKey(this._modifiersWithKeys, TextAreaWidthModifier.identity, TextAreaWidthModifier, value); 13623 return this; 13624 } 13625 enableHapticFeedback(value) { 13626 modifierWithKey(this._modifiersWithKeys, TextAreaEnableHapticFeedbackModifier.identity, TextAreaEnableHapticFeedbackModifier, value); 13627 return this; 13628 } 13629 stopBackPress(value) { 13630 modifierWithKey(this._modifiersWithKeys, TextAreaStopBackPressModifier.identity, TextAreaStopBackPressModifier, value); 13631 return this; 13632 } 13633 keyboardAppearance(value) { 13634 modifierWithKey(this._modifiersWithKeys, TextAreaKeyboardAppearanceModifier.identity, TextAreaKeyboardAppearanceModifier, value); 13635 return this; 13636 } 13637} 13638// @ts-ignore 13639if (globalThis.TextArea !== undefined) { 13640 globalThis.TextArea.attributeModifier = function (modifier) { 13641 attributeModifierFunc.call(this, modifier, (nativePtr) => { 13642 return new ArkTextAreaComponent(nativePtr); 13643 }, (nativePtr, classType, modifierJS) => { 13644 return new modifierJS.TextAreaModifier(nativePtr, classType); 13645 }); 13646 }; 13647} 13648 13649/// <reference path='./import.ts' /> 13650class TextInputStyleModifier extends ModifierWithKey { 13651 constructor(value) { 13652 super(value); 13653 } 13654 applyPeer(node, reset) { 13655 if (reset) { 13656 getUINativeModule().textInput.resetStyle(node); 13657 } 13658 else { 13659 getUINativeModule().textInput.setStyle(node, this.value); 13660 } 13661 } 13662 checkObjectDiff() { 13663 return !isBaseOrResourceEqual(this.stageValue, this.value); 13664 } 13665} 13666TextInputStyleModifier.identity = Symbol('textInputStyle'); 13667class TextInputMaxLengthModifier extends ModifierWithKey { 13668 constructor(value) { 13669 super(value); 13670 } 13671 applyPeer(node, reset) { 13672 if (reset) { 13673 getUINativeModule().textInput.resetMaxLength(node); 13674 } 13675 else { 13676 getUINativeModule().textInput.setMaxLength(node, this.value); 13677 } 13678 } 13679 checkObjectDiff() { 13680 return !isBaseOrResourceEqual(this.stageValue, this.value); 13681 } 13682} 13683TextInputMaxLengthModifier.identity = Symbol('textInputMaxLength'); 13684class TextInputMaxLinesModifier extends ModifierWithKey { 13685 constructor(value) { 13686 super(value); 13687 } 13688 applyPeer(node, reset) { 13689 if (reset) { 13690 getUINativeModule().textInput.resetMaxLines(node); 13691 } 13692 else { 13693 getUINativeModule().textInput.setMaxLines(node, this.value); 13694 } 13695 } 13696 checkObjectDiff() { 13697 return !isBaseOrResourceEqual(this.stageValue, this.value); 13698 } 13699} 13700TextInputMaxLinesModifier.identity = Symbol('textInputMaxLines'); 13701class TextInputDecorationModifier extends ModifierWithKey { 13702 constructor(value) { 13703 super(value); 13704 } 13705 applyPeer(node, reset) { 13706 if (reset) { 13707 getUINativeModule().textInput.resetDecoration(node); 13708 } 13709 else { 13710 getUINativeModule().textInput.setDecoration(node, this.value.type, this.value.color, this.value.style); 13711 } 13712 } 13713 checkObjectDiff() { 13714 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 13715 return true; 13716 } 13717 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 13718 return !isResourceEqual(this.stageValue.color, this.value.color); 13719 } 13720 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 13721 return !(this.stageValue.color === this.value.color); 13722 } 13723 else { 13724 return true; 13725 } 13726 } 13727} 13728TextInputDecorationModifier.identity = Symbol('textInputDecoration'); 13729class TextInputLetterSpacingModifier extends ModifierWithKey { 13730 constructor(value) { 13731 super(value); 13732 } 13733 applyPeer(node, reset) { 13734 if (reset) { 13735 getUINativeModule().textInput.resetLetterSpacing(node); 13736 } 13737 else { 13738 getUINativeModule().textInput.setLetterSpacing(node, this.value); 13739 } 13740 } 13741 checkObjectDiff() { 13742 return !isBaseOrResourceEqual(this.stageValue, this.value); 13743 } 13744} 13745TextInputLetterSpacingModifier.identity = Symbol('textInputLetterSpacing'); 13746class TextInputLineHeightModifier extends ModifierWithKey { 13747 constructor(value) { 13748 super(value); 13749 } 13750 applyPeer(node, reset) { 13751 if (reset) { 13752 getUINativeModule().textInput.resetLineHeight(node); 13753 } 13754 else { 13755 getUINativeModule().textInput.setLineHeight(node, this.value); 13756 } 13757 } 13758 checkObjectDiff() { 13759 return !isBaseOrResourceEqual(this.stageValue, this.value); 13760 } 13761} 13762TextInputLineHeightModifier.identity = Symbol('textInputLineHeight'); 13763class TextInputUnderlineColorModifier extends ModifierWithKey { 13764 constructor(value) { 13765 super(value); 13766 } 13767 applyPeer(node, reset) { 13768 if (reset) { 13769 getUINativeModule().textInput.resetUnderlineColor(node); 13770 } 13771 else { 13772 const valueType = typeof this.value; 13773 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 13774 getUINativeModule().textInput.setUnderlineColor(node, this.value, undefined, undefined, undefined, undefined); 13775 } 13776 else { 13777 getUINativeModule().textInput.setUnderlineColor(node, undefined, this.value.normal, this.value.typing, this.value.error, this.value.disable); 13778 } 13779 } 13780 } 13781 checkObjectDiff() { 13782 if (isResource(this.stageValue) && isResource(this.value)) { 13783 return !isBaseOrResourceEqual(this.stageValue, this.value); 13784 } 13785 else if (!isResource(this.stageValue) && !isResource(this.value)) { 13786 return !(this.stageValue.normal === this.value.normal && 13787 this.stageValue.typing === this.value.typing && 13788 this.stageValue.error === this.value.error && 13789 this.stageValue.disable === this.value.disable); 13790 } 13791 else { 13792 return true; 13793 } 13794 } 13795} 13796TextInputUnderlineColorModifier.identity = Symbol('textInputUnderlineColor'); 13797class TextInputWordBreakModifier extends ModifierWithKey { 13798 constructor(value) { 13799 super(value); 13800 } 13801 applyPeer(node, reset) { 13802 if (reset) { 13803 getUINativeModule().textInput.resetWordBreak(node); 13804 } 13805 else { 13806 getUINativeModule().textInput.setWordBreak(node, this.value); 13807 } 13808 } 13809 checkObjectDiff() { 13810 return !isBaseOrResourceEqual(this.stageValue, this.value); 13811 } 13812} 13813TextInputWordBreakModifier.identity = Symbol('textInputWordBreak'); 13814 13815class TextInputLineBreakStrategyModifier extends ModifierWithKey { 13816 constructor(value) { 13817 super(value); 13818 } 13819 applyPeer(node, reset) { 13820 if (reset) { 13821 getUINativeModule().textInput.resetLineBreakStrategy(node); 13822 } 13823 else { 13824 getUINativeModule().textInput.setLineBreakStrategy(node, this.value); 13825 } 13826 } 13827 checkObjectDiff() { 13828 return !isBaseOrResourceEqual(this.stageValue, this.value); 13829 } 13830} 13831TextInputLineBreakStrategyModifier.identity = Symbol('textInputLineBreakStrategy'); 13832 13833class TextInputMinFontSizeModifier extends ModifierWithKey { 13834 constructor(value) { 13835 super(value); 13836 } 13837 applyPeer(node, reset) { 13838 if (reset) { 13839 getUINativeModule().textInput.resetMinFontSize(node); 13840 } 13841 else { 13842 getUINativeModule().textInput.setMinFontSize(node, this.value); 13843 } 13844 } 13845 checkObjectDiff() { 13846 return !isBaseOrResourceEqual(this.stageValue, this.value); 13847 } 13848} 13849TextInputMinFontSizeModifier.identity = Symbol('textInputMinFontSize'); 13850class TextInputMaxFontSizeModifier extends ModifierWithKey { 13851 constructor(value) { 13852 super(value); 13853 } 13854 applyPeer(node, reset) { 13855 if (reset) { 13856 getUINativeModule().textInput.resetMaxFontSize(node); 13857 } 13858 else { 13859 getUINativeModule().textInput.setMaxFontSize(node, this.value); 13860 } 13861 } 13862 checkObjectDiff() { 13863 return !isBaseOrResourceEqual(this.stageValue, this.value); 13864 } 13865} 13866TextInputMaxFontSizeModifier.identity = Symbol('textInputMaxFontSize'); 13867class TextInputHeightAdaptivePolicyModifier extends ModifierWithKey { 13868 constructor(value) { 13869 super(value); 13870 } 13871 applyPeer(node, reset) { 13872 if (reset) { 13873 getUINativeModule().textInput.resetHeightAdaptivePolicy(node); 13874 } 13875 else { 13876 getUINativeModule().textInput.setHeightAdaptivePolicy(node, this.value); 13877 } 13878 } 13879 checkObjectDiff() { 13880 return !isBaseOrResourceEqual(this.stageValue, this.value); 13881 } 13882} 13883TextInputHeightAdaptivePolicyModifier.identity = Symbol('textInputHeightAdaptivePolicy'); 13884class TextInputTextOverflowModifier extends ModifierWithKey { 13885 constructor(value) { 13886 super(value); 13887 } 13888 applyPeer(node, reset) { 13889 if (reset) { 13890 getUINativeModule().textInput.resetTextOverflow(node); 13891 } else { 13892 getUINativeModule().textInput.setTextOverflow(node, this.value); 13893 } 13894 } 13895 checkObjectDiff() { 13896 return this.stageValue !== this.value; 13897 } 13898} 13899TextInputTextOverflowModifier.identity = Symbol('textInputTextOverflow'); 13900class TextInputTextIndentModifier extends ModifierWithKey { 13901 constructor(value) { 13902 super(value); 13903 } 13904 applyPeer(node, reset) { 13905 if (reset) { 13906 getUINativeModule().textInput.resetTextIndent(node); 13907 } else { 13908 getUINativeModule().textInput.setTextIndent(node, this.value); 13909 } 13910 } 13911 13912 checkObjectDiff() { 13913 return !isBaseOrResourceEqual(this.stageValue, this.value); 13914 } 13915} 13916TextInputTextIndentModifier.identity = Symbol('textInputTextIndent'); 13917class TextInputShowPasswordIconModifier extends ModifierWithKey { 13918 constructor(value) { 13919 super(value); 13920 } 13921 applyPeer(node, reset) { 13922 if (reset) { 13923 getUINativeModule().textInput.resetShowPasswordIcon(node); 13924 } 13925 else { 13926 getUINativeModule().textInput.setShowPasswordIcon(node, this.value); 13927 } 13928 } 13929 checkObjectDiff() { 13930 return !isBaseOrResourceEqual(this.stageValue, this.value); 13931 } 13932} 13933TextInputShowPasswordIconModifier.identity = Symbol('textInputShowPasswordIcon'); 13934class TextInputShowPasswordModifier extends ModifierWithKey { 13935 constructor(value) { 13936 super(value); 13937 } 13938 applyPeer(node, reset) { 13939 if (reset) { 13940 getUINativeModule().textInput.resetShowPassword(node); 13941 } 13942 else { 13943 getUINativeModule().textInput.setShowPassword(node, this.value); 13944 } 13945 } 13946 checkObjectDiff() { 13947 return !isBaseOrResourceEqual(this.stageValue, this.value); 13948 } 13949} 13950TextInputShowPasswordModifier.identity = Symbol('textInputShowPassword'); 13951class TextInputTextAlignModifier extends ModifierWithKey { 13952 constructor(value) { 13953 super(value); 13954 } 13955 applyPeer(node, reset) { 13956 if (reset) { 13957 getUINativeModule().textInput.resetTextAlign(node); 13958 } 13959 else { 13960 getUINativeModule().textInput.setTextAlign(node, this.value); 13961 } 13962 } 13963 checkObjectDiff() { 13964 return !isBaseOrResourceEqual(this.stageValue, this.value); 13965 } 13966} 13967TextInputTextAlignModifier.identity = Symbol('textInputTextAlign'); 13968class TextInputPlaceholderFontModifier extends ModifierWithKey { 13969 constructor(value) { 13970 super(value); 13971 } 13972 applyPeer(node, reset) { 13973 if (reset) { 13974 getUINativeModule().textInput.resetPlaceholderFont(node); 13975 } 13976 else { 13977 getUINativeModule().textInput.setPlaceholderFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 13978 } 13979 } 13980 checkObjectDiff() { 13981 if (!(this.stageValue.weight === this.value.weight && 13982 this.stageValue.style === this.value.style)) { 13983 return true; 13984 } 13985 else { 13986 if (((isResource(this.stageValue.size) && isResource(this.value.size) && 13987 isResourceEqual(this.stageValue.size, this.value.size)) || 13988 (!isResource(this.stageValue.size) && !isResource(this.value.size) && 13989 this.stageValue.size === this.value.size)) && 13990 ((isResource(this.stageValue.family) && isResource(this.value.family) && 13991 isResourceEqual(this.stageValue.family, this.value.family)) || 13992 (!isResource(this.stageValue.family) && !isResource(this.value.family) && 13993 this.stageValue.family === this.value.family))) { 13994 return false; 13995 } 13996 else { 13997 return true; 13998 } 13999 } 14000 } 14001} 14002TextInputPlaceholderFontModifier.identity = Symbol('textInputPlaceholderFont'); 14003class TextInputPlaceholderColorModifier extends ModifierWithKey { 14004 constructor(value) { 14005 super(value); 14006 } 14007 applyPeer(node, reset) { 14008 if (reset) { 14009 getUINativeModule().textInput.resetPlaceholderColor(node); 14010 } 14011 else { 14012 getUINativeModule().textInput.setPlaceholderColor(node, this.value); 14013 } 14014 } 14015 checkObjectDiff() { 14016 return !isBaseOrResourceEqual(this.stageValue, this.value); 14017 } 14018} 14019TextInputPlaceholderColorModifier.identity = Symbol('textInputPlaceholderColor'); 14020class TextInputPasswordIconModifier extends ModifierWithKey { 14021 constructor(value) { 14022 super(value); 14023 } 14024 applyPeer(node, reset) { 14025 if (reset) { 14026 getUINativeModule().textInput.resetPasswordIcon(node); 14027 } 14028 else { 14029 getUINativeModule().textInput.setPasswordIcon(node, this.value.onIconSrc, this.value.offIconSrc); 14030 } 14031 } 14032 checkObjectDiff() { 14033 return !isBaseOrResourceEqual(this.stageValue.onIconSrc, this.value.onIconSrc) || 14034 !isBaseOrResourceEqual(this.stageValue.offIconSrc, this.value.offIconSrc); 14035 } 14036} 14037TextInputPasswordIconModifier.identity = Symbol('textInputPasswordIcon'); 14038class TextInputSelectedBackgroundColorModifier extends ModifierWithKey { 14039 constructor(value) { 14040 super(value); 14041 } 14042 applyPeer(node, reset) { 14043 if (reset) { 14044 getUINativeModule().textInput.resetSelectedBackgroundColor(node); 14045 } 14046 else { 14047 getUINativeModule().textInput.setSelectedBackgroundColor(node, this.value); 14048 } 14049 } 14050 checkObjectDiff() { 14051 return !isBaseOrResourceEqual(this.stageValue, this.value); 14052 } 14053} 14054TextInputSelectedBackgroundColorModifier.identity = Symbol('textInputSelectedBackgroundColor'); 14055class TextInputSelectionMenuHiddenModifier extends ModifierWithKey { 14056 constructor(value) { 14057 super(value); 14058 } 14059 applyPeer(node, reset) { 14060 if (reset) { 14061 getUINativeModule().textInput.resetSelectionMenuHidden(node); 14062 } 14063 else { 14064 getUINativeModule().textInput.setSelectionMenuHidden(node, this.value); 14065 } 14066 } 14067 checkObjectDiff() { 14068 return !isBaseOrResourceEqual(this.stageValue, this.value); 14069 } 14070} 14071TextInputSelectionMenuHiddenModifier.identity = Symbol('textInputSelectionMenuHidden'); 14072class TextInputShowUnderlineModifier extends ModifierWithKey { 14073 constructor(value) { 14074 super(value); 14075 } 14076 applyPeer(node, reset) { 14077 if (reset) { 14078 getUINativeModule().textInput.resetShowUnderline(node); 14079 } 14080 else { 14081 getUINativeModule().textInput.setShowUnderline(node, this.value); 14082 } 14083 } 14084 checkObjectDiff() { 14085 return !isBaseOrResourceEqual(this.stageValue, this.value); 14086 } 14087} 14088TextInputShowUnderlineModifier.identity = Symbol('textInputShowUnderLine'); 14089 14090class TextInputPasswordRulesModifier extends ModifierWithKey { 14091 constructor(value) { 14092 super(value); 14093 } 14094 applyPeer(node, reset) { 14095 if (reset) { 14096 getUINativeModule().textInput.resetPasswordRules(node); 14097 } else { 14098 getUINativeModule().textInput.setPasswordRules(node, this.value); 14099 } 14100 } 14101 checkObjectDiff() { 14102 return !isBaseOrResourceEqual(this.stageValue, this.value); 14103 } 14104} 14105 14106TextInputPasswordRulesModifier.identity = Symbol('textInputPasswordRules'); 14107class TextInputEnableAutoFillModifier extends ModifierWithKey { 14108 constructor(value) { 14109 super(value); 14110 } 14111 applyPeer(node, reset) { 14112 if (reset) { 14113 getUINativeModule().textInput.resetEnableAutoFill(node); 14114 } else { 14115 getUINativeModule().textInput.setEnableAutoFill(node, this.value); 14116 } 14117 } 14118 checkObjectDiff() { 14119 return !isBaseOrResourceEqual(this.stageValue, this.value); 14120 } 14121} 14122TextInputEnableAutoFillModifier.identity = Symbol('textInputEnableAutoFill'); 14123 14124class TextInputFontFeatureModifier extends ModifierWithKey { 14125 constructor(value) { 14126 super(value); 14127 } 14128 applyPeer(node, reset) { 14129 if (reset) { 14130 getUINativeModule().textInput.resetFontFeature(node); 14131 } else { 14132 getUINativeModule().textInput.setFontFeature(node, this.value); 14133 } 14134 } 14135 checkObjectDiff() { 14136 return !isBaseOrResourceEqual(this.stageValue, this.value); 14137 } 14138} 14139TextInputFontFeatureModifier.identity = Symbol('textInputFontFeature'); 14140 14141class TextInputShowErrorModifier extends ModifierWithKey { 14142 constructor(value) { 14143 super(value); 14144 } 14145 applyPeer(node, reset) { 14146 if (reset) { 14147 getUINativeModule().textInput.resetShowError(node); 14148 } 14149 else { 14150 getUINativeModule().textInput.setShowError(node, this.value); 14151 } 14152 } 14153 checkObjectDiff() { 14154 return !isBaseOrResourceEqual(this.stageValue, this.value); 14155 } 14156} 14157TextInputShowErrorModifier.identity = Symbol('textInputShowError'); 14158class TextInputTypeModifier extends ModifierWithKey { 14159 constructor(value) { 14160 super(value); 14161 } 14162 applyPeer(node, reset) { 14163 if (reset) { 14164 getUINativeModule().textInput.resetType(node); 14165 } 14166 else { 14167 getUINativeModule().textInput.setType(node, this.value); 14168 } 14169 } 14170 checkObjectDiff() { 14171 return !isBaseOrResourceEqual(this.stageValue, this.value); 14172 } 14173} 14174TextInputTypeModifier.identity = Symbol('textInputType'); 14175class TextInputCaretPositionModifier extends ModifierWithKey { 14176 constructor(value) { 14177 super(value); 14178 } 14179 applyPeer(node, reset) { 14180 if (reset) { 14181 getUINativeModule().textInput.resetCaretPosition(node); 14182 } 14183 else { 14184 getUINativeModule().textInput.setCaretPosition(node, this.value); 14185 } 14186 } 14187 checkObjectDiff() { 14188 return !isBaseOrResourceEqual(this.stageValue, this.value); 14189 } 14190} 14191TextInputCaretPositionModifier.identity = Symbol('textInputCaretPosition'); 14192class TextInputCopyOptionModifier extends ModifierWithKey { 14193 constructor(value) { 14194 super(value); 14195 } 14196 applyPeer(node, reset) { 14197 if (reset) { 14198 getUINativeModule().textInput.resetCopyOption(node); 14199 } 14200 else { 14201 getUINativeModule().textInput.setCopyOption(node, this.value); 14202 } 14203 } 14204 checkObjectDiff() { 14205 return !isBaseOrResourceEqual(this.stageValue, this.value); 14206 } 14207} 14208TextInputCopyOptionModifier.identity = Symbol('textInputCopyOption'); 14209class TextInputEnableKeyboardOnFocusModifier extends ModifierWithKey { 14210 constructor(value) { 14211 super(value); 14212 } 14213 applyPeer(node, reset) { 14214 if (reset) { 14215 getUINativeModule().textInput.resetEnableKeyboardOnFocus(node); 14216 } 14217 else { 14218 getUINativeModule().textInput.setEnableKeyboardOnFocus(node, this.value); 14219 } 14220 } 14221 checkObjectDiff() { 14222 return !isBaseOrResourceEqual(this.stageValue, this.value); 14223 } 14224} 14225TextInputEnableKeyboardOnFocusModifier.identity = Symbol('textInputEnableKeyboardOnFocus'); 14226class TextInputCaretStyleModifier extends ModifierWithKey { 14227 constructor(value) { 14228 super(value); 14229 } 14230 applyPeer(node, reset) { 14231 if (reset) { 14232 getUINativeModule().textInput.resetCaretStyle(node); 14233 } 14234 else { 14235 getUINativeModule().textInput.setCaretStyle(node, this.value.width, this.value.color); 14236 } 14237 } 14238 checkObjectDiff() { 14239 if (isObject(this.stageValue) && isObject(this.value)) { 14240 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width); 14241 } 14242 else { 14243 return true; 14244 } 14245 } 14246} 14247TextInputCaretStyleModifier.identity = Symbol('textInputCaretStyle'); 14248class TextInputEnterKeyTypeModifier extends ModifierWithKey { 14249 constructor(value) { 14250 super(value); 14251 } 14252 applyPeer(node, reset) { 14253 if (reset) { 14254 getUINativeModule().textInput.resetEnterKeyType(node); 14255 } 14256 else { 14257 getUINativeModule().textInput.setEnterKeyType(node, this.value); 14258 } 14259 } 14260 checkObjectDiff() { 14261 return !isBaseOrResourceEqual(this.stageValue, this.value); 14262 } 14263} 14264TextInputEnterKeyTypeModifier.identity = Symbol('textInputEnterKeyType'); 14265class TextInputBarStateModifier extends ModifierWithKey { 14266 constructor(value) { 14267 super(value); 14268 } 14269 applyPeer(node, reset) { 14270 if (reset) { 14271 getUINativeModule().textInput.resetBarState(node); 14272 } 14273 else { 14274 getUINativeModule().textInput.setBarState(node, this.value); 14275 } 14276 } 14277 checkObjectDiff() { 14278 return !isBaseOrResourceEqual(this.stageValue, this.value); 14279 } 14280} 14281TextInputBarStateModifier.identity = Symbol('textInputBarState'); 14282class TextInputCaretColorModifier extends ModifierWithKey { 14283 constructor(value) { 14284 super(value); 14285 } 14286 applyPeer(node, reset) { 14287 if (reset) { 14288 getUINativeModule().textInput.resetCaretColor(node); 14289 } 14290 else { 14291 getUINativeModule().textInput.setCaretColor(node, this.value); 14292 } 14293 } 14294 checkObjectDiff() { 14295 return !isBaseOrResourceEqual(this.stageValue, this.value); 14296 } 14297} 14298TextInputCaretColorModifier.identity = Symbol('textinputCaretColor'); 14299class TextInputFontColorModifier extends ModifierWithKey { 14300 constructor(value) { 14301 super(value); 14302 } 14303 applyPeer(node, reset) { 14304 if (reset) { 14305 getUINativeModule().textInput.resetFontColor(node); 14306 } 14307 else { 14308 getUINativeModule().textInput.setFontColor(node, this.value); 14309 } 14310 } 14311 checkObjectDiff() { 14312 return !isBaseOrResourceEqual(this.stageValue, this.value); 14313 } 14314} 14315TextInputFontColorModifier.identity = Symbol('textInputFontColor'); 14316class TextInputFontSizeModifier extends ModifierWithKey { 14317 constructor(value) { 14318 super(value); 14319 } 14320 applyPeer(node, reset) { 14321 if (reset) { 14322 getUINativeModule().textInput.resetFontSize(node); 14323 } 14324 else { 14325 getUINativeModule().textInput.setFontSize(node, this.value); 14326 } 14327 } 14328 checkObjectDiff() { 14329 return !isBaseOrResourceEqual(this.stageValue, this.value); 14330 } 14331} 14332TextInputFontSizeModifier.identity = Symbol('textInputFontSize'); 14333class TextInputFontStyleModifier extends ModifierWithKey { 14334 constructor(value) { 14335 super(value); 14336 } 14337 applyPeer(node, reset) { 14338 if (reset) { 14339 getUINativeModule().textInput.resetFontStyle(node); 14340 } 14341 else { 14342 getUINativeModule().textInput.setFontStyle(node, this.value); 14343 } 14344 } 14345 checkObjectDiff() { 14346 return !isBaseOrResourceEqual(this.stageValue, this.value); 14347 } 14348} 14349TextInputFontStyleModifier.identity = Symbol('textInputFontStyle'); 14350class TextInputFontWeightModifier extends ModifierWithKey { 14351 constructor(value) { 14352 super(value); 14353 } 14354 applyPeer(node, reset) { 14355 if (reset) { 14356 getUINativeModule().textInput.resetFontWeight(node); 14357 } 14358 else { 14359 getUINativeModule().textInput.setFontWeight(node, this.value); 14360 } 14361 } 14362 checkObjectDiff() { 14363 return !isBaseOrResourceEqual(this.stageValue, this.value); 14364 } 14365} 14366TextInputFontWeightModifier.identity = Symbol('textInputFontWeight'); 14367class TextInputFontFamilyModifier extends ModifierWithKey { 14368 constructor(value) { 14369 super(value); 14370 } 14371 applyPeer(node, reset) { 14372 if (reset) { 14373 getUINativeModule().textInput.resetFontFamily(node); 14374 } 14375 else { 14376 getUINativeModule().textInput.setFontFamily(node, this.value); 14377 } 14378 } 14379 checkObjectDiff() { 14380 return !isBaseOrResourceEqual(this.stageValue, this.value); 14381 } 14382} 14383TextInputFontFamilyModifier.identity = Symbol('textInputFontFamily'); 14384class TextInputCancelButtonModifier extends ModifierWithKey { 14385 constructor(value) { 14386 super(value); 14387 } 14388 applyPeer(node, reset) { 14389 if (reset) { 14390 getUINativeModule().textInput.resetCancelButton(node); 14391 } 14392 else { 14393 let _a, _b, _c; 14394 getUINativeModule().textInput.setCancelButton(node, this.value.style, 14395 (_a = this.value.icon) === null || _a === void 0 ? void 0 : _a.size, 14396 (_b = this.value.icon) === null || _b === void 0 ? void 0 : _b.color, 14397 (_c = this.value.icon) === null || _c === void 0 ? void 0 : _c.src); 14398 } 14399 } 14400 checkObjectDiff() { 14401 let _a, _b, _c, _d, _e, _f; 14402 return this.stageValue.style !== this.value.style || 14403 !isBaseOrResourceEqual((_a = this.stageValue.icon) === null || _a === void 0 ? void 0 : _a.size, (_b = this.value.icon) === null || _b === void 0 ? void 0 : _b.size) || 14404 !isBaseOrResourceEqual((_c = this.stageValue.icon) === null || _c === void 0 ? void 0 : _c.color, (_d = this.value.icon) === null || _d === void 0 ? void 0 : _d.color) || 14405 !isBaseOrResourceEqual((_e = this.stageValue.icon) === null || _e === void 0 ? void 0 : _e.src, (_f = this.value.icon) === null || _f === void 0 ? void 0 : _f.src); 14406 } 14407} 14408TextInputCancelButtonModifier.identity = Symbol('textInputCancelButton'); 14409class TextInputSelectAllModifier extends ModifierWithKey { 14410 constructor(value) { 14411 super(value); 14412 } 14413 applyPeer(node, reset) { 14414 if (reset) { 14415 getUINativeModule().textInput.resetSelectAll(node); 14416 } 14417 else { 14418 getUINativeModule().textInput.setSelectAll(node, this.value); 14419 } 14420 } 14421 checkObjectDiff() { 14422 return !isBaseOrResourceEqual(this.stageValue, this.value); 14423 } 14424} 14425TextInputSelectAllModifier.identity = Symbol('textInputSelectAll'); 14426class TextInputShowCounterModifier extends ModifierWithKey { 14427 constructor(value) { 14428 super(value); 14429 } 14430 applyPeer(node, reset) { 14431 if (reset) { 14432 getUINativeModule().textInput.resetShowCounter(node); 14433 } 14434 else { 14435 getUINativeModule().textInput.setShowCounter(node, this.value.value, this.value.highlightBorder, this.value.thresholdPercentage); 14436 } 14437 } 14438 checkObjectDiff() { 14439 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 14440 !isBaseOrResourceEqual(this.stageValue.highlightBorder, this.value.highlightBorder) || 14441 !isBaseOrResourceEqual(this.stageValue.thresholdPercentage, this.value.thresholdPercentage); 14442 } 14443} 14444TextInputShowCounterModifier.identity = Symbol('textInputShowCounter'); 14445class TextInputOnEditChangeModifier extends ModifierWithKey { 14446 constructor(value) { 14447 super(value); 14448 } 14449 applyPeer(node, reset) { 14450 if (reset) { 14451 getUINativeModule().textInput.resetOnEditChange(node); 14452 } else { 14453 getUINativeModule().textInput.setOnEditChange(node, this.value); 14454 } 14455 } 14456} 14457TextInputOnEditChangeModifier.identity = Symbol('textInputOnEditChange'); 14458class TextInputFilterModifier extends ModifierWithKey { 14459 constructor(value) { 14460 super(value); 14461 } 14462 applyPeer(node, reset) { 14463 if (reset) { 14464 getUINativeModule().textInput.resetInputFilter(node); 14465 } 14466 else { 14467 getUINativeModule().textInput.setInputFilter(node, this.value.value, this.value.error); 14468 } 14469 } 14470 checkObjectDiff() { 14471 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 14472 !isBaseOrResourceEqual(this.stageValue.error, this.value.error); 14473 } 14474} 14475TextInputFilterModifier.identity = Symbol('textInputFilter'); 14476class TextInputOnSubmitModifier extends ModifierWithKey { 14477 constructor(value) { 14478 super(value); 14479 } 14480 applyPeer(node, reset) { 14481 if (reset) { 14482 getUINativeModule().textInput.resetOnSubmit(node); 14483 } else { 14484 getUINativeModule().textInput.setOnSubmit(node, this.value); 14485 } 14486 } 14487} 14488TextInputOnSubmitModifier.identity = Symbol('textInputOnSubmit'); 14489class TextInputOnChangeModifier extends ModifierWithKey { 14490 constructor(value) { 14491 super(value); 14492 } 14493 applyPeer(node, reset) { 14494 if (reset) { 14495 getUINativeModule().textInput.resetOnChange(node); 14496 } else { 14497 getUINativeModule().textInput.setOnChange(node, this.value); 14498 } 14499 } 14500} 14501TextInputOnChangeModifier.identity = Symbol('textInputOnChange'); 14502class TextInputOnTextSelectionChangeModifier extends ModifierWithKey { 14503 constructor(value) { 14504 super(value); 14505 } 14506 applyPeer(node, reset) { 14507 if (reset) { 14508 getUINativeModule().textInput.resetOnTextSelectionChange(node); 14509 } else { 14510 getUINativeModule().textInput.setOnTextSelectionChange(node, this.value); 14511 } 14512 } 14513} 14514TextInputOnTextSelectionChangeModifier.identity = Symbol('textInputOnTextSelectionChange'); 14515class TextInputOnContentScrollModifier extends ModifierWithKey { 14516 constructor(value) { 14517 super(value); 14518 } 14519 applyPeer(node, reset) { 14520 if (reset) { 14521 getUINativeModule().textInput.resetOnContentScroll(node); 14522 } else { 14523 getUINativeModule().textInput.setOnContentScroll(node, this.value); 14524 } 14525 } 14526} 14527TextInputOnContentScrollModifier.identity = Symbol('textInputOnContentScroll'); 14528class TextInputOnCopyModifier extends ModifierWithKey { 14529 constructor(value) { 14530 super(value); 14531 } 14532 applyPeer(node, reset) { 14533 if (reset) { 14534 getUINativeModule().textInput.resetOnCopy(node); 14535 } else { 14536 getUINativeModule().textInput.setOnCopy(node, this.value); 14537 } 14538 } 14539} 14540TextInputOnCopyModifier.identity = Symbol('textInputOnCopy'); 14541class TextInputOnCutModifier extends ModifierWithKey { 14542 constructor(value) { 14543 super(value); 14544 } 14545 applyPeer(node, reset) { 14546 if (reset) { 14547 getUINativeModule().textInput.resetOnCut(node); 14548 } else { 14549 getUINativeModule().textInput.setOnCut(node, this.value); 14550 } 14551 } 14552} 14553TextInputOnCutModifier.identity = Symbol('textInputOnCut'); 14554class TextInputOnPasteModifier extends ModifierWithKey { 14555 constructor(value) { 14556 super(value); 14557 } 14558 applyPeer(node, reset) { 14559 if (reset) { 14560 getUINativeModule().textInput.resetOnPaste(node); 14561 } else { 14562 getUINativeModule().textInput.setOnPaste(node, this.value); 14563 } 14564 } 14565} 14566TextInputOnPasteModifier.identity = Symbol('textInputOnPaste'); 14567class TextInputPaddingModifier extends ModifierWithKey { 14568 constructor(value) { 14569 super(value); 14570 } 14571 applyPeer(node, reset) { 14572 if (reset) { 14573 getUINativeModule().textInput.resetPadding(node); 14574 } 14575 else { 14576 getUINativeModule().textInput.setPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 14577 } 14578 } 14579 checkObjectDiff() { 14580 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 14581 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 14582 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 14583 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 14584 } 14585} 14586TextInputPaddingModifier.identity = Symbol('textInputPadding'); 14587 14588class TextInputTextModifier extends ModifierWithKey { 14589 constructor(value) { 14590 super(value); 14591 } 14592 14593 applyPeer(node, reset) { 14594 if (reset) { 14595 getUINativeModule().textInput.resetText(node); 14596 } else { 14597 getUINativeModule().textInput.setText(node, this.value); 14598 } 14599 } 14600 14601 checkObjectDiff() { 14602 return !isBaseOrResourceEqual(this.stageValue, this.value); 14603 } 14604} 14605TextInputTextModifier.identity = Symbol('textInputText'); 14606 14607class TextInputPlaceholderModifier extends ModifierWithKey { 14608 constructor(value) { 14609 super(value); 14610 } 14611 applyPeer(node, reset) { 14612 if (reset) { 14613 getUINativeModule().textInput.resetPlaceholder(node); 14614 } else { 14615 getUINativeModule().textInput.setPlaceholder(node, this.value); 14616 } 14617 } 14618 14619 checkObjectDiff() { 14620 return !isBaseOrResourceEqual(this.stageValue, this.value); 14621 } 14622} 14623TextInputPlaceholderModifier.identity = Symbol('textInputPlaceholder'); 14624 14625class TextInputControllerModifier extends ModifierWithKey { 14626 constructor(value) { 14627 super(value); 14628 } 14629 14630 applyPeer(node, reset) { 14631 if (reset) { 14632 getUINativeModule().textInput.resetController(node); 14633 } else { 14634 getUINativeModule().textInput.setController(node, this.value); 14635 } 14636 } 14637 14638} 14639TextInputControllerModifier.identity = Symbol('textInputController'); 14640 14641 14642class TextInputContentTypeModifier extends ModifierWithKey { 14643 constructor(value) { 14644 super(value); 14645 } 14646 applyPeer(node, reset) { 14647 if (reset) { 14648 getUINativeModule().textInput.resetContentType(node); 14649 } 14650 else { 14651 getUINativeModule().textInput.setContentType(node, this.value); 14652 } 14653 } 14654 checkObjectDiff() { 14655 return !isBaseOrResourceEqual(this.stageValue, this.value); 14656 } 14657} 14658TextInputContentTypeModifier.identity = Symbol('textInputContentType'); 14659class TextInputBorderModifier extends ModifierWithKey { 14660 constructor(value) { 14661 super(value); 14662 } 14663 applyPeer(node, reset) { 14664 if (reset) { 14665 getUINativeModule().textInput.resetBorder(node); 14666 } else { 14667 getUINativeModule().textInput.setBorder(node, 14668 this.value.arkWidth.left, this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 14669 this.value.arkColor.leftColor, this.value.arkColor.rightColor, this.value.arkColor.topColor, this.value.arkColor.bottomColor, 14670 this.value.arkRadius.topLeft, this.value.arkRadius.topRight, this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, 14671 this.value.arkStyle.top, this.value.arkStyle.right, this.value.arkStyle.bottom, this.value.arkStyle.left); 14672 } 14673 } 14674 checkObjectDiff() { 14675 return this.value.checkObjectDiff(this.stageValue); 14676 } 14677} 14678TextInputBorderModifier.identity = Symbol('textInputBorder'); 14679class TextInputBorderWidthModifier extends ModifierWithKey { 14680 constructor(value) { 14681 super(value); 14682 } 14683 applyPeer(node, reset) { 14684 if (reset) { 14685 getUINativeModule().textInput.resetBorderWidth(node); 14686 } else { 14687 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 14688 getUINativeModule().textInput.setBorderWidth(node, this.value, this.value, this.value, this.value); 14689 } else { 14690 getUINativeModule().textInput.setBorderWidth(node, this.value.top, this.value.right, 14691 this.value.bottom, this.value.left); 14692 } 14693 } 14694 } 14695 checkObjectDiff() { 14696 if (isResource(this.stageValue) && isResource(this.value)) { 14697 return !isResourceEqual(this.stageValue, this.value); 14698 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 14699 return !(this.stageValue.left === this.value.left && 14700 this.stageValue.right === this.value.right && 14701 this.stageValue.top === this.value.top && 14702 this.stageValue.bottom === this.value.bottom); 14703 } else { 14704 return true; 14705 } 14706 } 14707} 14708TextInputBorderWidthModifier.identity = Symbol('textInputBorderWidth'); 14709class TextInputBorderColorModifier extends ModifierWithKey { 14710 constructor(value) { 14711 super(value); 14712 } 14713 applyPeer(node, reset) { 14714 if (reset) { 14715 getUINativeModule().textInput.resetBorderColor(node); 14716 } else { 14717 const valueType = typeof this.value; 14718 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 14719 getUINativeModule().textInput.setBorderColor(node, this.value, this.value, this.value, this.value); 14720 } else { 14721 getUINativeModule().textInput.setBorderColor(node, this.value.top, 14722 this.value.right, this.value.bottom, this.value.left); 14723 } 14724 } 14725 } 14726 checkObjectDiff() { 14727 if (isResource(this.stageValue) && isResource(this.value)) { 14728 return !isResourceEqual(this.stageValue, this.value); 14729 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 14730 return !(this.stageValue.left === this.value.left && 14731 this.stageValue.right === this.value.right && 14732 this.stageValue.top === this.value.top && 14733 this.stageValue.bottom === this.value.bottom); 14734 } else { 14735 return true; 14736 } 14737 } 14738} 14739TextInputBorderColorModifier.identity = Symbol('textInputBorderColor'); 14740class TextInputBorderStyleModifier extends ModifierWithKey { 14741 constructor(value) { 14742 super(value); 14743 } 14744 applyPeer(node, reset) { 14745 if (reset) { 14746 getUINativeModule().textInput.resetBorderStyle(node); 14747 } else { 14748 let type; 14749 let style; 14750 let top; 14751 let right; 14752 let bottom; 14753 let left; 14754 if (isNumber(this.value)) { 14755 style = this.value; 14756 type = true; 14757 } else if (isObject(this.value)) { 14758 top = this.value?.top; 14759 right = this.value?.right; 14760 bottom = this.value?.bottom; 14761 left = this.value?.left; 14762 type = true; 14763 } 14764 if (type === true) { 14765 getUINativeModule().textInput.setBorderStyle(node, type, style, top, right, bottom, left); 14766 } else { 14767 getUINativeModule().textInput.resetBorderStyle(node); 14768 } 14769 } 14770 } 14771 checkObjectDiff() { 14772 return !(this.value?.top === this.stageValue?.top && 14773 this.value?.right === this.stageValue?.right && 14774 this.value?.bottom === this.stageValue?.bottom && 14775 this.value?.left === this.stageValue?.left); 14776 } 14777} 14778TextInputBorderStyleModifier.identity = Symbol('textInputBorderStyle'); 14779class TextInputBorderRadiusModifier extends ModifierWithKey { 14780 constructor(value) { 14781 super(value); 14782 } 14783 applyPeer(node, reset) { 14784 if (reset) { 14785 getUINativeModule().textInput.resetBorderRadius(node); 14786 } else { 14787 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 14788 getUINativeModule().textInput.setBorderRadius(node, this.value, this.value, this.value, this.value); 14789 } else { 14790 getUINativeModule().textInput.setBorderRadius(node, this.value.topLeft, this.value.topRight, 14791 this.value.bottomLeft, this.value.bottomRight); 14792 } 14793 } 14794 } 14795 checkObjectDiff() { 14796 if (isResource(this.stageValue) && isResource(this.value)) { 14797 return !isResourceEqual(this.stageValue, this.value); 14798 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 14799 return !(this.stageValue.topLeft === this.value.topLeft && 14800 this.stageValue.topRight === this.value.topRight && 14801 this.stageValue.bottomLeft === this.value.bottomLeft && 14802 this.stageValue.bottomRight === this.value.bottomRight); 14803 } else { 14804 return true; 14805 } 14806 } 14807} 14808TextInputBorderRadiusModifier.identity = Symbol('textInputBorderRadius'); 14809class TextInputBackgroundColorModifier extends ModifierWithKey { 14810 constructor(value) { 14811 super(value); 14812 } 14813 applyPeer(node, reset) { 14814 if (reset) { 14815 getUINativeModule().textInput.resetBackgroundColor(node); 14816 } else { 14817 getUINativeModule().textInput.setBackgroundColor(node, this.value); 14818 } 14819 } 14820 14821 checkObjectDiff() { 14822 return !isBaseOrResourceEqual(this.stageValue, this.value); 14823 } 14824} 14825TextInputBackgroundColorModifier.identity = Symbol('textInputBackgroundColor'); 14826class TextInputMarginModifier extends ModifierWithKey { 14827 constructor(value) { 14828 super(value); 14829 } 14830 applyPeer(node, reset) { 14831 if (reset) { 14832 getUINativeModule().textInput.resetMargin(node); 14833 } 14834 else { 14835 getUINativeModule().textInput.setMargin(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 14836 } 14837 } 14838 checkObjectDiff() { 14839 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 14840 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 14841 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 14842 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 14843 } 14844} 14845TextInputMarginModifier.identity = Symbol('textInputMargin'); 14846class TextInputOnWillChangeModifier extends ModifierWithKey { 14847 constructor(value) { 14848 super(value); 14849 } 14850 applyPeer(node, reset) { 14851 if (reset) { 14852 getUINativeModule().textInput.resetOnWillChange(node); 14853 } else { 14854 getUINativeModule().textInput.setOnWillChange(node, this.value); 14855 } 14856 } 14857} 14858TextInputOnWillChangeModifier.identity = Symbol('textInputOnWillChange'); 14859class TextInputOnWillInsertModifier extends ModifierWithKey { 14860 constructor(value) { 14861 super(value); 14862 } 14863 applyPeer(node, reset) { 14864 if (reset) { 14865 getUINativeModule().textInput.resetOnWillInsert(node); 14866 } else { 14867 getUINativeModule().textInput.setOnWillInsert(node, this.value); 14868 } 14869 } 14870} 14871TextInputOnWillInsertModifier.identity = Symbol('textInputOnWillInsert'); 14872 14873class TextInputOnDidInsertModifier extends ModifierWithKey { 14874 constructor(value) { 14875 super(value); 14876 } 14877 applyPeer(node, reset) { 14878 if (reset) { 14879 getUINativeModule().textInput.resetOnDidInsert(node); 14880 } else { 14881 getUINativeModule().textInput.setOnDidInsert(node, this.value); 14882 } 14883 } 14884} 14885TextInputOnDidInsertModifier.identity = Symbol('textInputOnDidInsert'); 14886 14887class TextInputOnWillDeleteModifier extends ModifierWithKey { 14888 constructor(value) { 14889 super(value); 14890 } 14891 applyPeer(node, reset) { 14892 if (reset) { 14893 getUINativeModule().textInput.resetOnWillDelete(node); 14894 } else { 14895 getUINativeModule().textInput.setOnWillDelete(node, this.value); 14896 } 14897 } 14898} 14899TextInputOnWillDeleteModifier.identity = Symbol('textInputOnWillDelete'); 14900 14901class TextInputOnDidDeleteModifier extends ModifierWithKey { 14902 constructor(value) { 14903 super(value); 14904 } 14905 applyPeer(node, reset) { 14906 if (reset) { 14907 getUINativeModule().textInput.resetOnDidDelete(node); 14908 } else { 14909 getUINativeModule().textInput.setOnDidDelete(node, this.value); 14910 } 14911 } 14912} 14913TextInputOnDidDeleteModifier.identity = Symbol('textInputOnDidDelete'); 14914class TextInputEnablePreviewTextModifier extends ModifierWithKey { 14915 constructor(value) { 14916 super(value); 14917 } 14918 applyPeer(node, reset) { 14919 if (reset) { 14920 getUINativeModule().textInput.resetEnablePreviewText(node); 14921 } 14922 else { 14923 getUINativeModule().textInput.setEnablePreviewText(node, this.value); 14924 } 14925 } 14926 checkObjectDiff() { 14927 return !isBaseOrResourceEqual(this.stageValue, this.value); 14928 } 14929} 14930TextInputEnablePreviewTextModifier.identity = Symbol('textInputEnablePreviewText'); 14931class TextInputEditMenuOptionsModifier extends ModifierWithKey { 14932 constructor(value) { 14933 super(value); 14934 } 14935 applyPeer(node, reset) { 14936 if (reset) { 14937 getUINativeModule().textInput.resetSelectionMenuOptions(node); 14938 } else { 14939 getUINativeModule().textInput.setSelectionMenuOptions(node, this.value); 14940 } 14941 } 14942} 14943TextInputEditMenuOptionsModifier.identity = Symbol('textInputEditMenuOptions'); 14944 14945class TextInputWidthModifier extends ModifierWithKey { 14946 constructor(value) { 14947 super(value); 14948 } 14949 applyPeer(node, reset) { 14950 if (reset) { 14951 getUINativeModule().textInput.resetWidth(node); 14952 } else { 14953 getUINativeModule().textInput.setWidth(node, this.value); 14954 } 14955 } 14956} 14957TextInputWidthModifier.identity = Symbol('textInputWidth'); 14958class TextInputEnableHapticFeedbackModifier extends ModifierWithKey { 14959 constructor(value) { 14960 super(value); 14961 } 14962 applyPeer(node, reset) { 14963 if (reset) { 14964 getUINativeModule().textInput.resetEnableHapticFeedback(node); 14965 } 14966 else { 14967 getUINativeModule().textInput.setEnableHapticFeedback(node, this.value); 14968 } 14969 } 14970 checkObjectDiff() { 14971 return !isBaseOrResourceEqual(this.stageValue, this.value); 14972 } 14973} 14974TextInputEnableHapticFeedbackModifier.identity = Symbol('textInputEnableHapticFeedback'); 14975 14976class TextInputKeyboardAppearanceModifier extends ModifierWithKey { 14977 constructor(value) { 14978 super(value); 14979 } 14980 applyPeer(node, reset) { 14981 if (reset) { 14982 getUINativeModule().textInput.resetKeyboardAppearance(node); 14983 } 14984 else { 14985 getUINativeModule().textInput.setKeyboardAppearance(node, this.value); 14986 } 14987 } 14988 checkObjectDiff() { 14989 return !isBaseOrResourceEqual(this.stageValue, this.value); 14990 } 14991} 14992TextInputKeyboardAppearanceModifier.identity = Symbol('textInputKeyboardAppearance'); 14993 14994class TextInputStopBackPressModifier extends ModifierWithKey { 14995 constructor(value) { 14996 super(value); 14997 } 14998 applyPeer(node, reset) { 14999 if (reset) { 15000 getUINativeModule().textInput.resetStopBackPress(node); 15001 } 15002 else { 15003 getUINativeModule().textInput.setStopBackPress(node, this.value); 15004 } 15005 } 15006 checkObjectDiff() { 15007 return !isBaseOrResourceEqual(this.stageValue, this.value); 15008 } 15009} 15010TextInputStopBackPressModifier.identity = Symbol('textInputStopBackPress'); 15011 15012class ArkTextInputComponent extends ArkComponent { 15013 constructor(nativePtr, classType) { 15014 super(nativePtr, classType); 15015 } 15016 initialize(value) { 15017 if (value[0] !== undefined) { 15018 this.setPlaceholder(value[0].placeholder); 15019 this.setText(value[0].text); 15020 this.setController(value[0].controller); 15021 } 15022 return this; 15023 } 15024 setText(value) { 15025 modifierWithKey(this._modifiersWithKeys, TextInputTextModifier.identity, 15026 TextInputTextModifier, value); 15027 return this; 15028 } 15029 setPlaceholder(value) { 15030 modifierWithKey(this._modifiersWithKeys, TextInputPlaceholderModifier.identity, 15031 TextInputPlaceholderModifier, value); 15032 return this; 15033 } 15034 setController(value) { 15035 modifierWithKey(this._modifiersWithKeys, TextInputControllerModifier.identity, 15036 TextInputControllerModifier, value); 15037 return this; 15038 } 15039 15040 cancelButton(value) { 15041 modifierWithKey(this._modifiersWithKeys, TextInputCancelButtonModifier.identity, TextInputCancelButtonModifier, value); 15042 return this; 15043 } 15044 selectAll(value) { 15045 modifierWithKey(this._modifiersWithKeys, TextInputSelectAllModifier.identity, TextInputSelectAllModifier, value); 15046 return this; 15047 } 15048 enableAutoFill(value) { 15049 modifierWithKey(this._modifiersWithKeys, TextInputEnableAutoFillModifier.identity, TextInputEnableAutoFillModifier, value); 15050 return this; 15051 } 15052 passwordRules(value) { 15053 modifierWithKey(this._modifiersWithKeys, TextInputPasswordRulesModifier.identity, TextInputPasswordRulesModifier, value); 15054 return this; 15055 } 15056 showCounter(value, options) { 15057 let arkValue = new ArkTextFieldShowCounter(); 15058 arkValue.value = value; 15059 arkValue.highlightBorder = options?.highlightBorder; 15060 arkValue.thresholdPercentage = options?.thresholdPercentage; 15061 modifierWithKey(this._modifiersWithKeys, TextInputShowCounterModifier.identity, TextInputShowCounterModifier, arkValue); 15062 return this; 15063 } 15064 type(value) { 15065 modifierWithKey(this._modifiersWithKeys, TextInputTypeModifier.identity, TextInputTypeModifier, value); 15066 return this; 15067 } 15068 placeholderColor(value) { 15069 modifierWithKey(this._modifiersWithKeys, TextInputPlaceholderColorModifier.identity, TextInputPlaceholderColorModifier, value); 15070 return this; 15071 } 15072 placeholderFont(value) { 15073 modifierWithKey(this._modifiersWithKeys, TextInputPlaceholderFontModifier.identity, TextInputPlaceholderFontModifier, value); 15074 return this; 15075 } 15076 enterKeyType(value) { 15077 modifierWithKey(this._modifiersWithKeys, TextInputEnterKeyTypeModifier.identity, TextInputEnterKeyTypeModifier, value); 15078 return this; 15079 } 15080 caretColor(value) { 15081 modifierWithKey(this._modifiersWithKeys, TextInputCaretColorModifier.identity, TextInputCaretColorModifier, value); 15082 return this; 15083 } 15084 onEditChanged(callback) { 15085 modifierWithKey(this._modifiersWithKeys, TextInputOnEditChangeModifier.identity, TextInputOnEditChangeModifier, callback); 15086 return this; 15087 } 15088 onEditChange(callback) { 15089 modifierWithKey(this._modifiersWithKeys, TextInputOnEditChangeModifier.identity, TextInputOnEditChangeModifier, callback); 15090 return this; 15091 } 15092 onSubmit(callback) { 15093 modifierWithKey(this._modifiersWithKeys, TextInputOnSubmitModifier.identity, TextInputOnSubmitModifier, callback); 15094 return this; 15095 } 15096 onChange(callback) { 15097 modifierWithKey(this._modifiersWithKeys, TextInputOnChangeModifier.identity, TextInputOnChangeModifier, callback); 15098 return this; 15099 } 15100 onTextSelectionChange(callback) { 15101 modifierWithKey(this._modifiersWithKeys, TextInputOnTextSelectionChangeModifier.identity, TextInputOnTextSelectionChangeModifier, callback); 15102 return this; 15103 } 15104 onContentScroll(callback) { 15105 modifierWithKey(this._modifiersWithKeys, TextInputOnContentScrollModifier.identity, TextInputOnContentScrollModifier, callback); 15106 return this; 15107 } 15108 maxLength(value) { 15109 modifierWithKey(this._modifiersWithKeys, TextInputMaxLengthModifier.identity, TextInputMaxLengthModifier, value); 15110 return this; 15111 } 15112 fontColor(value) { 15113 modifierWithKey(this._modifiersWithKeys, TextInputFontColorModifier.identity, TextInputFontColorModifier, value); 15114 return this; 15115 } 15116 fontSize(value) { 15117 modifierWithKey(this._modifiersWithKeys, TextInputFontSizeModifier.identity, TextInputFontSizeModifier, value); 15118 return this; 15119 } 15120 fontStyle(value) { 15121 modifierWithKey(this._modifiersWithKeys, TextInputFontStyleModifier.identity, TextInputFontStyleModifier, value); 15122 return this; 15123 } 15124 fontWeight(value) { 15125 modifierWithKey(this._modifiersWithKeys, TextInputFontWeightModifier.identity, TextInputFontWeightModifier, value); 15126 return this; 15127 } 15128 fontFamily(value) { 15129 modifierWithKey(this._modifiersWithKeys, TextInputFontFamilyModifier.identity, TextInputFontFamilyModifier, value); 15130 return this; 15131 } 15132 inputFilter(value, error) { 15133 let arkValue = new ArkTextInputFilter(); 15134 arkValue.value = value; 15135 arkValue.error = error; 15136 modifierWithKey(this._modifiersWithKeys, TextInputFilterModifier.identity, TextInputFilterModifier, arkValue); 15137 return this; 15138 } 15139 onCopy(callback) { 15140 modifierWithKey(this._modifiersWithKeys, TextInputOnCopyModifier.identity, TextInputOnCopyModifier, callback); 15141 return this; 15142 } 15143 onCut(callback) { 15144 modifierWithKey(this._modifiersWithKeys, TextInputOnCutModifier.identity, TextInputOnCutModifier, callback); 15145 return this; 15146 } 15147 onPaste(callback) { 15148 modifierWithKey(this._modifiersWithKeys, TextInputOnPasteModifier.identity, TextInputOnPasteModifier, callback); 15149 return this; 15150 } 15151 copyOption(value) { 15152 modifierWithKey(this._modifiersWithKeys, TextInputCopyOptionModifier.identity, TextInputCopyOptionModifier, value); 15153 return this; 15154 } 15155 showPasswordIcon(value) { 15156 modifierWithKey(this._modifiersWithKeys, TextInputShowPasswordIconModifier.identity, TextInputShowPasswordIconModifier, value); 15157 return this; 15158 } 15159 showPassword(value) { 15160 modifierWithKey(this._modifiersWithKeys, TextInputShowPasswordModifier.identity, TextInputShowPasswordModifier, value); 15161 return this; 15162 } 15163 textAlign(value) { 15164 modifierWithKey(this._modifiersWithKeys, TextInputTextAlignModifier.identity, TextInputTextAlignModifier, value); 15165 return this; 15166 } 15167 style(value) { 15168 modifierWithKey(this._modifiersWithKeys, TextInputStyleModifier.identity, TextInputStyleModifier, value); 15169 return this; 15170 } 15171 caretStyle(value) { 15172 modifierWithKey(this._modifiersWithKeys, TextInputCaretStyleModifier.identity, TextInputCaretStyleModifier, value); 15173 return this; 15174 } 15175 selectedBackgroundColor(value) { 15176 modifierWithKey(this._modifiersWithKeys, TextInputSelectedBackgroundColorModifier.identity, TextInputSelectedBackgroundColorModifier, value); 15177 return this; 15178 } 15179 caretPosition(value) { 15180 modifierWithKey(this._modifiersWithKeys, TextInputCaretPositionModifier.identity, TextInputCaretPositionModifier, value); 15181 return this; 15182 } 15183 enableKeyboardOnFocus(value) { 15184 modifierWithKey(this._modifiersWithKeys, TextInputEnableKeyboardOnFocusModifier.identity, TextInputEnableKeyboardOnFocusModifier, value); 15185 return this; 15186 } 15187 passwordIcon(value) { 15188 modifierWithKey(this._modifiersWithKeys, TextInputPasswordIconModifier.identity, TextInputPasswordIconModifier, value); 15189 return this; 15190 } 15191 showError(value) { 15192 modifierWithKey(this._modifiersWithKeys, TextInputShowErrorModifier.identity, TextInputShowErrorModifier, value); 15193 return this; 15194 } 15195 showUnit(event) { 15196 throw new Error('Method not implemented.'); 15197 } 15198 showUnderline(value) { 15199 modifierWithKey(this._modifiersWithKeys, TextInputShowUnderlineModifier.identity, TextInputShowUnderlineModifier, value); 15200 return this; 15201 } 15202 fontFeature(value) { 15203 modifierWithKey(this._modifiersWithKeys, TextInputFontFeatureModifier.identity, TextInputFontFeatureModifier, value); 15204 return this; 15205 } 15206 selectionMenuHidden(value) { 15207 modifierWithKey(this._modifiersWithKeys, TextInputSelectionMenuHiddenModifier.identity, TextInputSelectionMenuHiddenModifier, value); 15208 return this; 15209 } 15210 barState(value) { 15211 modifierWithKey(this._modifiersWithKeys, TextInputBarStateModifier.identity, TextInputBarStateModifier, value); 15212 return this; 15213 } 15214 maxLines(value) { 15215 modifierWithKey(this._modifiersWithKeys, TextInputMaxLinesModifier.identity, TextInputMaxLinesModifier, value); 15216 return this; 15217 } 15218 customKeyboard(event) { 15219 throw new Error('Method not implemented.'); 15220 } 15221 decoration(value) { 15222 modifierWithKey(this._modifiersWithKeys, TextInputDecorationModifier.identity, TextInputDecorationModifier, value); 15223 return this; 15224 } 15225 letterSpacing(value) { 15226 modifierWithKey(this._modifiersWithKeys, TextInputLetterSpacingModifier.identity, TextInputLetterSpacingModifier, value); 15227 return this; 15228 } 15229 lineHeight(value) { 15230 modifierWithKey(this._modifiersWithKeys, TextInputLineHeightModifier.identity, TextInputLineHeightModifier, value); 15231 return this; 15232 } 15233 underlineColor(value) { 15234 modifierWithKey(this._modifiersWithKeys, TextInputUnderlineColorModifier.identity, TextInputUnderlineColorModifier, value); 15235 return this; 15236 } 15237 wordBreak(value) { 15238 modifierWithKey(this._modifiersWithKeys, TextInputWordBreakModifier.identity, TextInputWordBreakModifier, value); 15239 return this; 15240 } 15241 lineBreakStrategy(value) { 15242 modifierWithKey(this._modifiersWithKeys, TextInputLineBreakStrategyModifier.identity, 15243 TextInputLineBreakStrategyModifier, value); 15244 return this; 15245 } 15246 minFontSize(value) { 15247 modifierWithKey(this._modifiersWithKeys, TextInputMinFontSizeModifier.identity, TextInputMinFontSizeModifier, value); 15248 return this; 15249 } 15250 maxFontSize(value) { 15251 modifierWithKey(this._modifiersWithKeys, TextInputMaxFontSizeModifier.identity, TextInputMaxFontSizeModifier, value); 15252 return this; 15253 } 15254 heightAdaptivePolicy(value) { 15255 modifierWithKey(this._modifiersWithKeys, TextInputHeightAdaptivePolicyModifier.identity, TextInputHeightAdaptivePolicyModifier, value); 15256 return this; 15257 } 15258 textOverflow(value) { 15259 modifierWithKey(this._modifiersWithKeys, TextInputTextOverflowModifier.identity, TextInputTextOverflowModifier, value); 15260 return this; 15261 } 15262 textIndent(value) { 15263 modifierWithKey(this._modifiersWithKeys, TextInputTextIndentModifier.identity, TextInputTextIndentModifier, value); 15264 return this; 15265 } 15266 padding(value) { 15267 let arkValue = new ArkPadding(); 15268 if (value !== null && value !== undefined) { 15269 if (isLengthType(value) || isResource(value)) { 15270 arkValue.top = value; 15271 arkValue.right = value; 15272 arkValue.bottom = value; 15273 arkValue.left = value; 15274 } 15275 else { 15276 arkValue.top = value.top; 15277 arkValue.right = value.right; 15278 arkValue.bottom = value.bottom; 15279 arkValue.left = value.left; 15280 } 15281 modifierWithKey(this._modifiersWithKeys, TextInputPaddingModifier.identity, TextInputPaddingModifier, arkValue); 15282 } 15283 else { 15284 modifierWithKey(this._modifiersWithKeys, TextInputPaddingModifier.identity, TextInputPaddingModifier, undefined); 15285 } 15286 return this; 15287 } 15288 contentType(value) { 15289 modifierWithKey(this._modifiersWithKeys, TextInputContentTypeModifier.identity, TextInputContentTypeModifier, value); 15290 return this; 15291 } 15292 border(value) { 15293 let arkBorder = valueToArkBorder(value); 15294 modifierWithKey(this._modifiersWithKeys, TextInputBorderModifier.identity, TextInputBorderModifier, arkBorder); 15295 return this; 15296 } 15297 borderWidth(value) { 15298 modifierWithKey(this._modifiersWithKeys, TextInputBorderWidthModifier.identity, TextInputBorderWidthModifier, value); 15299 return this; 15300 } 15301 borderColor(value) { 15302 modifierWithKey(this._modifiersWithKeys, TextInputBorderColorModifier.identity, TextInputBorderColorModifier, value); 15303 return this; 15304 } 15305 borderStyle(value) { 15306 modifierWithKey(this._modifiersWithKeys, TextInputBorderStyleModifier.identity, TextInputBorderStyleModifier, value); 15307 return this; 15308 } 15309 borderRadius(value) { 15310 modifierWithKey(this._modifiersWithKeys, TextInputBorderRadiusModifier.identity, TextInputBorderRadiusModifier, value); 15311 return this; 15312 } 15313 backgroundColor(value) { 15314 modifierWithKey(this._modifiersWithKeys, TextInputBackgroundColorModifier.identity, TextInputBackgroundColorModifier, value); 15315 return this; 15316 } 15317 margin(value) { 15318 let arkValue = new ArkPadding(); 15319 if (value !== null && value !== undefined) { 15320 if (isLengthType(value) || isResource(value)) { 15321 arkValue.top = value; 15322 arkValue.right = value; 15323 arkValue.bottom = value; 15324 arkValue.left = value; 15325 } 15326 else { 15327 arkValue.top = value.top; 15328 arkValue.right = value.right; 15329 arkValue.bottom = value.bottom; 15330 arkValue.left = value.left; 15331 } 15332 modifierWithKey(this._modifiersWithKeys, TextInputMarginModifier.identity, TextInputMarginModifier, arkValue); 15333 } 15334 else { 15335 modifierWithKey(this._modifiersWithKeys, TextInputMarginModifier.identity, TextInputMarginModifier, undefined); 15336 } 15337 return this; 15338 } 15339 onWillChange(callback) { 15340 modifierWithKey(this._modifiersWithKeys, TextInputOnWillChangeModifier.identity, TextInputOnWillChangeModifier, callback); 15341 return this; 15342 } 15343 onWillInsert(callback) { 15344 modifierWithKey(this._modifiersWithKeys, TextInputOnWillInsertModifier.identity, TextInputOnWillInsertModifier, callback); 15345 return this; 15346 } 15347 onDidInsert(callback) { 15348 modifierWithKey(this._modifiersWithKeys, TextInputOnDidInsertModifier.identity, TextInputOnDidInsertModifier, callback); 15349 return this; 15350 } 15351 onWillDelete(callback) { 15352 modifierWithKey(this._modifiersWithKeys, TextInputOnWillDeleteModifier.identity, TextInputOnWillDeleteModifier, callback); 15353 return this; 15354 } 15355 onDidDelete(callback) { 15356 modifierWithKey(this._modifiersWithKeys, TextInputOnDidDeleteModifier.identity, TextInputOnDidDeleteModifier, callback); 15357 return this; 15358 } 15359 enablePreviewText(value) { 15360 modifierWithKey(this._modifiersWithKeys, TextInputEnablePreviewTextModifier.identity, TextInputEnablePreviewTextModifier, value); 15361 return this; 15362 } 15363 editMenuOptions(value) { 15364 modifierWithKey(this._modifiersWithKeys, TextInputEditMenuOptionsModifier.identity, 15365 TextInputEditMenuOptionsModifier, value); 15366 return this; 15367 } 15368 width(value) { 15369 modifierWithKey(this._modifiersWithKeys, TextInputWidthModifier.identity, TextInputWidthModifier, value); 15370 return this; 15371 } 15372 enableHapticFeedback(value) { 15373 modifierWithKey(this._modifiersWithKeys, TextInputEnableHapticFeedbackModifier.identity, TextInputEnableHapticFeedbackModifier, value); 15374 return this; 15375 } 15376 stopBackPress(value) { 15377 modifierWithKey(this._modifiersWithKeys, TextInputStopBackPressModifier.identity, TextInputStopBackPressModifier, value); 15378 return this; 15379 } 15380 keyboardAppearance(value) { 15381 modifierWithKey(this._modifiersWithKeys, TextInputKeyboardAppearanceModifier.identity, TextInputKeyboardAppearanceModifier, value); 15382 return this; 15383 } 15384} 15385// @ts-ignore 15386if (globalThis.TextInput !== undefined) { 15387 globalThis.TextInput.attributeModifier = function (modifier) { 15388 attributeModifierFunc.call(this, modifier, (nativePtr) => { 15389 return new ArkTextInputComponent(nativePtr); 15390 }, (nativePtr, classType, modifierJS) => { 15391 return new modifierJS.TextInputModifier(nativePtr, classType); 15392 }); 15393 }; 15394} 15395 15396/// <reference path='./import.ts' /> 15397class VideoObjectFitModifier extends ModifierWithKey { 15398 constructor(value) { 15399 super(value); 15400 } 15401 applyPeer(node, reset) { 15402 if (reset) { 15403 getUINativeModule().video.resetObjectFit(node); 15404 } 15405 else { 15406 getUINativeModule().video.setObjectFit(node, this.value); 15407 } 15408 } 15409 checkObjectDiff() { 15410 return !isBaseOrResourceEqual(this.stageValue, this.value); 15411 } 15412} 15413VideoObjectFitModifier.identity = Symbol('videoObjectFit'); 15414class VideoAutoPlayModifier extends ModifierWithKey { 15415 constructor(value) { 15416 super(value); 15417 } 15418 applyPeer(node, reset) { 15419 if (reset) { 15420 getUINativeModule().video.resetAutoPlay(node); 15421 } 15422 else { 15423 getUINativeModule().video.setAutoPlay(node, this.value); 15424 } 15425 } 15426 checkObjectDiff() { 15427 return !isBaseOrResourceEqual(this.stageValue, this.value); 15428 } 15429} 15430VideoAutoPlayModifier.identity = Symbol('videoAutoPlayr'); 15431class VideoControlsModifier extends ModifierWithKey { 15432 constructor(value) { 15433 super(value); 15434 } 15435 applyPeer(node, reset) { 15436 if (reset) { 15437 getUINativeModule().video.resetControls(node); 15438 } 15439 else { 15440 getUINativeModule().video.setControls(node, this.value); 15441 } 15442 } 15443 checkObjectDiff() { 15444 return !isBaseOrResourceEqual(this.stageValue, this.value); 15445 } 15446} 15447VideoControlsModifier.identity = Symbol('videoControls'); 15448class VideoLoopModifier extends ModifierWithKey { 15449 constructor(value) { 15450 super(value); 15451 } 15452 applyPeer(node, reset) { 15453 if (reset) { 15454 getUINativeModule().video.resetLoop(node); 15455 } 15456 else { 15457 getUINativeModule().video.setLoop(node, this.value); 15458 } 15459 } 15460 checkObjectDiff() { 15461 return !isBaseOrResourceEqual(this.stageValue, this.value); 15462 } 15463} 15464VideoLoopModifier.identity = Symbol('videoLoop'); 15465class VideoMutedModifier extends ModifierWithKey { 15466 constructor(value) { 15467 super(value); 15468 } 15469 applyPeer(node, reset) { 15470 if (reset) { 15471 getUINativeModule().video.resetMuted(node); 15472 } 15473 else { 15474 getUINativeModule().video.setMuted(node, this.value); 15475 } 15476 } 15477 checkObjectDiff() { 15478 return !isBaseOrResourceEqual(this.stageValue, this.value); 15479 } 15480} 15481VideoMutedModifier.identity = Symbol('videoMuted'); 15482class VideoOpacityModifier extends ModifierWithKey { 15483 constructor(value) { 15484 super(value); 15485 } 15486 applyPeer(node, reset) { 15487 if (reset) { 15488 getUINativeModule().video.resetOpacity(node); 15489 } 15490 else { 15491 getUINativeModule().video.setOpacity(node, this.value); 15492 } 15493 } 15494 checkObjectDiff() { 15495 return !isBaseOrResourceEqual(this.stageValue, this.value); 15496 } 15497} 15498VideoOpacityModifier.identity = Symbol('videoOpacity'); 15499class VideoSurfaceBackgroundColorModifier extends ModifierWithKey { 15500 constructor(value) { 15501 super(value); 15502 } 15503 applyPeer(node, reset) { 15504 if (reset) { 15505 getUINativeModule().video.resetVideoSurfaceBackgroundColor(node); 15506 } 15507 else { 15508 getUINativeModule().video.setVideoSurfaceBackgroundColor(node, this.value); 15509 } 15510 } 15511 checkObjectDiff() { 15512 return !isBaseOrResourceEqual(this.stageValue, this.value); 15513 } 15514} 15515VideoSurfaceBackgroundColorModifier.identity = Symbol('videoSurfaceBackgroundColor'); 15516class VideoTransitionModifier extends ModifierWithKey { 15517 constructor(value) { 15518 super(value); 15519 } 15520 applyPeer(node, reset) { 15521 if (reset) { 15522 getUINativeModule().video.resetTransition(node); 15523 } 15524 else { 15525 getUINativeModule().video.setTransition(node, this.value); 15526 } 15527 } 15528 checkObjectDiff() { 15529 return true; 15530 } 15531} 15532VideoTransitionModifier.identity = Symbol('videoTransition'); 15533class VideoEnableShortcutKeyModifier extends ModifierWithKey { 15534 constructor(value) { 15535 super(value); 15536 } 15537 applyPeer(node, reset) { 15538 if (reset) { 15539 getUINativeModule().video.resetShortcutKeyEnabled(node); 15540 } else { 15541 getUINativeModule().video.setShortcutKeyEnabled(node, this.value); 15542 } 15543 } 15544 checkObjectDiff() { 15545 return !isBaseOrResourceEqual(this.stageValue, this.value); 15546 } 15547} 15548VideoEnableShortcutKeyModifier.identity = Symbol('videoEnableShortcutKey'); 15549class ArkVideoComponent extends ArkComponent { 15550 constructor(nativePtr, classType) { 15551 super(nativePtr, classType); 15552 } 15553 muted(value) { 15554 modifierWithKey(this._modifiersWithKeys, VideoMutedModifier.identity, VideoMutedModifier, value); 15555 return this; 15556 } 15557 autoPlay(value) { 15558 modifierWithKey(this._modifiersWithKeys, VideoAutoPlayModifier.identity, VideoAutoPlayModifier, value); 15559 return this; 15560 } 15561 surfaceBackgroundColor(value) { 15562 modifierWithKey(this._modifiersWithKeys, VideoSurfaceBackgroundColorModifier.identity, 15563 VideoSurfaceBackgroundColorModifier, value); 15564 return this; 15565 } 15566 controls(value) { 15567 modifierWithKey(this._modifiersWithKeys, VideoControlsModifier.identity, VideoControlsModifier, value); 15568 return this; 15569 } 15570 loop(value) { 15571 modifierWithKey(this._modifiersWithKeys, VideoLoopModifier.identity, VideoLoopModifier, value); 15572 return this; 15573 } 15574 objectFit(value) { 15575 modifierWithKey(this._modifiersWithKeys, VideoObjectFitModifier.identity, VideoObjectFitModifier, value); 15576 return this; 15577 } 15578 enableShortcutKey(value) { 15579 modifierWithKey(this._modifiersWithKeys, VideoEnableShortcutKeyModifier.identity, VideoEnableShortcutKeyModifier, value); 15580 return this; 15581 } 15582 opacity(value) { 15583 modifierWithKey(this._modifiersWithKeys, VideoOpacityModifier.identity, VideoOpacityModifier, value); 15584 return this; 15585 } 15586 transition(value) { 15587 modifierWithKey(this._modifiersWithKeys, VideoTransitionModifier.identity, VideoTransitionModifier, value); 15588 return this; 15589 } 15590 onStart(callback) { 15591 throw new Error('Method not implemented.'); 15592 } 15593 onPause(callback) { 15594 throw new Error('Method not implemented.'); 15595 } 15596 onFinish(event) { 15597 throw new Error('Method not implemented.'); 15598 } 15599 onFullscreenChange(callback) { 15600 throw new Error('Method not implemented.'); 15601 } 15602 onPrepared(callback) { 15603 throw new Error('Method not implemented.'); 15604 } 15605 onSeeking(callback) { 15606 throw new Error('Method not implemented.'); 15607 } 15608 onSeeked(callback) { 15609 throw new Error('Method not implemented.'); 15610 } 15611 onUpdate(callback) { 15612 throw new Error('Method not implemented.'); 15613 } 15614 onError(callback) { 15615 throw new Error('Method not implemented.'); 15616 } 15617 onStop(callback) { 15618 throw new Error('Method not implemented.'); 15619 } 15620} 15621// @ts-ignore 15622if (globalThis.Video !== undefined) { 15623 globalThis.Video.attributeModifier = function (modifier) { 15624 attributeModifierFunc.call(this, modifier, (nativePtr) => { 15625 return new ArkVideoComponent(nativePtr); 15626 }, (nativePtr, classType, modifierJS) => { 15627 return new modifierJS.VideoModifier(nativePtr, classType); 15628 }); 15629 }; 15630} 15631 15632/// <reference path='./import.ts' /> 15633class ArkBorderStyle { 15634 constructor() { 15635 this.type = undefined; 15636 this.style = undefined; 15637 this.top = undefined; 15638 this.right = undefined; 15639 this.bottom = undefined; 15640 this.left = undefined; 15641 } 15642 isEqual(another) { 15643 return (this.type === another.type && 15644 this.style === another.style && 15645 this.top === another.top && 15646 this.right === another.right && 15647 this.bottom === another.bottom && 15648 this.left === another.left); 15649 } 15650 parseBorderStyle(value) { 15651 if (typeof value === 'number') { 15652 this.style = value; 15653 this.type = true; 15654 return true; 15655 } 15656 else if (typeof value === 'object') { 15657 return this.parseEdgeStyles(value); 15658 } 15659 return false; 15660 } 15661 parseEdgeStyles(options) { 15662 this.top = options.top; 15663 this.right = options.right; 15664 this.bottom = options.bottom; 15665 this.left = options.left; 15666 this.type = true; 15667 return true; 15668 } 15669} 15670class ArkBorderColor { 15671 constructor() { 15672 this.startColor = undefined; 15673 this.endColor = undefined; 15674 this.leftColor = undefined; 15675 this.rightColor = undefined; 15676 this.topColor = undefined; 15677 this.bottomColor = undefined; 15678 } 15679 isEqual(another) { 15680 return (this.leftColor === another.leftColor && 15681 this.rightColor === another.rightColor && 15682 this.topColor === another.topColor && 15683 this.bottomColor === another.bottomColor && 15684 this.startColor === another.startColor && 15685 this.endColor === another.endColor); 15686 } 15687} 15688class ArkBorderWidth { 15689 constructor() { 15690 this.start = undefined; 15691 this.end = undefined; 15692 this.left = undefined; 15693 this.right = undefined; 15694 this.top = undefined; 15695 this.bottom = undefined; 15696 } 15697 isEqual(another) { 15698 return (this.left === another.left && 15699 this.right === another.right && 15700 this.top === another.top && 15701 this.bottom === another.bottom && 15702 this.start === another.start && 15703 this.end === another.end); 15704 } 15705} 15706class ArkBorderRadius { 15707 constructor() { 15708 this.topStart = undefined; 15709 this.topEnd = undefined; 15710 this.bottomStart = undefined; 15711 this.bottomEnd = undefined; 15712 this.topLeft = undefined; 15713 this.topRight = undefined; 15714 this.bottomLeft = undefined; 15715 this.bottomRight = undefined; 15716 } 15717 isEqual(another) { 15718 return (this.topLeft === another.topLeft && 15719 this.topRight === another.topRight && 15720 this.bottomLeft === another.bottomLeft && 15721 this.bottomRight === another.bottomRight && 15722 this.topStart === another.topStart && 15723 this.topEnd === another.topEnd && 15724 this.bottomStart === another.bottomStart && 15725 this.bottomEnd === another.bottomEnd); 15726 } 15727} 15728class ArkLabelFont { 15729 constructor() { 15730 this.size = undefined; 15731 this.weight = undefined; 15732 this.family = undefined; 15733 this.style = undefined; 15734 } 15735 isEqual(another) { 15736 return (this.size === another.size && 15737 this.weight === another.weight && 15738 this.family === another.family && 15739 this.style === another.style); 15740 } 15741} 15742function deepCompareArrays(arr1, arr2) { 15743 return (Array.isArray(arr1) && 15744 Array.isArray(arr2) && 15745 arr1.length === arr2.length && 15746 arr1.every((value, index) => { 15747 if (Array.isArray(value) && Array.isArray(arr2[index])) { 15748 return deepCompareArrays(value, arr2[index]); 15749 } 15750 else { 15751 return value === arr2[index]; 15752 } 15753 })); 15754} 15755class ArkLinearGradient { 15756 constructor(angle, direction, colors, repeating) { 15757 this.angle = angle; 15758 this.direction = direction; 15759 this.colors = colors; 15760 this.repeating = repeating; 15761 } 15762 isEqual(another) { 15763 return (this.angle === another.angle && 15764 this.direction === another.direction && 15765 deepCompareArrays(this.colors, another.colors) && 15766 this.repeating === another.repeating); 15767 } 15768} 15769class ArkSweepGradient { 15770 constructor(center, start, end, rotation, colors, repeating) { 15771 this.center = center; 15772 this.start = start; 15773 this.end = end; 15774 this.rotation = rotation; 15775 this.colors = colors; 15776 this.repeating = repeating; 15777 } 15778 isEqual(another) { 15779 return (deepCompareArrays(this.center, another.center) && 15780 this.start === another.start && 15781 this.end === another.end && 15782 this.rotation === another.rotation && 15783 deepCompareArrays(this.colors, another.colors) && 15784 this.repeating === another.repeating); 15785 } 15786} 15787class ArkForegroundBlurStyle { 15788 constructor() { 15789 this.blurStyle = undefined; 15790 this.colorMode = undefined; 15791 this.adaptiveColor = undefined; 15792 this.scale = undefined; 15793 this.blurOptions = undefined; 15794 } 15795 isEqual(another) { 15796 return (this.blurStyle === another.blurStyle && 15797 this.colorMode === another.colorMode && 15798 this.adaptiveColor === another.adaptiveColor && 15799 this.scale === another.scale && 15800 this.blurOptions === another.blurOptions); 15801 } 15802} 15803class ArkLinearGradientBlur { 15804 constructor() { 15805 this.blurRadius = undefined; 15806 this.fractionStops = undefined; 15807 this.direction = undefined; 15808 } 15809 isEqual(another) { 15810 return (this.blurRadius === another.blurRadius && 15811 deepCompareArrays(this.fractionStops, another.fractionStops) && 15812 this.direction === another.direction); 15813 } 15814} 15815class ArkOverlay { 15816 constructor() { 15817 this.value = undefined; 15818 this.align = undefined; 15819 this.offsetX = undefined; 15820 this.offsetY = undefined; 15821 this.hasOptions = undefined; 15822 this.hasOffset = undefined; 15823 } 15824 splitOption(options) { 15825 if (isUndefined(options)) { 15826 return true; 15827 } 15828 this.hasOptions = true; 15829 this.align = options.align; 15830 if (isUndefined(options.offset)) { 15831 return true; 15832 } 15833 this.hasOffset = true; 15834 this.offsetX = options.offset.x; 15835 this.offsetY = options.offset.y; 15836 return true; 15837 } 15838 splitOverlayValue(value, options) { 15839 if (typeof value === 'string') { 15840 this.value = value; 15841 return this.splitOption(options); 15842 } 15843 return false; 15844 } 15845 isEqual(another) { 15846 return ((this.value === another.value) && (this.align === another.align) && 15847 (this.offsetX === another.offsetX) && (this.offsetY === another.offsetY) && 15848 (this.hasOptions === another.hasOptions) && (this.hasOffset === another.hasOffset)); 15849 } 15850 checkObjectDiff(another) { 15851 return !this.isEqual(another); 15852 } 15853} 15854class ArkSharedTransition { 15855 constructor() { 15856 this.id = undefined; 15857 this.options = undefined; 15858 } 15859 isEqual(another) { 15860 return (this.id === another.id) && (this.options === another.options); 15861 } 15862} 15863class ArkListEdgeEffect { 15864 constructor() { 15865 this.value = undefined; 15866 this.options = undefined; 15867 } 15868 isEqual(another) { 15869 return (this.value === another.value) && 15870 (this.options === another.options); 15871 } 15872} 15873class ArkFadingEdge { 15874 constructor() { 15875 this.value = undefined; 15876 this.options = undefined; 15877 } 15878 isEqual(another) { 15879 return (this.value === another.value) && 15880 (this.options === another.options); 15881 } 15882} 15883class ArkScrollEdgeEffect { 15884 constructor() { 15885 this.value = undefined; 15886 this.options = undefined; 15887 } 15888 isEqual(another) { 15889 return (this.value === another.value) && 15890 (this.options === another.options); 15891 } 15892} 15893class ArkBlurOptions { 15894 constructor() { 15895 this.value = undefined; 15896 this.options = undefined; 15897 } 15898} 15899class InvertOptions { 15900 constructor() { 15901 this.high = undefined; 15902 this.low = undefined; 15903 this.threshold = undefined; 15904 this.thresholdRange = undefined; 15905 } 15906} 15907class ArkMenuAlignType { 15908 constructor(alignType, offset) { 15909 this.alignType = alignType; 15910 if (!isUndefined(offset) && isObject(offset)) { 15911 this.dx = offset.dx; 15912 this.dy = offset.dy; 15913 } 15914 } 15915 isEqual(another) { 15916 return this.alignType === another.alignType && this.dx === another.dx && this.dy === another.dy; 15917 } 15918} 15919 15920class ArkSelection { 15921 constructor() { 15922 this.selectionStart = undefined; 15923 this.selectionEnd = undefined; 15924 } 15925 isEqual(another) { 15926 return this.selectionStart === another.selectionStart && 15927 this.selectionEnd === another.selectionEnd; 15928 } 15929} 15930 15931class TextDataDetectorConfig { 15932 constructor() { 15933 this.types = undefined; 15934 this.onDetectResultUpdate = undefined; 15935 this.color = undefined; 15936 this.decorationType = undefined; 15937 this.decorationColor = undefined; 15938 this.decorationStyle = undefined; 15939 } 15940 isEqual(another) { 15941 return (this.types === another.types) && (this.onDetectResultUpdate === another.onDetectResultUpdate) && 15942 (this.color === another.color) && (this.decorationType === another.decorationType) && 15943 (this.decorationColor === another.decorationColor) && (this.decorationStyle === another.decorationStyle); 15944 } 15945} 15946 15947class ArkSliderTips { 15948 constructor(value, content) { 15949 this.showTip = value; 15950 this.tipText = content; 15951 } 15952 isEqual(another) { 15953 return this.showTip === another.showTip && this.tipText === another.tipText; 15954 } 15955} 15956class ArkStarStyle { 15957 constructor() { 15958 this.backgroundUri = undefined; 15959 this.foregroundUri = undefined; 15960 this.secondaryUri = undefined; 15961 } 15962 isEqual(another) { 15963 return (this.backgroundUri === another.backgroundUri && 15964 this.foregroundUri === another.foregroundUri && 15965 this.secondaryUri === another.secondaryUri); 15966 } 15967} 15968class ArkBackgroundBlurStyle { 15969 constructor() { 15970 this.blurStyle = undefined; 15971 this.colorMode = undefined; 15972 this.adaptiveColor = undefined; 15973 this.scale = undefined; 15974 this.blurOptions = undefined; 15975 this.policy = undefined; 15976 this.inactiveColor = undefined; 15977 this.type = undefined; 15978 } 15979 isEqual(another) { 15980 return (this.blurStyle === another.blurStyle && 15981 this.colorMode === another.colorMode && 15982 this.adaptiveColor === another.adaptiveColor && 15983 this.scale === another.scale && 15984 this.blurOptions === another.blurOptions && 15985 this.policy === another.policy && 15986 this.inactiveColor === another.inactiveColor && 15987 this.type === another.type); 15988 } 15989} 15990class ArkBorderDashGap { 15991 constructor() { 15992 this.left = undefined; 15993 this.right = undefined; 15994 this.top = undefined; 15995 this.bottom = undefined; 15996 } 15997 isEqual(another) { 15998 return (this.left === another.left && 15999 this.right === another.right && 16000 this.top === another.top && 16001 this.bottom === another.bottom); 16002 } 16003} 16004class ArkBorderDashWidth { 16005 constructor() { 16006 this.left = undefined; 16007 this.right = undefined; 16008 this.top = undefined; 16009 this.bottom = undefined; 16010 } 16011 isEqual(another) { 16012 return (this.left === another.left && 16013 this.right === another.right && 16014 this.top === another.top && 16015 this.bottom === another.bottom); 16016 } 16017} 16018class ArkBorder { 16019 constructor() { 16020 this.arkWidth = new ArkBorderWidth(); 16021 this.arkColor = new ArkBorderColor(); 16022 this.arkRadius = new ArkBorderRadius(); 16023 this.arkStyle = new ArkBorderStyle(); 16024 this.arkDashGap = new ArkBorderDashGap(); 16025 this.arkDashWidth = new ArkBorderDashWidth(); 16026 } 16027 isEqual(another) { 16028 return (this.arkWidth.isEqual(another.arkWidth) && 16029 this.arkColor.isEqual(another.arkColor) && 16030 this.arkRadius.isEqual(another.arkRadius) && 16031 this.arkStyle.isEqual(another.arkStyle) && 16032 this.arkDashGap.isEqual(another.arkDashGap) && 16033 this.arkDashWidth.isEqual(another.arkDashWidth)); 16034 } 16035 checkObjectDiff(another) { 16036 return !this.isEqual(another); 16037 } 16038} 16039class ArkBackgroundImageSize { 16040 constructor() { 16041 this.imageSize = undefined; 16042 this.width = undefined; 16043 this.height = undefined; 16044 } 16045 isEqual(another) { 16046 return this.imageSize === another.imageSize && this.width === another.width && this.height === another.height; 16047 } 16048} 16049class ArkBackgroundImage { 16050 constructor() { 16051 this.src = undefined; 16052 this.repeat = undefined; 16053 } 16054 isEqual(another) { 16055 return this.src === another.src && this.repeat === another.repeat; 16056 } 16057} 16058class ArkGridColColumnOption { 16059 constructor() { 16060 this.xs = undefined; 16061 this.sm = undefined; 16062 this.md = undefined; 16063 this.lg = undefined; 16064 this.xl = undefined; 16065 this.xxl = undefined; 16066 } 16067 isEqual(another) { 16068 return (this.xs === another.xs && 16069 this.sm === another.sm && 16070 this.md === another.md && 16071 this.lg === another.lg && 16072 this.xl === another.xl && 16073 this.xxl === another.xxl); 16074 } 16075} 16076class ArkPadding { 16077 constructor() { 16078 this.top = undefined; 16079 this.right = undefined; 16080 this.bottom = undefined; 16081 this.left = undefined; 16082 } 16083 isEqual(another) { 16084 return (this.top === another.top && 16085 this.right === another.right && 16086 this.bottom === another.bottom && 16087 this.left === another.left); 16088 } 16089} 16090 16091class ArkBarMode { 16092 isEqual(another) { 16093 return (this.barMode === another.barMode) && (this.options === another.options); 16094 } 16095} 16096class ArkDivider { 16097 isEqual(another) { 16098 return (this.divider === another.divider); 16099 } 16100} 16101class ArkBarGridAlign { 16102 isEqual(another) { 16103 return (this.barGridAlign === another.barGridAlign); 16104 } 16105} 16106class ArkScrollableBarModeOptions { 16107 isEqual(another) { 16108 return (this.value === another.value); 16109 } 16110} 16111class ArkAlignRules { 16112 constructor() { 16113 this.left = undefined; 16114 this.middle = undefined; 16115 this.right = undefined; 16116 this.top = undefined; 16117 this.center = undefined; 16118 this.bottom = undefined; 16119 } 16120 isEqual(another) { 16121 return (this.left === another.left && 16122 this.middle === another.middle && 16123 this.right === another.right && 16124 this.top === another.top && 16125 this.center === another.center && 16126 this.bottom === another.bottom); 16127 } 16128} 16129class ArkSafeAreaExpandOpts { 16130 constructor() { 16131 this.type = undefined; 16132 this.edges = undefined; 16133 } 16134 isEqual(another) { 16135 return (this.type === another.type) && (this.edges === another.edges); 16136 } 16137} 16138class ArkButtonStyle { 16139 constructor() { 16140 this.left = 16; 16141 this.top = 48; 16142 this.width = 24; 16143 this.height = 24; 16144 this.icons = { 16145 shown: undefined, 16146 hidden: undefined, 16147 switching: undefined 16148 }; 16149 } 16150 isEqual(another) { 16151 return (this.left === another.left && 16152 this.top === another.top && 16153 this.width === another.width && 16154 this.height === another.height && 16155 this.icons === another.icons); 16156 } 16157} 16158class ArkShadowInfoToArray { 16159 constructor() { 16160 this.radius = []; 16161 this.type = []; 16162 this.color = []; 16163 this.offsetX = []; 16164 this.offsetX = []; 16165 this.offsetY = []; 16166 this.fill = []; 16167 } 16168 isEqual(another) { 16169 return (this.radius === another.radius) && 16170 (this.color === another.color) && 16171 (this.offsetX === another.offsetX) && 16172 (this.offsetY === another.offsetY) && 16173 (this.fill === another.fill); 16174 } 16175 convertShadowOptions(value) { 16176 if (Object.getPrototypeOf(value).constructor === Object) { 16177 if (value.radius === null || value.radius === undefined) { 16178 return false; 16179 } 16180 else { 16181 this.radius.push(value.radius); 16182 this.type.push(value.type); 16183 this.color.push(value.color); 16184 this.offsetX.push((value.offsetX === undefined || 16185 value.offsetX === null) ? 0 : value.offsetX); 16186 this.offsetY.push((value.offsetY === undefined || 16187 value.offsetY === null) ? 0 : value.offsetY); 16188 this.fill.push((value.fill === undefined || 16189 value.fill === null) ? false : value.fill); 16190 return true; 16191 } 16192 } 16193 else if (Object.getPrototypeOf(value).constructor === Array) { 16194 let isFlag = true; 16195 for (let item of value) { 16196 if (item.radius === undefined || item.radius === null) { 16197 isFlag = false; 16198 break; 16199 } 16200 } 16201 if (isFlag) { 16202 for (let objValue of value) { 16203 this.radius.push(objValue.radius); 16204 this.type.push(objValue.type); 16205 this.color.push(objValue.color); 16206 this.offsetX.push((objValue.offsetX === undefined || objValue.offsetX === null) ? 0 : objValue.offsetX); 16207 this.offsetY.push((objValue.offsetY === undefined || objValue.offsetY === null) ? 0 : objValue.offsetY); 16208 this.fill.push((objValue.fill === undefined || objValue.fill === null) ? false : objValue.fill); 16209 } 16210 return true; 16211 } 16212 else { 16213 return false; 16214 } 16215 } 16216 } 16217 checkDiff(value, stageValue) { 16218 if (!value || !stageValue || !value.radius || !stageValue.radius) { 16219 return true; 16220 } 16221 if (!((isResource(stageValue.radius) && isResource(value.radius) && 16222 isResourceEqual(stageValue.radius, value.radius)) || 16223 (isNumber(stageValue.radius) && isNumber(value.radius) && 16224 stageValue.radius === value.radius))) { 16225 return true; 16226 } 16227 if (!(isNumber(stageValue.type) && isNumber(value.type) && 16228 stageValue.type === value.type)) { 16229 return true; 16230 } 16231 if (!((isResource(stageValue.color) && isResource(value.color) && 16232 isResourceEqual(stageValue.color, value.color)) || 16233 (!isResource(stageValue.color) && !isResource(value.color) && 16234 stageValue.color === value.color))) { 16235 return true; 16236 } 16237 if (!((isResource(stageValue.offsetX) && isResource(value.offsetX) && 16238 isResourceEqual(stageValue.offsetX, value.offsetX)) || 16239 (isNumber(stageValue.offsetX) && isNumber(value.offsetX) && 16240 stageValue.offsetX === value.offsetX))) { 16241 return true; 16242 } 16243 if (!((isResource(stageValue.offsetY) && isResource(value.offsetY) && 16244 isResourceEqual(stageValue.offsetY, value.offsetY)) || 16245 (isNumber(stageValue.offsetY) && isNumber(value.offsetY) && 16246 stageValue.offsetY === value.offsetY))) { 16247 return true; 16248 } 16249 if (!(isBoolean(stageValue.fill) && isBoolean(value.fill) && 16250 stageValue.fill === value.fill)) { 16251 return true; 16252 } 16253 return false; 16254 } 16255} 16256class ArkTextBackGroundStyle { 16257 constructor() { 16258 this.color = undefined; 16259 this.radius = new ArkBorderRadius(); 16260 } 16261 isEqual(another) { 16262 return (this.color === another.color && 16263 this.radius.isEqual(another.arkRadius)); 16264 } 16265 checkObjectDiff(another) { 16266 return !this.isEqual(another); 16267 } 16268 convertTextBackGroundStyleOptions(value) { 16269 let _a, _b, _c, _d; 16270 if (isUndefined(value)) { 16271 return false; 16272 } 16273 if (!isUndefined(value === null || value === void 0 ? void 0 : value.color) && (value === null || value === void 0 ? void 0 : value.color) !== null) { 16274 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 16275 this.color = value.color; 16276 } 16277 } 16278 16279 if (!isUndefined(value === null || value === void 0 ? void 0 : value.radius) && (value === null || value === void 0 ? void 0 : value.radius) !== null) { 16280 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 16281 this.radius.topLeft = value.radius; 16282 this.radius.topRight = value.radius; 16283 this.radius.bottomLeft = value.radius; 16284 this.radius.bottomRight = value.radius; 16285 } 16286 else { 16287 this.radius.topLeft = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topLeft; 16288 this.radius.topRight = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topRight; 16289 this.radius.bottomLeft = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomLeft; 16290 this.radius.bottomRight = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomRight; 16291 } 16292 } 16293 return true; 16294 } 16295} 16296class ArkSearchButton { 16297 constructor() { 16298 this.value = undefined; 16299 this.fontSize = undefined; 16300 this.fontColor = undefined; 16301 } 16302 isEqual(another) { 16303 return (this.value === another.value) && 16304 (this.fontSize === another.fontSize) && 16305 (this.fontColor === another.fontColor); 16306 } 16307} 16308class ArkSearchInputFilter { 16309 constructor() { 16310 this.value = undefined; 16311 this.error = undefined; 16312 } 16313 isEqual(another) { 16314 return (this.value === another.value) && 16315 (this.error === another.error); 16316 } 16317} 16318class ArkImageFrameInfoToArray { 16319 constructor() { 16320 this.arrSrc = []; 16321 this.arrWidth = []; 16322 this.arrHeight = []; 16323 this.arrTop = []; 16324 this.arrLeft = []; 16325 this.arrDuration = []; 16326 } 16327 isEqual(another) { 16328 return (this.arrSrc.toString() === another.arrSrc.toString()) && 16329 (this.arrWidth.toString() === another.arrWidth.toString()) && 16330 (this.arrHeight.toString() === another.arrHeight.toString()) && 16331 (this.arrTop.toString() === another.arrTop.toString()) && 16332 (this.arrLeft.toString() === another.arrLeft.toString()) && 16333 (this.arrDuration.toString() === another.arrDuration.toString()); 16334 } 16335} 16336class ArkEdgeAlign { 16337 constructor() { 16338 this.alignType = undefined; 16339 this.offset = undefined; 16340 } 16341 isEqual(another) { 16342 return (this.alignType === another.alignType && this.offset === another.offset); 16343 } 16344} 16345class ArkKeyBoardShortCut { 16346 constructor() { 16347 this.value = undefined; 16348 this.keys = undefined; 16349 this.action = undefined; 16350 } 16351 isEqual(another) { 16352 return (this.value === another.value) && (this.keys === another.keys) && 16353 (this.action === another.action); 16354 } 16355} 16356 16357class ArkCustomProperty { 16358 constructor() { 16359 this.key = undefined; 16360 this.value = undefined; 16361 } 16362} 16363 16364class ArkUseEffect { 16365 constructor() { 16366 this.useEffect = undefined; 16367 this.effectType = undefined; 16368 } 16369 isEqual(another) { 16370 return (this.useEffect === another.useEffect) && (this.effectType === another.effectType); 16371 } 16372} 16373 16374class ArkBlendMode { 16375 constructor() { 16376 this.blendMode = undefined; 16377 this.blendApplyType = undefined; 16378 } 16379 isEqual(another) { 16380 return (this.blendMode === another.blendMode) && (this.blendApplyType === another.blendApplyType); 16381 } 16382} 16383class ArkAlignStyle { 16384 constructor() { 16385 this.indexerAlign = undefined; 16386 this.offset = undefined; 16387 } 16388 isEqual(another) { 16389 return (this.indexerAlign === another.indexerAlign && this.offset === another.offset); 16390 } 16391} 16392class ArkNestedScrollOptions { 16393 constructor() { 16394 this.scrollForward = undefined; 16395 this.scrollBackward = undefined; 16396 } 16397 isEqual(another) { 16398 return ((this.scrollForward === another.scrollForward) && (this.scrollBackward === another.scrollBackward)); 16399 } 16400} 16401class ArkConstraintSizeOptions { 16402 constructor() { 16403 this.minWidth = undefined; 16404 this.maxWidth = undefined; 16405 this.minHeight = undefined; 16406 this.maxHeight = undefined; 16407 } 16408 isEqual(another) { 16409 return (this.minWidth === another.minWidth && 16410 this.maxWidth === another.maxWidth && 16411 this.minHeight === another.minHeight && 16412 this.maxHeight === another.maxHeight); 16413 } 16414} 16415class ArkTextFieldShowCounter { 16416 constructor() { 16417 this.value = undefined; 16418 this.highlightBorder = undefined; 16419 this.thresholdPercentage = undefined; 16420 } 16421 isEqual(another) { 16422 return (this.value === another.value) && 16423 (this.highlightBorder === another.highlightBorder) && 16424 (this.thresholdPercentage === another.thresholdPercentage); 16425 } 16426} 16427class ArkTextInputFilter { 16428 constructor() { 16429 this.value = undefined; 16430 this.error = undefined; 16431 } 16432 isEqual(another) { 16433 return (this.value === another.value) && 16434 (this.error === another.error); 16435 } 16436} 16437class ArkDotIndicator extends DotIndicator { 16438 constructor() { 16439 super(); 16440 this.type = undefined; 16441 this.leftValue = undefined; 16442 this.topValue = undefined; 16443 this.rightValue = undefined; 16444 this.bottomValue = undefined; 16445 this.itemWidthValue = undefined; 16446 this.itemHeightValue = undefined; 16447 this.selectedItemWidthValue = undefined; 16448 this.selectedItemHeightValue = undefined; 16449 this.maskValue = undefined; 16450 this.colorValue = undefined; 16451 this.selectedColorValue = undefined; 16452 this.maxDisplayCountValue = undefined; 16453 } 16454 isEqual(another) { 16455 return (this.type === another.type && 16456 this.leftValue === another.leftValue && 16457 this.topValue === another.topValue && 16458 this.rightValue === another.rightValue && 16459 this.bottomValue === another.bottomValue && 16460 this.itemWidthValue === another.itemWidthValue && 16461 this.itemHeightValue === another.itemHeightValue && 16462 this.selectedItemWidthValue === another.selectedItemWidthValue && 16463 this.selectedItemHeightValue === another.selectedItemHeightValue && 16464 this.maskValue === another.maskValue && 16465 this.colorValue === another.colorValue && 16466 this.selectedColorValue === another.selectedColorValue && 16467 this.maxDisplayCountValue === another.maxDisplayCountValue); 16468 } 16469} 16470class ArkDigitIndicator extends DigitIndicator { 16471 constructor() { 16472 super(); 16473 this.type = undefined; 16474 this.leftValue = undefined; 16475 this.topValue = undefined; 16476 this.rightValue = undefined; 16477 this.bottomValue = undefined; 16478 this.fontColorValue = undefined; 16479 this.selectedFontColorValue = undefined; 16480 this.digitFontValue = undefined; 16481 this.selectedDigitFontValue = undefined; 16482 } 16483 isEqual(another) { 16484 return (this.type === another.type && 16485 this.leftValue === another.leftValue && 16486 this.topValue === another.topValue && 16487 this.rightValue === another.rightValue && 16488 this.bottomValue === another.bottomValue && 16489 this.digitFontValue === another.digitFontValue && 16490 this.selectedDigitFontValue === another.selectedDigitFontValue); 16491 } 16492} 16493class ArkDigitFont { 16494 constructor() { 16495 this.size = undefined; 16496 this.weight = undefined; 16497 } 16498 isEqual(another) { 16499 return this.size === another.size && this.weight === another.weight; 16500 } 16501 parseFontWeight(value) { 16502 const valueWeightMap = { 16503 [0]: 'lighter', 16504 [1]: 'normal', 16505 [2]: 'regular', 16506 [3]: 'medium', 16507 [4]: 'bold', 16508 [5]: 'bolder' 16509 }; 16510 if (isUndefined(value)) { 16511 this.weight = '-'; 16512 } 16513 else if (value in valueWeightMap) { 16514 this.weight = valueWeightMap[value]; 16515 } 16516 else { 16517 this.weight = value.toString(); 16518 } 16519 return this.weight; 16520 } 16521} 16522class ArkDisplayArrow { 16523 constructor() { 16524 this.value = undefined; 16525 this.isHoverShow = undefined; 16526 } 16527 isEqual(another) { 16528 return this.value === another.value && this.isHoverShow === another.isHoverShow; 16529 } 16530} 16531class ArkDisplayCount { 16532 constructor() { 16533 this.value = undefined; 16534 this.swipeByGroup = undefined; 16535 } 16536 isEqual(another) { 16537 return this.value === another.value && this.swipeByGroup === another.swipeByGroup; 16538 } 16539} 16540class ArkSwiperCachedCount { 16541 constructor() { 16542 this.value = undefined; 16543 this.isShown = undefined; 16544 } 16545 isEqual(another) { 16546 return this.value === another.value && this.isShown === another.isShown; 16547 } 16548 } 16549class ArkGridEdgeEffect { 16550 constructor() { 16551 this.value = undefined; 16552 this.options = undefined; 16553 } 16554 isEqual(another) { 16555 return (this.value === another.value) && 16556 (this.options === another.options); 16557 } 16558} 16559 16560class ArkWaterFlowEdgeEffect { 16561 constructor() { 16562 this.value = undefined; 16563 this.options = undefined; 16564 } 16565 isEqual(another) { 16566 return (this.value === another.value) && 16567 (this.options === another.options); 16568 } 16569} 16570class ArkScrollableCacheOptions { 16571 constructor(count, show) { 16572 this.count = count; 16573 this.show = show; 16574 } 16575 isEqual(other) { 16576 return (this.count === other.count) && 16577 (this.show === other.show); 16578 } 16579} 16580class ArkChainMode { 16581 constructor() { 16582 this.direction = undefined; 16583 this.style = undefined; 16584 } 16585 isEqual(another) { 16586 return (this.direction === another.direction) && (this.style === another.style); 16587 } 16588} 16589class ArkMesh { 16590 constructor() { 16591 this.value = undefined; 16592 this.column = undefined; 16593 this.row = undefined; 16594 } 16595 isEqual(another) { 16596 return (deepCompareArrays(this.value, another.value) && 16597 this.column === another.column && 16598 this.row === another.row); 16599 } 16600} 16601class ArkLanesOpt { 16602 constructor() { 16603 this.lanesNum = undefined; 16604 this.minLength = undefined; 16605 this.maxLength = undefined; 16606 this.gutter = undefined; 16607 } 16608 isEqual(another) { 16609 return (this.lanesNum === another.lanesNum && this.minLength === another.minLength 16610 && this.maxLength === another.maxLength && this.gutter === another.gutter); 16611 } 16612} 16613class ArkScrollSnapOptions { 16614 constructor() { 16615 this.snapAlign = undefined; 16616 this.snapPagination = undefined; 16617 this.enableSnapToStart = undefined; 16618 this.enableSnapToEnd = undefined; 16619 } 16620 isEqual(another) { 16621 return ((this.snapAlign === another.snapAlign) && 16622 (this.snapPagination === another.snapPagination) && 16623 (this.enableSnapToStart === another.enableSnapToStart) && 16624 (this.enableSnapToEnd === another.enableSnapToEnd)); 16625 } 16626} 16627class ArkScrollOffsetOptions { 16628 constructor() { 16629 this.xOffset = undefined; 16630 this.yOffset = undefined; 16631 } 16632 isEqual(another) { 16633 return this.xOffset === another.xOffset && this.yOffset === another.yOffset; 16634 } 16635} 16636 16637class ArkGeometryTransition { 16638 constructor() { 16639 this.id = undefined; 16640 this.options = undefined; 16641 } 16642 isEqual(another) { 16643 return (this.id === another.id && this.options === another.options); 16644 } 16645} 16646class ArkSymbolEffect { 16647 constructor() { 16648 this.symbolEffect = undefined; 16649 this.action = undefined; 16650 } 16651 isEqual(another) { 16652 return (this.symbolEffect === another.symbolEffect) && 16653 (this.action === another.action); 16654 } 16655} 16656class ArkFocusScopeId { 16657 constructor() { 16658 this.id = undefined; 16659 this.isGroup = undefined; 16660 this.arrowStepOut = undefined; 16661 } 16662 isEqual(another) { 16663 return ((this.id === another.id) && (this.isGroup === another.isGroup) && 16664 (this.arrowStepOut === another.arrowStepOut)); 16665 } 16666} 16667class ArkFocusScopePriority { 16668 constructor() { 16669 this.scopeId = undefined; 16670 this.priority = undefined; 16671 } 16672 isEqual(another) { 16673 return (this.scopeId === another.scopeId) && (this.priority === another.priority); 16674 } 16675} 16676/// <reference path='./import.ts' /> 16677/// <reference path='./ArkComponent.ts' /> 16678const FontWeightMap = { 16679 0: 'lighter', 16680 1: 'normal', 16681 2: 'regular', 16682 3: 'medium', 16683 4: 'bold', 16684 5: 'bolder', 16685 100: '100', 16686 200: '200', 16687 300: '300', 16688 400: '400', 16689 500: '500', 16690 600: '600', 16691 700: '700', 16692 800: '800', 16693 900: '900', 16694}; 16695 16696class ArkDragPreviewOptions { 16697 constructor() { 16698 this.mode = undefined; 16699 this.numberBadge = undefined; 16700 this.isMultiSelectionEnabled = undefined; 16701 this.defaultAnimationBeforeLifting = undefined; 16702 this.isLiftingDisabled = undefined; 16703 } 16704 16705 isEqual(another) { 16706 return ( 16707 this.mode === another.mode && 16708 this.numberBadge === another.numberBadge && 16709 this.isMultiSelectionEnabled === another.isMultiSelectionEnabled && 16710 this.defaultAnimationBeforeLifting === another.defaultAnimationBeforeLifting && 16711 this.isLiftingDisabled === another.isLiftingDisabled 16712 ); 16713 } 16714} 16715 16716class ArkDragPreview { 16717 constructor() { 16718 this.inspectorId = undefined; 16719 this.onlyForLifting = false; 16720 this.pixelMap = undefined; 16721 this.extraInfo = undefined; 16722 } 16723 16724 isEqual(another) { 16725 return ( 16726 this.inspectorId === another.inspectorId && 16727 this.onlyForLifting === another.onlyForLifting && 16728 this.pixelMap === another.pixelMap && 16729 this.extraInfo === another.extraInfo 16730 ); 16731 } 16732} 16733 16734class ArkTextFont { 16735 constructor() { 16736 this.value = undefined; 16737 this.enableVariableFontWeight = undefined; 16738 } 16739 16740 isEqual(another) { 16741 return ( 16742 this.value === another.value && 16743 this.enableVariableFontWeight === another.enableVariableFontWeight 16744 ); 16745 } 16746 16747 checkObjectDiff(another) { 16748 return !this.isEqual(another); 16749 } 16750} 16751 16752class ArkFontWeight { 16753 constructor() { 16754 this.value = undefined; 16755 this.enableVariableFontWeight = undefined; 16756 } 16757 16758 isEqual(another) { 16759 return ( 16760 this.value === another.value && 16761 this.enableVariableFontWeight === another.enableVariableFontWeight 16762 ); 16763 } 16764 16765 checkObjectDiff(another) { 16766 return !this.isEqual(another); 16767 } 16768} 16769 16770class ArkNavigationTitle { 16771 constructor() { 16772 this.value = undefined; 16773 this.navigationTitleOptions = undefined; 16774 } 16775 isEqual(another) { 16776 return (this.value === another.value) && (this.navigationTitleOptions === another.navigationTitleOptions); 16777 } 16778} 16779 16780class ArkNavHideTitleBarOrToolBar { 16781 constructor() { 16782 this.isHide = undefined; 16783 this.animated = undefined; 16784 } 16785 isEqual(another) { 16786 return (this.isHide === another.isHide) && (this.animated === another.animated); 16787 } 16788} 16789 16790class ArkButtonComponent extends ArkComponent { 16791 constructor(nativePtr, classType) { 16792 super(nativePtr, classType); 16793 } 16794 allowChildCount() { 16795 return 1; 16796 } 16797 initialize(value) { 16798 if (value.length >= 1 && (isResource(value[0]) || isString(value[0]))) { 16799 modifierWithKey(this._modifiersWithKeys, ButtonCreateTypeModifier.identity, ButtonCreateTypeModifier, true); 16800 } else { 16801 modifierWithKey(this._modifiersWithKeys, ButtonCreateTypeModifier.identity, ButtonCreateTypeModifier, false); 16802 } 16803 if (value.length === 1) { 16804 if (!isNull(value[0]) && isObject(value[0])) { 16805 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, value[0]); 16806 } else if (isResource(value[0]) || isString(value[0])) { 16807 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, value[0]); 16808 } else { 16809 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, undefined); 16810 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, undefined); 16811 } 16812 } else if (value.length === 2) { 16813 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, value[0]); 16814 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, value[1]); 16815 } else { 16816 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, undefined); 16817 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, undefined); 16818 } 16819 return this; 16820 } 16821 backgroundColor(value) { 16822 modifierWithKey(this._modifiersWithKeys, ButtonBackgroundColorModifier.identity, ButtonBackgroundColorModifier, value); 16823 return this; 16824 } 16825 type(value) { 16826 modifierWithKey(this._modifiersWithKeys, ButtonTypeModifier.identity, ButtonTypeModifier, value); 16827 return this; 16828 } 16829 stateEffect(value) { 16830 modifierWithKey(this._modifiersWithKeys, ButtonStateEffectModifier.identity, ButtonStateEffectModifier, value); 16831 return this; 16832 } 16833 fontColor(value) { 16834 modifierWithKey(this._modifiersWithKeys, ButtonFontColorModifier.identity, ButtonFontColorModifier, value); 16835 return this; 16836 } 16837 fontSize(value) { 16838 modifierWithKey(this._modifiersWithKeys, ButtonFontSizeModifier.identity, ButtonFontSizeModifier, value); 16839 return this; 16840 } 16841 fontWeight(value) { 16842 modifierWithKey(this._modifiersWithKeys, ButtonFontWeightModifier.identity, ButtonFontWeightModifier, value); 16843 return this; 16844 } 16845 fontStyle(value) { 16846 modifierWithKey(this._modifiersWithKeys, ButtonFontStyleModifier.identity, ButtonFontStyleModifier, value); 16847 return this; 16848 } 16849 fontFamily(value) { 16850 modifierWithKey(this._modifiersWithKeys, ButtonFontFamilyModifier.identity, ButtonFontFamilyModifier, value); 16851 return this; 16852 } 16853 labelStyle(value) { 16854 modifierWithKey(this._modifiersWithKeys, ButtonLabelStyleModifier.identity, ButtonLabelStyleModifier, value); 16855 return this; 16856 } 16857 borderRadius(value) { 16858 modifierWithKey(this._modifiersWithKeys, ButtonBorderRadiusModifier.identity, ButtonBorderRadiusModifier, value); 16859 return this; 16860 } 16861 border(value) { 16862 modifierWithKey(this._modifiersWithKeys, ButtonBorderModifier.identity, ButtonBorderModifier, value); 16863 return this; 16864 } 16865 size(value) { 16866 modifierWithKey(this._modifiersWithKeys, ButtonSizeModifier.identity, ButtonSizeModifier, value); 16867 return this; 16868 } 16869 contentModifier(value) { 16870 modifierWithKey(this._modifiersWithKeys, ButtonContentModifier.identity, ButtonContentModifier, value); 16871 return this; 16872 } 16873 setContentModifier(modifier) { 16874 if (modifier === undefined || modifier === null) { 16875 getUINativeModule().button.setContentModifierBuilder(this.nativePtr, false); 16876 return; 16877 } 16878 this.needRebuild = false; 16879 this.applyContent = modifier.applyContent(); 16880 if (this.builder !== this.applyContent) { 16881 this.needRebuild = true; 16882 } 16883 this.builder = this.applyContent; 16884 this.modifier = modifier; 16885 getUINativeModule().button.setContentModifierBuilder(this.nativePtr, this); 16886 } 16887 makeContentModifierNode(context, buttonConfiguration) { 16888 buttonConfiguration.contentModifier = this.modifier; 16889 if (isUndefined(this.buttonNode) || this.needRebuild) { 16890 const xNode = globalThis.requireNapi('arkui.node'); 16891 this.buttonNode = new xNode.BuilderNode(context); 16892 this.buttonNode.build(this.builder, buttonConfiguration); 16893 this.needRebuild = false; 16894 } else { 16895 this.buttonNode.update(buttonConfiguration); 16896 } 16897 return this.buttonNode.getFrameNode(); 16898 } 16899 role(value) { 16900 modifierWithKey(this._modifiersWithKeys, ButtonRoleModifier.identity, ButtonRoleModifier, value); 16901 return this; 16902 } 16903 buttonStyle(value) { 16904 modifierWithKey(this._modifiersWithKeys, ButtonStyleModifier.identity, ButtonStyleModifier, value); 16905 return this; 16906 } 16907 controlSize(value) { 16908 modifierWithKey(this._modifiersWithKeys, ButtonControlSizeModifier.identity, ButtonControlSizeModifier, value); 16909 return this; 16910 } 16911} 16912class ButtonBackgroundColorModifier extends ModifierWithKey { 16913 constructor(value) { 16914 super(value); 16915 } 16916 applyPeer(node, reset) { 16917 if (reset) { 16918 getUINativeModule().button.resetBackgroundColor(node); 16919 } 16920 else { 16921 getUINativeModule().button.setBackgroundColor(node, this.value); 16922 } 16923 } 16924 checkObjectDiff() { 16925 return !isBaseOrResourceEqual(this.stageValue, this.value); 16926 } 16927} 16928ButtonBackgroundColorModifier.identity = Symbol('buttonBackgroundColor'); 16929class ButtonRoleModifier extends ModifierWithKey { 16930 constructor(value) { 16931 super(value); 16932 } 16933 applyPeer(node, reset) { 16934 if (reset) { 16935 getUINativeModule().button.resetButtonRole(node); 16936 } else { 16937 getUINativeModule().button.setButtonRole(node, this.value); 16938 } 16939 } 16940 checkObjectDiff() { 16941 return !isBaseOrResourceEqual(this.stageValue, this.value); 16942 } 16943} 16944ButtonRoleModifier.identity = Symbol('buttonRole'); 16945class ButtonStyleModifier extends ModifierWithKey { 16946 constructor(value) { 16947 super(value); 16948 } 16949 applyPeer(node, reset) { 16950 if (reset) { 16951 getUINativeModule().button.resetButtonStyle(node); 16952 } else { 16953 getUINativeModule().button.setButtonStyle(node, this.value); 16954 } 16955 } 16956 checkObjectDiff() { 16957 return !isBaseOrResourceEqual(this.stageValue, this.value); 16958 } 16959} 16960ButtonStyleModifier.identity = Symbol('buttonStyle'); 16961class ButtonControlSizeModifier extends ModifierWithKey { 16962 constructor(value) { 16963 super(value); 16964 } 16965 applyPeer(node, reset) { 16966 if (reset) { 16967 getUINativeModule().button.resetButtonControlSize(node); 16968 } else { 16969 getUINativeModule().button.setButtonControlSize(node, this.value); 16970 } 16971 } 16972 checkObjectDiff() { 16973 return !isBaseOrResourceEqual(this.stageValue, this.value); 16974 } 16975} 16976ButtonControlSizeModifier.identity = Symbol('buttonControlSize'); 16977class ButtonStateEffectModifier extends ModifierWithKey { 16978 constructor(value) { 16979 super(value); 16980 } 16981 applyPeer(node, reset) { 16982 if (reset) { 16983 getUINativeModule().button.resetStateEffect(node); 16984 } 16985 else { 16986 getUINativeModule().button.setStateEffect(node, this.value); 16987 } 16988 } 16989} 16990ButtonStateEffectModifier.identity = Symbol('buttonStateEffect'); 16991class ButtonFontStyleModifier extends ModifierWithKey { 16992 constructor(value) { 16993 super(value); 16994 } 16995 applyPeer(node, reset) { 16996 if (reset) { 16997 getUINativeModule().button.resetFontStyle(node); 16998 } 16999 else { 17000 getUINativeModule().button.setFontStyle(node, this.value); 17001 } 17002 } 17003} 17004ButtonFontStyleModifier.identity = Symbol('buttonFontStyle'); 17005class ButtonFontFamilyModifier extends ModifierWithKey { 17006 constructor(value) { 17007 super(value); 17008 } 17009 applyPeer(node, reset) { 17010 if (reset) { 17011 getUINativeModule().button.resetFontFamily(node); 17012 } 17013 else { 17014 getUINativeModule().button.setFontFamily(node, this.value); 17015 } 17016 } 17017 checkObjectDiff() { 17018 return !isBaseOrResourceEqual(this.stageValue, this.value); 17019 } 17020} 17021ButtonFontFamilyModifier.identity = Symbol('buttonFontFamily'); 17022class ButtonLabelStyleModifier extends ModifierWithKey { 17023 constructor(value) { 17024 super(value); 17025 } 17026 applyPeer(node, reset) { 17027 if (reset) { 17028 getUINativeModule().button.resetLabelStyle(node); 17029 } 17030 else { 17031 let textOverflow = this.value.overflow; // number(enum) -> Ace::TextOverflow 17032 let maxLines = this.value.maxLines; // number -> uint32_t 17033 let minFontSize = this.value.minFontSize; // number | string | Resource -> Dimension 17034 let maxFontSize = this.value.maxFontSize; // number | string | Resource -> Dimension 17035 let heightAdaptivePolicy = this.value.heightAdaptivePolicy; // number(enum) -> Ace::TextHeightAdaptivePolicy 17036 let fontSize; // number | string | Resource -> Dimension 17037 let fontWeight; // number | string | Ace::FontWeight -> string -> Ace::FontWeight 17038 let fontStyle; // number(enum) -> Ace::FontStyle 17039 let fontFamily; // string -> std::vector<std::string> 17040 if (isObject(this.value.font)) { 17041 fontSize = this.value.font.size; 17042 fontStyle = this.value.font.style; 17043 fontFamily = this.value.font.family; 17044 fontWeight = this.value.font.weight; 17045 } 17046 getUINativeModule().button.setLabelStyle(node, textOverflow, maxLines, minFontSize, 17047 maxFontSize, heightAdaptivePolicy, fontSize, fontWeight, fontStyle, fontFamily); 17048 } 17049 } 17050 checkObjectDiff() { 17051 if (isResource(this.stageValue) && isResource(this.value)) { 17052 return !isResourceEqual(this.stageValue, this.value); 17053 } 17054 else if (!isResource(this.stageValue) && !isResource(this.value)) { 17055 return !(this.value.overflow === this.stageValue.overflow && 17056 this.value.maxLines === this.stageValue.maxLines && 17057 this.value.minFontSize === this.stageValue.minFontSize && 17058 this.value.maxFontSize === this.stageValue.maxFontSize && 17059 this.value.heightAdaptivePolicy === this.stageValue.heightAdaptivePolicy && 17060 this.value.font === this.stageValue.font); 17061 } 17062 else { 17063 return true; 17064 } 17065 } 17066} 17067ButtonLabelStyleModifier.identity = Symbol('buttonLabelStyle'); 17068class ButtonTypeModifier extends ModifierWithKey { 17069 constructor(value) { 17070 super(value); 17071 } 17072 applyStage(node, component) { 17073 if (this.stageValue === undefined || this.stageValue === null) { 17074 this.value = this.stageValue; 17075 this.applyPeer(node, true, component); 17076 return true; 17077 } 17078 this.value = this.stageValue; 17079 this.applyPeer(node, false, component); 17080 return false; 17081 } 17082 applyPeer(node, reset) { 17083 if (reset) { 17084 getUINativeModule().button.resetType(node); 17085 } 17086 else { 17087 getUINativeModule().button.setType(node, this.value); 17088 } 17089 } 17090} 17091ButtonTypeModifier.identity = Symbol('buttonType'); 17092class ButtonFontColorModifier extends ModifierWithKey { 17093 constructor(value) { 17094 super(value); 17095 } 17096 applyPeer(node, reset) { 17097 if (reset) { 17098 getUINativeModule().button.resetFontColor(node); 17099 } 17100 else { 17101 getUINativeModule().button.setFontColor(node, this.value); 17102 } 17103 } 17104 checkObjectDiff() { 17105 return !isBaseOrResourceEqual(this.stageValue, this.value); 17106 } 17107} 17108ButtonFontColorModifier.identity = Symbol('buttonFontColor'); 17109class ButtonFontSizeModifier extends ModifierWithKey { 17110 constructor(value) { 17111 super(value); 17112 } 17113 applyPeer(node, reset) { 17114 if (reset) { 17115 getUINativeModule().button.resetFontSize(node); 17116 } 17117 else { 17118 getUINativeModule().button.setFontSize(node, this.value); 17119 } 17120 } 17121 checkObjectDiff() { 17122 return !isBaseOrResourceEqual(this.stageValue, this.value); 17123 } 17124} 17125ButtonFontSizeModifier.identity = Symbol('buttonFontSize'); 17126class ButtonFontWeightModifier extends ModifierWithKey { 17127 constructor(value) { 17128 super(value); 17129 } 17130 applyPeer(node, reset) { 17131 if (reset) { 17132 getUINativeModule().button.resetFontWeight(node); 17133 } 17134 else { 17135 getUINativeModule().button.setFontWeight(node, this.value); 17136 } 17137 } 17138} 17139ButtonFontWeightModifier.identity = Symbol('buttonFontWeight'); 17140class ButtonBorderRadiusModifier extends ModifierWithKey { 17141 constructor(value) { 17142 super(value); 17143 } 17144 applyPeer(node, reset) { 17145 if (reset) { 17146 getUINativeModule().button.resetButtonBorderRadius(node); 17147 } 17148 else { 17149 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 17150 getUINativeModule().button.setButtonBorderRadius(node, this.value, this.value, this.value, this.value); 17151 } 17152 else { 17153 getUINativeModule().button.setButtonBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 17154 } 17155 } 17156 } 17157 checkObjectDiff() { 17158 if (isResource(this.stageValue) && isResource(this.value)) { 17159 return !isResourceEqual(this.stageValue, this.value); 17160 } 17161 else if (!isResource(this.stageValue) && !isResource(this.value)) { 17162 return !(this.stageValue.topLeft === this.value.topLeft && 17163 this.stageValue.topRight === this.value.topRight && 17164 this.stageValue.bottomLeft === this.value.bottomLeft && 17165 this.stageValue.bottomRight === this.value.bottomRight); 17166 } 17167 else { 17168 return true; 17169 } 17170 } 17171} 17172ButtonBorderRadiusModifier.identity = Symbol('buttonBorderRadius'); 17173class ButtonBorderModifier extends ModifierWithKey { 17174 constructor(value) { 17175 super(value); 17176 } 17177 applyPeer(node, reset) { 17178 if (reset) { 17179 getUINativeModule().button.resetButtonBorder(node); 17180 } else { 17181 let widthLeft; 17182 let widthRight; 17183 let widthTop; 17184 let widthBottom; 17185 if (!isUndefined(this.value.width) && this.value.width != null) { 17186 if (isNumber(this.value.width) || isString(this.value.width) || isResource(this.value.width)) { 17187 widthLeft = this.value.width; 17188 widthRight = this.value.width; 17189 widthTop = this.value.width; 17190 widthBottom = this.value.width; 17191 } else { 17192 widthLeft = this.value.width.left; 17193 widthRight = this.value.width.right; 17194 widthTop = this.value.width.top; 17195 widthBottom = this.value.width.bottom; 17196 } 17197 } 17198 let leftColor; 17199 let rightColor; 17200 let topColor; 17201 let bottomColor; 17202 if (!isUndefined(this.value.color) && this.value.color != null) { 17203 if (isNumber(this.value.color) || isString(this.value.color) || isResource(this.value.color)) { 17204 leftColor = this.value.color; 17205 rightColor = this.value.color; 17206 topColor = this.value.color; 17207 bottomColor = this.value.color; 17208 } else { 17209 leftColor = this.value.color.left; 17210 rightColor = this.value.color.right; 17211 topColor = this.value.color.top; 17212 bottomColor = this.value.color.bottom; 17213 } 17214 } 17215 let topLeft; 17216 let topRight; 17217 let bottomLeft; 17218 let bottomRight; 17219 if (!isUndefined(this.value.radius) && this.value.radius != null) { 17220 if (isNumber(this.value.radius) || isString(this.value.radius) || isResource(this.value.radius)) { 17221 topLeft = this.value.radius; 17222 topRight = this.value.radius; 17223 bottomLeft = this.value.radius; 17224 bottomRight = this.value.radius; 17225 } else { 17226 topLeft = this.value.radius.topLeft; 17227 topRight = this.value.radius.topRight; 17228 bottomLeft = this.value.radius.bottomLeft; 17229 bottomRight = this.value.radius.bottomRight; 17230 } 17231 } 17232 let styleTop; 17233 let styleRight; 17234 let styleBottom; 17235 let styleLeft; 17236 if (!isUndefined(this.value.style) && this.value.style != null) { 17237 if (isNumber(this.value.style) || isString(this.value.style) || isResource(this.value.style)) { 17238 styleTop = this.value.style; 17239 styleRight = this.value.style; 17240 styleBottom = this.value.style; 17241 styleLeft = this.value.style; 17242 } else { 17243 styleTop = this.value.style.top; 17244 styleRight = this.value.style.right; 17245 styleBottom = this.value.style.bottom; 17246 styleLeft = this.value.style.left; 17247 } 17248 } 17249 getUINativeModule().button.setButtonBorder( 17250 node, 17251 widthLeft, 17252 widthRight, 17253 widthTop, 17254 widthBottom, 17255 leftColor, 17256 rightColor, 17257 topColor, 17258 bottomColor, 17259 topLeft, 17260 topRight, 17261 bottomLeft, 17262 bottomRight, 17263 styleTop, 17264 styleRight, 17265 styleBottom, 17266 styleLeft 17267 ); 17268 } 17269 } 17270 checkObjectDiff() { 17271 return ( 17272 !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 17273 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 17274 !isBaseOrResourceEqual(this.stageValue.radius, this.value.radius) || 17275 !isBaseOrResourceEqual(this.stageValue.style, this.value.style) 17276 ); 17277 } 17278} 17279ButtonBorderModifier.identity = Symbol('buttonBorder'); 17280class ButtonSizeModifier extends ModifierWithKey { 17281 constructor(value) { 17282 super(value); 17283 } 17284 applyPeer(node, reset) { 17285 if (reset) { 17286 getUINativeModule().button.resetButtonSize(node); 17287 } else { 17288 getUINativeModule().button.setButtonSize(node, this.value.width, this.value.height); 17289 } 17290 } 17291 checkObjectDiff() { 17292 return ( 17293 !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 17294 !isBaseOrResourceEqual(this.stageValue.height, this.value.height) 17295 ); 17296 } 17297} 17298ButtonSizeModifier.identity = Symbol('buttonSize'); 17299class ButtonLabelModifier extends ModifierWithKey { 17300 constructor(value) { 17301 super(value); 17302 } 17303 applyPeer(node, reset) { 17304 if (reset) { 17305 getUINativeModule().button.resetLabel(node); 17306 } else { 17307 getUINativeModule().button.setLabel(node, this.value); 17308 } 17309 } 17310 checkObjectDiff() { 17311 return !isBaseOrResourceEqual(this.stageValue, this.value); 17312 } 17313} 17314ButtonLabelModifier.identity = Symbol('buttonLabel'); 17315class ButtonOptionsModifier extends ModifierWithKey { 17316 applyPeer(node, reset) { 17317 if (reset) { 17318 getUINativeModule().button.resetOptions(node); 17319 } else { 17320 getUINativeModule().button.setOptions(node, this.value.type, this.value.stateEffect, 17321 this.value.buttonStyle, this.value.controlSize, this.value.role); 17322 } 17323 } 17324 checkObjectDiff() { 17325 return ( 17326 !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 17327 !isBaseOrResourceEqual(this.stageValue.stateEffect, this.value.stateEffect) || 17328 !isBaseOrResourceEqual(this.stageValue.buttonStyle, this.value.buttonStyle) || 17329 !isBaseOrResourceEqual(this.stageValue.controlSize, this.value.controlSize) || 17330 !isBaseOrResourceEqual(this.stageValue.role, this.value.role) 17331 ); 17332 } 17333} 17334ButtonOptionsModifier.identity = Symbol('buttonOptions'); 17335class ButtonCreateTypeModifier extends ModifierWithKey { 17336 applyPeer(node, reset) { 17337 if (!reset) { 17338 getUINativeModule().button.setCreateWithLabel(node, this.value); 17339 } 17340 } 17341 checkObjectDiff() { 17342 return !isBaseOrResourceEqual(this.stageValue, this.value); 17343 } 17344} 17345ButtonCreateTypeModifier.identity = Symbol('buttonCreateType'); 17346class ButtonContentModifier extends ModifierWithKey { 17347 constructor(value) { 17348 super(value); 17349 } 17350 applyPeer(node, reset, component) { 17351 let buttonComponent = component; 17352 buttonComponent.setContentModifier(this.value); 17353 } 17354} 17355ButtonContentModifier.identity = Symbol('buttonContentModifier'); 17356// @ts-ignore 17357if (globalThis.Button !== undefined) { 17358 globalThis.Button.attributeModifier = function (modifier) { 17359 attributeModifierFunc.call(this, modifier, (nativePtr) => { 17360 return new ArkButtonComponent(nativePtr); 17361 }, (nativePtr, classType, modifierJS) => { 17362 return new modifierJS.ButtonModifier(nativePtr, classType); 17363 }); 17364 }; 17365 // @ts-ignore 17366 globalThis.Button.contentModifier = function (modifier) { 17367 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 17368 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 17369 let component = this.createOrGetNode(elmtId, () => { 17370 return new ArkButtonComponent(nativeNode); 17371 }); 17372 component.setContentModifier(modifier); 17373 }; 17374} 17375 17376/// <reference path='./import.ts' /> 17377class ArkLoadingProgressComponent extends ArkComponent { 17378 constructor(nativePtr, classType) { 17379 super(nativePtr, classType); 17380 } 17381 initialize(value) { 17382 return this; 17383 } 17384 allowChildCount() { 17385 return 0; 17386 } 17387 color(value) { 17388 modifierWithKey(this._modifiersWithKeys, LoadingProgressColorModifier.identity, LoadingProgressColorModifier, value); 17389 return this; 17390 } 17391 enableLoading(value) { 17392 modifierWithKey(this._modifiersWithKeys, LoadingProgressEnableLoadingModifier.identity, LoadingProgressEnableLoadingModifier, value); 17393 return this; 17394 } 17395 foregroundColor(value) { 17396 modifierWithKey(this._modifiersWithKeys, LoadingProgressForegroundColorModifier.identity, 17397 LoadingProgressForegroundColorModifier, value); 17398 return this; 17399 } 17400 contentModifier(value) { 17401 modifierWithKey(this._modifiersWithKeys, LoadingProgressContentModifier.identity, LoadingProgressContentModifier, value); 17402 return this; 17403 } 17404 setContentModifier(modifier) { 17405 if (modifier === undefined || modifier === null) { 17406 getUINativeModule().loadingProgress.setContentModifierBuilder(this.nativePtr, false); 17407 return; 17408 } 17409 this.needRebuild = false; 17410 if (this.builder !== modifier.applyContent()) { 17411 this.needRebuild = true; 17412 } 17413 this.builder = modifier.applyContent(); 17414 this.modifier = modifier; 17415 getUINativeModule().loadingProgress.setContentModifierBuilder(this.nativePtr, this); 17416 } 17417 makeContentModifierNode(context, loadingProgressConfiguration) { 17418 loadingProgressConfiguration.contentModifier = this.modifier; 17419 if (isUndefined(this.loadingProgressNode) || this.needRebuild) { 17420 const xNode = globalThis.requireNapi('arkui.node'); 17421 this.loadingProgressNode = new xNode.BuilderNode(context); 17422 this.loadingProgressNode.build(this.builder, loadingProgressConfiguration); 17423 this.needRebuild = false; 17424 } else { 17425 this.loadingProgressNode.update(loadingProgressConfiguration); 17426 } 17427 return this.loadingProgressNode.getFrameNode(); 17428 } 17429} 17430class LoadingProgressColorModifier extends ModifierWithKey { 17431 constructor(value) { 17432 super(value); 17433 } 17434 applyPeer(node, reset) { 17435 if (reset) { 17436 getUINativeModule().loadingProgress.resetColor(node); 17437 } 17438 else { 17439 getUINativeModule().loadingProgress.setColor(node, this.value); 17440 } 17441 } 17442 checkObjectDiff() { 17443 return !isBaseOrResourceEqual(this.stageValue, this.value); 17444 } 17445} 17446LoadingProgressColorModifier.identity = Symbol('loadingProgressColor'); 17447class LoadingProgressForegroundColorModifier extends ModifierWithKey { 17448 constructor(value) { 17449 super(value); 17450 } 17451 applyPeer(node, reset) { 17452 if (reset) { 17453 getUINativeModule().loadingProgress.resetForegroundColor(node); 17454 } 17455 else { 17456 getUINativeModule().loadingProgress.setForegroundColor(node, this.value); 17457 } 17458 } 17459 checkObjectDiff() { 17460 return !isBaseOrResourceEqual(this.stageValue, this.value); 17461 } 17462} 17463LoadingProgressForegroundColorModifier.identity = Symbol('loadingProgressForegroundColor'); 17464class LoadingProgressContentModifier extends ModifierWithKey { 17465 constructor(value) { 17466 super(value); 17467 } 17468 applyPeer(node, reset, component) { 17469 let loadingProgressComponent = component; 17470 loadingProgressComponent.setContentModifier(this.value); 17471 } 17472} 17473LoadingProgressContentModifier.identity = Symbol('loadingProgressContentModifier'); 17474class LoadingProgressEnableLoadingModifier extends ModifierWithKey { 17475 constructor(value) { 17476 super(value); 17477 } 17478 applyPeer(node, reset) { 17479 if (reset) { 17480 getUINativeModule().loadingProgress.resetEnableLoading(node); 17481 } 17482 else { 17483 getUINativeModule().loadingProgress.setEnableLoading(node, this.value); 17484 } 17485 } 17486} 17487LoadingProgressEnableLoadingModifier.identity = Symbol('loadingProgressEnableLoading'); 17488// @ts-ignore 17489if (globalThis.LoadingProgress !== undefined) { 17490 globalThis.LoadingProgress.attributeModifier = function (modifier) { 17491 attributeModifierFunc.call(this, modifier, (nativePtr) => { 17492 return new ArkLoadingProgressComponent(nativePtr); 17493 }, (nativePtr, classType, modifierJS) => { 17494 return new modifierJS.LoadingProgressModifier(nativePtr, classType); 17495 }); 17496 }; 17497 17498 globalThis.LoadingProgress.contentModifier = function (modifier) { 17499 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 17500 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 17501 let component = this.createOrGetNode(elmtId, () => { 17502 return new ArkLoadingProgressComponent(nativeNode); 17503 }); 17504 component.setContentModifier(modifier); 17505 }; 17506} 17507 17508/// <reference path='./import.ts' /> 17509class ArkRefreshComponent extends ArkComponent { 17510 constructor(nativePtr, classType) { 17511 super(nativePtr, classType); 17512 } 17513 onStateChange(callback) { 17514 throw new Error('Method not implemented.'); 17515 } 17516 onRefreshing(callback) { 17517 throw new Error('Method not implemented.'); 17518 } 17519 refreshOffset(value) { 17520 modifierWithKey(this._modifiersWithKeys, RefreshOffsetModifier.identity, RefreshOffsetModifier, value); 17521 return this; 17522 } 17523 pullToRefresh(value) { 17524 modifierWithKey(this._modifiersWithKeys, PullToRefreshModifier.identity, PullToRefreshModifier, value); 17525 return this; 17526 } 17527 pullDownRatio(value) { 17528 modifierWithKey(this._modifiersWithKeys, PullDownRatioModifier.identity, PullDownRatioModifier, value); 17529 return this; 17530 } 17531} 17532class RefreshOffsetModifier extends ModifierWithKey { 17533 constructor(value) { 17534 super(value); 17535 } 17536 applyPeer(node, reset) { 17537 if (reset) { 17538 getUINativeModule().refresh.resetRefreshOffset(node); 17539 } 17540 else { 17541 getUINativeModule().refresh.setRefreshOffset(node, this.value); 17542 } 17543 } 17544} 17545RefreshOffsetModifier.identity = Symbol('refreshOffset'); 17546class PullToRefreshModifier extends ModifierWithKey { 17547 constructor(value) { 17548 super(value); 17549 } 17550 applyPeer(node, reset) { 17551 if (reset) { 17552 getUINativeModule().refresh.resetPullToRefresh(node); 17553 } 17554 else { 17555 getUINativeModule().refresh.setPullToRefresh(node, this.value); 17556 } 17557 } 17558} 17559PullToRefreshModifier.identity = Symbol('pullToRefresh'); 17560class PullDownRatioModifier extends ModifierWithKey { 17561 constructor(value) { 17562 super(value); 17563 } 17564 applyPeer(node, reset) { 17565 if (reset) { 17566 getUINativeModule().refresh.resetPullDownRatio(node); 17567 } 17568 else { 17569 getUINativeModule().refresh.setPullDownRatio(node, this.value); 17570 } 17571 } 17572 checkObjectDiff() { 17573 return !isBaseOrResourceEqual(this.stageValue, this.value); 17574 } 17575} 17576PullDownRatioModifier.identity = Symbol('pullDownRatio'); 17577// @ts-ignore 17578if (globalThis.Refresh !== undefined) { 17579 globalThis.Refresh.attributeModifier = function (modifier) { 17580 attributeModifierFunc.call(this, modifier, (nativePtr) => { 17581 return new ArkRefreshComponent(nativePtr); 17582 }, (nativePtr, classType, modifierJS) => { 17583 return new modifierJS.RefreshModifier(nativePtr, classType); 17584 }); 17585 }; 17586} 17587 17588/// <reference path='./import.ts' /> 17589class ScrollNestedScrollModifier extends ModifierWithKey { 17590 applyPeer(node, reset) { 17591 if (reset) { 17592 getUINativeModule().scroll.resetNestedScroll(node); 17593 } 17594 else { 17595 getUINativeModule().scroll.setNestedScroll(node, this.value.scrollForward, this.value.scrollBackward); 17596 } 17597 } 17598 checkObjectDiff() { 17599 return !isBaseOrResourceEqual(this.stageValue.scrollForward, this.value.scrollForward) || 17600 !isBaseOrResourceEqual(this.stageValue.scrollBackward, this.value.scrollBackward); 17601 } 17602} 17603ScrollNestedScrollModifier.identity = Symbol('nestedScroll'); 17604class ScrollEnableScrollInteractionModifier extends ModifierWithKey { 17605 applyPeer(node, reset) { 17606 if (reset) { 17607 getUINativeModule().scroll.resetEnableScroll(node); 17608 } 17609 else { 17610 getUINativeModule().scroll.setEnableScroll(node, this.value); 17611 } 17612 } 17613 checkObjectDiff() { 17614 return !isBaseOrResourceEqual(this.stageValue, this.value); 17615 } 17616} 17617ScrollEnableScrollInteractionModifier.identity = Symbol('enableScrollInteraction'); 17618class ScrollEnablePagingModifier extends ModifierWithKey { 17619 applyPeer(node, reset) { 17620 if (reset) { 17621 getUINativeModule().scroll.resetEnablePaging(node); 17622 } else { 17623 getUINativeModule().scroll.setEnablePaging(node, this.value); 17624 } 17625 } 17626} 17627ScrollEnablePagingModifier.identity = Symbol('scrollEnablePaging'); 17628class ScrollFrictionModifier extends ModifierWithKey { 17629 applyPeer(node, reset) { 17630 if (reset) { 17631 getUINativeModule().scroll.resetFriction(node); 17632 } 17633 else { 17634 getUINativeModule().scroll.setFriction(node, this.value); 17635 } 17636 } 17637 checkObjectDiff() { 17638 return !isBaseOrResourceEqual(this.stageValue, this.value); 17639 } 17640} 17641ScrollFrictionModifier.identity = Symbol('friction'); 17642class ScrollScrollSnapModifier extends ModifierWithKey { 17643 applyPeer(node, reset) { 17644 if (reset) { 17645 getUINativeModule().scroll.resetScrollSnap(node); 17646 } 17647 else { 17648 let snapPagination = []; 17649 let isArray = true; 17650 if (Array.isArray(this.value.snapPagination)) { 17651 for (let i = 0; i < this.value.snapPagination.length; i++) { 17652 let item = this.value.snapPagination[i]; 17653 snapPagination.push(item); 17654 } 17655 } 17656 else { 17657 isArray = false; 17658 } 17659 if (isArray) { 17660 getUINativeModule().scroll.setScrollSnap(node, this.value.snapAlign, snapPagination, 17661 this.value.enableSnapToStart, this.value.enableSnapToEnd); 17662 } 17663 else { 17664 getUINativeModule().scroll.setScrollSnap(node, this.value.snapAlign, this.value.snapPagination, 17665 this.value.enableSnapToStart, this.value.enableSnapToEnd); 17666 } 17667 } 17668 } 17669 checkObjectDiff() { 17670 return !((this.stageValue.snapAlign === this.value.snapAlign) && 17671 (this.stageValue.enableSnapToStart === this.value.enableSnapToStart) && 17672 (this.stageValue.enableSnapToEnd === this.value.enableSnapToEnd) && 17673 (this.stageValue.snapPagination === this.value.snapPagination)); 17674 } 17675} 17676ScrollScrollSnapModifier.identity = Symbol('scrollSnap'); 17677class ScrollScrollBarModifier extends ModifierWithKey { 17678 applyPeer(node, reset) { 17679 if (reset) { 17680 getUINativeModule().scroll.resetScrollBar(node); 17681 } 17682 else { 17683 getUINativeModule().scroll.setScrollBar(node, this.value); 17684 } 17685 } 17686 checkObjectDiff() { 17687 return !isBaseOrResourceEqual(this.stageValue, this.value); 17688 } 17689} 17690ScrollScrollBarModifier.identity = Symbol('scrollBar'); 17691class ScrollScrollableModifier extends ModifierWithKey { 17692 constructor(value) { 17693 super(value); 17694 } 17695 applyPeer(node, reset) { 17696 if (reset) { 17697 getUINativeModule().scroll.resetScrollable(node); 17698 } 17699 else { 17700 getUINativeModule().scroll.setScrollable(node, this.value); 17701 } 17702 } 17703 checkObjectDiff() { 17704 return this.stageValue !== this.value; 17705 } 17706} 17707ScrollScrollableModifier.identity = Symbol('scrollable'); 17708class ScrollEdgeEffectModifier extends ModifierWithKey { 17709 constructor(value) { 17710 super(value); 17711 } 17712 applyPeer(node, reset) { 17713 let _a; 17714 if (reset) { 17715 getUINativeModule().scroll.resetEdgeEffect(node); 17716 } 17717 else { 17718 getUINativeModule().scroll.setEdgeEffect(node, this.value.value, (_a = this.value.options) === null || _a === 17719 void 0 ? void 0 : _a.alwaysEnabled); 17720 } 17721 } 17722 checkObjectDiff() { 17723 return !((this.stageValue.value === this.value.value) && 17724 (this.stageValue.options === this.value.options)); 17725 } 17726} 17727ScrollEdgeEffectModifier.identity = Symbol('edgeEffect'); 17728class ScrollFadingEdgeModifier extends ModifierWithKey { 17729 constructor(value) { 17730 super(value); 17731 } 17732 applyPeer(node, reset) { 17733 if (reset) { 17734 getUINativeModule().scroll.resetFadingEdge(node); 17735 } 17736 else { 17737 getUINativeModule().scroll.setFadingEdge(node, this.value.value, this.value.options?.fadingEdgeLength); 17738 } 17739 } 17740 checkObjectDiff() { 17741 return !((this.stageValue.value === this.value.value) && 17742 (this.stageValue.options === this.value.options)); 17743 } 17744} 17745ScrollFadingEdgeModifier.identity = Symbol('scrollFadingEdge'); 17746class ScrollScrollBarWidthModifier extends ModifierWithKey { 17747 constructor(value) { 17748 super(value); 17749 } 17750 applyPeer(node, reset) { 17751 if (reset) { 17752 getUINativeModule().scroll.resetScrollBarWidth(node); 17753 } 17754 else { 17755 getUINativeModule().scroll.setScrollBarWidth(node, this.value); 17756 } 17757 } 17758 checkObjectDiff() { 17759 return this.stageValue !== this.value; 17760 } 17761} 17762ScrollScrollBarWidthModifier.identity = Symbol('scrollBarWidth'); 17763class ScrollScrollBarColorModifier extends ModifierWithKey { 17764 constructor(value) { 17765 super(value); 17766 } 17767 applyPeer(node, reset) { 17768 if (reset) { 17769 getUINativeModule().scroll.resetScrollBarColor(node); 17770 } 17771 else { 17772 getUINativeModule().scroll.setScrollBarColor(node, this.value); 17773 } 17774 } 17775 checkObjectDiff() { 17776 return !isBaseOrResourceEqual(this.stageValue, this.value); 17777 } 17778} 17779ScrollScrollBarColorModifier.identity = Symbol('scrollBarColor'); 17780class ScrollClipModifier extends ModifierWithKey { 17781 constructor(value) { 17782 super(value); 17783 } 17784 applyPeer(node, reset) { 17785 if (reset) { 17786 getUINativeModule().common.resetClipWithEdge(node); 17787 } 17788 else { 17789 getUINativeModule().common.setClipWithEdge(node, this.value); 17790 } 17791 } 17792 checkObjectDiff() { 17793 return true; 17794 } 17795} 17796ScrollClipModifier.identity = Symbol('scrollClip'); 17797class ScrollInitialOffsetModifier extends ModifierWithKey { 17798 applyPeer(node, reset) { 17799 if (reset) { 17800 getUINativeModule().scroll.resetInitialOffset(node); 17801 } 17802 else { 17803 getUINativeModule().scroll.setInitialOffset(node, this.value.xOffset, this.value.yOffset); 17804 } 17805 } 17806 checkObjectDiff() { 17807 return !((this.stageValue.xOffset === this.value.xOffset) && 17808 (this.stageValue.yOffset === this.value.yOffset)); 17809 } 17810} 17811ScrollInitialOffsetModifier.identity = Symbol('initialOffset'); 17812 17813class ScrollFlingSpeedLimitModifier extends ModifierWithKey { 17814 applyPeer(node, reset) { 17815 if (reset) { 17816 getUINativeModule().scroll.resetFlingSpeedLimit(node); 17817 } else { 17818 getUINativeModule().scroll.setFlingSpeedLimit(node, this.value); 17819 } 17820 } 17821 checkObjectDiff() { 17822 return true; 17823 } 17824} 17825ScrollFlingSpeedLimitModifier.identity = Symbol('flingSpeedLimit'); 17826 17827class ScrollInitializeModifier extends ModifierWithKey { 17828 constructor(value) { 17829 super(value); 17830 } 17831 applyPeer(node, reset) { 17832 if (reset) { 17833 getUINativeModule().scroll.resetScrollInitialize(node); 17834 } 17835 else { 17836 getUINativeModule().scroll.setScrollInitialize(node, this.value); 17837 } 17838 } 17839} 17840ScrollInitializeModifier.identity = Symbol('scrollInitialize'); 17841 17842class ScrollOnScrollStartModifier extends ModifierWithKey { 17843 constructor(value) { 17844 super(value); 17845 } 17846 applyPeer(node, reset) { 17847 if (reset) { 17848 getUINativeModule().scroll.resetScrollOnScrollStart(node); 17849 } else { 17850 getUINativeModule().scroll.setScrollOnScrollStart(node, this.value); 17851 } 17852 } 17853} 17854ScrollOnScrollStartModifier.identity = Symbol('scrollOnScrollStart'); 17855 17856class ScrollOnScrollEndModifier extends ModifierWithKey { 17857 constructor(value) { 17858 super(value); 17859 } 17860 applyPeer(node, reset) { 17861 if (reset) { 17862 getUINativeModule().scroll.resetScrollOnScrollEnd(node); 17863 } else { 17864 getUINativeModule().scroll.setScrollOnScrollEnd(node, this.value); 17865 } 17866 } 17867} 17868ScrollOnScrollEndModifier.identity = Symbol('scrollOnScrollEnd'); 17869 17870class ScrollOnScrollStopModifier extends ModifierWithKey { 17871 constructor(value) { 17872 super(value); 17873 } 17874 applyPeer(node, reset) { 17875 if (reset) { 17876 getUINativeModule().scroll.resetScrollOnScrollStop(node); 17877 } else { 17878 getUINativeModule().scroll.setScrollOnScrollStop(node, this.value); 17879 } 17880 } 17881} 17882ScrollOnScrollStopModifier.identity = Symbol('scrollOnScrollStop'); 17883 17884class ScrollOnScrollModifier extends ModifierWithKey { 17885 constructor(value) { 17886 super(value); 17887 } 17888 applyPeer(node, reset) { 17889 if (reset) { 17890 getUINativeModule().scroll.resetScrollOnScroll(node); 17891 } else { 17892 getUINativeModule().scroll.setScrollOnScroll(node, this.value); 17893 } 17894 } 17895} 17896ScrollOnScrollModifier.identity = Symbol('scrollOnScroll'); 17897 17898class ScrollOnScrollEdgeModifier extends ModifierWithKey { 17899 constructor(value) { 17900 super(value); 17901 } 17902 applyPeer(node, reset) { 17903 if (reset) { 17904 getUINativeModule().scroll.resetScrollOnScrollEdge(node); 17905 } else { 17906 getUINativeModule().scroll.setScrollOnScrollEdge(node, this.value); 17907 } 17908 } 17909} 17910ScrollOnScrollEdgeModifier.identity = Symbol('scrollOnScrollEdge'); 17911 17912class ScrollOnDidScrollModifier extends ModifierWithKey { 17913 constructor(value) { 17914 super(value); 17915 } 17916 applyPeer(node, reset) { 17917 if (reset) { 17918 getUINativeModule().scroll.resetScrollOnDidScroll(node); 17919 } else { 17920 getUINativeModule().scroll.setScrollOnDidScroll(node, this.value); 17921 } 17922 } 17923} 17924ScrollOnDidScrollModifier.identity = Symbol('scrollOnDidScroll'); 17925 17926class ScrollOnWillScrollModifier extends ModifierWithKey { 17927 constructor(value) { 17928 super(value); 17929 } 17930 applyPeer(node, reset) { 17931 if (reset) { 17932 getUINativeModule().scroll.resetScrollOnWillScroll(node); 17933 } else { 17934 getUINativeModule().scroll.setScrollOnWillScroll(node, this.value); 17935 } 17936 } 17937} 17938ScrollOnWillScrollModifier.identity = Symbol('scrollOnWillScroll'); 17939 17940class ScrollOnScrollFrameBeginModifier extends ModifierWithKey { 17941 constructor(value) { 17942 super(value); 17943 } 17944 applyPeer(node, reset) { 17945 if (reset) { 17946 getUINativeModule().scroll.resetScrollOnScrollFrameBegin(node); 17947 } else { 17948 getUINativeModule().scroll.setScrollOnScrollFrameBegin(node, this.value); 17949 } 17950 } 17951} 17952ScrollOnScrollFrameBeginModifier.identity = Symbol('scrollOnScrollFrameBegin'); 17953 17954class ArkScrollComponent extends ArkScrollable { 17955 constructor(nativePtr, classType) { 17956 super(nativePtr, classType); 17957 } 17958 initialize(value) { 17959 if (value[0] !== undefined) { 17960 modifierWithKey(this._modifiersWithKeys, ScrollInitializeModifier.identity, ScrollInitializeModifier, value[0]); 17961 } 17962 return this; 17963 } 17964 allowChildCount() { 17965 return 1; 17966 } 17967 scrollable(value) { 17968 modifierWithKey(this._modifiersWithKeys, ScrollScrollableModifier.identity, ScrollScrollableModifier, value); 17969 return this; 17970 } 17971 onScroll(event) { 17972 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollModifier.identity, ScrollOnScrollModifier, event); 17973 return this; 17974 } 17975 onScrollEdge(event) { 17976 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollEdgeModifier.identity, ScrollOnScrollEdgeModifier, event); 17977 return this; 17978 } 17979 onScrollStart(event) { 17980 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollStartModifier.identity, ScrollOnScrollStartModifier, event); 17981 return this; 17982 } 17983 onScrollEnd(event) { 17984 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollEndModifier.identity, ScrollOnScrollEndModifier, event); 17985 return this; 17986 } 17987 onScrollStop(event) { 17988 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollStopModifier.identity, ScrollOnScrollStopModifier, event); 17989 return this; 17990 } 17991 scrollBar(value) { 17992 if (value in BarState) { 17993 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarModifier.identity, ScrollScrollBarModifier, value); 17994 } 17995 else { 17996 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarModifier.identity, ScrollScrollBarModifier, undefined); 17997 } 17998 return this; 17999 } 18000 scrollBarColor(color) { 18001 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarColorModifier.identity, ScrollScrollBarColorModifier, color); 18002 return this; 18003 } 18004 scrollBarWidth(value) { 18005 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarWidthModifier.identity, ScrollScrollBarWidthModifier, value); 18006 return this; 18007 } 18008 edgeEffect(value, options) { 18009 let effect = new ArkScrollEdgeEffect(); 18010 effect.value = value; 18011 effect.options = options; 18012 modifierWithKey(this._modifiersWithKeys, ScrollEdgeEffectModifier.identity, ScrollEdgeEffectModifier, effect); 18013 return this; 18014 } 18015 fadingEdge(value, options) { 18016 let fadingEdge = new ArkFadingEdge(); 18017 fadingEdge.value = value; 18018 fadingEdge.options = options; 18019 modifierWithKey(this._modifiersWithKeys, ScrollFadingEdgeModifier.identity, ScrollFadingEdgeModifier, fadingEdge); 18020 return this; 18021 } 18022 onScrollFrameBegin(callback) { 18023 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollFrameBeginModifier.identity, ScrollOnScrollFrameBeginModifier, callback); 18024 return this; 18025 } 18026 18027 onWillScroll(callback) { 18028 modifierWithKey(this._modifiersWithKeys, ScrollOnWillScrollModifier.identity, ScrollOnWillScrollModifier, callback); 18029 return this; 18030 } 18031 18032 onDidScroll(callback) { 18033 modifierWithKey(this._modifiersWithKeys, ScrollOnDidScrollModifier.identity, ScrollOnDidScrollModifier, callback); 18034 return this; 18035 } 18036 18037 nestedScroll(value) { 18038 let options = new ArkNestedScrollOptions(); 18039 if (value) { 18040 if (value.scrollForward) { 18041 options.scrollForward = value.scrollForward; 18042 } 18043 if (value.scrollBackward) { 18044 options.scrollBackward = value.scrollBackward; 18045 } 18046 modifierWithKey(this._modifiersWithKeys, ScrollNestedScrollModifier.identity, ScrollNestedScrollModifier, options); 18047 } 18048 return this; 18049 } 18050 enableScrollInteraction(value) { 18051 modifierWithKey(this._modifiersWithKeys, ScrollEnableScrollInteractionModifier.identity, ScrollEnableScrollInteractionModifier, value); 18052 return this; 18053 } 18054 enablePaging(value) { 18055 modifierWithKey(this._modifiersWithKeys, ScrollEnablePagingModifier.identity, ScrollEnablePagingModifier, value); 18056 return this; 18057 } 18058 friction(value) { 18059 modifierWithKey(this._modifiersWithKeys, ScrollFrictionModifier.identity, ScrollFrictionModifier, value); 18060 return this; 18061 } 18062 scrollSnap(value) { 18063 let options = new ArkScrollSnapOptions(); 18064 if (value) { 18065 if (value.snapAlign) { 18066 options.snapAlign = value.snapAlign; 18067 } 18068 if (value.snapPagination) { 18069 options.snapPagination = value.snapPagination; 18070 } 18071 if (value.enableSnapToStart) { 18072 options.enableSnapToStart = value.enableSnapToStart; 18073 } 18074 if (value.enableSnapToEnd) { 18075 options.enableSnapToEnd = value.enableSnapToEnd; 18076 } 18077 modifierWithKey(this._modifiersWithKeys, ScrollScrollSnapModifier.identity, ScrollScrollSnapModifier, options); 18078 } 18079 return this; 18080 } 18081 clip(value) { 18082 modifierWithKey(this._modifiersWithKeys, ScrollClipModifier.identity, ScrollClipModifier, value); 18083 return this; 18084 } 18085 initialOffset(value) { 18086 let options = new ArkScrollOffsetOptions(); 18087 if (value) { 18088 if (value.xOffset) { 18089 options.xOffset = value.xOffset; 18090 } 18091 if (value.yOffset) { 18092 options.yOffset = value.yOffset; 18093 } 18094 modifierWithKey(this._modifiersWithKeys, ScrollInitialOffsetModifier.identity, ScrollInitialOffsetModifier, options); 18095 } 18096 return this; 18097 } 18098 flingSpeedLimit(value) { 18099 modifierWithKey(this._modifiersWithKeys, ScrollFlingSpeedLimitModifier.identity, ScrollFlingSpeedLimitModifier, value); 18100 return this; 18101 } 18102} 18103// @ts-ignore 18104if (globalThis.Scroll !== undefined) { 18105 globalThis.Scroll.attributeModifier = function (modifier) { 18106 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18107 return new ArkScrollComponent(nativePtr); 18108 }, (nativePtr, classType, modifierJS) => { 18109 return new modifierJS.ScrollModifier(nativePtr, classType); 18110 }); 18111 }; 18112} 18113 18114/// <reference path='./import.ts' /> 18115class ArkToggleComponent extends ArkComponent { 18116 constructor(nativePtr, classType) { 18117 super(nativePtr, classType); 18118 } 18119 onChange(callback) { 18120 throw new Error('Method not implemented.'); 18121 } 18122 selectedColor(value) { 18123 modifierWithKey(this._modifiersWithKeys, ToggleSelectedColorModifier.identity, ToggleSelectedColorModifier, value); 18124 return this; 18125 } 18126 switchPointColor(value) { 18127 modifierWithKey(this._modifiersWithKeys, ToggleSwitchPointColorModifier.identity, ToggleSwitchPointColorModifier, value); 18128 return this; 18129 } 18130 height(value) { 18131 modifierWithKey(this._modifiersWithKeys, ToggleHeightModifier.identity, ToggleHeightModifier, value); 18132 return this; 18133 } 18134 responseRegion(value) { 18135 modifierWithKey(this._modifiersWithKeys, ToggleResponseRegionModifier.identity, ToggleResponseRegionModifier, value); 18136 return this; 18137 } 18138 padding(value) { 18139 modifierWithKey(this._modifiersWithKeys, TogglePaddingModifier.identity, TogglePaddingModifier, value); 18140 return this; 18141 } 18142 backgroundColor(value) { 18143 modifierWithKey(this._modifiersWithKeys, ToggleBackgroundColorModifier.identity, ToggleBackgroundColorModifier, value); 18144 return this; 18145 } 18146 hoverEffect(value) { 18147 modifierWithKey(this._modifiersWithKeys, ToggleHoverEffectModifier.identity, ToggleHoverEffectModifier, value); 18148 return this; 18149 } 18150 switchStyle(value) { 18151 modifierWithKey(this._modifiersWithKeys, ToggleSwitchStyleModifier.identity, ToggleSwitchStyleModifier, value); 18152 return this; 18153 } 18154 contentModifier(value) { 18155 modifierWithKey(this._modifiersWithKeys, ToggleContentModifier.identity, ToggleContentModifier, value); 18156 return this; 18157 } 18158 setContentModifier(modifier) { 18159 if (modifier === undefined || modifier === null) { 18160 getUINativeModule().toggle.setContentModifierBuilder(this.nativePtr, false); 18161 return; 18162 } 18163 this.needRebuild = false; 18164 if (this.builder !== modifier.applyContent()) { 18165 this.needRebuild = true; 18166 } 18167 this.builder = modifier.applyContent(); 18168 this.modifier = modifier; 18169 getUINativeModule().toggle.setContentModifierBuilder(this.nativePtr, this); 18170 } 18171 makeContentModifierNode(context, toggleConfiguration) { 18172 toggleConfiguration.contentModifier = this.modifier; 18173 if (isUndefined(this.toggleNode) || this.needRebuild) { 18174 const xNode = globalThis.requireNapi('arkui.node'); 18175 this.toggleNode = new xNode.BuilderNode(context); 18176 this.toggleNode.build(this.builder, toggleConfiguration); 18177 this.needRebuild = false; 18178 } else { 18179 this.toggleNode.update(toggleConfiguration); 18180 } 18181 return this.toggleNode.getFrameNode(); 18182 } 18183} 18184class ToggleSelectedColorModifier extends ModifierWithKey { 18185 constructor(value) { 18186 super(value); 18187 } 18188 applyPeer(node, reset) { 18189 if (reset) { 18190 getUINativeModule().toggle.resetSelectedColor(node); 18191 } 18192 else { 18193 getUINativeModule().toggle.setSelectedColor(node, this.value); 18194 } 18195 } 18196 checkObjectDiff() { 18197 return !isBaseOrResourceEqual(this.stageValue, this.value); 18198 } 18199} 18200ToggleSelectedColorModifier.identity = Symbol('toggleSelectedColor'); 18201class ToggleSwitchPointColorModifier extends ModifierWithKey { 18202 constructor(value) { 18203 super(value); 18204 } 18205 applyPeer(node, reset) { 18206 if (reset) { 18207 getUINativeModule().toggle.resetSwitchPointColor(node); 18208 } 18209 else { 18210 getUINativeModule().toggle.setSwitchPointColor(node, this.value); 18211 } 18212 } 18213 checkObjectDiff() { 18214 return !isBaseOrResourceEqual(this.stageValue, this.value); 18215 } 18216} 18217ToggleSwitchPointColorModifier.identity = Symbol('toggleSwitchPointColor'); 18218class ToggleHeightModifier extends ModifierWithKey { 18219 constructor(value) { 18220 super(value); 18221 } 18222 applyPeer(node, reset) { 18223 if (reset) { 18224 getUINativeModule().toggle.resetHeight(node); 18225 } 18226 else { 18227 getUINativeModule().toggle.setHeight(node, this.value); 18228 } 18229 } 18230 checkObjectDiff() { 18231 return !isBaseOrResourceEqual(this.stageValue, this.value); 18232 } 18233} 18234ToggleHeightModifier.identity = Symbol('toggleHeight'); 18235class ToggleResponseRegionModifier extends ModifierWithKey { 18236 constructor(value) { 18237 super(value); 18238 } 18239 applyPeer(node, reset) { 18240 let _a, _b, _c, _d, _e, _f, _g, _h; 18241 if (reset) { 18242 getUINativeModule().toggle.resetResponseRegion(node); 18243 } 18244 else { 18245 let responseRegion = []; 18246 if (Array.isArray(this.value)) { 18247 for (let i = 0; i < this.value.length; i++) { 18248 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 18249 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 18250 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 18251 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 18252 } 18253 } 18254 else { 18255 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 18256 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 18257 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 18258 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 18259 } 18260 getUINativeModule().toggle.setResponseRegion(node, responseRegion, responseRegion.length); 18261 } 18262 } 18263 checkObjectDiff() { 18264 if (Array.isArray(this.stageValue) && Array.isArray(this.value)) { 18265 if (this.value.length !== this.stageValue.length) { 18266 return true; 18267 } 18268 else { 18269 for (let i = 0; i < this.value.length; i++) { 18270 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 18271 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 18272 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 18273 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 18274 return true; 18275 } 18276 } 18277 return false; 18278 } 18279 } 18280 else if (typeof this.stageValue === 'object' && typeof this.value === 'object') { 18281 return !(this.stageValue.x === this.value.x && 18282 this.stageValue.y === this.value.y && 18283 this.stageValue.height === this.value.height && 18284 this.stageValue.width === this.value.width); 18285 } 18286 else { 18287 return true; 18288 } 18289 } 18290} 18291ToggleResponseRegionModifier.identity = Symbol('toggleResponseRegion'); 18292class TogglePaddingModifier extends ModifierWithKey { 18293 constructor(value) { 18294 super(value); 18295 } 18296 applyPeer(node, reset) { 18297 if (reset) { 18298 getUINativeModule().toggle.resetPadding(node); 18299 } 18300 else { 18301 let top = undefined; 18302 let right = undefined; 18303 let bottom = undefined; 18304 let left = undefined; 18305 if (isLengthType(this.value) || isResource(this.value)) { 18306 top = this.value; 18307 right = this.value; 18308 bottom = this.value; 18309 left = this.value; 18310 } 18311 else if (typeof this.value === 'object') { 18312 top = this.value.top; 18313 right = this.value.right; 18314 bottom = this.value.bottom; 18315 left = this.value.left; 18316 } 18317 getUINativeModule().toggle.setPadding(node, top, right, bottom, left); 18318 } 18319 } 18320 checkObjectDiff() { 18321 if (isResource(this.stageValue) && isResource(this.value)) { 18322 return !isResourceEqual(this.stageValue, this.value); 18323 } 18324 else if (!isResource(this.stageValue) && !isResource(this.value)) { 18325 if (typeof this.stageValue === 'object' && typeof this.value === 'object') { 18326 return !(this.stageValue.left === this.value.left && 18327 this.stageValue.right === this.value.right && 18328 this.stageValue.top === this.value.top && 18329 this.stageValue.bottom === this.value.bottom); 18330 } 18331 else { 18332 return !(this.stageValue === this.value); 18333 } 18334 } 18335 return true; 18336 } 18337} 18338TogglePaddingModifier.identity = Symbol('togglePadding'); 18339class ToggleBackgroundColorModifier extends ModifierWithKey { 18340 constructor(value) { 18341 super(value); 18342 } 18343 applyPeer(node, reset) { 18344 if (reset) { 18345 getUINativeModule().toggle.resetBackgroundColor(node); 18346 } 18347 else { 18348 getUINativeModule().toggle.setBackgroundColor(node, this.value); 18349 } 18350 } 18351 checkObjectDiff() { 18352 return !isBaseOrResourceEqual(this.stageValue, this.value); 18353 } 18354} 18355ToggleBackgroundColorModifier.identity = Symbol('toggleBackgroundColor'); 18356class ToggleHoverEffectModifier extends ModifierWithKey { 18357 constructor(value) { 18358 super(value); 18359 } 18360 applyPeer(node, reset) { 18361 if (reset) { 18362 getUINativeModule().toggle.resetHoverEffect(node); 18363 } 18364 else { 18365 getUINativeModule().toggle.setHoverEffect(node, this.value); 18366 } 18367 } 18368} 18369ToggleHoverEffectModifier.identity = Symbol('toggleHoverEffect'); 18370class ToggleSwitchStyleModifier extends ModifierWithKey { 18371 constructor(value) { 18372 super(value); 18373 } 18374 applyPeer(node, reset) { 18375 if (reset) { 18376 getUINativeModule().toggle.resetSwitchStyle(node); 18377 } 18378 else { 18379 getUINativeModule().toggle.setSwitchStyle(node, this.value.pointRadius, this.value.unselectedColor, this.value.pointColor, this.value.trackBorderRadius); 18380 } 18381 } 18382 checkObjectDiff() { 18383 if (!isResource(this.stageValue) && !isResource(this.value)) { 18384 return !(this.stageValue.pointRadius === this.value.pointRadius && 18385 this.stageValue.unselectedColor === this.value.unselectedColor && 18386 this.stageValue.pointColor === this.value.pointColor && 18387 this.stageValue.trackBorderRadius === this.value.trackBorderRadius); 18388 } 18389 else if (isResource(this.stageValue) && isResource(this.value)){ 18390 return !(isResourceEqual(this.stageValue.pointRadius, this.value.pointRadius) && 18391 isResourceEqual(this.stageValue.unselectedColor, this.value.unselectedColor) && 18392 isResourceEqual(this.stageValue.pointColor, this.value.pointColor) && 18393 isResourceEqual(this.stageValue.trackBorderRadius, this.value.trackBorderRadius)); 18394 } 18395 else { 18396 return true; 18397 } 18398 } 18399} 18400ToggleSwitchStyleModifier.identity = Symbol('toggleSwitchStyle'); 18401class ToggleContentModifier extends ModifierWithKey { 18402 constructor(value) { 18403 super(value); 18404 } 18405 applyPeer(node, reset, component) { 18406 let toggleComponent = component; 18407 toggleComponent.setNodePtr(node); 18408 toggleComponent.setContentModifier(this.value); 18409 } 18410} 18411ToggleContentModifier.identity = Symbol('toggleContentModifier'); 18412// @ts-ignore 18413if (globalThis.Toggle !== undefined) { 18414 globalThis.Toggle.attributeModifier = function (modifier) { 18415 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18416 return new ArkToggleComponent(nativePtr); 18417 }, (nativePtr, classType, modifierJS) => { 18418 return new modifierJS.ToggleModifier(nativePtr, classType); 18419 }); 18420 }; 18421 globalThis.Toggle.contentModifier = function (modifier) { 18422 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 18423 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 18424 let component = this.createOrGetNode(elmtId, () => { 18425 return new ArkToggleComponent(nativeNode); 18426 }); 18427 component.setNodePtr(nativeNode); 18428 component.setContentModifier(modifier); 18429 }; 18430} 18431 18432/// <reference path='./import.ts' /> 18433class ArkSelectComponent extends ArkComponent { 18434 constructor(nativePtr, classType) { 18435 super(nativePtr, classType); 18436 } 18437 optionWidth(value) { 18438 modifierWithKey(this._modifiersWithKeys, SelectOptionWidthModifier.identity, SelectOptionWidthModifier, value); 18439 return this; 18440 } 18441 optionHeight(value) { 18442 modifierWithKey(this._modifiersWithKeys, SelectOptionHeightModifier.identity, SelectOptionHeightModifier, value); 18443 return this; 18444 } 18445 width(value) { 18446 modifierWithKey(this._modifiersWithKeys, SelectWidthModifier.identity, SelectWidthModifier, value); 18447 return this; 18448 } 18449 height(value) { 18450 modifierWithKey(this._modifiersWithKeys, SelectHeightModifier.identity, SelectHeightModifier, value); 18451 return this; 18452 } 18453 size(value) { 18454 modifierWithKey(this._modifiersWithKeys, SelectSizeModifier.identity, SelectSizeModifier, value); 18455 return this; 18456 } 18457 selected(value) { 18458 modifierWithKey(this._modifiersWithKeys, SelectedModifier.identity, SelectedModifier, value); 18459 return this; 18460 } 18461 value(value) { 18462 modifierWithKey(this._modifiersWithKeys, ValueModifier.identity, ValueModifier, value); 18463 return this; 18464 } 18465 font(value) { 18466 modifierWithKey(this._modifiersWithKeys, FontModifier.identity, FontModifier, value); 18467 return this; 18468 } 18469 fontColor(value) { 18470 modifierWithKey(this._modifiersWithKeys, SelectFontColorModifier.identity, SelectFontColorModifier, value); 18471 return this; 18472 } 18473 selectedOptionBgColor(value) { 18474 modifierWithKey(this._modifiersWithKeys, SelectedOptionBgColorModifier.identity, SelectedOptionBgColorModifier, value); 18475 return this; 18476 } 18477 selectedOptionFont(value) { 18478 modifierWithKey(this._modifiersWithKeys, SelectedOptionFontModifier.identity, SelectedOptionFontModifier, value); 18479 return this; 18480 } 18481 selectedOptionFontColor(value) { 18482 modifierWithKey(this._modifiersWithKeys, SelectedOptionFontColorModifier.identity, SelectedOptionFontColorModifier, value); 18483 return this; 18484 } 18485 optionBgColor(value) { 18486 modifierWithKey(this._modifiersWithKeys, OptionBgColorModifier.identity, OptionBgColorModifier, value); 18487 return this; 18488 } 18489 optionFont(value) { 18490 modifierWithKey(this._modifiersWithKeys, OptionFontModifier.identity, OptionFontModifier, value); 18491 return this; 18492 } 18493 optionFontColor(value) { 18494 modifierWithKey(this._modifiersWithKeys, OptionFontColorModifier.identity, OptionFontColorModifier, value); 18495 return this; 18496 } 18497 onSelect(callback) { 18498 throw new Error('Method not implemented.'); 18499 } 18500 space(value) { 18501 modifierWithKey(this._modifiersWithKeys, SpaceModifier.identity, SpaceModifier, value); 18502 return this; 18503 } 18504 arrowPosition(value) { 18505 modifierWithKey(this._modifiersWithKeys, ArrowPositionModifier.identity, ArrowPositionModifier, value); 18506 return this; 18507 } 18508 menuAlign(alignType, offset) { 18509 let menuAlign = new ArkMenuAlignType(alignType, offset); 18510 modifierWithKey(this._modifiersWithKeys, MenuAlignModifier.identity, MenuAlignModifier, menuAlign); 18511 return this; 18512 } 18513 menuBackgroundColor(value) { 18514 modifierWithKey( 18515 this._modifiersWithKeys, MenuBackgroundColorModifier.identity, MenuBackgroundColorModifier, value); 18516 return this; 18517 } 18518 menuBackgroundBlurStyle(value) { 18519 modifierWithKey( 18520 this._modifiersWithKeys, MenuBackgroundBlurStyleModifier.identity, MenuBackgroundBlurStyleModifier, value); 18521 return this; 18522 } 18523 controlSize(controlSize) { 18524 modifierWithKey(this._modifiersWithKeys, ControlSizeModifier.identity, ControlSizeModifier, controlSize); 18525 return this; 18526 } 18527 setContentModifier(modifier) { 18528 if (modifier === undefined || modifier === null) { 18529 getUINativeModule().select.setContentModifierBuilder(this.nativePtr, false); 18530 return; 18531 } 18532 this.builder = modifier.applyContent(); 18533 this.modifier = modifier; 18534 getUINativeModule().select.setContentModifierBuilder(this.nativePtr, this); 18535 } 18536 makeContentModifierNode(context, menuItemConfiguration) { 18537 menuItemConfiguration.contentModifier = this.modifier; 18538 const index = menuItemConfiguration.index; 18539 const xNode = globalThis.requireNapi('arkui.node'); 18540 this.menuItemNodes = new xNode.BuilderNode(context); 18541 this.menuItemNodes.build(this.builder, menuItemConfiguration); 18542 return this.menuItemNodes.getFrameNode(); 18543 } 18544 divider(value) { 18545 modifierWithKey(this._modifiersWithKeys, SelectDividerModifier.identity, SelectDividerModifier, value); 18546 return this; 18547 } 18548} 18549class MenuBackgroundColorModifier extends ModifierWithKey { 18550 constructor(value) { 18551 super(value); 18552 } 18553 applyPeer(node, reset) { 18554 if (reset) { 18555 getUINativeModule().select.resetMenuBackgroundColor(node); 18556 } 18557 else { 18558 getUINativeModule().select.setMenuBackgroundColor(node, this.value); 18559 } 18560 } 18561 checkObjectDiff() { 18562 return !isBaseOrResourceEqual(this.stageValue, this.value); 18563 } 18564} 18565MenuBackgroundColorModifier.identity = Symbol('selectMenuBackgroundColor'); 18566class MenuBackgroundBlurStyleModifier extends ModifierWithKey { 18567 constructor(value) { 18568 super(value); 18569 } 18570 applyPeer(node, reset) { 18571 if (reset) { 18572 getUINativeModule().select.resetMenuBackgroundBlurStyle(node); 18573 } 18574 else { 18575 getUINativeModule().select.setMenuBackgroundBlurStyle(node, this.value); 18576 } 18577 } 18578 checkObjectDiff() { 18579 return !isBaseOrResourceEqual(this.stageValue, this.value); 18580 } 18581} 18582MenuBackgroundBlurStyleModifier.identity = Symbol('selectMenuBackgroundBlurStyle'); 18583class FontModifier extends ModifierWithKey { 18584 constructor(value) { 18585 super(value); 18586 } 18587 applyPeer(node, reset) { 18588 if (reset) { 18589 getUINativeModule().select.resetFont(node); 18590 } 18591 else { 18592 getUINativeModule().select.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 18593 } 18594 } 18595 checkObjectDiff() { 18596 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 18597 let weightEQ = this.stageValue.weight === this.value.weight; 18598 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 18599 let styleEQ = this.stageValue.style === this.value.style; 18600 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 18601 } 18602} 18603FontModifier.identity = Symbol('selectFont'); 18604class OptionFontModifier extends ModifierWithKey { 18605 constructor(value) { 18606 super(value); 18607 } 18608 applyPeer(node, reset) { 18609 if (reset) { 18610 getUINativeModule().select.resetOptionFont(node); 18611 } 18612 else { 18613 getUINativeModule().select.setOptionFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 18614 } 18615 } 18616 checkObjectDiff() { 18617 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 18618 let weightEQ = this.stageValue.weight === this.value.weight; 18619 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 18620 let styleEQ = this.stageValue.style === this.value.style; 18621 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 18622 } 18623} 18624OptionFontModifier.identity = Symbol('selectOptionFont'); 18625class SelectedOptionFontModifier extends ModifierWithKey { 18626 constructor(value) { 18627 super(value); 18628 } 18629 applyPeer(node, reset) { 18630 if (reset) { 18631 getUINativeModule().select.resetSelectedOptionFont(node); 18632 } 18633 else { 18634 getUINativeModule().select.setSelectedOptionFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 18635 } 18636 } 18637 checkObjectDiff() { 18638 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 18639 let weightEQ = this.stageValue.weight === this.value.weight; 18640 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 18641 let styleEQ = this.stageValue.style === this.value.style; 18642 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 18643 } 18644} 18645SelectedOptionFontModifier.identity = Symbol('selectSelectedOptionFont'); 18646class MenuAlignModifier extends ModifierWithKey { 18647 constructor(value) { 18648 super(value); 18649 } 18650 applyPeer(node, reset) { 18651 if (reset) { 18652 getUINativeModule().select.resetMenuAlign(node); 18653 } 18654 else { 18655 getUINativeModule().select.setMenuAlign(node, this.value.alignType, this.value.dx, this.value.dy); 18656 } 18657 } 18658 checkObjectDiff() { 18659 let alignTypeEQ = this.stageValue.alignType === this.value.alignType; 18660 let dxEQ = isBaseOrResourceEqual(this.stageValue, this.value); 18661 let dyEQ = isBaseOrResourceEqual(this.stageValue, this.value); 18662 return !alignTypeEQ || !dxEQ || !dyEQ; 18663 } 18664 isEqual(stageValue, value) { 18665 if ((!isUndefined(stageValue) && isResource(stageValue)) && 18666 (!isUndefined(value) && isResource(value))) { 18667 return !isResourceEqual(stageValue, value); 18668 } 18669 else { 18670 return stageValue !== value; 18671 } 18672 } 18673} 18674MenuAlignModifier.identity = Symbol('selectMenuAlign'); 18675class SelectDividerModifier extends ModifierWithKey { 18676 constructor(value) { 18677 super(value); 18678 } 18679 applyPeer(node, reset) { 18680 var _a, _b, _c, _d; 18681 if (reset) { 18682 getUINativeModule().select.resetDivider(node, this.value); 18683 } 18684 else { 18685 getUINativeModule().select.setDivider(node, (_a = this.value) === null || _a === void 0 ? void 0 : _a.strokeWidth, 18686 (_b = this.value) === null || _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || _c === void 0 ? void 0 : _c.startMargin, 18687 (_d = this.value) === null || _d === void 0 ? void 0 : _d.endMargin); 18688 } 18689 } 18690 checkObjectDiff() { 18691 var _a, _b, _c, _d, _e, _f, _g, _h; 18692 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 18693 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 18694 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 18695 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 18696 } 18697} 18698SelectDividerModifier.identity = Symbol('selectDivider'); 18699class ControlSizeModifier extends ModifierWithKey { 18700 constructor(value) { 18701 super(value); 18702 } 18703 applyPeer(node, reset) { 18704 if (reset) { 18705 getUINativeModule().select.resetControlSize(node); 18706 } 18707 else { 18708 getUINativeModule().select.setControlSize(node, this.value); 18709 } 18710 } 18711 checkObjectDiff() { 18712 return this.stageValue !== this.value; 18713 } 18714} 18715ControlSizeModifier.identity = Symbol('controlSize'); 18716class ArrowPositionModifier extends ModifierWithKey { 18717 constructor(value) { 18718 super(value); 18719 } 18720 applyPeer(node, reset) { 18721 if (reset) { 18722 getUINativeModule().select.resetArrowPosition(node); 18723 } 18724 else { 18725 getUINativeModule().select.setArrowPosition(node, this.value); 18726 } 18727 } 18728 checkObjectDiff() { 18729 return this.stageValue !== this.value; 18730 } 18731} 18732ArrowPositionModifier.identity = Symbol('selectArrowPosition'); 18733class SpaceModifier extends ModifierWithKey { 18734 constructor(value) { 18735 super(value); 18736 } 18737 applyPeer(node, reset) { 18738 if (reset) { 18739 getUINativeModule().select.resetSpace(node); 18740 } 18741 else { 18742 getUINativeModule().select.setSpace(node, this.value); 18743 } 18744 } 18745 checkObjectDiff() { 18746 return !isBaseOrResourceEqual(this.stageValue, this.value); 18747 } 18748} 18749SpaceModifier.identity = Symbol('selectSpace'); 18750class ValueModifier extends ModifierWithKey { 18751 constructor(value) { 18752 super(value); 18753 } 18754 applyPeer(node, reset) { 18755 if (reset) { 18756 getUINativeModule().select.resetValue(node); 18757 } 18758 else { 18759 getUINativeModule().select.setValue(node, this.value); 18760 } 18761 } 18762 checkObjectDiff() { 18763 return !isBaseOrResourceEqual(this.stageValue, this.value); 18764 } 18765} 18766ValueModifier.identity = Symbol('selectValue'); 18767class SelectedModifier extends ModifierWithKey { 18768 constructor(value) { 18769 super(value); 18770 } 18771 applyPeer(node, reset) { 18772 if (reset) { 18773 getUINativeModule().select.resetSelected(node); 18774 } 18775 else { 18776 getUINativeModule().select.setSelected(node, this.value); 18777 } 18778 } 18779 checkObjectDiff() { 18780 return !isBaseOrResourceEqual(this.stageValue, this.value); 18781 } 18782} 18783SelectedModifier.identity = Symbol('selectSelected'); 18784class SelectFontColorModifier extends ModifierWithKey { 18785 constructor(value) { 18786 super(value); 18787 } 18788 applyPeer(node, reset) { 18789 if (reset) { 18790 getUINativeModule().select.resetFontColor(node); 18791 } 18792 else { 18793 getUINativeModule().select.setFontColor(node, this.value); 18794 } 18795 } 18796 checkObjectDiff() { 18797 return !isBaseOrResourceEqual(this.stageValue, this.value); 18798 } 18799} 18800SelectFontColorModifier.identity = Symbol('selectFontColor'); 18801class SelectedOptionBgColorModifier extends ModifierWithKey { 18802 constructor(value) { 18803 super(value); 18804 } 18805 applyPeer(node, reset) { 18806 if (reset) { 18807 getUINativeModule().select.resetSelectedOptionBgColor(node); 18808 } 18809 else { 18810 getUINativeModule().select.setSelectedOptionBgColor(node, this.value); 18811 } 18812 } 18813 checkObjectDiff() { 18814 return !isBaseOrResourceEqual(this.stageValue, this.value); 18815 } 18816} 18817SelectedOptionBgColorModifier.identity = Symbol('selectSelectedOptionBgColor'); 18818class OptionBgColorModifier extends ModifierWithKey { 18819 constructor(value) { 18820 super(value); 18821 } 18822 applyPeer(node, reset) { 18823 if (reset) { 18824 getUINativeModule().select.resetOptionBgColor(node); 18825 } 18826 else { 18827 getUINativeModule().select.setOptionBgColor(node, this.value); 18828 } 18829 } 18830 checkObjectDiff() { 18831 return !isBaseOrResourceEqual(this.stageValue, this.value); 18832 } 18833} 18834OptionBgColorModifier.identity = Symbol('selectOptionBgColor'); 18835class OptionFontColorModifier extends ModifierWithKey { 18836 constructor(value) { 18837 super(value); 18838 } 18839 applyPeer(node, reset) { 18840 if (reset) { 18841 getUINativeModule().select.resetOptionFontColor(node); 18842 } 18843 else { 18844 getUINativeModule().select.setOptionFontColor(node, this.value); 18845 } 18846 } 18847 checkObjectDiff() { 18848 return !isBaseOrResourceEqual(this.stageValue, this.value); 18849 } 18850} 18851OptionFontColorModifier.identity = Symbol('selectOptionFontColor'); 18852class SelectedOptionFontColorModifier extends ModifierWithKey { 18853 constructor(value) { 18854 super(value); 18855 } 18856 applyPeer(node, reset) { 18857 if (reset) { 18858 getUINativeModule().select.resetSelectedOptionFontColor(node); 18859 } 18860 else { 18861 getUINativeModule().select.setSelectedOptionFontColor(node, this.value); 18862 } 18863 } 18864 checkObjectDiff() { 18865 return !isBaseOrResourceEqual(this.stageValue, this.value); 18866 } 18867} 18868SelectedOptionFontColorModifier.identity = Symbol('selectSelectedOptionFontColor'); 18869class SelectOptionWidthModifier extends ModifierWithKey { 18870 constructor(value) { 18871 super(value); 18872 } 18873 applyPeer(node, reset) { 18874 if (reset) { 18875 getUINativeModule().select.resetOptionWidth(node); 18876 } else { 18877 getUINativeModule().select.setOptionWidth(node, this.value); 18878 } 18879 } 18880 18881 checkObjectDiff() { 18882 return !isBaseOrResourceEqual(this.stageValue, this.value); 18883 } 18884} 18885SelectOptionWidthModifier.identity = Symbol('selectOptionWidth'); 18886class SelectOptionHeightModifier extends ModifierWithKey { 18887 constructor(value) { 18888 super(value); 18889 } 18890 applyPeer(node, reset) { 18891 if (reset) { 18892 getUINativeModule().select.resetOptionHeight(node); 18893 } else { 18894 getUINativeModule().select.setOptionHeight(node, this.value); 18895 } 18896 } 18897 18898 checkObjectDiff() { 18899 return !isBaseOrResourceEqual(this.stageValue, this.value); 18900 } 18901} 18902SelectOptionHeightModifier.identity = Symbol('selectOptionHeight'); 18903class SelectWidthModifier extends ModifierWithKey { 18904 constructor(value) { 18905 super(value); 18906 } 18907 applyPeer(node, reset) { 18908 if (reset) { 18909 getUINativeModule().select.resetWidth(node); 18910 } else { 18911 getUINativeModule().select.setWidth(node, this.value); 18912 } 18913 } 18914 18915 checkObjectDiff() { 18916 return !isBaseOrResourceEqual(this.stageValue, this.value); 18917 } 18918} 18919SelectWidthModifier.identity = Symbol('selectWidth'); 18920class SelectHeightModifier extends ModifierWithKey { 18921 constructor(value) { 18922 super(value); 18923 } 18924 applyPeer(node, reset) { 18925 if (reset) { 18926 getUINativeModule().select.resetHeight(node); 18927 } else { 18928 getUINativeModule().select.setHeight(node, this.value); 18929 } 18930 } 18931 18932 checkObjectDiff() { 18933 return !isBaseOrResourceEqual(this.stageValue, this.value); 18934 } 18935} 18936SelectHeightModifier.identity = Symbol('selectHeight'); 18937class SelectSizeModifier extends ModifierWithKey { 18938 constructor(value) { 18939 super(value); 18940 } 18941 applyPeer(node, reset) { 18942 if (reset) { 18943 getUINativeModule().select.resetSize(node); 18944 } else { 18945 getUINativeModule().select.setSize(node, this.value.width, this.value.height); 18946 } 18947 } 18948 18949 checkObjectDiff() { 18950 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 18951 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 18952 } 18953} 18954SelectSizeModifier.identity = Symbol('selectSize'); 18955// @ts-ignore 18956if (globalThis.Select !== undefined) { 18957 globalThis.Select.attributeModifier = function (modifier) { 18958 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18959 return new ArkSelectComponent(nativePtr); 18960 }, (nativePtr, classType, modifierJS) => { 18961 return new modifierJS.SelectModifier(nativePtr, classType); 18962 }); 18963 }; 18964 18965 globalThis.Select.menuItemContentModifier = function (modifier) { 18966 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 18967 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 18968 let component = this.createOrGetNode(elmtId, () => { 18969 return new ArkSelectComponent(nativeNode); 18970 }); 18971 component.setContentModifier(modifier); 18972 }; 18973} 18974 18975/// <reference path='./import.ts' /> 18976class ArkRadioComponent extends ArkComponent { 18977 constructor(nativePtr, classType) { 18978 super(nativePtr, classType); 18979 } 18980 checked(value) { 18981 modifierWithKey(this._modifiersWithKeys, RadioCheckedModifier.identity, RadioCheckedModifier, value); 18982 return this; 18983 } 18984 onChange(callback) { 18985 throw new Error('Method not implemented.'); 18986 } 18987 radioStyle(value) { 18988 modifierWithKey(this._modifiersWithKeys, RadioStyleModifier.identity, RadioStyleModifier, value); 18989 return this; 18990 } 18991 width(value) { 18992 modifierWithKey(this._modifiersWithKeys, RadioWidthModifier.identity, RadioWidthModifier, value); 18993 return this; 18994 } 18995 height(value) { 18996 modifierWithKey(this._modifiersWithKeys, RadioHeightModifier.identity, RadioHeightModifier, value); 18997 return this; 18998 } 18999 size(value) { 19000 modifierWithKey(this._modifiersWithKeys, RadioSizeModifier.identity, RadioSizeModifier, value); 19001 return this; 19002 } 19003 hoverEffect(value) { 19004 modifierWithKey(this._modifiersWithKeys, RadioHoverEffectModifier.identity, RadioHoverEffectModifier, value); 19005 return this; 19006 } 19007 padding(value) { 19008 modifierWithKey(this._modifiersWithKeys, RadioPaddingModifier.identity, RadioPaddingModifier, value); 19009 return this; 19010 } 19011 responseRegion(value) { 19012 modifierWithKey(this._modifiersWithKeys, RadioResponseRegionModifier.identity, RadioResponseRegionModifier, value); 19013 return this; 19014 } 19015 contentModifier(value) { 19016 modifierWithKey(this._modifiersWithKeys, RadioContentModifier.identity, RadioContentModifier, value); 19017 return this; 19018 } 19019 setContentModifier(modifier) { 19020 if (modifier === undefined || modifier === null) { 19021 getUINativeModule().radio.setContentModifierBuilder(this.nativePtr, false); 19022 return; 19023 } 19024 this.needRebuild = false; 19025 if (this.builder !== modifier.applyContent()) { 19026 this.needRebuild = true; 19027 } 19028 this.builder = modifier.applyContent(); 19029 this.modifier = modifier; 19030 getUINativeModule().radio.setContentModifierBuilder(this.nativePtr, this); 19031 } 19032 makeContentModifierNode(context, radioConfiguration) { 19033 radioConfiguration.contentModifier = this.modifier; 19034 if (isUndefined(this.radioNode) || this.needRebuild) { 19035 const xNode = globalThis.requireNapi('arkui.node'); 19036 this.radioNode = new xNode.BuilderNode(context); 19037 this.radioNode.build(this.builder, radioConfiguration); 19038 this.needRebuild = false; 19039 } else { 19040 this.radioNode.update(radioConfiguration); 19041 } 19042 return this.radioNode.getFrameNode(); 19043 } 19044} 19045class RadioCheckedModifier extends ModifierWithKey { 19046 constructor(value) { 19047 super(value); 19048 } 19049 applyPeer(node, reset) { 19050 if (reset) { 19051 getUINativeModule().radio.resetRadioChecked(node); 19052 } 19053 else { 19054 getUINativeModule().radio.setRadioChecked(node, this.value); 19055 } 19056 } 19057} 19058RadioCheckedModifier.identity = Symbol('radioChecked'); 19059class RadioStyleModifier extends ModifierWithKey { 19060 constructor(value) { 19061 super(value); 19062 } 19063 applyPeer(node, reset) { 19064 if (reset) { 19065 getUINativeModule().radio.resetRadioStyle(node); 19066 } 19067 else { 19068 getUINativeModule().radio.setRadioStyle(node, this.value.checkedBackgroundColor, this.value.uncheckedBorderColor, this.value.indicatorColor); 19069 } 19070 } 19071 checkObjectDiff() { 19072 let checkedBackgroundColorEQ = isBaseOrResourceEqual(this.stageValue.checkedBackgroundColor, this.value.checkedBackgroundColor); 19073 let uncheckedBorderColorEQ = isBaseOrResourceEqual(this.stageValue.uncheckedBorderColor, this.value.uncheckedBorderColor); 19074 let indicatorColorEQ = isBaseOrResourceEqual(this.stageValue.indicatorColor, this.value.indicatorColor); 19075 return !checkedBackgroundColorEQ || 19076 !uncheckedBorderColorEQ || 19077 !indicatorColorEQ; 19078 } 19079} 19080RadioStyleModifier.identity = Symbol('radioStyle'); 19081class RadioWidthModifier extends ModifierWithKey { 19082 constructor(value) { 19083 super(value); 19084 } 19085 applyPeer(node, reset) { 19086 if (reset) { 19087 getUINativeModule().radio.resetRadioWidth(node); 19088 } 19089 else { 19090 getUINativeModule().radio.setRadioWidth(node, this.value); 19091 } 19092 } 19093 checkObjectDiff() { 19094 return !isBaseOrResourceEqual(this.stageValue, this.value); 19095 } 19096} 19097RadioWidthModifier.identity = Symbol('radioWidth'); 19098class RadioHeightModifier extends ModifierWithKey { 19099 constructor(value) { 19100 super(value); 19101 } 19102 applyPeer(node, reset) { 19103 if (reset) { 19104 getUINativeModule().radio.resetRadioHeight(node); 19105 } 19106 else { 19107 getUINativeModule().radio.setRadioHeight(node, this.value); 19108 } 19109 } 19110 checkObjectDiff() { 19111 return !isBaseOrResourceEqual(this.stageValue, this.value); 19112 } 19113} 19114RadioHeightModifier.identity = Symbol('radioHeight'); 19115class RadioSizeModifier extends ModifierWithKey { 19116 constructor(value) { 19117 super(value); 19118 } 19119 applyPeer(node, reset) { 19120 if (reset) { 19121 getUINativeModule().radio.resetRadioSize(node); 19122 } 19123 else { 19124 getUINativeModule().radio.setRadioSize(node, this.value.width, this.value.height); 19125 } 19126 } 19127 checkObjectDiff() { 19128 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 19129 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 19130 } 19131} 19132RadioSizeModifier.identity = Symbol('radioSize'); 19133class RadioHoverEffectModifier extends ModifierWithKey { 19134 constructor(value) { 19135 super(value); 19136 } 19137 applyPeer(node, reset) { 19138 if (reset) { 19139 getUINativeModule().radio.resetRadioHoverEffect(node); 19140 } 19141 else { 19142 getUINativeModule().radio.setRadioHoverEffect(node, this.value); 19143 } 19144 } 19145 checkObjectDiff() { 19146 return !isBaseOrResourceEqual(this.stageValue, this.value); 19147 } 19148} 19149RadioHoverEffectModifier.identity = Symbol('radioHoverEffect'); 19150class RadioPaddingModifier extends ModifierWithKey { 19151 constructor(value) { 19152 super(value); 19153 } 19154 applyPeer(node, reset) { 19155 if (reset) { 19156 getUINativeModule().radio.resetRadioPadding(node); 19157 } 19158 else { 19159 let paddingTop; 19160 let paddingRight; 19161 let paddingBottom; 19162 let paddingLeft; 19163 if (this.value !== null && this.value !== undefined) { 19164 if (isLengthType(this.value) || isResource(this.value)) { 19165 paddingTop = this.value; 19166 paddingRight = this.value; 19167 paddingBottom = this.value; 19168 paddingLeft = this.value; 19169 } 19170 else { 19171 paddingTop = this.value.top; 19172 paddingRight = this.value.right; 19173 paddingBottom = this.value.bottom; 19174 paddingLeft = this.value.left; 19175 } 19176 } 19177 getUINativeModule().radio.setRadioPadding(node, paddingTop, paddingRight, paddingBottom, paddingLeft); 19178 } 19179 } 19180 checkObjectDiff() { 19181 if (isResource(this.stageValue) && isResource(this.value)) { 19182 return !isResourceEqual(this.stageValue, this.value); 19183 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 19184 return !(this.stageValue.left === this.value.left && 19185 this.stageValue.right === this.value.right && 19186 this.stageValue.top === this.value.top && 19187 this.stageValue.bottom === this.value.bottom); 19188 } else { 19189 return true; 19190 } 19191 } 19192} 19193RadioPaddingModifier.identity = Symbol('radioPadding'); 19194class RadioResponseRegionModifier extends ModifierWithKey { 19195 constructor(value) { 19196 super(value); 19197 } 19198 applyPeer(node, reset) { 19199 let _a, _b, _c, _d, _e, _f, _g, _h; 19200 if (reset) { 19201 getUINativeModule().radio.resetRadioResponseRegion(node); 19202 } 19203 else { 19204 let responseRegion = []; 19205 if (Array.isArray(this.value)) { 19206 for (let i = 0; i < this.value.length; i++) { 19207 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 19208 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 19209 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 19210 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 19211 } 19212 } 19213 else { 19214 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 19215 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 19216 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 19217 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 19218 } 19219 getUINativeModule().radio.setRadioResponseRegion(node, responseRegion, responseRegion.length); 19220 } 19221 } 19222 checkObjectDiff() { 19223 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 19224 if (this.value.length !== this.stageValue.length) { 19225 return true; 19226 } 19227 else { 19228 for (let i = 0; i < this.value.length; i++) { 19229 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 19230 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 19231 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 19232 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 19233 return true; 19234 } 19235 } 19236 return false; 19237 } 19238 } 19239 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 19240 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 19241 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 19242 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 19243 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 19244 } 19245 else { 19246 return true; 19247 } 19248 } 19249} 19250RadioResponseRegionModifier.identity = Symbol('radioResponseRegion'); 19251class RadioContentModifier extends ModifierWithKey { 19252 constructor(value) { 19253 super(value); 19254 } 19255 applyPeer(node, reset, component) { 19256 let radioComponent = component; 19257 radioComponent.setContentModifier(this.value); 19258 } 19259} 19260RadioContentModifier.identity = Symbol('radioContentModifier'); 19261// @ts-ignore 19262if (globalThis.Radio !== undefined) { 19263 globalThis.Radio.attributeModifier = function (modifier) { 19264 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19265 return new ArkRadioComponent(nativePtr); 19266 }, (nativePtr, classType, modifierJS) => { 19267 return new modifierJS.RadioModifier(nativePtr, classType); 19268 }); 19269 }; 19270 globalThis.Radio.contentModifier = function (modifier) { 19271 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 19272 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 19273 let component = this.createOrGetNode(elmtId, () => { 19274 return new ArkRadioComponent(nativeNode); 19275 }); 19276 component.setContentModifier(modifier); 19277 }; 19278} 19279 19280/// <reference path='./import.ts' /> 19281class ArkTimePickerComponent extends ArkComponent { 19282 constructor(nativePtr, classType) { 19283 super(nativePtr, classType); 19284 } 19285 loop(value) { 19286 modifierWithKey(this._modifiersWithKeys, TimepickerLoopModifier.identity, TimepickerLoopModifier, value); 19287 return this; 19288 } 19289 useMilitaryTime(value) { 19290 modifierWithKey(this._modifiersWithKeys, TimepickerUseMilitaryTimeModifier.identity, TimepickerUseMilitaryTimeModifier, value); 19291 return this; 19292 } 19293 disappearTextStyle(value) { 19294 modifierWithKey(this._modifiersWithKeys, TimepickerDisappearTextStyleModifier.identity, TimepickerDisappearTextStyleModifier, value); 19295 return this; 19296 } 19297 textStyle(value) { 19298 modifierWithKey(this._modifiersWithKeys, TimepickerTextStyleModifier.identity, TimepickerTextStyleModifier, value); 19299 return this; 19300 } 19301 selectedTextStyle(value) { 19302 modifierWithKey(this._modifiersWithKeys, TimepickerSelectedTextStyleModifier.identity, TimepickerSelectedTextStyleModifier, value); 19303 return this; 19304 } 19305 onChange(callback) { 19306 throw new Error('Method not implemented.'); 19307 } 19308 dateTimeOptions(value) { 19309 modifierWithKey(this._modifiersWithKeys, TimepickerDateTimeOptionsModifier.identity, TimepickerDateTimeOptionsModifier, value); 19310 return this; 19311 } 19312} 19313class TimepickerTextStyleModifier extends ModifierWithKey { 19314 constructor(value) { 19315 super(value); 19316 } 19317 applyPeer(node, reset) { 19318 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 19319 if (reset) { 19320 getUINativeModule().timepicker.resetTextStyle(node); 19321 } 19322 else { 19323 getUINativeModule().timepicker.setTextStyle(node, (_b = (_a = this.value) === null || 19324 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 19325 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 19326 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 19327 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 19328 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 19329 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 19330 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 19331 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 19332 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 19333 } 19334 } 19335 checkObjectDiff() { 19336 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 19337 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 19338 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 19339 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 19340 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 19341 return true; 19342 } 19343 else { 19344 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 19345 _k === void 0 ? void 0 : _k.color) || 19346 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 19347 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 19348 _p === void 0 ? void 0 : _p.size) || 19349 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 19350 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 19351 _t === void 0 ? void 0 : _t.family); 19352 } 19353 } 19354} 19355TimepickerTextStyleModifier.identity = Symbol('textStyle'); 19356class TimepickerSelectedTextStyleModifier extends ModifierWithKey { 19357 constructor(value) { 19358 super(value); 19359 } 19360 applyPeer(node, reset) { 19361 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 19362 if (reset) { 19363 getUINativeModule().timepicker.resetSelectedTextStyle(node); 19364 } 19365 else { 19366 getUINativeModule().timepicker.setSelectedTextStyle(node, (_b = (_a = this.value) === null || 19367 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 19368 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 19369 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 19370 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 19371 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 19372 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 19373 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 19374 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 19375 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 19376 } 19377 } 19378 checkObjectDiff() { 19379 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 19380 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 19381 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 19382 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 19383 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 19384 return true; 19385 } 19386 else { 19387 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || _k === void 0 ? void 0 : _k.color) || 19388 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || _p === void 0 ? void 0 : _p.size) || 19389 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || _t === void 0 ? void 0 : _t.family); 19390 } 19391 } 19392} 19393TimepickerSelectedTextStyleModifier.identity = Symbol('selectedTextStyle'); 19394class TimepickerDisappearTextStyleModifier extends ModifierWithKey { 19395 constructor(value) { 19396 super(value); 19397 } 19398 applyPeer(node, reset) { 19399 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 19400 if (reset) { 19401 getUINativeModule().timepicker.resetDisappearTextStyle(node); 19402 } 19403 else { 19404 getUINativeModule().timepicker.setDisappearTextStyle(node, (_b = (_a = this.value) === null || 19405 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 19406 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 19407 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 19408 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 19409 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 19410 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 19411 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 19412 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 19413 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 19414 } 19415 } 19416 checkObjectDiff() { 19417 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 19418 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? 19419 void 0 : _b.weight) === ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 19420 _d === void 0 ? void 0 : _d.weight) && 19421 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? 19422 void 0 : _f.style) === ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || 19423 _h === void 0 ? void 0 : _h.style))) { 19424 return true; 19425 } 19426 else { 19427 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, 19428 (_k = this.value) === null || _k === void 0 ? void 0 : _k.color) || 19429 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 19430 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 19431 _p === void 0 ? void 0 : _p.size) || 19432 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 19433 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 19434 _t === void 0 ? void 0 : _t.family); 19435 } 19436 } 19437} 19438TimepickerDisappearTextStyleModifier.identity = Symbol('disappearTextStyle'); 19439class TimepickerUseMilitaryTimeModifier extends ModifierWithKey { 19440 constructor(value) { 19441 super(value); 19442 } 19443 applyPeer(node, reset) { 19444 if (reset) { 19445 getUINativeModule().timepicker.resetTimepickerUseMilitaryTime(node); 19446 } 19447 else { 19448 getUINativeModule().timepicker.setTimepickerUseMilitaryTime(node, this.value); 19449 } 19450 } 19451} 19452TimepickerUseMilitaryTimeModifier.identity = Symbol('timepickerUseMilitaryTime'); 19453 19454class TimepickerLoopModifier extends ModifierWithKey { 19455 constructor(value) { 19456 super(value); 19457 } 19458 applyPeer(node, reset) { 19459 if (reset) { 19460 getUINativeModule().timepicker.resetTimepickerLoop(node); 19461 } 19462 else { 19463 getUINativeModule().timepicker.setTimepickerLoop(node, this.value); 19464 } 19465 } 19466} 19467TimepickerLoopModifier.identity = Symbol('timepickerLoop'); 19468 19469class TimepickerDateTimeOptionsModifier extends ModifierWithKey { 19470 constructor(value) { 19471 super(value); 19472 } 19473 applyPeer(node, reset) { 19474 if (reset) { 19475 getUINativeModule().timepicker.resetTimepickerDateTimeOptions(node); 19476 } 19477 else { 19478 getUINativeModule().timepicker.setTimepickerDateTimeOptions(node, this.value.hour, this.value.minute, this.value.second); 19479 } 19480 } 19481} 19482TimepickerDateTimeOptionsModifier.identity = Symbol('timepickerDateTimeOptions'); 19483 19484// @ts-ignore 19485if (globalThis.TimePicker !== undefined) { 19486 globalThis.TimePicker.attributeModifier = function (modifier) { 19487 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19488 return new ArkTimePickerComponent(nativePtr); 19489 }, (nativePtr, classType, modifierJS) => { 19490 return new modifierJS.TimePickerModifier(nativePtr, classType); 19491 }); 19492 }; 19493} 19494 19495/// <reference path='./import.ts' /> 19496class ArkTextPickerComponent extends ArkComponent { 19497 constructor(nativePtr, classType) { 19498 super(nativePtr, classType); 19499 } 19500 defaultPickerItemHeight(value) { 19501 modifierWithKey(this._modifiersWithKeys, TextpickerDefaultPickerItemHeightModifier.identity, TextpickerDefaultPickerItemHeightModifier, value); 19502 return this; 19503 } 19504 canLoop(value) { 19505 modifierWithKey(this._modifiersWithKeys, TextpickerCanLoopModifier.identity, TextpickerCanLoopModifier, value); 19506 return this; 19507 } 19508 disappearTextStyle(value) { 19509 modifierWithKey(this._modifiersWithKeys, TextpickerDisappearTextStyleModifier.identity, TextpickerDisappearTextStyleModifier, value); 19510 return this; 19511 } 19512 textStyle(value) { 19513 modifierWithKey(this._modifiersWithKeys, TextpickerTextStyleModifier.identity, TextpickerTextStyleModifier, value); 19514 return this; 19515 } 19516 selectedTextStyle(value) { 19517 modifierWithKey(this._modifiersWithKeys, TextpickerSelectedTextStyleModifier.identity, TextpickerSelectedTextStyleModifier, value); 19518 return this; 19519 } 19520 onAccept(callback) { 19521 throw new Error('Method not implemented.'); 19522 } 19523 onCancel(callback) { 19524 throw new Error('Method not implemented.'); 19525 } 19526 onChange(callback) { 19527 throw new Error('Method not implemented.'); 19528 } 19529 selectedIndex(value) { 19530 modifierWithKey(this._modifiersWithKeys, TextpickerSelectedIndexModifier.identity, TextpickerSelectedIndexModifier, value); 19531 return this; 19532 } 19533 divider(value) { 19534 modifierWithKey(this._modifiersWithKeys, TextpickerDividerModifier.identity, TextpickerDividerModifier, value); 19535 return this; 19536 } 19537 gradientHeight(value) { 19538 modifierWithKey(this._modifiersWithKeys, TextpickerGradientHeightModifier.identity, TextpickerGradientHeightModifier, value); 19539 return this; 19540 } 19541 disableTextStyleAnimation(value) { 19542 modifierWithKey(this._modifiersWithKeys, TextpickerDisableTextStyleAnimationModifier.identity, TextpickerDisableTextStyleAnimationModifier, value); 19543 return this; 19544 } 19545 defaultTextStyle(value) { 19546 modifierWithKey(this._modifiersWithKeys, TextpickerDefaultTextStyleModifier.identity, TextpickerDefaultTextStyleModifier, value); 19547 return this; 19548 } 19549} 19550class TextpickerCanLoopModifier extends ModifierWithKey { 19551 constructor(value) { 19552 super(value); 19553 } 19554 applyPeer(node, reset) { 19555 if (reset) { 19556 getUINativeModule().textpicker.resetCanLoop(node); 19557 } 19558 else { 19559 getUINativeModule().textpicker.setCanLoop(node, this.value); 19560 } 19561 } 19562} 19563TextpickerCanLoopModifier.identity = Symbol('textpickerCanLoop'); 19564class TextpickerSelectedIndexModifier extends ModifierWithKey { 19565 constructor(value) { 19566 super(value); 19567 } 19568 applyPeer(node, reset) { 19569 if (reset) { 19570 getUINativeModule().textpicker.resetSelectedIndex(node); 19571 } 19572 else { 19573 getUINativeModule().textpicker.setSelectedIndex(node, this.value); 19574 } 19575 } 19576 checkObjectDiff() { 19577 if (Array.isArray(this.stageValue) && Array.isArray(this.value)) { 19578 return !deepCompareArrays(this.stageValue, this.value); 19579 } 19580 else if (Array.isArray(this.stageValue) || Array.isArray(this.value)) { 19581 return true; 19582 } 19583 else { 19584 return this.stageValue !== this.value; 19585 } 19586 } 19587} 19588TextpickerSelectedIndexModifier.identity = Symbol('textpickerSelectedIndex'); 19589class TextpickerDividerModifier extends ModifierWithKey { 19590 constructor(value) { 19591 super(value); 19592 } 19593 applyPeer(node, reset) { 19594 var _a, _b, _c, _d; 19595 if (reset) { 19596 getUINativeModule().textpicker.resetDivider(node); 19597 } 19598 else { 19599 getUINativeModule().textpicker.setDivider(node, (_a = this.value) === null || _a === void 0 ? void 0 : _a.strokeWidth, (_b = this.value) === null || _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || _c === void 0 ? void 0 : _c.startMargin, (_d = this.value) === null || _d === void 0 ? void 0 : _d.endMargin); 19600 } 19601 } 19602 checkObjectDiff() { 19603 var _a, _b, _c, _d, _e, _f, _g, _h; 19604 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 19605 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 19606 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 19607 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 19608 } 19609} 19610TextpickerDividerModifier.identity = Symbol('textpickerDivider'); 19611 19612class TextpickerGradientHeightModifier extends ModifierWithKey { 19613 constructor(value) { 19614 super(value); 19615 } 19616 applyPeer(node, reset) { 19617 if (reset) { 19618 getUINativeModule().textpicker.resetGradientHeight(node); 19619 } 19620 else { 19621 getUINativeModule().textpicker.setGradientHeight(node, this.value); 19622 } 19623 } 19624 checkObjectDiff() { 19625 return !isBaseOrResourceEqual(this.stageValue, this.value); 19626 } 19627} 19628TextpickerGradientHeightModifier.identity = Symbol('textpickerGradientHeight'); 19629class TextpickerDisableTextStyleAnimationModifier extends ModifierWithKey { 19630 constructor(value) { 19631 super(value); 19632 } 19633 applyPeer(node, reset) { 19634 if (reset) { 19635 getUINativeModule().textpicker.resetDisableTextStyleAnimation(node); 19636 } 19637 else { 19638 getUINativeModule().textpicker.setDisableTextStyleAnimation(node, this.value); 19639 } 19640 } 19641} 19642TextpickerDisableTextStyleAnimationModifier.identity = Symbol('textpickerDisableTextStyleAnimation'); 19643class TextpickerDefaultTextStyleModifier extends ModifierWithKey { 19644 constructor(value) { 19645 super(value); 19646 } 19647 applyPeer(node, reset) { 19648 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; 19649 if (reset) { 19650 getUINativeModule().textpicker.resetDefaultTextStyle(node); 19651 } 19652 else { 19653 getUINativeModule().textpicker.setDefaultTextStyle(node, (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined, (_r = (_q = this.value) === null || _q === void 0 ? void 0 : _q.minFontSize) !== null && _r !== void 0 ? _r : undefined, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.maxFontSize) !== null && _t !== void 0 ? _t : undefined, (_v = (_u = this.value) === null || _u === void 0 ? void 0 : _u.overflow) !== null && _v !== void 0 ? _v : undefined); 19654 } 19655 } 19656 checkObjectDiff() { 19657 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; 19658 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 19659 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style) && 19660 ((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.overflow) === ((_k = this.value) === null || _k === void 0 ? void 0 : _k.overflow))) { 19661 return true; 19662 } 19663 else { 19664 return !isBaseOrResourceEqual((_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.color, (_m = this.value) === null || _m === void 0 ? void 0 : _m.color) || 19665 !isBaseOrResourceEqual((_p = (_o = this.stageValue) === null || _o === void 0 ? void 0 : _o.font) === null || _p === void 0 ? void 0 : _p.size, (_r = (_q = this.value) === null || _q === void 0 ? void 0 : _q.font) === null || _r === void 0 ? void 0 : _r.size) || 19666 !isBaseOrResourceEqual((_t = (_s = this.stageValue) === null || _s === void 0 ? void 0 : _s.font) === null || _t === void 0 ? void 0 : _t.family, (_v = (_u = this.value) === null || _u === void 0 ? void 0 : _u.font) === null || _v === void 0 ? void 0 : _v.family) || 19667 !isBaseOrResourceEqual((_w = this.stageValue) === null || _w === void 0 ? void 0 : _w.minFontSize, (_x = this.value) === null || _x === void 0 ? void 0 : _x.minFontSize) || 19668 !isBaseOrResourceEqual((_y = this.stageValue) === null || _y === void 0 ? void 0 : _y.maxFontSize, (_z = this.value) === null || _z === void 0 ? void 0 : _z.maxFontSize); 19669 } 19670 } 19671} 19672TextpickerDefaultTextStyleModifier.identity = Symbol('textpickerDefaultTextStyle'); 19673class TextpickerTextStyleModifier extends ModifierWithKey { 19674 constructor(value) { 19675 super(value); 19676 } 19677 applyPeer(node, reset) { 19678 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 19679 if (reset) { 19680 getUINativeModule().textpicker.resetTextStyle(node); 19681 } 19682 else { 19683 getUINativeModule().textpicker.setTextStyle(node, (_b = (_a = this.value) === null || 19684 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, (_e = 19685 (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 19686 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = 19687 (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 19688 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 19689 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 19690 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 19691 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 19692 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 19693 } 19694 } 19695 checkObjectDiff() { 19696 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 19697 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 19698 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 19699 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 19700 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 19701 return true; 19702 } 19703 else { 19704 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 19705 _k === void 0 ? void 0 : _k.color) || 19706 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 19707 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 19708 _p === void 0 ? void 0 : _p.size) || 19709 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 19710 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 19711 _t === void 0 ? void 0 : _t.family); 19712 } 19713 } 19714} 19715TextpickerTextStyleModifier.identity = Symbol('textpickerTextStyle'); 19716class TextpickerSelectedTextStyleModifier extends ModifierWithKey { 19717 constructor(value) { 19718 super(value); 19719 } 19720 applyPeer(node, reset) { 19721 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 19722 if (reset) { 19723 getUINativeModule().textpicker.resetSelectedTextStyle(node); 19724 } 19725 else { 19726 getUINativeModule().textpicker.setSelectedTextStyle(node, (_b = 19727 (_a = this.value) === null || _a === void 0 ? void 0 : _a.color) !== null && 19728 _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || 19729 _c === void 0 ? void 0 : _c.font) === null || 19730 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 19731 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 19732 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 19733 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 19734 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 19735 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 19736 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 19737 } 19738 } 19739 checkObjectDiff() { 19740 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 19741 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 19742 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 19743 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 19744 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 19745 return true; 19746 } 19747 else { 19748 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 19749 _k === void 0 ? void 0 : _k.color) || 19750 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 19751 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 19752 _p === void 0 ? void 0 : _p.size) || 19753 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 19754 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 19755 _t === void 0 ? void 0 : _t.family); 19756 } 19757 } 19758} 19759TextpickerSelectedTextStyleModifier.identity = Symbol('textpickerSelectedTextStyle'); 19760class TextpickerDisappearTextStyleModifier extends ModifierWithKey { 19761 constructor(value) { 19762 super(value); 19763 } 19764 applyPeer(node, reset) { 19765 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 19766 if (reset) { 19767 getUINativeModule().textpicker.resetDisappearTextStyle(node); 19768 } 19769 else { 19770 getUINativeModule().textpicker.setDisappearTextStyle(node, (_b = 19771 (_a = this.value) === null || _a === void 0 ? void 0 : _a.color) !== null && 19772 _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || 19773 _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.size) !== null && 19774 _e !== void 0 ? _e : undefined, (_h = (_g = (_f = this.value) === null || 19775 _f === void 0 ? void 0 : _f.font) === null || _g === void 0 ? void 0 : _g.weight) !== null && 19776 _h !== void 0 ? _h : undefined, (_l = (_k = (_j = this.value) === null || 19777 _j === void 0 ? void 0 : _j.font) === null || _k === void 0 ? void 0 : _k.family) !== null && 19778 _l !== void 0 ? _l : undefined, (_p = (_o = (_m = this.value) === null || 19779 _m === void 0 ? void 0 : _m.font) === null || _o === void 0 ? void 0 : _o.style) !== null && 19780 _p !== void 0 ? _p : undefined); 19781 } 19782 } 19783 checkObjectDiff() { 19784 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 19785 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 19786 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 19787 return true; 19788 } 19789 else { 19790 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || _k === void 0 ? void 0 : _k.color) || 19791 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || _p === void 0 ? void 0 : _p.size) || 19792 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || _t === void 0 ? void 0 : _t.family); 19793 } 19794 } 19795} 19796TextpickerDisappearTextStyleModifier.identity = Symbol('textpickerDisappearTextStyle'); 19797class TextpickerDefaultPickerItemHeightModifier extends ModifierWithKey { 19798 constructor(value) { 19799 super(value); 19800 } 19801 applyPeer(node, reset) { 19802 if (reset) { 19803 getUINativeModule().textpicker.resetDefaultPickerItemHeight(node); 19804 } 19805 else { 19806 getUINativeModule().textpicker.setDefaultPickerItemHeight(node, this.value); 19807 } 19808 } 19809} 19810TextpickerDefaultPickerItemHeightModifier.identity = Symbol('textpickerDefaultPickerItemHeight'); 19811// @ts-ignore 19812if (globalThis.TextPicker !== undefined) { 19813 globalThis.TextPicker.attributeModifier = function (modifier) { 19814 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19815 return new ArkTextPickerComponent(nativePtr); 19816 }, (nativePtr, classType, modifierJS) => { 19817 return new modifierJS.TextPickerModifier(nativePtr, classType); 19818 }); 19819 }; 19820} 19821 19822/// <reference path='./import.ts' /> 19823class ArkSliderComponent extends ArkComponent { 19824 constructor(nativePtr, classType) { 19825 super(nativePtr, classType); 19826 } 19827 blockColor(value) { 19828 modifierWithKey(this._modifiersWithKeys, BlockColorModifier.identity, BlockColorModifier, value); 19829 return this; 19830 } 19831 trackColor(value) { 19832 modifierWithKey(this._modifiersWithKeys, TrackColorModifier.identity, TrackColorModifier, value); 19833 return this; 19834 } 19835 selectedColor(value) { 19836 modifierWithKey(this._modifiersWithKeys, SelectColorModifier.identity, SelectColorModifier, value); 19837 return this; 19838 } 19839 minLabel(value) { 19840 throw new Error('Method not implemented.'); 19841 } 19842 maxLabel(value) { 19843 throw new Error('Method not implemented.'); 19844 } 19845 showSteps(value) { 19846 modifierWithKey(this._modifiersWithKeys, ShowStepsModifier.identity, ShowStepsModifier, value); 19847 return this; 19848 } 19849 showTips(value, content) { 19850 let showTips = new ArkSliderTips(value, content); 19851 modifierWithKey(this._modifiersWithKeys, ShowTipsModifier.identity, ShowTipsModifier, showTips); 19852 return this; 19853 } 19854 trackThickness(value) { 19855 modifierWithKey(this._modifiersWithKeys, TrackThicknessModifier.identity, TrackThicknessModifier, value); 19856 return this; 19857 } 19858 onChange(callback) { 19859 throw new Error('Method not implemented.'); 19860 } 19861 blockBorderColor(value) { 19862 modifierWithKey(this._modifiersWithKeys, BlockBorderColorModifier.identity, BlockBorderColorModifier, value); 19863 return this; 19864 } 19865 blockBorderWidth(value) { 19866 modifierWithKey(this._modifiersWithKeys, BlockBorderWidthModifier.identity, BlockBorderWidthModifier, value); 19867 return this; 19868 } 19869 stepColor(value) { 19870 modifierWithKey(this._modifiersWithKeys, StepColorModifier.identity, StepColorModifier, value); 19871 return this; 19872 } 19873 trackBorderRadius(value) { 19874 modifierWithKey(this._modifiersWithKeys, TrackBorderRadiusModifier.identity, TrackBorderRadiusModifier, value); 19875 return this; 19876 } 19877 selectedBorderRadius(value) { 19878 modifierWithKey(this._modifiersWithKeys, SelectedBorderRadiusModifier.identity, SelectedBorderRadiusModifier, value); 19879 return this; 19880 } 19881 blockSize(value) { 19882 modifierWithKey(this._modifiersWithKeys, BlockSizeModifier.identity, BlockSizeModifier, value); 19883 return this; 19884 } 19885 blockStyle(value) { 19886 modifierWithKey(this._modifiersWithKeys, BlockStyleModifier.identity, BlockStyleModifier, value); 19887 return this; 19888 } 19889 stepSize(value) { 19890 modifierWithKey(this._modifiersWithKeys, StepSizeModifier.identity, StepSizeModifier, value); 19891 return this; 19892 } 19893 sliderInteractionMode(value) { 19894 modifierWithKey(this._modifiersWithKeys, InteractionModeModifier.identity, InteractionModeModifier, value); 19895 return this; 19896 } 19897 minResponsiveDistance(value) { 19898 modifierWithKey(this._modifiersWithKeys, MinResponsiveDistanceModifier.identity, MinResponsiveDistanceModifier, value); 19899 return this; 19900 } 19901 contentModifier(value) { 19902 modifierWithKey(this._modifiersWithKeys, SliderContentModifier.identity, SliderContentModifier, value); 19903 return this; 19904 } 19905 slideRange(value) { 19906 modifierWithKey(this._modifiersWithKeys, ValidSlideRangeModifier.identity, ValidSlideRangeModifier, value); 19907 return this; 19908 } 19909 setContentModifier(modifier) { 19910 if (modifier === undefined || modifier === null) { 19911 getUINativeModule().slider.setContentModifierBuilder(this.nativePtr, false); 19912 return; 19913 } 19914 this.needRebuild = false; 19915 if (this.builder !== modifier.applyContent()) { 19916 this.needRebuild = true; 19917 } 19918 this.builder = modifier.applyContent(); 19919 this.modifier = modifier; 19920 getUINativeModule().slider.setContentModifierBuilder(this.nativePtr, this); 19921 } 19922 makeContentModifierNode(context, sliderConfiguration) { 19923 sliderConfiguration.contentModifier = this.modifier; 19924 if (isUndefined(this.sliderNode) || this.needRebuild) { 19925 const xNode = globalThis.requireNapi('arkui.node'); 19926 this.sliderNode = new xNode.BuilderNode(context); 19927 this.sliderNode.build(this.builder, sliderConfiguration); 19928 this.needRebuild = false; 19929 } else { 19930 this.sliderNode.update(sliderConfiguration); 19931 } 19932 return this.sliderNode.getFrameNode(); 19933 } 19934} 19935class BlockStyleModifier extends ModifierWithKey { 19936 constructor(value) { 19937 super(value); 19938 } 19939 applyPeer(node, reset) { 19940 if (reset) { 19941 getUINativeModule().slider.resetBlockStyle(node); 19942 } 19943 else { 19944 getUINativeModule().slider.setBlockStyle(node, this.value); 19945 } 19946 } 19947 checkObjectDiff() { 19948 return !(this.stageValue.type === this.value.type && 19949 this.stageValue.image === this.value.image && 19950 this.stageValue.shape === this.value.shape); 19951 } 19952} 19953BlockStyleModifier.identity = Symbol('sliderBlockStyle'); 19954class ShowTipsModifier extends ModifierWithKey { 19955 constructor(value) { 19956 super(value); 19957 } 19958 applyPeer(node, reset) { 19959 let _a; 19960 if (reset) { 19961 getUINativeModule().slider.resetShowTips(node); 19962 } 19963 else { 19964 getUINativeModule().slider.setShowTips(node, this.value.showTip, (_a = this.value) === null || _a === void 0 ? void 0 : _a.tipText); 19965 } 19966 } 19967 checkObjectDiff() { 19968 let showTipDiff = this.stageValue.showTip !== this.value.showTip; 19969 let tipTextDiff = !isBaseOrResourceEqual(this.stageValue.tipText, this.value.tipText); 19970 return showTipDiff || tipTextDiff; 19971 } 19972} 19973ShowTipsModifier.identity = Symbol('sliderShowTips'); 19974class StepSizeModifier extends ModifierWithKey { 19975 constructor(value) { 19976 super(value); 19977 } 19978 applyPeer(node, reset) { 19979 if (reset) { 19980 getUINativeModule().slider.resetStepSize(node); 19981 } 19982 else { 19983 getUINativeModule().slider.setStepSize(node, this.value); 19984 } 19985 } 19986 checkObjectDiff() { 19987 return !isBaseOrResourceEqual(this.stageValue, this.value); 19988 } 19989} 19990StepSizeModifier.identity = Symbol('sliderStepSize'); 19991class BlockSizeModifier extends ModifierWithKey { 19992 constructor(value) { 19993 super(value); 19994 } 19995 applyPeer(node, reset) { 19996 if (reset) { 19997 getUINativeModule().slider.resetBlockSize(node); 19998 } 19999 else { 20000 getUINativeModule().slider.setBlockSize(node, this.value.width, this.value.height); 20001 } 20002 } 20003 checkObjectDiff() { 20004 if (isResource(this.stageValue.height) && isResource(this.value.height) && isResource(this.stageValue.width) && isResource(this.value.width)) { 20005 return !(isResourceEqual(this.stageValue.height, this.value.height) && isResourceEqual(this.stageValue.width, this.value.width)); 20006 } 20007 else { 20008 return true; 20009 } 20010 } 20011} 20012BlockSizeModifier.identity = Symbol('sliderBlockSize'); 20013class TrackBorderRadiusModifier extends ModifierWithKey { 20014 constructor(value) { 20015 super(value); 20016 } 20017 applyPeer(node, reset) { 20018 if (reset) { 20019 getUINativeModule().slider.resetTrackBorderRadius(node); 20020 } 20021 else { 20022 getUINativeModule().slider.setTrackBorderRadius(node, this.value); 20023 } 20024 } 20025 checkObjectDiff() { 20026 return !isBaseOrResourceEqual(this.stageValue, this.value); 20027 } 20028} 20029TrackBorderRadiusModifier.identity = Symbol('sliderTrackBorderRadius'); 20030class StepColorModifier extends ModifierWithKey { 20031 constructor(value) { 20032 super(value); 20033 } 20034 applyPeer(node, reset) { 20035 if (reset) { 20036 getUINativeModule().slider.resetStepColor(node); 20037 } 20038 else { 20039 getUINativeModule().slider.setStepColor(node, this.value); 20040 } 20041 } 20042 checkObjectDiff() { 20043 return !isBaseOrResourceEqual(this.stageValue, this.value); 20044 } 20045} 20046StepColorModifier.identity = Symbol('sliderStepColor'); 20047class BlockBorderColorModifier extends ModifierWithKey { 20048 constructor(value) { 20049 super(value); 20050 } 20051 applyPeer(node, reset) { 20052 if (reset) { 20053 getUINativeModule().slider.resetBlockBorderColor(node); 20054 } 20055 else { 20056 getUINativeModule().slider.setBlockBorderColor(node, this.value); 20057 } 20058 } 20059 checkObjectDiff() { 20060 return !isBaseOrResourceEqual(this.stageValue, this.value); 20061 } 20062} 20063BlockBorderColorModifier.identity = Symbol('sliderBlockBorderColor'); 20064class BlockBorderWidthModifier extends ModifierWithKey { 20065 constructor(value) { 20066 super(value); 20067 } 20068 applyPeer(node, reset) { 20069 if (reset) { 20070 getUINativeModule().slider.resetBlockBorderWidth(node); 20071 } 20072 else { 20073 getUINativeModule().slider.setBlockBorderWidth(node, this.value); 20074 } 20075 } 20076 checkObjectDiff() { 20077 return !isBaseOrResourceEqual(this.stageValue, this.value); 20078 } 20079} 20080BlockBorderWidthModifier.identity = Symbol('sliderBlockBorderWidth'); 20081class BlockColorModifier extends ModifierWithKey { 20082 constructor(value) { 20083 super(value); 20084 } 20085 applyPeer(node, reset) { 20086 if (reset) { 20087 getUINativeModule().slider.resetBlockColor(node); 20088 } 20089 else { 20090 getUINativeModule().slider.setBlockColor(node, this.value); 20091 } 20092 } 20093 checkObjectDiff() { 20094 return !isBaseOrResourceEqual(this.stageValue, this.value); 20095 } 20096} 20097BlockColorModifier.identity = Symbol('sliderBlockColor'); 20098class TrackColorModifier extends ModifierWithKey { 20099 constructor(value) { 20100 super(value); 20101 } 20102 applyPeer(node, reset) { 20103 if (reset) { 20104 getUINativeModule().slider.resetTrackBackgroundColor(node); 20105 } 20106 else { 20107 getUINativeModule().slider.setTrackBackgroundColor(node, this.value); 20108 } 20109 } 20110 checkObjectDiff() { 20111 return !isBaseOrResourceEqual(this.stageValue, this.value); 20112 } 20113} 20114TrackColorModifier.identity = Symbol('sliderTrackColor'); 20115class SelectColorModifier extends ModifierWithKey { 20116 constructor(value) { 20117 super(value); 20118 } 20119 applyPeer(node, reset) { 20120 if (reset) { 20121 getUINativeModule().slider.resetSelectColor(node); 20122 } 20123 else { 20124 getUINativeModule().slider.setSelectColor(node, this.value); 20125 } 20126 } 20127 checkObjectDiff() { 20128 return !isBaseOrResourceEqual(this.stageValue, this.value); 20129 } 20130} 20131SelectColorModifier.identity = Symbol('sliderSelectColor'); 20132class ShowStepsModifier extends ModifierWithKey { 20133 constructor(value) { 20134 super(value); 20135 } 20136 applyPeer(node, reset) { 20137 if (reset) { 20138 getUINativeModule().slider.resetShowSteps(node); 20139 } 20140 else { 20141 getUINativeModule().slider.setShowSteps(node, this.value); 20142 } 20143 } 20144 checkObjectDiff() { 20145 return this.stageValue !== this.value; 20146 } 20147} 20148ShowStepsModifier.identity = Symbol('sliderShowSteps'); 20149class TrackThicknessModifier extends ModifierWithKey { 20150 constructor(value) { 20151 super(value); 20152 } 20153 applyPeer(node, reset) { 20154 if (reset) { 20155 getUINativeModule().slider.resetThickness(node); 20156 } 20157 else { 20158 getUINativeModule().slider.setThickness(node, this.value); 20159 } 20160 } 20161 checkObjectDiff() { 20162 return !isBaseOrResourceEqual(this.stageValue, this.value); 20163 } 20164} 20165TrackThicknessModifier.identity = Symbol('sliderTrackThickness'); 20166class ValidSlideRangeModifier extends ModifierWithKey { 20167 constructor(value) { 20168 super(value); 20169 } 20170 applyPeer(node, reset) { 20171 if (reset) { 20172 getUINativeModule().slider.resetValidSlideRange(node); 20173 } else { 20174 getUINativeModule().slider.setValidSlideRange(node, this.value); 20175 } 20176 } 20177 checkObjectDiff() { 20178 return !isBaseOrResourceEqual(this.stageValue, this.value); 20179 } 20180} 20181ValidSlideRangeModifier.identity = Symbol('slideRange'); 20182class SelectedBorderRadiusModifier extends ModifierWithKey { 20183 constructor(value) { 20184 super(value); 20185 } 20186 applyPeer(node, reset) { 20187 if (reset) { 20188 getUINativeModule().slider.resetSelectedBorderRadius(node); 20189 } else { 20190 getUINativeModule().slider.setSelectedBorderRadius(node, this.value); 20191 } 20192 } 20193 checkObjectDiff() { 20194 return !isBaseOrResourceEqual(this.stageValue, this.value); 20195 } 20196} 20197SelectedBorderRadiusModifier.identity = Symbol('sliderSelectedBorderRadius'); 20198class InteractionModeModifier extends ModifierWithKey { 20199 constructor(value) { 20200 super(value); 20201 } 20202 applyPeer(node, reset) { 20203 if (reset) { 20204 getUINativeModule().slider.resetInteractionMode(node); 20205 } else { 20206 getUINativeModule().slider.setInteractionMode(node, this.value); 20207 } 20208 } 20209 checkObjectDiff() { 20210 return !isBaseOrResourceEqual(this.stageValue, this.value); 20211 } 20212} 20213InteractionModeModifier.identity = Symbol('sliderInteractionMode'); 20214class MinResponsiveDistanceModifier extends ModifierWithKey { 20215 constructor(value) { 20216 super(value); 20217 } 20218 applyPeer(node, reset) { 20219 if (reset) { 20220 getUINativeModule().slider.resetMinResponsiveDistance(node); 20221 } else { 20222 getUINativeModule().slider.setMinResponsiveDistance(node, this.value); 20223 } 20224 } 20225 checkObjectDiff() { 20226 return !isBaseOrResourceEqual(this.stageValue, this.value); 20227 } 20228} 20229MinResponsiveDistanceModifier.identity = Symbol('sliderMinResponsiveDistance'); 20230class SliderContentModifier extends ModifierWithKey { 20231 constructor(value) { 20232 super(value); 20233 } 20234 applyPeer(nodenode, reset, component) { 20235 let sliderComponent = component; 20236 sliderComponent.setContentModifier(this.value); 20237 } 20238} 20239SliderContentModifier.identity = Symbol('sliderContentModifier'); 20240// @ts-ignore 20241if (globalThis.Slider !== undefined) { 20242 globalThis.Slider.attributeModifier = function (modifier) { 20243 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20244 return new ArkSliderComponent(nativePtr); 20245 }, (nativePtr, classType, modifierJS) => { 20246 return new modifierJS.SliderModifier(nativePtr, classType); 20247 }); 20248 }; 20249 globalThis.Slider.contentModifier = function (modifier) { 20250 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 20251 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 20252 let component = this.createOrGetNode(elmtId, () => { 20253 return new ArkSliderComponent(nativeNode); 20254 }); 20255 component.setContentModifier(modifier); 20256 }; 20257} 20258 20259/// <reference path='./import.ts' /> 20260class RatingStarsModifier extends ModifierWithKey { 20261 constructor(value) { 20262 super(value); 20263 } 20264 applyPeer(node, reset) { 20265 if (reset) { 20266 getUINativeModule().rating.resetStars(node); 20267 } 20268 else { 20269 getUINativeModule().rating.setStars(node, this.value); 20270 } 20271 } 20272} 20273RatingStarsModifier.identity = Symbol('ratingStars'); 20274class RatingStepSizeModifier extends ModifierWithKey { 20275 constructor(value) { 20276 super(value); 20277 } 20278 applyPeer(node, reset) { 20279 if (reset) { 20280 getUINativeModule().rating.resetStepSize(node); 20281 } 20282 else { 20283 getUINativeModule().rating.setStepSize(node, this.value); 20284 } 20285 } 20286} 20287RatingStepSizeModifier.identity = Symbol('ratingStepSize'); 20288class RatingStarStyleModifier extends ModifierWithKey { 20289 constructor(value) { 20290 super(value); 20291 } 20292 applyPeer(node, reset) { 20293 let _a, _b, _c; 20294 if (reset) { 20295 getUINativeModule().rating.resetStarStyle(node); 20296 } 20297 else { 20298 getUINativeModule().rating.setStarStyle(node, (_a = this.value) === null || 20299 _a === void 0 ? void 0 : _a.backgroundUri, (_b = this.value) === null || 20300 _b === void 0 ? void 0 : _b.foregroundUri, (_c = this.value) === null || 20301 _c === void 0 ? void 0 : _c.secondaryUri); 20302 } 20303 } 20304 checkObjectDiff() { 20305 let _a, _b, _c, _d, _e, _f; 20306 return ((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.backgroundUri) !== 20307 ((_b = this.value) === null || _b === void 0 ? void 0 : _b.backgroundUri) || 20308 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.foregroundUri) !== 20309 ((_d = this.value) === null || _d === void 0 ? void 0 : _d.foregroundUri) || 20310 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.secondaryUri) !== 20311 ((_f = this.value) === null || _f === void 0 ? void 0 : _f.secondaryUri); 20312 } 20313} 20314RatingStarStyleModifier.identity = Symbol('ratingStarStyle'); 20315class RatingContentModifier extends ModifierWithKey { 20316 constructor(value) { 20317 super(value); 20318 } 20319 applyPeer(node, reset, component) { 20320 let ratingComponent = component; 20321 ratingComponent.setContentModifier(this.value); 20322 } 20323} 20324RatingStarStyleModifier.identity = Symbol('ratingContentModifier'); 20325class ArkRatingComponent extends ArkComponent { 20326 constructor(nativePtr, classType) { 20327 super(nativePtr, classType); 20328 } 20329 stars(value) { 20330 modifierWithKey(this._modifiersWithKeys, RatingStarsModifier.identity, RatingStarsModifier, value); 20331 return this; 20332 } 20333 stepSize(value) { 20334 modifierWithKey(this._modifiersWithKeys, RatingStepSizeModifier.identity, RatingStepSizeModifier, value); 20335 return this; 20336 } 20337 starStyle(value) { 20338 let starStyle = new ArkStarStyle(); 20339 if (!isUndefined(value)) { 20340 starStyle.backgroundUri = value.backgroundUri; 20341 starStyle.foregroundUri = value.foregroundUri; 20342 starStyle.secondaryUri = value.secondaryUri; 20343 modifierWithKey(this._modifiersWithKeys, RatingStarStyleModifier.identity, RatingStarStyleModifier, value); 20344 } 20345 else { 20346 modifierWithKey(this._modifiersWithKeys, RatingStarStyleModifier.identity, RatingStarStyleModifier, undefined); 20347 } 20348 return this; 20349 } 20350 onChange(callback) { 20351 throw new Error('Method not implemented.'); 20352 } 20353 contentModifier(value) { 20354 modifierWithKey(this._modifiersWithKeys, RatingContentModifier.identity, RatingContentModifier, value); 20355 return this; 20356 } 20357 setContentModifier(modifier) { 20358 if (modifier === undefined || modifier === null) { 20359 getUINativeModule().rating.setContentModifierBuilder(this.nativePtr, false); 20360 return; 20361 } 20362 this.needRebuild = false; 20363 if (this.builder !== modifier.applyContent()) { 20364 this.needRebuild = true; 20365 } 20366 this.builder = modifier.applyContent(); 20367 this.modifier = modifier; 20368 getUINativeModule().rating.setContentModifierBuilder(this.nativePtr, this); 20369 } 20370 makeContentModifierNode(context, ratingConfiguration) { 20371 ratingConfiguration.contentModifier = this.modifier; 20372 if (isUndefined(this.ratingNode) || this.needRebuild) { 20373 const xNode = globalThis.requireNapi('arkui.node'); 20374 this.ratingNode = new xNode.BuilderNode(context); 20375 this.ratingNode.build(this.builder, ratingConfiguration); 20376 this.needRebuild = false; 20377 } else { 20378 this.ratingNode.update(ratingConfiguration); 20379 } 20380 return this.ratingNode.getFrameNode(); 20381 } 20382} 20383// @ts-ignore 20384if (globalThis.Rating !== undefined) { 20385 globalThis.Rating.attributeModifier = function (modifier) { 20386 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20387 return new ArkRatingComponent(nativePtr); 20388 }, (nativePtr, classType, modifierJS) => { 20389 return new modifierJS.RatingModifier(nativePtr, classType); 20390 }); 20391 }; 20392 globalThis.Rating.contentModifier = function (modifier) { 20393 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 20394 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 20395 let component = this.createOrGetNode(elmtId, () => { 20396 return new ArkRatingComponent(nativeNode); 20397 }); 20398 component.setContentModifier(modifier); 20399 }; 20400} 20401 20402/// <reference path='./import.ts' /> 20403class ArkCheckboxComponent extends ArkComponent { 20404 constructor(nativePtr, classType) { 20405 super(nativePtr, classType); 20406 } 20407 shape(value) { 20408 modifierWithKey(this._modifiersWithKeys, CheckBoxShapeModifier.identity, CheckBoxShapeModifier, value); 20409 return this; 20410 } 20411 width(value) { 20412 modifierWithKey(this._modifiersWithKeys, CheckboxWidthModifier.identity, CheckboxWidthModifier, value); 20413 return this; 20414 } 20415 height(value) { 20416 modifierWithKey(this._modifiersWithKeys, CheckboxHeightModifier.identity, CheckboxHeightModifier, value); 20417 return this; 20418 } 20419 select(value) { 20420 modifierWithKey(this._modifiersWithKeys, CheckboxSelectModifier.identity, CheckboxSelectModifier, value); 20421 return this; 20422 } 20423 selectedColor(value) { 20424 modifierWithKey(this._modifiersWithKeys, CheckboxSelectedColorModifier.identity, CheckboxSelectedColorModifier, value); 20425 return this; 20426 } 20427 unselectedColor(value) { 20428 modifierWithKey(this._modifiersWithKeys, CheckboxUnselectedColorModifier.identity, CheckboxUnselectedColorModifier, value); 20429 return this; 20430 } 20431 mark(value) { 20432 modifierWithKey(this._modifiersWithKeys, CheckboxMarkModifier.identity, CheckboxMarkModifier, value); 20433 return this; 20434 } 20435 padding(value) { 20436 let arkValue = new ArkPadding(); 20437 if (value !== null && value !== undefined) { 20438 if (isLengthType(value) || isResource(value)) { 20439 arkValue.top = value; 20440 arkValue.right = value; 20441 arkValue.bottom = value; 20442 arkValue.left = value; 20443 } 20444 else { 20445 arkValue.top = value.top; 20446 arkValue.right = value.right; 20447 arkValue.bottom = value.bottom; 20448 arkValue.left = value.left; 20449 } 20450 modifierWithKey(this._modifiersWithKeys, CheckBoxPaddingModifier.identity, CheckBoxPaddingModifier, arkValue); 20451 } 20452 else { 20453 modifierWithKey(this._modifiersWithKeys, CheckBoxPaddingModifier.identity, CheckBoxPaddingModifier, undefined); 20454 } 20455 return this; 20456 } 20457 size(value) { 20458 modifierWithKey(this._modifiersWithKeys, CheckBoxSizeModifier.identity, CheckBoxSizeModifier, value); 20459 return this; 20460 } 20461 responseRegion(value) { 20462 modifierWithKey(this._modifiersWithKeys, CheckBoxResponseRegionModifier.identity, CheckBoxResponseRegionModifier, value); 20463 return this; 20464 } 20465 contentModifier(value) { 20466 modifierWithKey(this._modifiersWithKeys, CheckBoxContentModifier.identity, CheckBoxContentModifier, value); 20467 return this; 20468 } 20469 setContentModifier(modifier) { 20470 if (modifier === undefined || modifier === null) { 20471 getUINativeModule().checkbox.setContentModifierBuilder(this.nativePtr, false); 20472 return; 20473 } 20474 this.needRebuild = false; 20475 if (this.builder !== modifier.applyContent()) { 20476 this.needRebuild = true; 20477 } 20478 this.builder = modifier.applyContent(); 20479 this.modifier = modifier; 20480 getUINativeModule().checkbox.setContentModifierBuilder(this.nativePtr, this); 20481 } 20482 makeContentModifierNode(context, checkBoxConfiguration) { 20483 checkBoxConfiguration.contentModifier = this.modifier; 20484 if (isUndefined(this.checkboxNode) || this.needRebuild) { 20485 const xNode = globalThis.requireNapi('arkui.node'); 20486 this.checkboxNode = new xNode.BuilderNode(context); 20487 this.checkboxNode.build(this.builder, checkBoxConfiguration); 20488 this.needRebuild = false; 20489 } else { 20490 this.checkboxNode.update(checkBoxConfiguration); 20491 } 20492 return this.checkboxNode.getFrameNode(); 20493 } 20494 onChange(callback) { 20495 throw new Error('Method not implemented.'); 20496 } 20497} 20498class CheckBoxResponseRegionModifier extends ModifierWithKey { 20499 constructor(value) { 20500 super(value); 20501 } 20502 applyPeer(node, reset) { 20503 let _a, _b, _c, _d, _e, _f, _g, _h; 20504 if (reset) { 20505 getUINativeModule().checkbox.resetCheckboxResponseRegion(node); 20506 } 20507 else { 20508 let responseRegion = []; 20509 if (Array.isArray(this.value)) { 20510 for (let i = 0; i < this.value.length; i++) { 20511 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 20512 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 20513 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 20514 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 20515 } 20516 } 20517 else { 20518 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 20519 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 20520 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 20521 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 20522 } 20523 getUINativeModule().checkbox.setCheckboxResponseRegion(node, responseRegion, responseRegion.length); 20524 } 20525 } 20526 checkObjectDiff() { 20527 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 20528 if (this.value.length !== this.stageValue.length) { 20529 return true; 20530 } 20531 else { 20532 for (let i = 0; i < this.value.length; i++) { 20533 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 20534 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 20535 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 20536 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 20537 return true; 20538 } 20539 } 20540 return false; 20541 } 20542 } 20543 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 20544 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 20545 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 20546 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 20547 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 20548 } 20549 else { 20550 return true; 20551 } 20552 } 20553} 20554CheckBoxResponseRegionModifier.identity = Symbol('responseRegion'); 20555class CheckBoxContentModifier extends ModifierWithKey { 20556 constructor(value) { 20557 super(value); 20558 } 20559 applyPeer(node, reset, component) { 20560 let checkboxComponent = component; 20561 checkboxComponent.setContentModifier(this.value); 20562 } 20563} 20564CheckBoxContentModifier.identity = Symbol('checkBoxContentModifier'); 20565class CheckBoxShapeModifier extends ModifierWithKey { 20566 constructor(value) { 20567 super(value); 20568 } 20569 applyPeer(node, reset) { 20570 if (reset) { 20571 getUINativeModule().checkbox.resetCheckboxShape(node); 20572 } else { 20573 getUINativeModule().checkbox.setCheckboxShape(node, this.value); 20574 } 20575 } 20576 20577 checkObjectDiff() { 20578 return !isBaseOrResourceEqual(this.stageValue, this.value); 20579 } 20580} 20581CheckBoxShapeModifier.identity = Symbol('checkboxShape'); 20582class CheckBoxSizeModifier extends ModifierWithKey { 20583 constructor(value) { 20584 super(value); 20585 } 20586 applyPeer(node, reset) { 20587 if (reset) { 20588 getUINativeModule().checkbox.resetCheckboxSize(node); 20589 } 20590 else { 20591 getUINativeModule().checkbox.setCheckboxSize(node, this.value.width, this.value.height); 20592 } 20593 } 20594 checkObjectDiff() { 20595 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 20596 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 20597 } 20598} 20599CheckBoxSizeModifier.identity = Symbol('size'); 20600class CheckBoxPaddingModifier extends ModifierWithKey { 20601 constructor(value) { 20602 super(value); 20603 } 20604 applyPeer(node, reset) { 20605 if (reset) { 20606 getUINativeModule().checkbox.resetCheckboxPadding(node); 20607 } 20608 else { 20609 getUINativeModule().checkbox.setCheckboxPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 20610 } 20611 } 20612 checkObjectDiff() { 20613 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 20614 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 20615 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 20616 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 20617 } 20618} 20619CheckBoxPaddingModifier.identity = Symbol('padding'); 20620class CheckboxMarkModifier extends ModifierWithKey { 20621 constructor(value) { 20622 super(value); 20623 } 20624 applyPeer(node, reset) { 20625 let _a, _b, _c; 20626 if (reset) { 20627 getUINativeModule().checkbox.resetMark(node); 20628 } 20629 else { 20630 getUINativeModule().checkbox.setMark(node, (_a = this.value) === null || 20631 _a === void 0 ? void 0 : _a.strokeColor, (_b = this.value) === null || 20632 _b === void 0 ? void 0 : _b.size, (_c = this.value) === null || 20633 _c === void 0 ? void 0 : _c.strokeWidth); 20634 } 20635 } 20636 checkObjectDiff() { 20637 let colorEQ = isBaseOrResourceEqual(this.stageValue.strokeColor, this.value.strokeColor); 20638 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 20639 let widthEQ = isBaseOrResourceEqual(this.stageValue.strokeWidth, this.value.strokeWidth); 20640 return !colorEQ || !sizeEQ || !widthEQ; 20641 } 20642} 20643CheckboxMarkModifier.identity = Symbol('checkboxMark'); 20644class CheckboxSelectModifier extends ModifierWithKey { 20645 constructor(value) { 20646 super(value); 20647 } 20648 applyPeer(node, reset) { 20649 if (reset) { 20650 getUINativeModule().checkbox.resetSelect(node); 20651 } 20652 else { 20653 getUINativeModule().checkbox.setSelect(node, this.value); 20654 } 20655 } 20656 checkObjectDiff() { 20657 return this.stageValue !== this.value; 20658 } 20659} 20660CheckboxSelectModifier.identity = Symbol('checkboxSelect'); 20661class CheckboxHeightModifier extends ModifierWithKey { 20662 constructor(value) { 20663 super(value); 20664 } 20665 applyPeer(node, reset) { 20666 if (reset) { 20667 getUINativeModule().checkbox.resetHeight(node); 20668 } 20669 else { 20670 getUINativeModule().checkbox.setHeight(node, this.value); 20671 } 20672 } 20673 checkObjectDiff() { 20674 return !isBaseOrResourceEqual(this.stageValue, this.value); 20675 } 20676} 20677CheckboxHeightModifier.identity = Symbol('checkboxHeight'); 20678class CheckboxWidthModifier extends ModifierWithKey { 20679 constructor(value) { 20680 super(value); 20681 } 20682 applyPeer(node, reset) { 20683 if (reset) { 20684 getUINativeModule().checkbox.resetWidth(node); 20685 } 20686 else { 20687 getUINativeModule().checkbox.setWidth(node, this.value); 20688 } 20689 } 20690 checkObjectDiff() { 20691 return !isBaseOrResourceEqual(this.stageValue, this.value); 20692 } 20693} 20694CheckboxWidthModifier.identity = Symbol('checkboxWidth'); 20695class CheckboxSelectedColorModifier extends ModifierWithKey { 20696 constructor(value) { 20697 super(value); 20698 } 20699 applyPeer(node, reset) { 20700 if (reset) { 20701 getUINativeModule().checkbox.resetSelectedColor(node); 20702 } 20703 else { 20704 getUINativeModule().checkbox.setSelectedColor(node, this.value); 20705 } 20706 } 20707 checkObjectDiff() { 20708 return !isBaseOrResourceEqual(this.stageValue, this.value); 20709 } 20710} 20711CheckboxSelectedColorModifier.identity = Symbol('checkboxSelectedColor'); 20712class CheckboxUnselectedColorModifier extends ModifierWithKey { 20713 constructor(value) { 20714 super(value); 20715 } 20716 applyPeer(node, reset) { 20717 if (reset) { 20718 getUINativeModule().checkbox.resetUnSelectedColor(node); 20719 } 20720 else { 20721 getUINativeModule().checkbox.setUnSelectedColor(node, this.value); 20722 } 20723 } 20724 checkObjectDiff() { 20725 return !isBaseOrResourceEqual(this.stageValue, this.value); 20726 } 20727} 20728CheckboxUnselectedColorModifier.identity = Symbol('checkboxUnselectedColor'); 20729// @ts-ignore 20730if (globalThis.Checkbox !== undefined) { 20731 globalThis.Checkbox.attributeModifier = function (modifier) { 20732 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20733 return new ArkCheckboxComponent(nativePtr); 20734 }, (nativePtr, classType, modifierJS) => { 20735 return new modifierJS.CheckboxModifier(nativePtr, classType); 20736 }); 20737 }; 20738 globalThis.Checkbox.contentModifier = function (modifier) { 20739 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 20740 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 20741 let component = this.createOrGetNode(elmtId, () => { 20742 return new ArkCheckboxComponent(nativeNode); 20743 }); 20744 component.setContentModifier(modifier); 20745 }; 20746} 20747 20748/// <reference path='./import.ts' /> 20749class ArkNavDestinationComponent extends ArkComponent { 20750 constructor(nativePtr, classType) { 20751 super(nativePtr, classType); 20752 } 20753 title(value, options) { 20754 if (isUndefined(value) || isNull(value)) { 20755 modifierWithKey(this._modifiersWithKeys, NavDestinationTitleModifier.identity, 20756 NavDestinationTitleModifier, undefined); 20757 return this; 20758 } 20759 let arkNavigationTitle = new ArkNavigationTitle(); 20760 arkNavigationTitle.value = value; 20761 if (!isUndefined(options) && !isNull(options) && isObject(options)) { 20762 if (Object.keys(options).length !== 0) { 20763 arkNavigationTitle.navigationTitleOptions = options; 20764 } 20765 } 20766 modifierWithKey(this._modifiersWithKeys, NavDestinationTitleModifier.identity, 20767 NavDestinationTitleModifier, arkNavigationTitle); 20768 return this; 20769 } 20770 menus(value) { 20771 if (isUndefined(value)) { 20772 modifierWithKey(this._modifiersWithKeys, NavDestinationMenusModifier.identity, 20773 NavDestinationMenusModifier, undefined); 20774 return this; 20775 } 20776 modifierWithKey(this._modifiersWithKeys, NavDestinationMenusModifier.identity, 20777 NavDestinationMenusModifier, value); 20778 return this; 20779 } 20780 hideTitleBar(isHide, animated) { 20781 let arkNavDestinationHideTitleBar = new ArkNavHideTitleBarOrToolBar(); 20782 if (!isUndefined(isHide) && !isNull(isHide)) { 20783 arkNavDestinationHideTitleBar.isHide = isHide; 20784 } 20785 if (!isUndefined(animated) && !isNull(animated)) { 20786 arkNavDestinationHideTitleBar.animated = animated; 20787 } 20788 if (arkNavDestinationHideTitleBar.isHide === undefined && arkNavDestinationHideTitleBar.animated === undefined) { 20789 modifierWithKey(this._modifiersWithKeys, HideTitleBarModifier.identity, HideTitleBarModifier, undefined); 20790 } else { 20791 modifierWithKey(this._modifiersWithKeys, HideTitleBarModifier.identity, HideTitleBarModifier, arkNavDestinationHideTitleBar); 20792 } 20793 return this; 20794 } 20795 hideToolBar(isHide, animated) { 20796 let arkNavDestinationHideToolBar = new ArkNavHideTitleBarOrToolBar(); 20797 if (!isUndefined(isHide) && !isNull(isHide)) { 20798 arkNavDestinationHideToolBar.isHide = isHide; 20799 } 20800 if (!isUndefined(animated) && !isNull(animated)) { 20801 arkNavDestinationHideToolBar.animated = animated; 20802 } 20803 if (arkNavDestinationHideToolBar.isHide === undefined && arkNavDestinationHideToolBar.animated === undefined) { 20804 modifierWithKey(this._modifiersWithKeys, NavDestinationHideToolBarModifier.identity, 20805 NavDestinationHideToolBarModifier, undefined); 20806 } else { 20807 modifierWithKey(this._modifiersWithKeys, NavDestinationHideToolBarModifier.identity, 20808 NavDestinationHideToolBarModifier, arkNavDestinationHideToolBar); 20809 } 20810 return this; 20811 } 20812 toolbarConfiguration(value) { 20813 throw new Error('Method not implemented.'); 20814 } 20815 hideBackButton(value) { 20816 modifierWithKey(this._modifiersWithKeys, NavDestinationHideBackButtonModifier.identity, 20817 NavDestinationHideBackButtonModifier, value); 20818 return this; 20819 } 20820 backButtonIcon(value) { 20821 modifierWithKey(this._modifiersWithKeys, NavDestinationBackButtonIconModifier.identity, 20822 NavDestinationBackButtonIconModifier, value); 20823 return this; 20824 } 20825 mode(value) { 20826 modifierWithKey(this._modifiersWithKeys, NavDestinationModeModifier.identity, 20827 NavDestinationModeModifier, value); 20828 return this; 20829 } 20830 systemTransition(value) { 20831 modifierWithKey(this._modifiersWithKeys, NavDestinationSystemTransitionModifier.identity, 20832 NavDestinationSystemTransitionModifier, value); 20833 return this; 20834 } 20835 onShown(callback) { 20836 throw new Error('Method not implemented.'); 20837 } 20838 onHidden(callback) { 20839 throw new Error('Method not implemented.'); 20840 } 20841 onBackPressed(callback) { 20842 throw new Error('Method not implemented.'); 20843 } 20844 ignoreLayoutSafeArea(types, edges) { 20845 let opts = new ArkSafeAreaExpandOpts(); 20846 if (types && types.length >= 0) { 20847 let safeAreaType = ''; 20848 for (let param of types) { 20849 if (!isNumber(param) || param >= SAFE_AREA_TYPE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 20850 safeAreaType = undefined; 20851 break; 20852 } 20853 if (safeAreaType) { 20854 safeAreaType += '|'; 20855 safeAreaType += param.toString(); 20856 } 20857 else { 20858 safeAreaType += param.toString(); 20859 } 20860 } 20861 opts.type = safeAreaType; 20862 } 20863 if (edges && edges.length >= 0) { 20864 let safeAreaEdge = ''; 20865 for (let param of edges) { 20866 if (!isNumber(param) || param >= SAFE_AREA_EDGE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 20867 safeAreaEdge = undefined; 20868 break; 20869 } 20870 if (safeAreaEdge) { 20871 safeAreaEdge += '|'; 20872 safeAreaEdge += param.toString(); 20873 } 20874 else { 20875 safeAreaEdge += param.toString(); 20876 } 20877 } 20878 opts.edges = safeAreaEdge; 20879 } 20880 if (opts.type === undefined && opts.edges === undefined) { 20881 modifierWithKey(this._modifiersWithKeys, IgnoreLayoutSafeAreaModifier.identity, IgnoreLayoutSafeAreaModifier, undefined); 20882 } 20883 else { 20884 modifierWithKey(this._modifiersWithKeys, IgnoreLayoutSafeAreaModifier.identity, IgnoreLayoutSafeAreaModifier, opts); 20885 } 20886 return this; 20887 } 20888 recoverable(value) { 20889 modifierWithKey(this._modifiersWithKeys, NavDestinationRecoverableModifier.identity, NavDestinationRecoverableModifier, value); 20890 return this; 20891 } 20892} 20893 20894class HideTitleBarModifier extends ModifierWithKey { 20895 constructor(value) { 20896 super(value); 20897 } 20898 applyPeer(node, reset) { 20899 if (reset) { 20900 getUINativeModule().navDestination.resetHideTitleBar(node); 20901 } 20902 else { 20903 getUINativeModule().navDestination.setHideTitleBar(node, this.value?.isHide, this.value?.animated); 20904 } 20905 } 20906} 20907HideTitleBarModifier.identity = Symbol('hideTitleBar'); 20908 20909class NavDestinationHideToolBarModifier extends ModifierWithKey { 20910 constructor(value) { 20911 super(value); 20912 } 20913 applyPeer(node, reset) { 20914 if (reset) { 20915 getUINativeModule().navDestination.resetHideToolBar(node); 20916 } 20917 else { 20918 getUINativeModule().navDestination.setHideToolBar(node, this.value?.isHide, this.value?.animated); 20919 } 20920 } 20921} 20922NavDestinationHideToolBarModifier.identity = Symbol('hideToolBar'); 20923 20924class NavDestinationHideBackButtonModifier extends ModifierWithKey { 20925 constructor(value) { 20926 super(value); 20927 } 20928 applyPeer(node, reset) { 20929 if (reset) { 20930 getUINativeModule().navDestination.resetHideBackButton(node); 20931 } 20932 else { 20933 getUINativeModule().navDestination.setHideBackButton(node, this.value); 20934 } 20935 } 20936} 20937NavDestinationHideBackButtonModifier.identity = Symbol('hideBackButton'); 20938 20939class IgnoreLayoutSafeAreaModifier extends ModifierWithKey { 20940 constructor(value) { 20941 super(value); 20942 } 20943 applyPeer(node, reset) { 20944 if (reset) { 20945 getUINativeModule().navDestination.resetIgnoreLayoutSafeArea(node); 20946 } 20947 else { 20948 getUINativeModule().navDestination.setIgnoreLayoutSafeArea(node, this.value.type, this.value.edges); 20949 } 20950 } 20951 checkObjectDiff() { 20952 return !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 20953 !isBaseOrResourceEqual(this.stageValue.edges, this.value.edges); 20954 } 20955} 20956IgnoreLayoutSafeAreaModifier.identity = Symbol('ignoreLayoutSafeArea'); 20957 20958class NavDestinationRecoverableModifier extends ModifierWithKey { 20959 constructor(value) { 20960 super(value); 20961 } 20962 20963 applyPeer(node, reset) { 20964 if (reset) { 20965 getUINativeModule().navDestination.resetRecoverable(node); 20966 } else { 20967 getUINativeModule().navDestination.setRecoverable(node, this.value); 20968 } 20969 } 20970} 20971NavDestinationRecoverableModifier.identity = Symbol('recoverable'); 20972 20973class NavDestinationTitleModifier extends ModifierWithKey { 20974 constructor(value) { 20975 super(value); 20976 } 20977 applyPeer(node, reset) { 20978 if (reset) { 20979 getUINativeModule().navDestination.resetTitle(node); 20980 } else { 20981 getUINativeModule().navDestination.setTitle(node, this.value?.value, this.value?.navigationTitleOptions); 20982 } 20983 } 20984 checkObjectDiff() { 20985 return !this.value.isEqual(this.stageValue); 20986 } 20987} 20988NavDestinationTitleModifier.identity = Symbol('title'); 20989 20990class NavDestinationMenusModifier extends ModifierWithKey { 20991 constructor(value) { 20992 super(value); 20993 } 20994 applyPeer(node, reset) { 20995 if (reset) { 20996 getUINativeModule().navDestination.resetMenus(node); 20997 } else { 20998 getUINativeModule().navDestination.setMenus(node, this.value); 20999 } 21000 } 21001 checkObjectDiff() { 21002 if (!Array.isArray(this.value) || !Array.isArray(this.stageValue)) { 21003 return true; 21004 } 21005 if (this.value.length !== this.stageValue.length) { 21006 return true; 21007 } 21008 for (let i = 0; i < this.value.length; i++) { 21009 if (!(isBaseOrResourceEqual(this.stageValue[i].value, this.value[i].value) && 21010 isBaseOrResourceEqual(this.stageValue[i].icon, this.value[i].icon) && 21011 isBaseOrResourceEqual(this.stageValue[i].isEnabled, this.value[i].isEnabled) && 21012 isBaseOrResourceEqual(this.stageValue[i].action, this.value[i].action) && 21013 isBaseOrResourceEqual(this.stageValue[i].symbolIcon, this.value[i].symbolIcon) 21014 )) { 21015 return true; 21016 } 21017 } 21018 return false; 21019 } 21020} 21021NavDestinationMenusModifier.identity = Symbol('menus'); 21022 21023//@ts-ignore 21024if (globalThis.NavDestination !== undefined) { 21025 globalThis.NavDestination.attributeModifier = function (modifier) { 21026 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21027 return new ArkNavDestinationComponent(nativePtr); 21028 }, (nativePtr, classType, modifierJS) => { 21029 return new modifierJS.NavDestinationModifier(nativePtr, classType); 21030 }); 21031 }; 21032} 21033 21034/// <reference path='./import.ts' /> 21035class ArkCounterComponent extends ArkComponent { 21036 constructor(nativePtr, classType) { 21037 super(nativePtr, classType); 21038 } 21039 onInc(event) { 21040 throw new Error('Method not implemented.'); 21041 } 21042 onDec(event) { 21043 throw new Error('Method not implemented.'); 21044 } 21045 enableDec(value) { 21046 modifierWithKey(this._modifiersWithKeys, EnableDecModifier.identity, EnableDecModifier, value); 21047 return this; 21048 } 21049 enableInc(value) { 21050 modifierWithKey(this._modifiersWithKeys, EnableIncModifier.identity, EnableIncModifier, value); 21051 return this; 21052 } 21053 backgroundColor(value) { 21054 modifierWithKey(this._modifiersWithKeys, CounterBackgroundColorModifier.identity, CounterBackgroundColorModifier, value); 21055 return this; 21056 } 21057 width(value) { 21058 modifierWithKey(this._modifiersWithKeys, CounterWidthModifier.identity, CounterWidthModifier, value); 21059 return this; 21060 } 21061 height(value) { 21062 modifierWithKey(this._modifiersWithKeys, CounterHeightModifier.identity, CounterHeightModifier, value); 21063 return this; 21064 } 21065 size(value) { 21066 modifierWithKey(this._modifiersWithKeys, CounterSizeModifier.identity, CounterSizeModifier, value); 21067 return this; 21068 } 21069} 21070class CounterHeightModifier extends ModifierWithKey { 21071 constructor(value) { 21072 super(value); 21073 } 21074 applyPeer(node, reset) { 21075 if (reset) { 21076 getUINativeModule().counter.resetCounterHeight(node); 21077 } 21078 else { 21079 getUINativeModule().counter.setCounterHeight(node, this.value); 21080 } 21081 } 21082 checkObjectDiff() { 21083 return !isBaseOrResourceEqual(this.stageValue, this.value); 21084 } 21085} 21086CounterHeightModifier.identity = Symbol('CounterHeight'); 21087class CounterWidthModifier extends ModifierWithKey { 21088 constructor(value) { 21089 super(value); 21090 } 21091 applyPeer(node, reset) { 21092 if (reset) { 21093 getUINativeModule().counter.resetCounterWidth(node); 21094 } 21095 else { 21096 getUINativeModule().counter.setCounterWidth(node, this.value); 21097 } 21098 } 21099 checkObjectDiff() { 21100 return !isBaseOrResourceEqual(this.stageValue, this.value); 21101 } 21102} 21103CounterWidthModifier.identity = Symbol('CounterWidth'); 21104class CounterBackgroundColorModifier extends ModifierWithKey { 21105 constructor(value) { 21106 super(value); 21107 } 21108 applyPeer(node, reset) { 21109 if (reset) { 21110 getUINativeModule().counter.resetCounterBackgroundColor(node); 21111 } 21112 else { 21113 getUINativeModule().counter.setCounterBackgroundColor(node, this.value); 21114 } 21115 } 21116 checkObjectDiff() { 21117 return !isBaseOrResourceEqual(this.stageValue, this.value); 21118 } 21119} 21120CounterBackgroundColorModifier.identity = Symbol('CounterBackgroundColor'); 21121class CounterSizeModifier extends ModifierWithKey { 21122 constructor(value) { 21123 super(value); 21124 } 21125 applyPeer(node, reset) { 21126 if (reset) { 21127 getUINativeModule().counter.resetCounterSize(node); 21128 } 21129 else { 21130 getUINativeModule().counter.setCounterSize(node, this.value.width, this.value.height); 21131 } 21132 } 21133 checkObjectDiff() { 21134 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 21135 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 21136 } 21137} 21138CounterSizeModifier.identity = Symbol('CounterSize'); 21139class EnableIncModifier extends ModifierWithKey { 21140 constructor(value) { 21141 super(value); 21142 } 21143 applyPeer(node, reset) { 21144 if (reset) { 21145 getUINativeModule().counter.resetEnableInc(node); 21146 } 21147 else { 21148 getUINativeModule().counter.setEnableInc(node, this.value); 21149 } 21150 } 21151} 21152EnableIncModifier.identity = Symbol('enableInc'); 21153class EnableDecModifier extends ModifierWithKey { 21154 constructor(value) { 21155 super(value); 21156 } 21157 applyPeer(node, reset) { 21158 if (reset) { 21159 getUINativeModule().counter.resetEnableDec(node); 21160 } 21161 else { 21162 getUINativeModule().counter.setEnableDec(node, this.value); 21163 } 21164 } 21165} 21166EnableDecModifier.identity = Symbol('enableDec'); 21167// @ts-ignore 21168if (globalThis.Counter !== undefined) { 21169 globalThis.Counter.attributeModifier = function (modifier) { 21170 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21171 return new ArkCounterComponent(nativePtr); 21172 }, (nativePtr, classType, modifierJS) => { 21173 return new modifierJS.CounterModifier(nativePtr, classType); 21174 }); 21175 }; 21176} 21177 21178/// <reference path='./import.ts' /> 21179class CheckboxGroupSelectAllModifier extends ModifierWithKey { 21180 constructor(value) { 21181 super(value); 21182 } 21183 applyPeer(node, reset) { 21184 if (reset) { 21185 getUINativeModule().checkboxgroup.resetCheckboxGroupSelectAll(node); 21186 } 21187 else { 21188 getUINativeModule().checkboxgroup.setCheckboxGroupSelectAll(node, this.value); 21189 } 21190 } 21191} 21192CheckboxGroupSelectAllModifier.identity = Symbol('checkboxgroupSelectAll'); 21193class CheckboxGroupSelectedColorModifier extends ModifierWithKey { 21194 constructor(value) { 21195 super(value); 21196 } 21197 applyPeer(node, reset) { 21198 if (reset) { 21199 getUINativeModule().checkboxgroup.resetCheckboxGroupSelectedColor(node); 21200 } 21201 else { 21202 getUINativeModule().checkboxgroup.setCheckboxGroupSelectedColor(node, this.value); 21203 } 21204 } 21205 checkObjectDiff() { 21206 return !isBaseOrResourceEqual(this.stageValue, this.value); 21207 } 21208} 21209CheckboxGroupSelectedColorModifier.identity = Symbol('checkboxgroupSelectedColor'); 21210class CheckboxGroupUnselectedColorModifier extends ModifierWithKey { 21211 constructor(value) { 21212 super(value); 21213 } 21214 applyPeer(node, reset) { 21215 if (reset) { 21216 getUINativeModule().checkboxgroup.resetCheckboxGroupUnSelectedColor(node); 21217 } 21218 else { 21219 getUINativeModule().checkboxgroup.setCheckboxGroupUnSelectedColor(node, this.value); 21220 } 21221 } 21222 checkObjectDiff() { 21223 return !isBaseOrResourceEqual(this.stageValue, this.value); 21224 } 21225} 21226CheckboxGroupUnselectedColorModifier.identity = Symbol('checkboxgroupUnselectedColor'); 21227class CheckboxGroupMarkModifier extends ModifierWithKey { 21228 constructor(value) { 21229 super(value); 21230 } 21231 applyPeer(node, reset) { 21232 let _a, _b, _c; 21233 if (reset) { 21234 getUINativeModule().checkboxgroup.resetCheckboxGroupMark(node); 21235 } 21236 else { 21237 getUINativeModule().checkboxgroup.setCheckboxGroupMark(node, (_a = this.value) === null || 21238 _a === void 0 ? void 0 : _a.strokeColor, (_b = this.value) === null || 21239 _b === void 0 ? void 0 : _b.size, (_c = this.value) === null || 21240 _c === void 0 ? void 0 : _c.strokeWidth); 21241 } 21242 } 21243 checkObjectDiff() { 21244 let colorEQ = isBaseOrResourceEqual(this.stageValue.strokeColor, this.value.strokeColor); 21245 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 21246 let widthEQ = isBaseOrResourceEqual(this.stageValue.strokeWidth, this.value.strokeWidth); 21247 return !colorEQ || !sizeEQ || !widthEQ; 21248 } 21249} 21250CheckboxGroupMarkModifier.identity = Symbol('checkboxgroupMark'); 21251class CheckboxGroupWidthModifier extends ModifierWithKey { 21252 constructor(value) { 21253 super(value); 21254 } 21255 applyPeer(node, reset) { 21256 if (reset) { 21257 getUINativeModule().checkboxgroup.resetCheckboxGroupWidth(node); 21258 } 21259 else { 21260 getUINativeModule().checkboxgroup.setCheckboxGroupWidth(node, this.value); 21261 } 21262 } 21263 checkObjectDiff() { 21264 return !isBaseOrResourceEqual(this.stageValue, this.value); 21265 } 21266} 21267CheckboxGroupWidthModifier.identity = Symbol('checkboxGroupWidth'); 21268class CheckboxGroupSizeModifier extends ModifierWithKey { 21269 constructor(value) { 21270 super(value); 21271 } 21272 applyPeer(node, reset) { 21273 if (reset) { 21274 getUINativeModule().checkboxgroup.resetCheckboxGroupSize(node); 21275 } 21276 else { 21277 getUINativeModule().checkboxgroup.setCheckboxGroupSize(node, this.value.width, this.value.height); 21278 } 21279 } 21280 checkObjectDiff() { 21281 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 21282 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 21283 } 21284} 21285CheckboxGroupSizeModifier.identity = Symbol('checkboxGroupSize'); 21286class CheckboxGroupHeightModifier extends ModifierWithKey { 21287 constructor(value) { 21288 super(value); 21289 } 21290 applyPeer(node, reset) { 21291 if (reset) { 21292 getUINativeModule().checkboxgroup.resetCheckboxGroupHeight(node); 21293 } 21294 else { 21295 getUINativeModule().checkboxgroup.setCheckboxGroupHeight(node, this.value); 21296 } 21297 } 21298 checkObjectDiff() { 21299 return !isBaseOrResourceEqual(this.stageValue, this.value); 21300 } 21301} 21302CheckboxGroupHeightModifier.identity = Symbol('checkboxGroupHeight'); 21303class CheckboxGroupStyleModifier extends ModifierWithKey { 21304 constructor(value) { 21305 super(value); 21306 } 21307 applyPeer(node, reset) { 21308 if (reset) { 21309 getUINativeModule().checkboxgroup.resetCheckboxGroupStyle(node); 21310 } else { 21311 getUINativeModule().checkboxgroup.setCheckboxGroupStyle(node, this.value); 21312 } 21313 } 21314 21315 checkObjectDiff() { 21316 return !isBaseOrResourceEqual(this.stageValue, this.value); 21317 } 21318} 21319CheckboxGroupStyleModifier.identity = Symbol('checkboxgroupStyle'); 21320class ArkCheckboxGroupComponent extends ArkComponent { 21321 constructor(nativePtr, classType) { 21322 super(nativePtr, classType); 21323 } 21324 selectAll(value) { 21325 modifierWithKey(this._modifiersWithKeys, CheckboxGroupSelectAllModifier.identity, CheckboxGroupSelectAllModifier, value); 21326 return this; 21327 } 21328 selectedColor(value) { 21329 modifierWithKey(this._modifiersWithKeys, CheckboxGroupSelectedColorModifier.identity, CheckboxGroupSelectedColorModifier, value); 21330 return this; 21331 } 21332 unselectedColor(value) { 21333 modifierWithKey(this._modifiersWithKeys, CheckboxGroupUnselectedColorModifier.identity, CheckboxGroupUnselectedColorModifier, value); 21334 return this; 21335 } 21336 mark(value) { 21337 modifierWithKey(this._modifiersWithKeys, CheckboxGroupMarkModifier.identity, CheckboxGroupMarkModifier, value); 21338 return this; 21339 } 21340 onChange(callback) { 21341 throw new Error('Method not implemented.'); 21342 } 21343 size(value) { 21344 modifierWithKey(this._modifiersWithKeys, CheckboxGroupSizeModifier.identity, CheckboxGroupSizeModifier, value); 21345 return this; 21346 } 21347 width(value) { 21348 modifierWithKey(this._modifiersWithKeys, CheckboxGroupWidthModifier.identity, CheckboxGroupWidthModifier, value); 21349 return this; 21350 } 21351 height(value) { 21352 modifierWithKey(this._modifiersWithKeys, CheckboxGroupHeightModifier.identity, CheckboxGroupHeightModifier, value); 21353 return this; 21354 } 21355 checkboxShape(value) { 21356 modifierWithKey(this._modifiersWithKeys, CheckboxGroupStyleModifier.identity, CheckboxGroupStyleModifier, value); 21357 return this; 21358 } 21359} 21360// @ts-ignore 21361if (globalThis.CheckboxGroup !== undefined) { 21362 globalThis.CheckboxGroup.attributeModifier = function (modifier) { 21363 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21364 return new ArkCheckboxGroupComponent(nativePtr); 21365 }, (nativePtr, classType, modifierJS) => { 21366 return new modifierJS.CheckboxGroupModifier(nativePtr, classType); 21367 }); 21368 }; 21369} 21370 21371/// <reference path='./import.ts' /> 21372class ArkPanelComponent extends ArkComponent { 21373 constructor(nativePtr, classType) { 21374 super(nativePtr, classType); 21375 } 21376 mode(value) { 21377 modifierWithKey(this._modifiersWithKeys, PanelModeModifier.identity, PanelModeModifier, value); 21378 return this; 21379 } 21380 type(value) { 21381 modifierWithKey(this._modifiersWithKeys, PanelTypeModifier.identity, PanelTypeModifier, value); 21382 return this; 21383 } 21384 dragBar(value) { 21385 modifierWithKey(this._modifiersWithKeys, DragBarModifier.identity, DragBarModifier, value); 21386 return this; 21387 } 21388 customHeight(value) { 21389 modifierWithKey(this._modifiersWithKeys, PanelCustomHeightModifier.identity, PanelCustomHeightModifier, value); 21390 return this; 21391 } 21392 fullHeight(value) { 21393 modifierWithKey(this._modifiersWithKeys, PanelFullHeightModifier.identity, PanelFullHeightModifier, value); 21394 return this; 21395 } 21396 halfHeight(value) { 21397 modifierWithKey(this._modifiersWithKeys, PanelHalfHeightModifier.identity, PanelHalfHeightModifier, value); 21398 return this; 21399 } 21400 miniHeight(value) { 21401 modifierWithKey(this._modifiersWithKeys, PanelMiniHeightModifier.identity, PanelMiniHeightModifier, value); 21402 return this; 21403 } 21404 show(value) { 21405 modifierWithKey(this._modifiersWithKeys, ShowModifier.identity, ShowModifier, value); 21406 return this; 21407 } 21408 backgroundMask(color) { 21409 modifierWithKey(this._modifiersWithKeys, PanelBackgroundMaskModifier.identity, PanelBackgroundMaskModifier, color); 21410 return this; 21411 } 21412 showCloseIcon(value) { 21413 modifierWithKey(this._modifiersWithKeys, ShowCloseIconModifier.identity, ShowCloseIconModifier, value); 21414 return this; 21415 } 21416 onChange(event) { 21417 throw new Error('Method not implemented.'); 21418 } 21419 onHeightChange(callback) { 21420 throw new Error('Method not implemented.'); 21421 } 21422} 21423class PanelBackgroundMaskModifier extends ModifierWithKey { 21424 constructor(value) { 21425 super(value); 21426 } 21427 applyPeer(node, reset) { 21428 if (reset) { 21429 getUINativeModule().panel.resetPanelBackgroundMask(node); 21430 } 21431 else { 21432 getUINativeModule().panel.setPanelBackgroundMask(node, this.value); 21433 } 21434 } 21435 checkObjectDiff() { 21436 return !isBaseOrResourceEqual(this.stageValue, this.value); 21437 } 21438} 21439PanelBackgroundMaskModifier.identity = Symbol('panelBackgroundMask'); 21440class PanelModeModifier extends ModifierWithKey { 21441 constructor(value) { 21442 super(value); 21443 } 21444 applyPeer(node, reset) { 21445 if (reset) { 21446 getUINativeModule().panel.resetPanelMode(node); 21447 } 21448 else { 21449 getUINativeModule().panel.setPanelMode(node, this.value); 21450 } 21451 } 21452 checkObjectDiff() { 21453 return !isBaseOrResourceEqual(this.stageValue, this.value); 21454 } 21455} 21456PanelModeModifier.identity = Symbol('panelMode'); 21457class PanelTypeModifier extends ModifierWithKey { 21458 constructor(value) { 21459 super(value); 21460 } 21461 applyPeer(node, reset) { 21462 if (reset) { 21463 getUINativeModule().panel.resetPanelType(node); 21464 } 21465 else { 21466 getUINativeModule().panel.setPanelType(node, this.value); 21467 } 21468 } 21469 checkObjectDiff() { 21470 return !isBaseOrResourceEqual(this.stageValue, this.value); 21471 } 21472} 21473PanelTypeModifier.identity = Symbol('panelType'); 21474class PanelCustomHeightModifier extends ModifierWithKey { 21475 constructor(value) { 21476 super(value); 21477 } 21478 applyPeer(node, reset) { 21479 if (reset) { 21480 getUINativeModule().panel.resetPanelCustomHeight(node); 21481 } 21482 else { 21483 getUINativeModule().panel.setPanelCustomHeight(node, this.value); 21484 } 21485 } 21486 checkObjectDiff() { 21487 return !isBaseOrResourceEqual(this.stageValue, this.value); 21488 } 21489} 21490PanelCustomHeightModifier.identity = Symbol('panelCustomHeight'); 21491class PanelFullHeightModifier extends ModifierWithKey { 21492 constructor(value) { 21493 super(value); 21494 } 21495 applyPeer(node, reset) { 21496 if (reset) { 21497 getUINativeModule().panel.resetPanelFullHeight(node); 21498 } 21499 else { 21500 getUINativeModule().panel.setPanelFullHeight(node, this.value); 21501 } 21502 } 21503 checkObjectDiff() { 21504 return !isBaseOrResourceEqual(this.stageValue, this.value); 21505 } 21506} 21507PanelFullHeightModifier.identity = Symbol('panelFullHeight'); 21508class PanelHalfHeightModifier extends ModifierWithKey { 21509 constructor(value) { 21510 super(value); 21511 } 21512 applyPeer(node, reset) { 21513 if (reset) { 21514 getUINativeModule().panel.resetPanelHalfHeight(node); 21515 } 21516 else { 21517 getUINativeModule().panel.setPanelHalfHeight(node, this.value); 21518 } 21519 } 21520 checkObjectDiff() { 21521 return !isBaseOrResourceEqual(this.stageValue, this.value); 21522 } 21523} 21524PanelHalfHeightModifier.identity = Symbol('panelHalfHeight'); 21525class PanelMiniHeightModifier extends ModifierWithKey { 21526 constructor(value) { 21527 super(value); 21528 } 21529 applyPeer(node, reset) { 21530 if (reset) { 21531 getUINativeModule().panel.resetPanelMiniHeight(node); 21532 } 21533 else { 21534 getUINativeModule().panel.setPanelMiniHeight(node, this.value); 21535 } 21536 } 21537 checkObjectDiff() { 21538 return !isBaseOrResourceEqual(this.stageValue, this.value); 21539 } 21540} 21541PanelMiniHeightModifier.identity = Symbol('panelMiniHeight'); 21542class ShowCloseIconModifier extends ModifierWithKey { 21543 constructor(value) { 21544 super(value); 21545 } 21546 applyPeer(node, reset) { 21547 if (reset) { 21548 getUINativeModule().panel.resetShowCloseIcon(node); 21549 } 21550 else { 21551 getUINativeModule().panel.setShowCloseIcon(node, this.value); 21552 } 21553 } 21554 checkObjectDiff() { 21555 return !isBaseOrResourceEqual(this.stageValue, this.value); 21556 } 21557} 21558ShowCloseIconModifier.identity = Symbol('showCloseIcon'); 21559class DragBarModifier extends ModifierWithKey { 21560 constructor(value) { 21561 super(value); 21562 } 21563 applyPeer(node, reset) { 21564 if (reset) { 21565 getUINativeModule().panel.resetDragBar(node); 21566 } 21567 else { 21568 getUINativeModule().panel.setDragBar(node, this.value); 21569 } 21570 } 21571 checkObjectDiff() { 21572 return !isBaseOrResourceEqual(this.stageValue, this.value); 21573 } 21574} 21575DragBarModifier.identity = Symbol('dragBar'); 21576class ShowModifier extends ModifierWithKey { 21577 constructor(value) { 21578 super(value); 21579 } 21580 applyPeer(node, reset) { 21581 if (reset) { 21582 getUINativeModule().panel.resetShow(node); 21583 } 21584 else { 21585 getUINativeModule().panel.setShow(node, this.value); 21586 } 21587 } 21588 checkObjectDiff() { 21589 return !isBaseOrResourceEqual(this.stageValue, this.value); 21590 } 21591} 21592ShowModifier.identity = Symbol('show'); 21593// @ts-ignore 21594if (globalThis.Panel !== undefined) { 21595 globalThis.Panel.attributeModifier = function (modifier) { 21596 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21597 return new ArkPanelComponent(nativePtr); 21598 }, (nativePtr, classType, modifierJS) => { 21599 return new modifierJS.PanelModifier(nativePtr, classType); 21600 }); 21601 }; 21602} 21603 21604/// <reference path='./import.ts' /> 21605const TITLE_MODE_RANGE = 2; 21606const NAV_BAR_POSITION_RANGE = 1; 21607const NAVIGATION_MODE_RANGE = 2; 21608const DEFAULT_NAV_BAR_WIDTH = 240; 21609const MIN_NAV_BAR_WIDTH_DEFAULT = '240vp'; 21610const MAX_NAV_BAR_WIDTH_DEFAULT = '40%'; 21611const NAVIGATION_TITLE_MODE_DEFAULT = 0; 21612const DEFAULT_UNIT = 'vp'; 21613class ArkNavigationComponent extends ArkComponent { 21614 constructor(nativePtr, classType) { 21615 super(nativePtr, classType); 21616 } 21617 navBarWidth(value) { 21618 modifierWithKey(this._modifiersWithKeys, NavBarWidthModifier.identity, NavBarWidthModifier, value); 21619 return this; 21620 } 21621 navBarPosition(value) { 21622 modifierWithKey(this._modifiersWithKeys, NavBarPositionModifier.identity, NavBarPositionModifier, value); 21623 return this; 21624 } 21625 navBarWidthRange(value) { 21626 modifierWithKey(this._modifiersWithKeys, NavBarWidthRangeModifier.identity, NavBarWidthRangeModifier, value); 21627 return this; 21628 } 21629 minContentWidth(value) { 21630 modifierWithKey(this._modifiersWithKeys, MinContentWidthModifier.identity, MinContentWidthModifier, value); 21631 return this; 21632 } 21633 enableDragBar(value) { 21634 modifierWithKey(this._modifiersWithKeys, NavigationEnableDragBarModifier.identity, NavigationEnableDragBarModifier, value); 21635 return this; 21636 } 21637 mode(value) { 21638 modifierWithKey(this._modifiersWithKeys, ModeModifier.identity, ModeModifier, value); 21639 return this; 21640 } 21641 backButtonIcon(value) { 21642 modifierWithKey(this._modifiersWithKeys, BackButtonIconModifier.identity, BackButtonIconModifier, value); 21643 return this; 21644 } 21645 hideNavBar(value) { 21646 modifierWithKey(this._modifiersWithKeys, HideNavBarModifier.identity, HideNavBarModifier, value); 21647 return this; 21648 } 21649 title(value, options) { 21650 if (isUndefined(value) || isNull(value)) { 21651 modifierWithKey(this._modifiersWithKeys, TitleModifier.identity, 21652 TitleModifier, undefined); 21653 return this; 21654 } 21655 let arkNavigationTitle = new ArkNavigationTitle(); 21656 arkNavigationTitle.value = value; 21657 if (!isUndefined(options) && !isNull(options) && isObject(options)) { 21658 if (Object.keys(options).length !== 0) { 21659 arkNavigationTitle.navigationTitleOptions = options; 21660 } 21661 } 21662 modifierWithKey(this._modifiersWithKeys, TitleModifier.identity, 21663 TitleModifier, arkNavigationTitle); 21664 return this; 21665 } 21666 subTitle(value) { 21667 modifierWithKey(this._modifiersWithKeys, SubTitleModifier.identity, SubTitleModifier, value); 21668 return this; 21669 } 21670 enableModeChangeAnimation(value) { 21671 modifierWithKey(this._modifiersWithKeys, EnableModeChangeAnimationModifier.identity, 21672 EnableModeChangeAnimationModifier, value); 21673 return this; 21674 } 21675 hideTitleBar(isHide, animated) { 21676 let arkNavigationHideTitleBar = new ArkNavHideTitleBarOrToolBar(); 21677 if (!isUndefined(isHide) && !isNull(isHide)) { 21678 arkNavigationHideTitleBar.isHide = isHide; 21679 } 21680 if (!isUndefined(animated) && !isNull(animated)) { 21681 arkNavigationHideTitleBar.animated = animated; 21682 } 21683 if (arkNavigationHideTitleBar.isHide === undefined && arkNavigationHideTitleBar.animated === undefined) { 21684 modifierWithKey(this._modifiersWithKeys, NavigationHideTitleBarModifier.identity, NavigationHideTitleBarModifier, undefined); 21685 } else { 21686 modifierWithKey(this._modifiersWithKeys, NavigationHideTitleBarModifier.identity, NavigationHideTitleBarModifier, arkNavigationHideTitleBar); 21687 } 21688 return this; 21689 } 21690 hideBackButton(value) { 21691 modifierWithKey(this._modifiersWithKeys, HideBackButtonModifier.identity, HideBackButtonModifier, value); 21692 return this; 21693 } 21694 titleMode(value) { 21695 modifierWithKey(this._modifiersWithKeys, TitleModeModifier.identity, TitleModeModifier, value); 21696 return this; 21697 } 21698 menus(value) { 21699 if (isUndefined(value)) { 21700 modifierWithKey(this._modifiersWithKeys, MenusModifier.identity, MenusModifier, undefined); 21701 return this; 21702 } 21703 modifierWithKey(this._modifiersWithKeys, MenusModifier.identity, MenusModifier, value); 21704 return this; 21705 } 21706 toolBar(value) { 21707 throw new Error('Method not implemented.'); 21708 } 21709 toolbarConfiguration(value) { 21710 throw new Error('Method not implemented.'); 21711 } 21712 hideToolBar(isHide, animated) { 21713 let arkNavigationHideToolBar = new ArkNavHideTitleBarOrToolBar(); 21714 if (!isUndefined(isHide) && !isNull(isHide)) { 21715 arkNavigationHideToolBar.isHide = isHide; 21716 } 21717 if (!isUndefined(animated) && !isNull(animated)) { 21718 arkNavigationHideToolBar.animated = animated; 21719 } 21720 if (arkNavigationHideToolBar.isHide === undefined && arkNavigationHideToolBar.animated === undefined) { 21721 modifierWithKey(this._modifiersWithKeys, HideToolBarModifier.identity, HideToolBarModifier, undefined); 21722 } else { 21723 modifierWithKey(this._modifiersWithKeys, HideToolBarModifier.identity, HideToolBarModifier, arkNavigationHideToolBar); 21724 } 21725 return this; 21726 } 21727 onTitleModeChange(callback) { 21728 throw new Error('Method not implemented.'); 21729 } 21730 onNavBarStateChange(callback) { 21731 throw new Error('Method not implemented.'); 21732 } 21733 onNavigationModeChange(callback) { 21734 throw new Error('Method not implemented.'); 21735 } 21736 navDestination(builder) { 21737 throw new Error('Method not implemented.'); 21738 } 21739 ignoreLayoutSafeArea(types, edges) { 21740 let opts = new ArkSafeAreaExpandOpts(); 21741 if (types && types.length >= 0) { 21742 let safeAreaType = ''; 21743 for (let param of types) { 21744 if (!isNumber(param) || param >= SAFE_AREA_TYPE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 21745 safeAreaType = undefined; 21746 break; 21747 } 21748 if (safeAreaType) { 21749 safeAreaType += '|'; 21750 safeAreaType += param.toString(); 21751 } 21752 else { 21753 safeAreaType += param.toString(); 21754 } 21755 } 21756 opts.type = safeAreaType; 21757 } 21758 if (edges && edges.length >= 0) { 21759 let safeAreaEdge = ''; 21760 for (let param of edges) { 21761 if (!isNumber(param) || param >= SAFE_AREA_EDGE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 21762 safeAreaEdge = undefined; 21763 break; 21764 } 21765 if (safeAreaEdge) { 21766 safeAreaEdge += '|'; 21767 safeAreaEdge += param.toString(); 21768 } 21769 else { 21770 safeAreaEdge += param.toString(); 21771 } 21772 } 21773 opts.edges = safeAreaEdge; 21774 } 21775 if (opts.type === undefined && opts.edges === undefined) { 21776 modifierWithKey(this._modifiersWithKeys, IgnoreNavLayoutSafeAreaModifier.identity, IgnoreNavLayoutSafeAreaModifier, undefined); 21777 } 21778 else { 21779 modifierWithKey(this._modifiersWithKeys, IgnoreNavLayoutSafeAreaModifier.identity, IgnoreNavLayoutSafeAreaModifier, opts); 21780 } 21781 return this; 21782 } 21783 recoverable(value) { 21784 modifierWithKey(this._modifiersWithKeys, NavigationRecoverableModifier.identity, NavigationRecoverableModifier, value); 21785 return this; 21786 } 21787} 21788class BackButtonIconModifier extends ModifierWithKey { 21789 constructor(value) { 21790 super(value); 21791 } 21792 applyPeer(node, reset) { 21793 if (reset) { 21794 getUINativeModule().navigation.resetBackButtonIcon(node); 21795 } 21796 else { 21797 getUINativeModule().navigation.setBackButtonIcon(node, this.value); 21798 } 21799 } 21800 checkObjectDiff() { 21801 return !isBaseOrResourceEqual(this.stageValue, this.value); 21802 } 21803} 21804BackButtonIconModifier.identity = Symbol('backButtonIcon'); 21805class NavBarWidthRangeModifier extends ModifierWithKey { 21806 constructor(value) { 21807 super(value); 21808 } 21809 applyPeer(node, reset) { 21810 if (reset) { 21811 getUINativeModule().navigation.resetNavBarWidthRange(node); 21812 } 21813 else { 21814 getUINativeModule().navigation.setNavBarWidthRange(node, this.value); 21815 } 21816 } 21817 checkObjectDiff() { 21818 return !isBaseOrResourceEqual(this.stageValue, this.value); 21819 } 21820} 21821NavBarWidthRangeModifier.identity = Symbol('navBarWidthRange'); 21822class MinContentWidthModifier extends ModifierWithKey { 21823 constructor(value) { 21824 super(value); 21825 } 21826 applyPeer(node, reset) { 21827 if (reset) { 21828 getUINativeModule().navigation.resetMinContentWidth(node); 21829 } 21830 else { 21831 getUINativeModule().navigation.setMinContentWidth(node, this.value); 21832 } 21833 } 21834 checkObjectDiff() { 21835 return !isBaseOrResourceEqual(this.stageValue, this.value); 21836 } 21837} 21838MinContentWidthModifier.identity = Symbol('minContentWidth'); 21839class NavBarWidthModifier extends ModifierWithKey { 21840 constructor(value) { 21841 super(value); 21842 } 21843 applyPeer(node, reset) { 21844 if (reset) { 21845 getUINativeModule().navigation.resetNavBarWidth(node); 21846 } 21847 else { 21848 getUINativeModule().navigation.setNavBarWidth(node, this.value); 21849 } 21850 } 21851 checkObjectDiff() { 21852 return !isBaseOrResourceEqual(this.stageValue, this.value); 21853 } 21854} 21855NavBarWidthModifier.identity = Symbol('navBarWidth'); 21856class NavBarPositionModifier extends ModifierWithKey { 21857 constructor(value) { 21858 super(value); 21859 } 21860 applyPeer(node, reset) { 21861 if (reset) { 21862 getUINativeModule().navigation.resetNavBarPosition(node); 21863 } 21864 else { 21865 getUINativeModule().navigation.setNavBarPosition(node, this.value); 21866 } 21867 } 21868} 21869NavBarPositionModifier.identity = Symbol('navBarPosition'); 21870class ModeModifier extends ModifierWithKey { 21871 constructor(value) { 21872 super(value); 21873 } 21874 static identity = Symbol('mode'); 21875 applyPeer(node, reset) { 21876 if (reset) { 21877 getUINativeModule().navigation.resetMode(node); 21878 } 21879 else { 21880 getUINativeModule().navigation.setMode(node, this.value); 21881 } 21882 } 21883} 21884class NavDestinationBackButtonIconModifier extends ModifierWithKey { 21885 constructor(value) { 21886 super(value); 21887 } 21888 static identity = Symbol('backButtonIcon'); 21889 applyPeer(node, reset) { 21890 if (reset) { 21891 getUINativeModule().navDestination.resetBackButtonIcon(node); 21892 } else { 21893 getUINativeModule().navDestination.setBackButtonIcon(node, this.value); 21894 } 21895 } 21896} 21897 21898class NavDestinationModeModifier extends ModifierWithKey { 21899 constructor(value) { 21900 super(value); 21901 } 21902 applyPeer(node, reset) { 21903 if (reset) { 21904 getUINativeModule().navDestination.resetMode(node); 21905 } 21906 else { 21907 getUINativeModule().navDestination.setMode(node, this.value); 21908 } 21909 } 21910} 21911NavDestinationModeModifier.identity = Symbol('mode'); 21912 21913class NavDestinationSystemTransitionModifier extends ModifierWithKey { 21914 constructor(value) { 21915 super(value); 21916 } 21917 applyPeer(node, reset) { 21918 if (reset) { 21919 getUINativeModule().navDestination.resetSystemTransition(node); 21920 } 21921 else { 21922 getUINativeModule().navDestination.setSystemTransition(node, this.value); 21923 } 21924 } 21925} 21926NavDestinationSystemTransitionModifier.identity = Symbol('systemTransition'); 21927 21928class HideToolBarModifier extends ModifierWithKey { 21929 constructor(value) { 21930 super(value); 21931 } 21932 applyPeer(node, reset) { 21933 if (reset) { 21934 getUINativeModule().navigation.resetHideToolBar(node); 21935 } 21936 else { 21937 getUINativeModule().navigation.setHideToolBar(node, this.value?.isHide, this.value?.animated); 21938 } 21939 } 21940} 21941HideToolBarModifier.identity = Symbol('hideToolBar'); 21942 21943class EnableModeChangeAnimationModifier extends ModifierWithKey { 21944 constructor(value) { 21945 super(value); 21946 } 21947 applyPeer(node, reset) { 21948 if (reset) { 21949 getUINativeModule().navigation.resetEnableModeChangeAnimation(node); 21950 } else { 21951 getUINativeModule().navigation.setEnableModeChangeAnimation(node, this.value); 21952 } 21953 } 21954} 21955EnableModeChangeAnimationModifier.identity = Symbol('enableModeChangeAnimation'); 21956 21957class TitleModeModifier extends ModifierWithKey { 21958 constructor(value) { 21959 super(value); 21960 } 21961 applyPeer(node, reset) { 21962 if (reset) { 21963 getUINativeModule().navigation.resetTitleMode(node); 21964 } 21965 else { 21966 getUINativeModule().navigation.setTitleMode(node, this.value); 21967 } 21968 } 21969} 21970TitleModeModifier.identity = Symbol('titleMode'); 21971class HideBackButtonModifier extends ModifierWithKey { 21972 constructor(value) { 21973 super(value); 21974 } 21975 applyPeer(node, reset) { 21976 if (reset) { 21977 getUINativeModule().navigation.resetHideBackButton(node); 21978 } 21979 else { 21980 getUINativeModule().navigation.setHideBackButton(node, this.value); 21981 } 21982 } 21983} 21984HideBackButtonModifier.identity = Symbol('hideBackButton'); 21985class SubTitleModifier extends ModifierWithKey { 21986 constructor(value) { 21987 super(value); 21988 } 21989 applyPeer(node, reset) { 21990 if (reset) { 21991 getUINativeModule().navigation.resetSubTitle(node); 21992 } 21993 else { 21994 getUINativeModule().navigation.setSubTitle(node, this.value); 21995 } 21996 } 21997} 21998SubTitleModifier.identity = Symbol('subTitle'); 21999class NavigationHideTitleBarModifier extends ModifierWithKey { 22000 constructor(value) { 22001 super(value); 22002 } 22003 applyPeer(node, reset) { 22004 if (reset) { 22005 getUINativeModule().navigation.resetHideTitleBar(node); 22006 } 22007 else { 22008 getUINativeModule().navigation.setHideTitleBar(node, this.value?.isHide, this.value?.animated); 22009 } 22010 } 22011} 22012NavigationHideTitleBarModifier.identity = Symbol('hideTitleBar'); 22013class HideNavBarModifier extends ModifierWithKey { 22014 constructor(value) { 22015 super(value); 22016 } 22017 applyPeer(node, reset) { 22018 if (reset) { 22019 getUINativeModule().navigation.resetHideNavBar(node); 22020 } 22021 else { 22022 getUINativeModule().navigation.setHideNavBar(node, this.value); 22023 } 22024 } 22025} 22026HideNavBarModifier.identity = Symbol('hideNavBar'); 22027 22028class NavigationEnableDragBarModifier extends ModifierWithKey { 22029 constructor(value) { 22030 super(value); 22031 } 22032 22033 applyPeer(node, reset) { 22034 if (reset) { 22035 getUINativeModule().navigation.resetEnableDragBar(node); 22036 } else { 22037 getUINativeModule().navigation.setEnableDragBar(node, this.value); 22038 } 22039 } 22040} 22041NavigationEnableDragBarModifier.identity = Symbol('enableDragBar'); 22042class IgnoreNavLayoutSafeAreaModifier extends ModifierWithKey { 22043 constructor(value) { 22044 super(value); 22045 } 22046 applyPeer(node, reset) { 22047 if (reset) { 22048 getUINativeModule().navigation.resetIgnoreLayoutSafeArea(node); 22049 } 22050 else { 22051 getUINativeModule().navigation.setIgnoreLayoutSafeArea(node, this.value.type, this.value.edges); 22052 } 22053 } 22054 checkObjectDiff() { 22055 return !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 22056 !isBaseOrResourceEqual(this.stageValue.edges, this.value.edges); 22057 } 22058} 22059IgnoreNavLayoutSafeAreaModifier.identity = Symbol('ignoreLayoutSafeArea'); 22060 22061class NavigationRecoverableModifier extends ModifierWithKey { 22062 constructor(value) { 22063 super(value); 22064 } 22065 22066 applyPeer(node, reset) { 22067 if (reset) { 22068 getUINativeModule().navigation.resetRecoverable(node); 22069 } else { 22070 getUINativeModule().navigation.setRecoverable(node, this.value); 22071 } 22072 } 22073} 22074NavigationRecoverableModifier.identity = Symbol('recoverable'); 22075 22076class MenusModifier extends ModifierWithKey { 22077 constructor(value) { 22078 super(value); 22079 } 22080 applyPeer(node, reset) { 22081 if (reset) { 22082 getUINativeModule().navigation.resetMenus(node); 22083 } else { 22084 getUINativeModule().navigation.setMenus(node, this.value); 22085 } 22086 } 22087 checkObjectDiff() { 22088 if (!Array.isArray(this.value) || !Array.isArray(this.stageValue)) { 22089 return true; 22090 } 22091 if (this.value.length !== this.stageValue.length) { 22092 return true; 22093 } 22094 for (let i = 0; i < this.value.length; i++) { 22095 if (!(isBaseOrResourceEqual(this.stageValue[i].value, this.value[i].value) && 22096 isBaseOrResourceEqual(this.stageValue[i].icon, this.value[i].icon) && 22097 isBaseOrResourceEqual(this.stageValue[i].isEnabled, this.value[i].isEnabled) && 22098 isBaseOrResourceEqual(this.stageValue[i].action, this.value[i].action) && 22099 isBaseOrResourceEqual(this.stageValue[i].symbolIcon, this.value[i].symbolIcon) 22100 )) { 22101 return true; 22102 } 22103 } 22104 return false; 22105 } 22106} 22107MenusModifier.identity = Symbol('menus'); 22108 22109class TitleModifier extends ModifierWithKey { 22110 constructor(value) { 22111 super(value); 22112 } 22113 applyPeer(node, reset) { 22114 if (reset) { 22115 getUINativeModule().navigation.resetTitle(node); 22116 } else { 22117 getUINativeModule().navigation.setTitle(node, this.value?.value, this.value?.navigationTitleOptions); 22118 } 22119 } 22120 checkObjectDiff() { 22121 return !this.value.isEqual(this.stageValue); 22122 } 22123} 22124TitleModifier.identity = Symbol('title'); 22125 22126// @ts-ignore 22127if (globalThis.Navigation !== undefined) { 22128 globalThis.Navigation.attributeModifier = function (modifier) { 22129 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22130 return new ArkNavigationComponent(nativePtr); 22131 }, (nativePtr, classType, modifierJS) => { 22132 return new modifierJS.NavigationModifier(nativePtr, classType); 22133 }); 22134 }; 22135} 22136 22137/// <reference path='./import.ts' /> 22138class ArkNavRouterComponent extends ArkComponent { 22139 constructor(nativePtr, classType) { 22140 super(nativePtr, classType); 22141 } 22142 onStateChange(callback) { 22143 throw new Error('Method not implemented.'); 22144 } 22145 mode(mode) { 22146 modifierWithKey(this._modifiersWithKeys, NavRouterModeModifier.identity, NavRouterModeModifier, mode); 22147 return this; 22148 } 22149} 22150class NavRouterModeModifier extends ModifierWithKey { 22151 constructor(value) { 22152 super(value); 22153 } 22154 applyPeer(node, reset) { 22155 if (reset) { 22156 getUINativeModule().navRouter.resetMode(node); 22157 } 22158 else { 22159 getUINativeModule().navRouter.setMode(node, this.value); 22160 } 22161 } 22162} 22163NavRouterModeModifier.identity = Symbol('mode'); 22164// @ts-ignore 22165if (globalThis.NavRouter !== undefined) { 22166 globalThis.NavRouter.attributeModifier = function (modifier) { 22167 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22168 return new ArkNavRouterComponent(nativePtr); 22169 }, (nativePtr, classType, modifierJS) => { 22170 return new modifierJS.NavRouterModifier(nativePtr, classType); 22171 }); 22172 }; 22173} 22174 22175/// <reference path='./import.ts' /> 22176class ArkNavigatorComponent extends ArkComponent { 22177 constructor(nativePtr, classType) { 22178 super(nativePtr, classType); 22179 } 22180 active(value) { 22181 modifierWithKey(this._modifiersWithKeys, ActiveModifier.identity, ActiveModifier, value); 22182 return this; 22183 } 22184 type(value) { 22185 modifierWithKey(this._modifiersWithKeys, TypeModifier.identity, TypeModifier, value); 22186 return this; 22187 } 22188 target(value) { 22189 modifierWithKey(this._modifiersWithKeys, TargetModifier.identity, TargetModifier, value); 22190 return this; 22191 } 22192 params(value) { 22193 modifierWithKey(this._modifiersWithKeys, ParamsModifier.identity, ParamsModifier, JSON.stringify(value)); 22194 return this; 22195 } 22196} 22197class ParamsModifier extends ModifierWithKey { 22198 constructor(value) { 22199 super(value); 22200 } 22201 applyPeer(node, reset) { 22202 if (reset) { 22203 getUINativeModule().navigator.resetParams(node); 22204 } 22205 else { 22206 getUINativeModule().navigator.setParams(node, this.value); 22207 } 22208 } 22209} 22210ParamsModifier.identity = Symbol('params'); 22211class TypeModifier extends ModifierWithKey { 22212 constructor(value) { 22213 super(value); 22214 } 22215 applyPeer(node, reset) { 22216 if (reset) { 22217 getUINativeModule().navigator.resetType(node); 22218 } 22219 else { 22220 getUINativeModule().navigator.setType(node, this.value); 22221 } 22222 } 22223} 22224TypeModifier.identity = Symbol('type'); 22225class ActiveModifier extends ModifierWithKey { 22226 constructor(value) { 22227 super(value); 22228 } 22229 applyPeer(node, reset) { 22230 if (reset) { 22231 getUINativeModule().navigator.resetActive(node); 22232 } 22233 else { 22234 getUINativeModule().navigator.setActive(node, this.value); 22235 } 22236 } 22237} 22238ActiveModifier.identity = Symbol('active'); 22239class TargetModifier extends ModifierWithKey { 22240 constructor(value) { 22241 super(value); 22242 } 22243 applyPeer(node, reset) { 22244 if (reset) { 22245 getUINativeModule().navigator.resetTarget(node); 22246 } 22247 else { 22248 getUINativeModule().navigator.setTarget(node, this.value); 22249 } 22250 } 22251} 22252TargetModifier.identity = Symbol('target'); 22253// @ts-ignore 22254if (globalThis.Navigator !== undefined) { 22255 globalThis.Navigator.attributeModifier = function (modifier) { 22256 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22257 return new ArkNavigatorComponent(nativePtr); 22258 }, (nativePtr, classType, modifierJS) => { 22259 return new modifierJS.NavigatorModifier(nativePtr, classType); 22260 }); 22261 }; 22262} 22263 22264/// <reference path='./import.ts' /> 22265class ArkAlphabetIndexerComponent extends ArkComponent { 22266 constructor(nativePtr, classType) { 22267 super(nativePtr, classType); 22268 } 22269 onSelected(callback) { 22270 throw new Error('Method not implemented.'); 22271 } 22272 color(value) { 22273 modifierWithKey(this._modifiersWithKeys, ColorModifier.identity, ColorModifier, value); 22274 return this; 22275 } 22276 selectedColor(value) { 22277 modifierWithKey(this._modifiersWithKeys, SelectedColorModifier.identity, SelectedColorModifier, value); 22278 return this; 22279 } 22280 popupColor(value) { 22281 modifierWithKey(this._modifiersWithKeys, PopupColorModifier.identity, PopupColorModifier, value); 22282 return this; 22283 } 22284 selectedBackgroundColor(value) { 22285 modifierWithKey(this._modifiersWithKeys, SelectedBackgroundColorModifier.identity, SelectedBackgroundColorModifier, value); 22286 return this; 22287 } 22288 popupBackground(value) { 22289 modifierWithKey(this._modifiersWithKeys, PopupBackgroundModifier.identity, PopupBackgroundModifier, value); 22290 return this; 22291 } 22292 popupSelectedColor(value) { 22293 modifierWithKey(this._modifiersWithKeys, PopupSelectedColorModifier.identity, PopupSelectedColorModifier, value); 22294 return this; 22295 } 22296 popupUnselectedColor(value) { 22297 modifierWithKey(this._modifiersWithKeys, PopupUnselectedColorModifier.identity, PopupUnselectedColorModifier, value); 22298 return this; 22299 } 22300 popupItemBackgroundColor(value) { 22301 modifierWithKey(this._modifiersWithKeys, PopupItemBackgroundColorModifier.identity, PopupItemBackgroundColorModifier, value); 22302 return this; 22303 } 22304 usingPopup(value) { 22305 modifierWithKey(this._modifiersWithKeys, UsingPopupModifier.identity, UsingPopupModifier, value); 22306 return this; 22307 } 22308 selectedFont(value) { 22309 modifierWithKey(this._modifiersWithKeys, SelectedFontModifier.identity, SelectedFontModifier, value); 22310 return this; 22311 } 22312 popupFont(value) { 22313 modifierWithKey(this._modifiersWithKeys, PopupFontModifier.identity, PopupFontModifier, value); 22314 return this; 22315 } 22316 popupItemFont(value) { 22317 modifierWithKey(this._modifiersWithKeys, PopupItemFontModifier.identity, PopupItemFontModifier, value); 22318 return this; 22319 } 22320 itemSize(value) { 22321 modifierWithKey(this._modifiersWithKeys, ItemSizeModifier.identity, ItemSizeModifier, value); 22322 return this; 22323 } 22324 font(value) { 22325 modifierWithKey(this._modifiersWithKeys, AlphabetIndexerFontModifier.identity, AlphabetIndexerFontModifier, value); 22326 return this; 22327 } 22328 alignStyle(value, offset) { 22329 let alignStyle = new ArkAlignStyle; 22330 alignStyle.indexerAlign = value; 22331 alignStyle.offset = offset; 22332 modifierWithKey(this._modifiersWithKeys, AlignStyleModifier.identity, AlignStyleModifier, alignStyle); 22333 return this; 22334 } 22335 onSelect(callback) { 22336 throw new Error('Method not implemented.'); 22337 } 22338 onRequestPopupData(callback) { 22339 throw new Error('Method not implemented.'); 22340 } 22341 onPopupSelect(callback) { 22342 throw new Error('Method not implemented.'); 22343 } 22344 selected(index) { 22345 modifierWithKey(this._modifiersWithKeys, AlphabetIndexerSelectedModifier.identity, AlphabetIndexerSelectedModifier, index); 22346 return this; 22347 } 22348 popupPosition(value) { 22349 modifierWithKey(this._modifiersWithKeys, PopupPositionModifier.identity, PopupPositionModifier, value); 22350 return this; 22351 } 22352 popupItemBorderRadius(value) { 22353 modifierWithKey(this._modifiersWithKeys, PopupItemBorderRadiusModifier.identity, PopupItemBorderRadiusModifier, value); 22354 return this; 22355 } 22356 itemBorderRadius(value) { 22357 modifierWithKey(this._modifiersWithKeys, ItemBorderRadiusModifier.identity, ItemBorderRadiusModifier, value); 22358 return this; 22359 } 22360 popupBackgroundBlurStyle(value) { 22361 modifierWithKey(this._modifiersWithKeys, PopupBackgroundBlurStyleModifier.identity, PopupBackgroundBlurStyleModifier, value); 22362 return this; 22363 } 22364 popupTitleBackground(value) { 22365 modifierWithKey(this._modifiersWithKeys, PopupTitleBackgroundModifier.identity, PopupTitleBackgroundModifier, value); 22366 return this; 22367 } 22368 width(value) { 22369 modifierWithKey(this._modifiersWithKeys, AdaptiveWidthModifier.identity, AdaptiveWidthModifier, value); 22370 return this; 22371 } 22372 autoCollapse(value) { 22373 modifierWithKey(this._modifiersWithKeys, AutoCollapseModifier.identity, AutoCollapseModifier, value); 22374 return this; 22375 } 22376 enableHapticFeedback(value) { 22377 modifierWithKey(this._modifiersWithKeys, EnableHapticFeedbackModifier.identity, EnableHapticFeedbackModifier, value); 22378 return this; 22379 } 22380} 22381// @ts-ignore 22382if (globalThis.AlphabetIndexer !== undefined) { 22383 globalThis.AlphabetIndexer.attributeModifier = function (modifier) { 22384 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22385 return new ArkAlphabetIndexerComponent(nativePtr); 22386 }, (nativePtr, classType, modifierJS) => { 22387 return new modifierJS.AlphabetIndexerModifier(nativePtr, classType); 22388 }); 22389 }; 22390} 22391 22392class PopupItemFontModifier extends ModifierWithKey { 22393 constructor(value) { 22394 super(value); 22395 } 22396 applyPeer(node, reset) { 22397 if (reset) { 22398 getUINativeModule().alphabetIndexer.resetPopupItemFont(node); 22399 } 22400 else { 22401 getUINativeModule().alphabetIndexer.setPopupItemFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 22402 } 22403 } 22404 checkObjectDiff() { 22405 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 22406 let weightEQ = this.stageValue.weight === this.value.weight; 22407 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 22408 let styleEQ = this.stageValue.style === this.value.style; 22409 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 22410 } 22411} 22412PopupItemFontModifier.identity = Symbol('popupItemFont'); 22413class SelectedFontModifier extends ModifierWithKey { 22414 constructor(value) { 22415 super(value); 22416 } 22417 applyPeer(node, reset) { 22418 if (reset) { 22419 getUINativeModule().alphabetIndexer.resetSelectedFont(node); 22420 } 22421 else { 22422 getUINativeModule().alphabetIndexer.setSelectedFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 22423 } 22424 } 22425 checkObjectDiff() { 22426 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 22427 let weightEQ = this.stageValue.weight === this.value.weight; 22428 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 22429 let styleEQ = this.stageValue.style === this.value.style; 22430 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 22431 } 22432} 22433SelectedFontModifier.identity = Symbol('alphaBetIndexerSelectedFont'); 22434class PopupFontModifier extends ModifierWithKey { 22435 constructor(value) { 22436 super(value); 22437 } 22438 applyPeer(node, reset) { 22439 if (reset) { 22440 getUINativeModule().alphabetIndexer.resetPopupFont(node); 22441 } 22442 else { 22443 getUINativeModule().alphabetIndexer.setPopupFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 22444 } 22445 } 22446 checkObjectDiff() { 22447 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 22448 let weightEQ = this.stageValue.weight === this.value.weight; 22449 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 22450 let styleEQ = this.stageValue.style === this.value.style; 22451 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 22452 } 22453} 22454PopupFontModifier.identity = Symbol('popupFont'); 22455class AlphabetIndexerFontModifier extends ModifierWithKey { 22456 constructor(value) { 22457 super(value); 22458 } 22459 applyPeer(node, reset) { 22460 if (reset) { 22461 getUINativeModule().alphabetIndexer.resetFont(node); 22462 } 22463 else { 22464 getUINativeModule().alphabetIndexer.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 22465 } 22466 } 22467 checkObjectDiff() { 22468 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 22469 let weightEQ = this.stageValue.weight === this.value.weight; 22470 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 22471 let styleEQ = this.stageValue.style === this.value.style; 22472 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 22473 } 22474} 22475AlphabetIndexerFontModifier.identity = Symbol('alphaBetIndexerFont'); 22476class PopupItemBackgroundColorModifier extends ModifierWithKey { 22477 constructor(value) { 22478 super(value); 22479 } 22480 applyPeer(node, reset) { 22481 if (reset) { 22482 getUINativeModule().alphabetIndexer.resetPopupItemBackgroundColor(node); 22483 } 22484 else { 22485 getUINativeModule().alphabetIndexer.setPopupItemBackgroundColor(node, this.value); 22486 } 22487 } 22488 checkObjectDiff() { 22489 return !isBaseOrResourceEqual(this.stageValue, this.value); 22490 } 22491} 22492PopupItemBackgroundColorModifier.identity = Symbol('popupItemBackgroundColor'); 22493class ColorModifier extends ModifierWithKey { 22494 constructor(value) { 22495 super(value); 22496 } 22497 applyPeer(node, reset) { 22498 if (reset) { 22499 getUINativeModule().alphabetIndexer.resetColor(node); 22500 } 22501 else { 22502 getUINativeModule().alphabetIndexer.setColor(node, this.value); 22503 } 22504 } 22505 checkObjectDiff() { 22506 return !isBaseOrResourceEqual(this.stageValue, this.value); 22507 } 22508} 22509ColorModifier.identity = Symbol('alphabetColor'); 22510class PopupColorModifier extends ModifierWithKey { 22511 constructor(value) { 22512 super(value); 22513 } 22514 applyPeer(node, reset) { 22515 if (reset) { 22516 getUINativeModule().alphabetIndexer.resetPopupColor(node); 22517 } 22518 else { 22519 getUINativeModule().alphabetIndexer.setPopupColor(node, this.value); 22520 } 22521 } 22522 checkObjectDiff() { 22523 return !isBaseOrResourceEqual(this.stageValue, this.value); 22524 } 22525} 22526PopupColorModifier.identity = Symbol('popupColor'); 22527class SelectedColorModifier extends ModifierWithKey { 22528 constructor(value) { 22529 super(value); 22530 } 22531 applyPeer(node, reset) { 22532 if (reset) { 22533 getUINativeModule().alphabetIndexer.resetSelectedColor(node); 22534 } 22535 else { 22536 getUINativeModule().alphabetIndexer.setSelectedColor(node, this.value); 22537 } 22538 } 22539 checkObjectDiff() { 22540 return !isBaseOrResourceEqual(this.stageValue, this.value); 22541 } 22542} 22543SelectedColorModifier.identity = Symbol('selectedColor'); 22544class PopupBackgroundModifier extends ModifierWithKey { 22545 constructor(value) { 22546 super(value); 22547 } 22548 applyPeer(node, reset) { 22549 if (reset) { 22550 getUINativeModule().alphabetIndexer.resetPopupBackground(node); 22551 } 22552 else { 22553 getUINativeModule().alphabetIndexer.setPopupBackground(node, this.value); 22554 } 22555 } 22556 checkObjectDiff() { 22557 return !isBaseOrResourceEqual(this.stageValue, this.value); 22558 } 22559} 22560PopupBackgroundModifier.identity = Symbol('popupBackground'); 22561class SelectedBackgroundColorModifier extends ModifierWithKey { 22562 constructor(value) { 22563 super(value); 22564 } 22565 applyPeer(node, reset) { 22566 if (reset) { 22567 getUINativeModule().alphabetIndexer.resetSelectedBackgroundColor(node); 22568 } 22569 else { 22570 getUINativeModule().alphabetIndexer.setSelectedBackgroundColor(node, this.value); 22571 } 22572 } 22573 checkObjectDiff() { 22574 return !isBaseOrResourceEqual(this.stageValue, this.value); 22575 } 22576} 22577SelectedBackgroundColorModifier.identity = Symbol('selectedBackgroundColor'); 22578class PopupUnselectedColorModifier extends ModifierWithKey { 22579 constructor(value) { 22580 super(value); 22581 } 22582 applyPeer(node, reset) { 22583 if (reset) { 22584 getUINativeModule().alphabetIndexer.resetPopupUnselectedColor(node); 22585 } 22586 else { 22587 getUINativeModule().alphabetIndexer.setPopupUnselectedColor(node, this.value); 22588 } 22589 } 22590 checkObjectDiff() { 22591 return !isBaseOrResourceEqual(this.stageValue, this.value); 22592 } 22593} 22594PopupUnselectedColorModifier.identity = Symbol('popupUnselectedColor'); 22595class PopupSelectedColorModifier extends ModifierWithKey { 22596 constructor(value) { 22597 super(value); 22598 } 22599 applyPeer(node, reset) { 22600 if (reset) { 22601 getUINativeModule().alphabetIndexer.resetPopupSelectedColor(node); 22602 } 22603 else { 22604 getUINativeModule().alphabetIndexer.setPopupSelectedColor(node, this.value); 22605 } 22606 } 22607 checkObjectDiff() { 22608 return !isBaseOrResourceEqual(this.stageValue, this.value); 22609 } 22610} 22611PopupSelectedColorModifier.identity = Symbol('popupSelectedColor'); 22612class AlignStyleModifier extends ModifierWithKey { 22613 constructor(value) { 22614 super(value); 22615 } 22616 applyPeer(node, reset) { 22617 if (reset) { 22618 getUINativeModule().alphabetIndexer.resetAlignStyle(node); 22619 } 22620 else { 22621 getUINativeModule().alphabetIndexer.setAlignStyle(node, this.value.indexerAlign, this.value.offset); 22622 } 22623 } 22624 checkObjectDiff() { 22625 let indexerAlignEQ = isBaseOrResourceEqual(this.stageValue.indexerAlign, this.value.indexerAlign); 22626 let offsetEQ = isBaseOrResourceEqual(this.stageValue.offset, this.value.offset); 22627 return !indexerAlignEQ || !offsetEQ; 22628 } 22629} 22630AlignStyleModifier.identity = Symbol('alignStyle'); 22631class UsingPopupModifier extends ModifierWithKey { 22632 constructor(value) { 22633 super(value); 22634 } 22635 applyPeer(node, reset) { 22636 if (reset) { 22637 getUINativeModule().alphabetIndexer.resetUsingPopup(node); 22638 } 22639 else { 22640 getUINativeModule().alphabetIndexer.setUsingPopup(node, this.value); 22641 } 22642 } 22643} 22644UsingPopupModifier.identity = Symbol('usingPopup'); 22645class AlphabetIndexerSelectedModifier extends ModifierWithKey { 22646 constructor(value) { 22647 super(value); 22648 } 22649 applyPeer(node, reset) { 22650 if (reset) { 22651 getUINativeModule().alphabetIndexer.resetSelected(node); 22652 } 22653 else { 22654 getUINativeModule().alphabetIndexer.setSelected(node, this.value); 22655 } 22656 } 22657} 22658AlphabetIndexerSelectedModifier.identity = Symbol('alphabetIndexerSelected'); 22659class ItemSizeModifier extends ModifierWithKey { 22660 constructor(value) { 22661 super(value); 22662 } 22663 applyPeer(node, reset) { 22664 if (reset) { 22665 getUINativeModule().alphabetIndexer.resetItemSize(node); 22666 } 22667 else { 22668 getUINativeModule().alphabetIndexer.setItemSize(node, this.value); 22669 } 22670 } 22671} 22672ItemSizeModifier.identity = Symbol('itemSize'); 22673class PopupPositionModifier extends ModifierWithKey { 22674 constructor(value) { 22675 super(value); 22676 } 22677 applyPeer(node, reset) { 22678 if (reset) { 22679 getUINativeModule().alphabetIndexer.resetPopupPosition(node); 22680 } 22681 else { 22682 getUINativeModule().alphabetIndexer.setPopupPosition(node, this.value.x, this.value.y); 22683 } 22684 } 22685 checkObjectDiff() { 22686 let xEQ = isBaseOrResourceEqual(this.stageValue.x, this.value.x); 22687 let yEQ = isBaseOrResourceEqual(this.stageValue.y, this.value.y); 22688 return !xEQ || !yEQ; 22689 } 22690} 22691PopupPositionModifier.identity = Symbol('popupPosition'); 22692class PopupItemBorderRadiusModifier extends ModifierWithKey { 22693 constructor(value) { 22694 super(value); 22695 } 22696 applyPeer(node, reset) { 22697 if (reset) { 22698 getUINativeModule().alphabetIndexer.resetPopupItemBorderRadius(node); 22699 } else { 22700 getUINativeModule().alphabetIndexer.setPopupItemBorderRadius(node, this.value); 22701 } 22702 } 22703} 22704PopupItemBorderRadiusModifier.identity = Symbol('popupItemBorderRadius'); 22705class ItemBorderRadiusModifier extends ModifierWithKey { 22706 constructor(value) { 22707 super(value); 22708 } 22709 applyPeer(node, reset) { 22710 if (reset) { 22711 getUINativeModule().alphabetIndexer.resetItemBorderRadius(node); 22712 } else { 22713 getUINativeModule().alphabetIndexer.setItemBorderRadius(node, this.value); 22714 } 22715 } 22716} 22717ItemBorderRadiusModifier.identity = Symbol('itemBorderRadius'); 22718class PopupBackgroundBlurStyleModifier extends ModifierWithKey { 22719 constructor(value) { 22720 super(value); 22721 } 22722 applyPeer(node, reset) { 22723 if (reset) { 22724 getUINativeModule().alphabetIndexer.resetPopupBackgroundBlurStyle(node); 22725 } else { 22726 getUINativeModule().alphabetIndexer.setPopupBackgroundBlurStyle(node, this.value); 22727 } 22728 } 22729} 22730ItemBorderRadiusModifier.identity = Symbol('popupBackgroundBlurStyle'); 22731 22732class PopupTitleBackgroundModifier extends ModifierWithKey { 22733 constructor(value) { 22734 super(value); 22735 } 22736 applyPeer(node, reset) { 22737 if (reset) { 22738 getUINativeModule().alphabetIndexer.resetPopupTitleBackground(node); 22739 } else { 22740 getUINativeModule().alphabetIndexer.setPopupTitleBackground(node, this.value); 22741 } 22742 } 22743} 22744PopupTitleBackgroundModifier.identity = Symbol('popupTitleBackground'); 22745class AdaptiveWidthModifier extends ModifierWithKey { 22746 constructor(value) { 22747 super(value); 22748 } 22749 applyPeer(node, reset) { 22750 if (reset) { 22751 getUINativeModule().alphabetIndexer.resetAdaptiveWidth(node); 22752 } else { 22753 getUINativeModule().alphabetIndexer.setAdaptiveWidth(node, this.value); 22754 } 22755 } 22756} 22757AdaptiveWidthModifier.identity = Symbol('adaptiveWidth'); 22758class AutoCollapseModifier extends ModifierWithKey { 22759 constructor(value) { 22760 super(value); 22761 } 22762 applyPeer(node, reset) { 22763 if (reset) { 22764 getUINativeModule().alphabetIndexer.resetAutoCollapse(node); 22765 } 22766 else { 22767 getUINativeModule().alphabetIndexer.setAutoCollapse(node, this.value); 22768 } 22769 } 22770 checkObjectDiff() { 22771 return !isBaseOrResourceEqual(this.stageValue, this.value); 22772 } 22773} 22774AutoCollapseModifier.identity = Symbol('autoCollapse'); 22775class EnableHapticFeedbackModifier extends ModifierWithKey { 22776 constructor(value) { 22777 super(value); 22778 } 22779 applyPeer(node, reset) { 22780 if (reset) { 22781 getUINativeModule().alphabetIndexer.resetEnableHapticFeedback(node); 22782 } 22783 else { 22784 getUINativeModule().alphabetIndexer.setEnableHapticFeedback(node, this.value); 22785 } 22786 } 22787 checkObjectDiff() { 22788 return !isBaseOrResourceEqual(this.stageValue, this.value); 22789 } 22790} 22791EnableHapticFeedbackModifier.identity = Symbol('enableHapticFeedback'); 22792 22793/// <reference path='./import.ts' /> 22794class TextStyleModifier extends ModifierWithKey { 22795 constructor(value) { 22796 super(value); 22797 } 22798 applyPeer(node, reset) { 22799 let _a, _b, _c, _d, _e, _f, _g, _h; 22800 if (reset) { 22801 getUINativeModule().calendarPicker.resetTextStyle(node); 22802 } 22803 else { 22804 getUINativeModule().calendarPicker.setTextStyle(node, (_b = (_a = this.value) === null || 22805 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 22806 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 22807 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = 22808 (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 22809 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined); 22810 } 22811 } 22812 checkObjectDiff() { 22813 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; 22814 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 22815 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight))) { 22816 return true; 22817 } 22818 else { 22819 return !isBaseOrResourceEqual((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.color, (_f = this.value) === null || 22820 _f === void 0 ? void 0 : _f.color) || 22821 !isBaseOrResourceEqual((_h = (_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.font) === null || 22822 _h === void 0 ? void 0 : _h.size, (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 22823 _k === void 0 ? void 0 : _k.size); 22824 } 22825 } 22826} 22827TextStyleModifier.identity = Symbol('textStyle'); 22828class EdgeAlignModifier extends ModifierWithKey { 22829 constructor(value) { 22830 super(value); 22831 } 22832 applyPeer(node, reset) { 22833 let _a, _b, _c, _d, _e, _f, _g, _h; 22834 if (reset) { 22835 getUINativeModule().calendarPicker.resetEdgeAlign(node); 22836 } 22837 else { 22838 getUINativeModule().calendarPicker.setEdgeAlign(node, (_b = (_a = this.value) === null || 22839 _a === void 0 ? void 0 : _a.alignType) !== null && _b !== void 0 ? _b : undefined, 22840 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.offset) === null || 22841 _d === void 0 ? void 0 : _d.dx) !== null && _e !== void 0 ? _e : undefined, (_h = (_g = 22842 (_f = this.value) === null || _f === void 0 ? void 0 : _f.offset) === null || 22843 _g === void 0 ? void 0 : _g.dy) !== null && _h !== void 0 ? _h : undefined); 22844 } 22845 } 22846 checkObjectDiff() { 22847 let _a, _b, _c, _d, _e, _f, _g, _h; 22848 if (!(this.stageValue.alignType === this.value.alignType)) { 22849 return true; 22850 } 22851 else { 22852 return !isBaseOrResourceEqual((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.offset) === null || _b === void 0 ? void 0 : _b.dx, (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.offset) === null || _d === void 0 ? void 0 : _d.dx) || 22853 !isBaseOrResourceEqual((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.offset) === null || _f === void 0 ? void 0 : _f.dy, (_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.offset) === null || _h === void 0 ? void 0 : _h.dy); 22854 } 22855 } 22856} 22857EdgeAlignModifier.identity = Symbol('edgeAlign'); 22858class CalendarPickerPaddingModifier extends ModifierWithKey { 22859 constructor(value) { 22860 super(value); 22861 } 22862 applyPeer(node, reset) { 22863 if (reset) { 22864 getUINativeModule().calendarPicker.resetCalendarPickerPadding(node); 22865 } 22866 else { 22867 getUINativeModule().calendarPicker.setCalendarPickerPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 22868 } 22869 } 22870 checkObjectDiff() { 22871 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 22872 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 22873 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 22874 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 22875 } 22876} 22877CalendarPickerPaddingModifier.identity = Symbol('calendarPickerPadding'); 22878class CalendarPickerBorderModifier extends ModifierWithKey { 22879 constructor(value) { 22880 super(value); 22881 } 22882 applyPeer(node, reset) { 22883 if (reset) { 22884 getUINativeModule().calendarPicker.resetCalendarPickerBorder(node); 22885 } 22886 else { 22887 getUINativeModule().calendarPicker.setCalendarPickerBorder(node, this.value.arkWidth.left, 22888 this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 22889 this.value.arkColor.leftColor, this.value.arkColor.rightColor, this.value.arkColor.topColor, 22890 this.value.arkColor.bottomColor, this.value.arkRadius.topLeft, this.value.arkRadius.topRight, 22891 this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, this.value.arkStyle.top, 22892 this.value.arkStyle.right, this.value.arkStyle.bottom, this.value.arkStyle.left); 22893 } 22894 } 22895 checkObjectDiff() { 22896 return this.value.checkObjectDiff(this.stageValue); 22897 } 22898} 22899CalendarPickerBorderModifier.identity = Symbol('calendarPickerBorder'); 22900 22901class CalendarPickerHeightModifier extends ModifierWithKey { 22902 constructor(value) { 22903 super(value); 22904 } 22905 applyPeer(node, reset) { 22906 if (reset) { 22907 getUINativeModule().calendarPicker.resetCalendarPickerHeight(node); 22908 } 22909 else { 22910 getUINativeModule().calendarPicker.setCalendarPickerHeight(node, this.value); 22911 } 22912 } 22913 checkObjectDiff() { 22914 return !isBaseOrResourceEqual(this.stageValue, this.value); 22915 } 22916} 22917CalendarPickerHeightModifier.identity = Symbol('calendarPickerHeight'); 22918 22919class CalendarPickerBorderRadiusModifier extends ModifierWithKey { 22920 constructor(value) { 22921 super(value); 22922 } 22923 applyPeer(node, reset) { 22924 if (reset) { 22925 getUINativeModule().calendarPicker.resetCalendarPickerBorderRadius(node); 22926 } 22927 else { 22928 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 22929 getUINativeModule().calendarPicker.setCalendarPickerBorderRadius(node, this.value, this.value, this.value, this.value); 22930 } 22931 else { 22932 if ((Object.keys(this.value).indexOf('topStart') >= 0) || 22933 (Object.keys(this.value).indexOf('topEnd') >= 0) || 22934 (Object.keys(this.value).indexOf('bottomStart') >= 0) || 22935 (Object.keys(this.value).indexOf('bottomEnd') >= 0)) { 22936 getUINativeModule().calendarPicker.setCalendarPickerBorderRadius(node, this.value.topStart, this.value.topEnd, this.value.bottomStart, this.value.bottomEnd); 22937 } else { 22938 getUINativeModule().calendarPicker.setCalendarPickerBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 22939 } 22940 } 22941 } 22942 } 22943 checkObjectDiff() { 22944 if (isResource(this.stageValue) && isResource(this.value)) { 22945 return !isResourceEqual(this.stageValue, this.value); 22946 } 22947 else if (!isResource(this.stageValue) && !isResource(this.value)) { 22948 if ((Object.keys(this.value).indexOf('topStart') >= 0) || 22949 (Object.keys(this.value).indexOf('topEnd') >= 0) || 22950 (Object.keys(this.value).indexOf('bottomStart') >= 0) || 22951 (Object.keys(this.value).indexOf('bottomEnd') >= 0)) { 22952 return !(this.stageValue.topStart === this.value.topStart && 22953 this.stageValue.topEnd === this.value.topEnd && 22954 this.stageValue.bottomStart === this.value.bottomStart && 22955 this.stageValue.bottomEnd === this.value.bottomEnd); 22956 } 22957 return !(this.stageValue.topLeft === this.value.topLeft && 22958 this.stageValue.topRight === this.value.topRight && 22959 this.stageValue.bottomLeft === this.value.bottomLeft && 22960 this.stageValue.bottomRight === this.value.bottomRight); 22961 } 22962 else { 22963 return true; 22964 } 22965 } 22966} 22967CalendarPickerBorderRadiusModifier.identity = Symbol('calendarPickerBorderRadius'); 22968 22969class CalendarPickerBorderColorModifier extends ModifierWithKey { 22970 constructor(value) { 22971 super(value); 22972 } 22973 applyPeer(node, reset) { 22974 if (reset) { 22975 getUINativeModule().calendarPicker.resetCalendarPickerBorderColor(node); 22976 } 22977 else { 22978 const valueType = typeof this.value; 22979 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 22980 getUINativeModule().calendarPicker.setCalendarPickerBorderColor(node, this.value, this.value, this.value, this.value, false); 22981 } 22982 else { 22983 if ((Object.keys(this.value).indexOf('start') >= 0) || 22984 (Object.keys(this.value).indexOf('end') >= 0)) { 22985 getUINativeModule().calendarPicker.setCalendarPickerBorderColor(node, this.value.top, this.value.end, this.value.bottom, this.value.start, true); 22986 } else { 22987 getUINativeModule().calendarPicker.setCalendarPickerBorderColor(node, this.value.top, this.value.right, this.value.bottom, this.value.left, false); 22988 } 22989 } 22990 } 22991 } 22992 checkObjectDiff() { 22993 if (isResource(this.stageValue) && isResource(this.value)) { 22994 return !isResourceEqual(this.stageValue, this.value); 22995 } 22996 else if (!isResource(this.stageValue) && !isResource(this.value)) { 22997 if ((Object.keys(this.value).indexOf('start') >= 0) || 22998 (Object.keys(this.value).indexOf('end') >= 0)) { 22999 return !(this.stageValue.start === this.value.start && 23000 this.stageValue.end === this.value.end && 23001 this.stageValue.top === this.value.top && 23002 this.stageValue.bottom === this.value.bottom); 23003 } 23004 return !(this.stageValue.left === this.value.left && 23005 this.stageValue.right === this.value.right && 23006 this.stageValue.top === this.value.top && 23007 this.stageValue.bottom === this.value.bottom); 23008 } 23009 else { 23010 return true; 23011 } 23012 } 23013} 23014CalendarPickerBorderColorModifier.identity = Symbol('calendarPickerBorderColor'); 23015 23016class ArkCalendarPickerComponent extends ArkComponent { 23017 constructor(nativePtr, classType) { 23018 super(nativePtr, classType); 23019 } 23020 edgeAlign(alignType, offset) { 23021 let arkEdgeAlign = new ArkEdgeAlign(); 23022 arkEdgeAlign.alignType = alignType; 23023 arkEdgeAlign.offset = offset; 23024 modifierWithKey(this._modifiersWithKeys, EdgeAlignModifier.identity, EdgeAlignModifier, arkEdgeAlign); 23025 return this; 23026 } 23027 textStyle(value) { 23028 modifierWithKey(this._modifiersWithKeys, TextStyleModifier.identity, TextStyleModifier, value); 23029 return this; 23030 } 23031 onChange(callback) { 23032 throw new Error('Method not implemented.'); 23033 } 23034 padding(value) { 23035 let arkValue = new ArkPadding(); 23036 if (value !== null && value !== undefined) { 23037 if (isLengthType(value) || isResource(value)) { 23038 arkValue.top = value; 23039 arkValue.right = value; 23040 arkValue.bottom = value; 23041 arkValue.left = value; 23042 } 23043 else { 23044 arkValue.top = value.top; 23045 arkValue.right = value.right; 23046 arkValue.bottom = value.bottom; 23047 arkValue.left = value.left; 23048 } 23049 modifierWithKey(this._modifiersWithKeys, CalendarPickerPaddingModifier.identity, CalendarPickerPaddingModifier, arkValue); 23050 } 23051 else { 23052 modifierWithKey(this._modifiersWithKeys, CalendarPickerPaddingModifier.identity, CalendarPickerPaddingModifier, undefined); 23053 } 23054 return this; 23055 } 23056 border(value) { 23057 let _a, _b, _c, _d; 23058 let arkBorder = new ArkBorder(); 23059 if (isUndefined(value)) { 23060 arkBorder = undefined; 23061 } 23062 if (!isUndefined(value === null || value === void 0 ? void 0 : value.width) && (value === null || value === void 0 ? void 0 : value.width) !== null) { 23063 if (isNumber(value.width) || isString(value.width) || isResource(value.width)) { 23064 arkBorder.arkWidth.left = value.width; 23065 arkBorder.arkWidth.right = value.width; 23066 arkBorder.arkWidth.top = value.width; 23067 arkBorder.arkWidth.bottom = value.width; 23068 } 23069 else { 23070 arkBorder.arkWidth.left = value.width.left; 23071 arkBorder.arkWidth.right = value.width.right; 23072 arkBorder.arkWidth.top = value.width.top; 23073 arkBorder.arkWidth.bottom = value.width.bottom; 23074 } 23075 } 23076 if (!isUndefined(value === null || value === void 0 ? void 0 : value.color) && (value === null || value === void 0 ? void 0 : value.color) !== null) { 23077 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 23078 arkBorder.arkColor.leftColor = value.color; 23079 arkBorder.arkColor.rightColor = value.color; 23080 arkBorder.arkColor.topColor = value.color; 23081 arkBorder.arkColor.bottomColor = value.color; 23082 } 23083 else { 23084 arkBorder.arkColor.leftColor = value.color.left; 23085 arkBorder.arkColor.rightColor = value.color.right; 23086 arkBorder.arkColor.topColor = value.color.top; 23087 arkBorder.arkColor.bottomColor = value.color.bottom; 23088 } 23089 } 23090 if (!isUndefined(value === null || value === void 0 ? void 0 : value.radius) && (value === null || value === void 0 ? void 0 : value.radius) !== null) { 23091 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 23092 arkBorder.arkRadius.topLeft = value.radius; 23093 arkBorder.arkRadius.topRight = value.radius; 23094 arkBorder.arkRadius.bottomLeft = value.radius; 23095 arkBorder.arkRadius.bottomRight = value.radius; 23096 } 23097 else { 23098 arkBorder.arkRadius.topLeft = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topLeft; 23099 arkBorder.arkRadius.topRight = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topRight; 23100 arkBorder.arkRadius.bottomLeft = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomLeft; 23101 arkBorder.arkRadius.bottomRight = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomRight; 23102 } 23103 } 23104 if (!isUndefined(value === null || value === void 0 ? void 0 : value.style) && (value === null || value === void 0 ? void 0 : value.style) !== null) { 23105 let arkBorderStyle = new ArkBorderStyle(); 23106 if (arkBorderStyle.parseBorderStyle(value.style)) { 23107 if (!isUndefined(arkBorderStyle.style)) { 23108 arkBorder.arkStyle.top = arkBorderStyle.style; 23109 arkBorder.arkStyle.left = arkBorderStyle.style; 23110 arkBorder.arkStyle.bottom = arkBorderStyle.style; 23111 arkBorder.arkStyle.right = arkBorderStyle.style; 23112 } 23113 else { 23114 arkBorder.arkStyle.top = arkBorderStyle.top; 23115 arkBorder.arkStyle.left = arkBorderStyle.left; 23116 arkBorder.arkStyle.bottom = arkBorderStyle.bottom; 23117 arkBorder.arkStyle.right = arkBorderStyle.right; 23118 } 23119 } 23120 } 23121 modifierWithKey(this._modifiersWithKeys, CalendarPickerBorderModifier.identity, CalendarPickerBorderModifier, arkBorder); 23122 return this; 23123 } 23124 height(value) { 23125 modifierWithKey(this._modifiersWithKeys, CalendarPickerHeightModifier.identity, CalendarPickerHeightModifier, value); 23126 return this; 23127 } 23128 borderRadius(value) { 23129 modifierWithKey(this._modifiersWithKeys, CalendarPickerBorderRadiusModifier.identity, CalendarPickerBorderRadiusModifier, value); 23130 return this; 23131 } 23132 borderColor(value) { 23133 modifierWithKey(this._modifiersWithKeys, CalendarPickerBorderColorModifier.identity, CalendarPickerBorderColorModifier, value); 23134 return this; 23135 } 23136} 23137// @ts-ignore 23138if (globalThis.CalendarPicker !== undefined) { 23139 globalThis.CalendarPicker.attributeModifier = function (modifier) { 23140 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23141 return new ArkCalendarPickerComponent(nativePtr); 23142 }, (nativePtr, classType, modifierJS) => { 23143 return new modifierJS.CalendarPickerModifier(nativePtr, classType); 23144 }); 23145 }; 23146} 23147 23148/// <reference path='./import.ts' /> 23149class ArkDataPanelComponent extends ArkComponent { 23150 constructor(nativePtr, classType) { 23151 super(nativePtr, classType); 23152 } 23153 closeEffect(value) { 23154 modifierWithKey(this._modifiersWithKeys, DataPanelCloseEffectModifier.identity, DataPanelCloseEffectModifier, value); 23155 return this; 23156 } 23157 valueColors(value) { 23158 modifierWithKey(this._modifiersWithKeys, DataPanelValueColorsModifier.identity, DataPanelValueColorsModifier, value); 23159 return this; 23160 } 23161 trackBackgroundColor(value) { 23162 modifierWithKey(this._modifiersWithKeys, DataPanelTrackBackgroundColorModifier.identity, DataPanelTrackBackgroundColorModifier, value); 23163 return this; 23164 } 23165 strokeWidth(value) { 23166 modifierWithKey(this._modifiersWithKeys, DataPanelStrokeWidthModifier.identity, DataPanelStrokeWidthModifier, value); 23167 return this; 23168 } 23169 trackShadow(value) { 23170 modifierWithKey(this._modifiersWithKeys, DataPanelTrackShadowModifier.identity, DataPanelTrackShadowModifier, value); 23171 return this; 23172 } 23173 contentModifier(value) { 23174 modifierWithKey(this._modifiersWithKeys, DataPanelContentModifier.identity, DataPanelContentModifier, value); 23175 return this; 23176 } 23177 setContentModifier(modifier) { 23178 if (modifier === undefined || modifier === null) { 23179 getUINativeModule().dataPanel.setContentModifierBuilder(this.nativePtr, false); 23180 return; 23181 } 23182 if (this.builder !== modifier.applyContent()) { 23183 this.needRebuild = true; 23184 } 23185 this.builder = modifier.applyContent(); 23186 this.modifier = modifier; 23187 getUINativeModule().dataPanel.setContentModifierBuilder(this.nativePtr, this); 23188 } 23189 makeContentModifierNode(context, dataPanelConfig) { 23190 dataPanelConfig.contentModifier = this.modifier; 23191 if (isUndefined(this.dataPanelNode) || this.needRebuild) { 23192 let xNode = globalThis.requireNapi('arkui.node'); 23193 this.dataPanelNode = new xNode.BuilderNode(context); 23194 this.dataPanelNode.build(this.builder, dataPanelConfig); 23195 this.needRebuild = false; 23196 } else { 23197 this.dataPanelNode.update(dataPanelConfig); 23198 } 23199 return this.dataPanelNode.getFrameNode(); 23200 } 23201} 23202class DataPanelStrokeWidthModifier extends ModifierWithKey { 23203 applyPeer(node, reset) { 23204 if (reset) { 23205 getUINativeModule().dataPanel.resetDataPanelStrokeWidth(node); 23206 } 23207 else { 23208 getUINativeModule().dataPanel.setDataPanelStrokeWidth(node, this.value); 23209 } 23210 } 23211 checkObjectDiff() { 23212 return !isBaseOrResourceEqual(this.stageValue, this.value); 23213 } 23214} 23215DataPanelStrokeWidthModifier.identity = Symbol('dataPanelStrokeWidth'); 23216class DataPanelCloseEffectModifier extends ModifierWithKey { 23217 applyPeer(node, reset) { 23218 if (reset) { 23219 getUINativeModule().dataPanel.resetCloseEffect(node); 23220 } 23221 else { 23222 getUINativeModule().dataPanel.setCloseEffect(node, this.value); 23223 } 23224 } 23225 checkObjectDiff() { 23226 return !isBaseOrResourceEqual(this.stageValue, this.value); 23227 } 23228} 23229DataPanelCloseEffectModifier.identity = Symbol('dataPanelCloseEffect'); 23230class DataPanelTrackBackgroundColorModifier extends ModifierWithKey { 23231 applyPeer(node, reset) { 23232 if (reset) { 23233 getUINativeModule().dataPanel.resetDataPanelTrackBackgroundColor(node); 23234 } 23235 else { 23236 getUINativeModule().dataPanel.setDataPanelTrackBackgroundColor(node, this.value); 23237 } 23238 } 23239 checkObjectDiff() { 23240 return !isBaseOrResourceEqual(this.stageValue, this.value); 23241 } 23242} 23243DataPanelTrackBackgroundColorModifier.identity = Symbol('dataPanelTrackBackgroundColorModifier'); 23244class DataPanelTrackShadowModifier extends ModifierWithKey { 23245 applyPeer(node, reset) { 23246 if (reset) { 23247 if (this.value === null) { 23248 getUINativeModule().dataPanel.setDataPanelTrackShadow(node, null); 23249 } 23250 getUINativeModule().dataPanel.resetDataPanelTrackShadow(node); 23251 } 23252 else { 23253 getUINativeModule().dataPanel.setDataPanelTrackShadow(node, this.value); 23254 } 23255 } 23256 checkObjectDiff() { 23257 return true; 23258 } 23259} 23260DataPanelTrackShadowModifier.identity = Symbol('dataPanelTrackShadow'); 23261class DataPanelContentModifier extends ModifierWithKey { 23262 constructor(value) { 23263 super(value); 23264 } 23265 applyPeer(node, reset, component) { 23266 let dataPanelComponent = component; 23267 dataPanelComponent.setContentModifier(this.value); 23268 } 23269} 23270DataPanelContentModifier.identity = Symbol('dataPanelContentModifier'); 23271class DataPanelValueColorsModifier extends ModifierWithKey { 23272 applyPeer(node, reset) { 23273 if (reset) { 23274 getUINativeModule().dataPanel.resetDataPanelValueColors(node); 23275 return; 23276 } 23277 else { 23278 getUINativeModule().dataPanel.setDataPanelValueColors(node, this.value); 23279 } 23280 } 23281 checkObjectDiff() { 23282 return true; 23283 } 23284} 23285DataPanelValueColorsModifier.identity = Symbol('dataPanelValueColors'); 23286// @ts-ignore 23287if (globalThis.DataPanel !== undefined) { 23288 globalThis.DataPanel.attributeModifier = function (modifier) { 23289 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23290 return new ArkDataPanelComponent(nativePtr); 23291 }, (nativePtr, classType, modifierJS) => { 23292 return new modifierJS.DataPanelModifier(nativePtr, classType); 23293 }); 23294 }; 23295} 23296 23297/// <reference path='./import.ts' /> 23298class ArkDatePickerComponent extends ArkComponent { 23299 constructor(nativePtr, classType) { 23300 super(nativePtr, classType); 23301 } 23302 lunar(value) { 23303 modifierWithKey(this._modifiersWithKeys, DatePickerLunarModifier.identity, DatePickerLunarModifier, value); 23304 return this; 23305 } 23306 disappearTextStyle(value) { 23307 modifierWithKey(this._modifiersWithKeys, DatePickerDisappearTextStyleModifier.identity, DatePickerDisappearTextStyleModifier, value); 23308 return this; 23309 } 23310 textStyle(value) { 23311 modifierWithKey(this._modifiersWithKeys, DatePickerTextStyleModifier.identity, DatePickerTextStyleModifier, value); 23312 return this; 23313 } 23314 selectedTextStyle(value) { 23315 modifierWithKey(this._modifiersWithKeys, DatePickerSelectedTextStyleModifier.identity, DatePickerSelectedTextStyleModifier, value); 23316 return this; 23317 } 23318 onChange(callback) { 23319 throw new Error('Method not implemented.'); 23320 } 23321 onDateChange(callback) { 23322 throw new Error('Method not implemented.'); 23323 } 23324 backgroundColor(value) { 23325 modifierWithKey(this._modifiersWithKeys, DatePickerBackgroundColorModifier.identity, DatePickerBackgroundColorModifier, value); 23326 return this; 23327 } 23328} 23329class DatePickerLunarModifier extends ModifierWithKey { 23330 constructor(value) { 23331 super(value); 23332 } 23333 applyPeer(node, reset) { 23334 if (reset) { 23335 getUINativeModule().datePicker.resetLunar(node); 23336 } 23337 else { 23338 getUINativeModule().datePicker.setLunar(node, this.value); 23339 } 23340 } 23341} 23342DatePickerLunarModifier.identity = Symbol('lunar'); 23343class DatePickerTextStyleModifier extends ModifierWithKey { 23344 constructor(value) { 23345 super(value); 23346 } 23347 applyPeer(node, reset) { 23348 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 23349 if (reset) { 23350 getUINativeModule().datePicker.resetTextStyle(node); 23351 } 23352 else { 23353 getUINativeModule().datePicker.setTextStyle(node, (_b = (_a = this.value) === null || 23354 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || 23355 _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 23356 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 23357 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 23358 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 23359 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 23360 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 23361 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 23362 } 23363 } 23364 checkObjectDiff() { 23365 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 23366 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 23367 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 23368 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 23369 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 23370 return true; 23371 } 23372 else { 23373 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 23374 _k === void 0 ? void 0 : _k.color) || 23375 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 23376 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || _p === void 0 ? void 0 : _p.size) || 23377 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 23378 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 23379 _t === void 0 ? void 0 : _t.family); 23380 } 23381 } 23382} 23383DatePickerTextStyleModifier.identity = Symbol('textStyle'); 23384class DatePickerSelectedTextStyleModifier extends ModifierWithKey { 23385 constructor(value) { 23386 super(value); 23387 } 23388 applyPeer(node, reset) { 23389 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 23390 if (reset) { 23391 getUINativeModule().datePicker.resetSelectedTextStyle(node); 23392 } 23393 else { 23394 getUINativeModule().datePicker.setSelectedTextStyle(node, (_b = (_a = this.value) === null || 23395 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 23396 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 23397 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = (_g = 23398 (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 23399 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 23400 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 23401 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, (_p = 23402 (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 23403 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 23404 } 23405 } 23406 checkObjectDiff() { 23407 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 23408 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 23409 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 23410 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 23411 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 23412 return true; 23413 } 23414 else { 23415 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 23416 _k === void 0 ? void 0 : _k.color) || 23417 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || _m === 23418 void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || _p === 23419 void 0 ? void 0 : _p.size) || 23420 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || _r === 23421 void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || _t === 23422 void 0 ? void 0 : _t.family); 23423 } 23424 } 23425} 23426DatePickerSelectedTextStyleModifier.identity = Symbol('selectedTextStyle'); 23427class DatePickerDisappearTextStyleModifier extends ModifierWithKey { 23428 constructor(value) { 23429 super(value); 23430 } 23431 applyPeer(node, reset) { 23432 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 23433 if (reset) { 23434 getUINativeModule().datePicker.resetDisappearTextStyle(node); 23435 } 23436 else { 23437 getUINativeModule().datePicker.setDisappearTextStyle(node, (_b = (_a = this.value) === null || 23438 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 23439 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 23440 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 23441 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 23442 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 23443 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 23444 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 23445 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 23446 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 23447 } 23448 } 23449 checkObjectDiff() { 23450 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 23451 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 23452 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 23453 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 23454 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 23455 return true; 23456 } 23457 else { 23458 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 23459 _k === void 0 ? void 0 : _k.color) || 23460 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 23461 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 23462 _p === void 0 ? void 0 : _p.size) || 23463 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 23464 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || 23465 _s === void 0 ? void 0 : _s.font) === null || _t === void 0 ? void 0 : _t.family); 23466 } 23467 } 23468} 23469DatePickerDisappearTextStyleModifier.identity = Symbol('disappearTextStyle'); 23470class DatePickerBackgroundColorModifier extends ModifierWithKey { 23471 constructor(value) { 23472 super(value); 23473 } 23474 applyPeer(node, reset) { 23475 if (reset) { 23476 getUINativeModule().datePicker.resetBackgroundColor(node); 23477 } 23478 else { 23479 getUINativeModule().datePicker.setBackgroundColor(node, this.value); 23480 } 23481 } 23482 checkObjectDiff() { 23483 return !isBaseOrResourceEqual(this.stageValue, this.value); 23484 } 23485} 23486DatePickerBackgroundColorModifier.identity = Symbol('datePickerBackgroundColor'); 23487//@ts-ignore 23488if (globalThis.DatePicker !== undefined) { 23489 globalThis.DatePicker.attributeModifier = function (modifier) { 23490 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23491 return new ArkDatePickerComponent(nativePtr); 23492 }, (nativePtr, classType, modifierJS) => { 23493 return new modifierJS.DatePickerModifier(nativePtr, classType); 23494 }); 23495 }; 23496} 23497 23498/// <reference path='./import.ts' /> 23499class ArkFormComponentComponent extends ArkComponent { 23500 constructor(nativePtr, classType) { 23501 super(nativePtr, classType); 23502 } 23503 size(value) { 23504 modifierWithKey(this._modifiersWithKeys, FormComponentSizeModifier.identity, FormComponentSizeModifier, value); 23505 return this; 23506 } 23507 visibility(value) { 23508 modifierWithKey(this._modifiersWithKeys, FormComponentVisibilityModifier.identity, FormComponentVisibilityModifier, value); 23509 return this; 23510 } 23511 moduleName(value) { 23512 modifierWithKey(this._modifiersWithKeys, FormComponentModuleNameModifier.identity, FormComponentModuleNameModifier, value); 23513 return this; 23514 } 23515 dimension(value) { 23516 modifierWithKey(this._modifiersWithKeys, FormComponentDimensionModifier.identity, FormComponentDimensionModifier, value); 23517 return this; 23518 } 23519 allowUpdate(value) { 23520 modifierWithKey(this._modifiersWithKeys, FormComponentAllowUpdateModifier.identity, FormComponentAllowUpdateModifier, value); 23521 return this; 23522 } 23523 onAcquired(callback) { 23524 throw new Error('Method not implemented.'); 23525 } 23526 onError(callback) { 23527 throw new Error('Method not implemented.'); 23528 } 23529 onRouter(callback) { 23530 throw new Error('Method not implemented.'); 23531 } 23532 onUninstall(callback) { 23533 throw new Error('Method not implemented.'); 23534 } 23535 onLoad(callback) { 23536 throw new Error('Method not implemented.'); 23537 } 23538} 23539class FormComponentModuleNameModifier extends ModifierWithKey { 23540 constructor(value) { 23541 super(value); 23542 } 23543 applyPeer(node, reset) { 23544 if (reset) { 23545 getUINativeModule().formComponent.resetModuleName(node); 23546 } 23547 else { 23548 getUINativeModule().formComponent.setModuleName(node, this.value); 23549 } 23550 } 23551} 23552FormComponentModuleNameModifier.identity = Symbol('formComponentModuleName'); 23553class FormComponentDimensionModifier extends ModifierWithKey { 23554 constructor(value) { 23555 super(value); 23556 } 23557 applyPeer(node, reset) { 23558 if (reset) { 23559 getUINativeModule().formComponent.resetDimension(node); 23560 } 23561 else { 23562 getUINativeModule().formComponent.setDimension(node, this.value); 23563 } 23564 } 23565 checkObjectDiff() { 23566 return !isBaseOrResourceEqual(this.stageValue, this.value); 23567 } 23568} 23569FormComponentDimensionModifier.identity = Symbol('formComponentDimension'); 23570class FormComponentAllowUpdateModifier extends ModifierWithKey { 23571 constructor(value) { 23572 super(value); 23573 } 23574 applyPeer(node, reset) { 23575 if (reset) { 23576 getUINativeModule().formComponent.resetAllowUpdate(node); 23577 } 23578 else { 23579 getUINativeModule().formComponent.setAllowUpdate(node, this.value); 23580 } 23581 } 23582} 23583FormComponentAllowUpdateModifier.identity = Symbol('formComponentAllowUpdate'); 23584class FormComponentSizeModifier extends ModifierWithKey { 23585 constructor(value) { 23586 super(value); 23587 } 23588 applyPeer(node, reset) { 23589 if (reset) { 23590 getUINativeModule().formComponent.resetSize(node); 23591 } 23592 else { 23593 getUINativeModule().formComponent.setSize(node, this.value.width, this.value.height); 23594 } 23595 } 23596 checkObjectDiff() { 23597 let widthEQ = isBaseOrResourceEqual(this.stageValue.width, this.value.width); 23598 let heightEQ = isBaseOrResourceEqual(this.stageValue.height, this.value.height); 23599 return !widthEQ || !heightEQ; 23600 } 23601} 23602FormComponentSizeModifier.identity = Symbol('formComponentSize'); 23603class FormComponentVisibilityModifier extends ModifierWithKey { 23604 constructor(value) { 23605 super(value); 23606 } 23607 applyPeer(node, reset) { 23608 if (reset) { 23609 getUINativeModule().formComponent.resetVisibility(node); 23610 } 23611 else { 23612 getUINativeModule().formComponent.setVisibility(node, this.value); 23613 } 23614 } 23615} 23616FormComponentVisibilityModifier.identity = Symbol('formComponentVisibility'); 23617// @ts-ignore 23618if (globalThis.FormComponent !== undefined) { 23619 globalThis.FormComponent.attributeModifier = function (modifier) { 23620 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23621 return new ArkFormComponentComponent(nativePtr); 23622 }, (nativePtr, classType, modifierJS) => { 23623 return new modifierJS.FormComponentModifier(nativePtr, classType); 23624 }); 23625 }; 23626} 23627 23628/// <reference path='./import.ts' /> 23629class ArkGaugeComponent extends ArkComponent { 23630 constructor(nativePtr, classType) { 23631 super(nativePtr, classType); 23632 } 23633 value(value) { 23634 modifierWithKey(this._modifiersWithKeys, GaugeVauleModifier.identity, GaugeVauleModifier, value); 23635 return this; 23636 } 23637 startAngle(angle) { 23638 modifierWithKey(this._modifiersWithKeys, GaugeStartAngleModifier.identity, GaugeStartAngleModifier, angle); 23639 return this; 23640 } 23641 endAngle(angle) { 23642 modifierWithKey(this._modifiersWithKeys, GaugeEndAngleModifier.identity, GaugeEndAngleModifier, angle); 23643 return this; 23644 } 23645 colors(colors) { 23646 modifierWithKey(this._modifiersWithKeys, GaugeColorsModifier.identity, GaugeColorsModifier, colors); 23647 return this; 23648 } 23649 strokeWidth(length) { 23650 modifierWithKey(this._modifiersWithKeys, GaugeStrokeWidthModifier.identity, GaugeStrokeWidthModifier, length); 23651 return this; 23652 } 23653 description(value) { 23654 throw new Error('Method not implemented.'); 23655 } 23656 trackShadow(value) { 23657 modifierWithKey(this._modifiersWithKeys, GaugeTrackShadowModifier.identity, GaugeTrackShadowModifier, value); 23658 return this; 23659 } 23660 indicator(value) { 23661 modifierWithKey(this._modifiersWithKeys, GaugeIndicatorModifier.identity, GaugeIndicatorModifier, value); 23662 return this; 23663 } 23664 contentModifier(value) { 23665 modifierWithKey(this._modifiersWithKeys, GaugeContentModifier.identity, GaugeContentModifier, value); 23666 return this; 23667 } 23668 setContentModifier(modifier) { 23669 if (modifier === undefined || modifier === null) { 23670 getUINativeModule().gauge.setContentModifierBuilder(this.nativePtr, false); 23671 return; 23672 } 23673 this.needRebuild = false; 23674 if (this.builder !== modifier.applyContent()) { 23675 this.needRebuild = true; 23676 } 23677 this.builder = modifier.applyContent(); 23678 this.modifier = modifier; 23679 getUINativeModule().gauge.setContentModifierBuilder(this.nativePtr, this); 23680 } 23681 makeContentModifierNode(context, gaugeConfiguration) { 23682 gaugeConfiguration.contentModifier = this.modifier; 23683 if (isUndefined(this.gaugeNode) || this.needRebuild) { 23684 let xNode = globalThis.requireNapi('arkui.node'); 23685 this.gaugeNode = new xNode.BuilderNode(context); 23686 this.gaugeNode.build(this.builder, gaugeConfiguration); 23687 this.needRebuild = false; 23688 } else { 23689 this.gaugeNode.update(gaugeConfiguration); 23690 } 23691 return this.gaugeNode.getFrameNode(); 23692 } 23693} 23694class GaugeIndicatorModifier extends ModifierWithKey { 23695 applyPeer(node, reset) { 23696 if (reset) { 23697 getUINativeModule().gauge.resetGaugeIndicator(node, this.value); 23698 } 23699 else { 23700 getUINativeModule().gauge.setGaugeIndicator(node, this.value.icon, this.value.space); 23701 } 23702 } 23703 checkObjectDiff() { 23704 return !isBaseOrResourceEqual(this.stageValue.icon, this.value.icon) || 23705 !isBaseOrResourceEqual(this.stageValue.space, this.value.space); 23706 } 23707} 23708GaugeIndicatorModifier.identity = Symbol('gaugeIndicator'); 23709class GaugeContentModifier extends ModifierWithKey { 23710 constructor(value) { 23711 super(value); 23712 } 23713 applyPeer(node, reset, component) { 23714 let gaugeComponent = component; 23715 gaugeComponent.setContentModifier(this.value); 23716 } 23717} 23718GaugeContentModifier.identity = Symbol('gaugeContentModifier'); 23719class GaugeColorsModifier extends ModifierWithKey { 23720 applyPeer(node, reset) { 23721 if (reset) { 23722 getUINativeModule().gauge.resetGaugeColors(node); 23723 } 23724 else { 23725 getUINativeModule().gauge.setGaugeColors(node, this.value); 23726 } 23727 } 23728 checkObjectDiff() { 23729 return true; 23730 } 23731} 23732GaugeColorsModifier.identity = Symbol('gaugeColors'); 23733class GaugeVauleModifier extends ModifierWithKey { 23734 applyPeer(node, reset) { 23735 if (reset) { 23736 getUINativeModule().gauge.resetGaugeVaule(node); 23737 } 23738 else { 23739 getUINativeModule().gauge.setGaugeVaule(node, this.value); 23740 } 23741 } 23742 checkObjectDiff() { 23743 return !isBaseOrResourceEqual(this.stageValue, this.value); 23744 } 23745} 23746GaugeVauleModifier.identity = Symbol('gaugeVaule'); 23747class GaugeStartAngleModifier extends ModifierWithKey { 23748 applyPeer(node, reset) { 23749 if (reset) { 23750 getUINativeModule().gauge.resetGaugeStartAngle(node); 23751 } 23752 else { 23753 getUINativeModule().gauge.setGaugeStartAngle(node, this.value); 23754 } 23755 } 23756 checkObjectDiff() { 23757 return !isBaseOrResourceEqual(this.stageValue, this.value); 23758 } 23759} 23760GaugeStartAngleModifier.identity = Symbol('gaugeStartAngle'); 23761class GaugeEndAngleModifier extends ModifierWithKey { 23762 applyPeer(node, reset) { 23763 if (reset) { 23764 getUINativeModule().gauge.resetGaugeEndAngle(node); 23765 } 23766 else { 23767 getUINativeModule().gauge.setGaugeEndAngle(node, this.value); 23768 } 23769 } 23770 checkObjectDiff() { 23771 return !isBaseOrResourceEqual(this.stageValue, this.value); 23772 } 23773} 23774GaugeEndAngleModifier.identity = Symbol('gaugeEndAngle'); 23775class GaugeStrokeWidthModifier extends ModifierWithKey { 23776 applyPeer(node, reset) { 23777 if (reset) { 23778 getUINativeModule().gauge.resetGaugeStrokeWidth(node); 23779 } 23780 else { 23781 getUINativeModule().gauge.setGaugeStrokeWidth(node, this.value); 23782 } 23783 } 23784 checkObjectDiff() { 23785 return !isBaseOrResourceEqual(this.stageValue, this.value); 23786 } 23787} 23788GaugeStrokeWidthModifier.identity = Symbol('gaugeStrokeWidth'); 23789class GaugeTrackShadowModifier extends ModifierWithKey { 23790 applyPeer(node, reset) { 23791 if (reset) { 23792 getUINativeModule().gauge.resetGaugeTrackShadow(node); 23793 } 23794 else { 23795 getUINativeModule().gauge.setGaugeTrackShadow(node, this.value, this.value.radius, this.value.offsetX, this.value.offsetY); 23796 } 23797 } 23798 checkObjectDiff() { 23799 return !isBaseOrResourceEqual(this.stageValue, this.value); 23800 } 23801} 23802GaugeTrackShadowModifier.identity = Symbol('gaugeTrackShadow'); 23803// @ts-ignore 23804if (globalThis.Gauge !== undefined) { 23805 globalThis.Gauge.attributeModifier = function (modifier) { 23806 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23807 return new ArkGaugeComponent(nativePtr); 23808 }, (nativePtr, classType, modifierJS) => { 23809 return new modifierJS.GaugeModifier(nativePtr, classType); 23810 }); 23811 }; 23812 globalThis.Gauge.contentModifier = function (modifier) { 23813 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 23814 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 23815 let component = this.createOrGetNode(elmtId, () => { 23816 return new ArkGaugeComponent(nativeNode); 23817 }); 23818 component.setContentModifier(modifier); 23819 }; 23820} 23821 23822/// <reference path='./import.ts' /> 23823class ArkMarqueeComponent extends ArkComponent { 23824 constructor(nativePtr, classType) { 23825 super(nativePtr, classType); 23826 } 23827 allowChildCount() { 23828 return 0; 23829 } 23830 initialize(value) { 23831 if (value.length === 1 && isObject(value[0])) { 23832 modifierWithKey(this._modifiersWithKeys, MarqueeInitializeModifier.identity, MarqueeInitializeModifier, value[0]); 23833 } else { 23834 modifierWithKey(this._modifiersWithKeys, MarqueeInitializeModifier.identity, MarqueeInitializeModifier, undefined); 23835 } 23836 return this; 23837 } 23838 fontSize(value) { 23839 modifierWithKey(this._modifiersWithKeys, MarqueeFontSizeModifier.identity, MarqueeFontSizeModifier, value); 23840 return this; 23841 } 23842 fontColor(value) { 23843 modifierWithKey(this._modifiersWithKeys, MarqueeFontColorModifier.identity, MarqueeFontColorModifier, value); 23844 return this; 23845 } 23846 allowScale(value) { 23847 modifierWithKey(this._modifiersWithKeys, MarqueeAllowScaleModifier.identity, MarqueeAllowScaleModifier, value); 23848 return this; 23849 } 23850 fontWeight(value) { 23851 modifierWithKey(this._modifiersWithKeys, MarqueeFontWeightModifier.identity, MarqueeFontWeightModifier, value); 23852 return this; 23853 } 23854 fontFamily(value) { 23855 modifierWithKey(this._modifiersWithKeys, MarqueeFontFamilyModifier.identity, MarqueeFontFamilyModifier, value); 23856 return this; 23857 } 23858 onStart(event) { 23859 modifierWithKey(this._modifiersWithKeys, MarqueeOnStartModifier.identity, MarqueeOnStartModifier, event); 23860 return this; 23861 } 23862 onBounce(event) { 23863 modifierWithKey(this._modifiersWithKeys, MarqueeOnBounceModifier.identity, MarqueeOnBounceModifier, event); 23864 return this; 23865 } 23866 onFinish(event) { 23867 modifierWithKey(this._modifiersWithKeys, MarqueeOnFinishModifier.identity, MarqueeOnFinishModifier, event); 23868 return this; 23869 } 23870 marqueeUpdateStrategy(value) { 23871 modifierWithKey(this._modifiersWithKeys, MarqueeUpdateStrategyModifier.identity, MarqueeUpdateStrategyModifier, value); 23872 return this; 23873 } 23874} 23875class MarqueeInitializeModifier extends ModifierWithKey { 23876 constructor(value) { 23877 super(value); 23878 } 23879 applyPeer(node, reset) { 23880 var _a, _b, _c, _d, _e; 23881 if (reset) { 23882 getUINativeModule().marquee.setInitialize(node, undefined, undefined, undefined, undefined, undefined); 23883 } 23884 else { 23885 getUINativeModule().marquee.setInitialize(node, (_a = this.value) === null || _a === void 0 ? void 0 : _a.start, 23886 (_b = this.value) === null || _b === void 0 ? void 0 : _b.step, (_c = this.value) === null || _c === void 0 ? void 0 : _c.loop, 23887 (_d = this.value) === null || _d === void 0 ? void 0 : _d.fromStart, (_e = this.value) === null || _e === void 0 ? void 0 : _e.src); 23888 } 23889 } 23890 23891 checkObjectDiff() { 23892 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; 23893 return !isBaseOrResourceEqual((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.start, (_b = this.value) === null || _b === void 0 ? void 0 : _b.start) || 23894 !isBaseOrResourceEqual((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.step, (_d = this.value) === null || _d === void 0 ? void 0 : _d.step) || 23895 !isBaseOrResourceEqual((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.loop, (_f = this.value) === null || _f === void 0 ? void 0 : _f.loop) || 23896 !isBaseOrResourceEqual((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.fromStart, (_h = this.value) === null || _h === void 0 ? void 0 : _h.fromStart) || 23897 !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.src, (_k = this.value) === null || _k === void 0 ? void 0 : _k.src); 23898 } 23899} 23900MarqueeInitializeModifier.identity = Symbol('marqueeInitialize'); 23901class MarqueeFontColorModifier extends ModifierWithKey { 23902 constructor(value) { 23903 super(value); 23904 } 23905 applyPeer(node, reset) { 23906 if (reset) { 23907 getUINativeModule().marquee.resetFontColor(node); 23908 } 23909 else { 23910 getUINativeModule().marquee.setFontColor(node, this.value); 23911 } 23912 } 23913 checkObjectDiff() { 23914 return !isBaseOrResourceEqual(this.stageValue, this.value); 23915 } 23916} 23917MarqueeFontColorModifier.identity = Symbol('fontColor'); 23918class MarqueeFontSizeModifier extends ModifierWithKey { 23919 constructor(value) { 23920 super(value); 23921 } 23922 applyPeer(node, reset) { 23923 if (reset) { 23924 getUINativeModule().marquee.resetFontSize(node); 23925 } 23926 else { 23927 getUINativeModule().marquee.setFontSize(node, this.value); 23928 } 23929 } 23930 checkObjectDiff() { 23931 return !isBaseOrResourceEqual(this.stageValue, this.value); 23932 } 23933} 23934MarqueeFontSizeModifier.identity = Symbol('fontSize'); 23935class MarqueeAllowScaleModifier extends ModifierWithKey { 23936 constructor(value) { 23937 super(value); 23938 } 23939 applyPeer(node, reset) { 23940 if (reset) { 23941 getUINativeModule().marquee.resetAllowScale(node); 23942 } 23943 else { 23944 getUINativeModule().marquee.setAllowScale(node, this.value); 23945 } 23946 } 23947} 23948MarqueeAllowScaleModifier.identity = Symbol('allowScale'); 23949class MarqueeFontWeightModifier extends ModifierWithKey { 23950 constructor(value) { 23951 super(value); 23952 } 23953 applyPeer(node, reset) { 23954 if (reset) { 23955 getUINativeModule().marquee.resetFontWeight(node); 23956 } 23957 else { 23958 getUINativeModule().marquee.setFontWeight(node, this.value); 23959 } 23960 } 23961 checkObjectDiff() { 23962 return this.stageValue !== this.value; 23963 } 23964} 23965MarqueeFontWeightModifier.identity = Symbol('fontWeight'); 23966class MarqueeFontFamilyModifier extends ModifierWithKey { 23967 constructor(value) { 23968 super(value); 23969 } 23970 applyPeer(node, reset) { 23971 if (reset) { 23972 getUINativeModule().marquee.resetFontFamily(node); 23973 } 23974 else { 23975 getUINativeModule().marquee.setFontFamily(node, this.value); 23976 } 23977 } 23978} 23979MarqueeFontFamilyModifier.identity = Symbol('fontFamily'); 23980class MarqueeUpdateStrategyModifier extends ModifierWithKey { 23981 constructor(value) { 23982 super(value); 23983 } 23984 applyPeer(node, reset) { 23985 if (reset) { 23986 getUINativeModule().marquee.resetMarqueeUpdateStrategy(node); 23987 } 23988 else { 23989 getUINativeModule().marquee.setMarqueeUpdateStrategy(node, this.value); 23990 } 23991 } 23992} 23993MarqueeUpdateStrategyModifier.identity = Symbol('marqueeUpdateStrategy'); 23994class MarqueeOnStartModifier extends ModifierWithKey { 23995 constructor(value) { 23996 super(value); 23997 } 23998 applyPeer(node, reset) { 23999 if (reset) { 24000 getUINativeModule().marquee.resetMarqueeOnStart(node); 24001 } else { 24002 getUINativeModule().marquee.setMarqueeOnStart(node, this.value); 24003 } 24004 } 24005} 24006MarqueeOnStartModifier.identity = Symbol('marqueeOnStart'); 24007class MarqueeOnBounceModifier extends ModifierWithKey { 24008 constructor(value) { 24009 super(value); 24010 } 24011 applyPeer(node, reset) { 24012 if (reset) { 24013 getUINativeModule().marquee.resetMarqueeOnBounce(node); 24014 } else { 24015 getUINativeModule().marquee.setMarqueeOnBounce(node, this.value); 24016 } 24017 } 24018} 24019MarqueeOnBounceModifier.identity = Symbol('marqueeOnBounce'); 24020class MarqueeOnFinishModifier extends ModifierWithKey { 24021 constructor(value) { 24022 super(value); 24023 } 24024 applyPeer(node, reset) { 24025 if (reset) { 24026 getUINativeModule().marquee.resetMarqueeOnFinish(node); 24027 } else { 24028 getUINativeModule().marquee.setMarqueeOnFinish(node, this.value); 24029 } 24030 } 24031} 24032MarqueeOnFinishModifier.identity = Symbol('marqueeOnFinish'); 24033// @ts-ignore 24034if (globalThis.Marquee !== undefined) { 24035 globalThis.Marquee.attributeModifier = function (modifier) { 24036 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24037 return new ArkMarqueeComponent(nativePtr); 24038 }, (nativePtr, classType, modifierJS) => { 24039 return new modifierJS.MarqueeModifier(nativePtr, classType); 24040 }); 24041 }; 24042} 24043 24044/// <reference path='./import.ts' /> 24045class MenuFontColorModifier extends ModifierWithKey { 24046 constructor(value) { 24047 super(value); 24048 } 24049 applyPeer(node, reset) { 24050 if (reset) { 24051 getUINativeModule().menu.resetMenuFontColor(node); 24052 } 24053 else { 24054 getUINativeModule().menu.setMenuFontColor(node, this.value); 24055 } 24056 } 24057 checkObjectDiff() { 24058 return !isBaseOrResourceEqual(this.stageValue, this.value); 24059 } 24060} 24061MenuFontColorModifier.identity = Symbol('fontColor'); 24062class MenuWidthModifier extends ModifierWithKey { 24063 applyPeer(node, reset) { 24064 if (reset) { 24065 getUINativeModule().menu.resetWidth(node); 24066 } else { 24067 getUINativeModule().menu.setWidth(node, this.value); 24068 } 24069 } 24070 24071 checkObjectDiff() { 24072 return !isBaseOrResourceEqual(this.stageValue, this.value); 24073 } 24074} 24075MenuWidthModifier.identity = Symbol('menuWidth'); 24076class MenuFontModifier extends ModifierWithKey { 24077 constructor(value) { 24078 super(value); 24079 } 24080 applyPeer(node, reset) { 24081 if (reset || !this.value) { 24082 getUINativeModule().menu.resetFont(node); 24083 } 24084 else { 24085 getUINativeModule().menu.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 24086 } 24087 } 24088 checkObjectDiff() { 24089 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 24090 let weightEQ = this.stageValue.weight === this.value.weight; 24091 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 24092 let styleEQ = this.stageValue.style === this.value.style; 24093 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 24094 } 24095} 24096MenuFontModifier.identity = Symbol('font'); 24097class RadiusModifier extends ModifierWithKey { 24098 constructor(value) { 24099 super(value); 24100 } 24101 applyPeer(node, reset) { 24102 if (reset) { 24103 getUINativeModule().menu.resetRadius(node); 24104 } 24105 else { 24106 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 24107 getUINativeModule().menu.setRadius(node, this.value, this.value, this.value, this.value, false); 24108 } 24109 else { 24110 getUINativeModule().menu.setRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight, true); 24111 } 24112 } 24113 } 24114 checkObjectDiff() { 24115 if (isResource(this.stageValue) && isResource(this.value)) { 24116 return !isResourceEqual(this.stageValue, this.value); 24117 } 24118 else if (!isResource(this.stageValue) && !isResource(this.value)) { 24119 return !(this.stageValue.topLeft === this.value.topLeft && 24120 this.stageValue.topRight === this.value.topRight && 24121 this.stageValue.bottomLeft === this.value.bottomLeft && 24122 this.stageValue.bottomRight === this.value.bottomRight); 24123 } 24124 else { 24125 return true; 24126 } 24127 } 24128} 24129RadiusModifier.identity = Symbol('radius'); 24130class MenuItemDividerModifier extends ModifierWithKey { 24131 constructor(value) { 24132 super(value); 24133 } 24134 applyPeer(node, reset) { 24135 if (reset || !this.value) { 24136 getUINativeModule().menu.resetMenuItemDivider(node); 24137 } else { 24138 getUINativeModule().menu.setMenuItemDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 24139 } 24140 } 24141 checkObjectDiff() { 24142 if (isResource(this.stageValue) && isResource(this.value)) { 24143 return !isResourceEqual(this.stageValue, this.value); 24144 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 24145 return !(this.stageValue.strokeWidth === this.value.strokeWidth && 24146 this.stageValue.color === this.value.color && 24147 this.stageValue.startMargin === this.value.startMargin && 24148 this.stageValue.endMargin === this.value.endMargin); 24149 } else { 24150 return true; 24151 } 24152 } 24153} 24154MenuItemDividerModifier.identity = Symbol('menuItemDivider'); 24155class MenuItemGroupDividerModifier extends ModifierWithKey { 24156 constructor(value) { 24157 super(value); 24158 } 24159 applyPeer(node, reset) { 24160 if (reset || !this.value) { 24161 getUINativeModule().menu.resetMenuItemGroupDivider(node); 24162 } else { 24163 getUINativeModule().menu.setMenuItemGroupDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 24164 } 24165 } 24166 24167 checkObjectDiff() { 24168 if (isResource(this.stageValue) && isResource(this.value)) { 24169 return !isResourceEqual(this.stageValue, this.value); 24170 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 24171 return !(this.stageValue.strokeWidth === this.value.strokeWidth && 24172 this.stageValue.color === this.value.color && 24173 this.stageValue.startMargin === this.value.startMargin && 24174 this.stageValue.endMargin === this.value.endMargin); 24175 } else { 24176 return true; 24177 } 24178 } 24179} 24180MenuItemGroupDividerModifier.identity = Symbol('menuItemGroupDivider'); 24181class SubMenuExpandingModeModifier extends ModifierWithKey { 24182 constructor(value) { 24183 super(value); 24184 } 24185 applyPeer(node, reset) { 24186 if (reset) { 24187 getUINativeModule().menu.resetSubMenuExpandingMode(node); 24188 } else { 24189 getUINativeModule().menu.setSubMenuExpandingMode(node, this.value); 24190 } 24191 } 24192} 24193SubMenuExpandingModeModifier.identity = Symbol('subMenuExpandingMode'); 24194class ArkMenuComponent extends ArkComponent { 24195 constructor(nativePtr, classType) { 24196 super(nativePtr, classType); 24197 } 24198 width(value) { 24199 modifierWithKey(this._modifiersWithKeys, MenuWidthModifier.identity, MenuWidthModifier, value); 24200 return this; 24201 } 24202 fontSize(value) { 24203 throw new Error('Method not implemented.'); 24204 } 24205 font(value) { 24206 modifierWithKey(this._modifiersWithKeys, MenuFontModifier.identity, MenuFontModifier, value); 24207 return this; 24208 } 24209 fontColor(value) { 24210 modifierWithKey(this._modifiersWithKeys, MenuFontColorModifier.identity, MenuFontColorModifier, value); 24211 return this; 24212 } 24213 radius(value) { 24214 modifierWithKey(this._modifiersWithKeys, RadiusModifier.identity, RadiusModifier, value); 24215 return this; 24216 } 24217 menuItemDivider(value) { 24218 modifierWithKey(this._modifiersWithKeys, MenuItemDividerModifier.identity, MenuItemDividerModifier, value); 24219 return this; 24220 } 24221 menuItemGroupDivider(value) { 24222 modifierWithKey(this._modifiersWithKeys, MenuItemGroupDividerModifier.identity, MenuItemGroupDividerModifier, value); 24223 return this; 24224 } 24225 subMenuExpandingMode(value) { 24226 modifierWithKey(this._modifiersWithKeys, SubMenuExpandingModeModifier.identity, SubMenuExpandingModeModifier, value); 24227 return this; 24228 } 24229} 24230// @ts-ignore 24231if (globalThis.Menu !== undefined) { 24232 globalThis.Menu.attributeModifier = function (modifier) { 24233 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24234 return new ArkMenuComponent(nativePtr); 24235 }, (nativePtr, classType, modifierJS) => { 24236 return new modifierJS.MenuModifier(nativePtr, classType); 24237 }); 24238 }; 24239} 24240 24241/// <reference path='./import.ts' /> 24242class MenuItemSelectedModifier extends ModifierWithKey { 24243 constructor(value) { 24244 super(value); 24245 } 24246 applyPeer(node, reset) { 24247 if (reset) { 24248 getUINativeModule().menuitem.resetMenuItemSelected(node); 24249 } 24250 else { 24251 getUINativeModule().menuitem.setMenuItemSelected(node, this.value); 24252 } 24253 } 24254 checkObjectDiff() { 24255 return !isBaseOrResourceEqual(this.stageValue, this.value); 24256 } 24257} 24258MenuItemSelectedModifier.identity = Symbol('menuItemSelected'); 24259class LabelFontColorModifier extends ModifierWithKey { 24260 constructor(value) { 24261 super(value); 24262 } 24263 applyPeer(node, reset) { 24264 if (reset) { 24265 getUINativeModule().menuitem.resetLabelFontColor(node); 24266 } 24267 else { 24268 getUINativeModule().menuitem.setLabelFontColor(node, this.value); 24269 } 24270 } 24271 checkObjectDiff() { 24272 return !isBaseOrResourceEqual(this.stageValue, this.value); 24273 } 24274} 24275LabelFontColorModifier.identity = Symbol('labelfontColor'); 24276class ContentFontColorModifier extends ModifierWithKey { 24277 constructor(value) { 24278 super(value); 24279 } 24280 applyPeer(node, reset) { 24281 if (reset) { 24282 getUINativeModule().menuitem.resetContentFontColor(node); 24283 } 24284 else { 24285 getUINativeModule().menuitem.setContentFontColor(node, this.value); 24286 } 24287 } 24288 checkObjectDiff() { 24289 return !isBaseOrResourceEqual(this.stageValue, this.value); 24290 } 24291} 24292ContentFontColorModifier.identity = Symbol('contentfontColor'); 24293class LabelFontModifier extends ModifierWithKey { 24294 constructor(value) { 24295 super(value); 24296 } 24297 applyPeer(node, reset) { 24298 if (reset || !this.value) { 24299 getUINativeModule().menuitem.resetLabelFont(node); 24300 } 24301 else { 24302 getUINativeModule().menuitem.setLabelFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 24303 } 24304 } 24305 checkObjectDiff() { 24306 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 24307 let weightEQ = this.stageValue.weight === this.value.weight; 24308 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 24309 let styleEQ = this.stageValue.style === this.value.style; 24310 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 24311 } 24312} 24313LabelFontModifier.identity = Symbol('labelFont'); 24314class ContentFontModifier extends ModifierWithKey { 24315 constructor(value) { 24316 super(value); 24317 } 24318 applyPeer(node, reset) { 24319 if (reset || !this.value) { 24320 getUINativeModule().menuitem.resetContentFont(node); 24321 } 24322 else { 24323 getUINativeModule().menuitem.setContentFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 24324 } 24325 } 24326 checkObjectDiff() { 24327 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 24328 let weightEQ = this.stageValue.weight === this.value.weight; 24329 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 24330 let styleEQ = this.stageValue.style === this.value.style; 24331 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 24332 } 24333} 24334ContentFontModifier.identity = Symbol('contentFont'); 24335class MenuItemSelectIconModifier extends ModifierWithKey { 24336 applyPeer(node, reset) { 24337 if (reset || !this.value) { 24338 getUINativeModule().menuitem.resetSelectIcon(node); 24339 } else { 24340 getUINativeModule().menuitem.setSelectIcon(node, this.value); 24341 } 24342 } 24343 checkObjectDiff() { 24344 return !isBaseOrResourceEqual(this.stageValue, this.value); 24345 } 24346} 24347MenuItemSelectIconModifier.identity = Symbol('selectIcon'); 24348class ArkMenuItemComponent extends ArkComponent { 24349 constructor(nativePtr, classType) { 24350 super(nativePtr, classType); 24351 } 24352 selected(value) { 24353 modifierWithKey(this._modifiersWithKeys, MenuItemSelectedModifier.identity, MenuItemSelectedModifier, value); 24354 return this; 24355 } 24356 selectIcon(value) { 24357 modifierWithKey(this._modifiersWithKeys, MenuItemSelectIconModifier.identity, MenuItemSelectIconModifier, value); 24358 return this; 24359 } 24360 onChange(callback) { 24361 throw new Error('Method not implemented.'); 24362 } 24363 contentFont(value) { 24364 modifierWithKey(this._modifiersWithKeys, ContentFontModifier.identity, ContentFontModifier, value); 24365 return this; 24366 } 24367 contentFontColor(value) { 24368 modifierWithKey(this._modifiersWithKeys, ContentFontColorModifier.identity, ContentFontColorModifier, value); 24369 return this; 24370 } 24371 labelFont(value) { 24372 modifierWithKey(this._modifiersWithKeys, LabelFontModifier.identity, LabelFontModifier, value); 24373 return this; 24374 } 24375 labelFontColor(value) { 24376 modifierWithKey(this._modifiersWithKeys, LabelFontColorModifier.identity, LabelFontColorModifier, value); 24377 return this; 24378 } 24379} 24380// @ts-ignore 24381if (globalThis.MenuItem !== undefined) { 24382 globalThis.MenuItem.attributeModifier = function (modifier) { 24383 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24384 return new ArkMenuItemComponent(nativePtr); 24385 }, (nativePtr, classType, modifierJS) => { 24386 return new modifierJS.MenuItemModifier(nativePtr, classType); 24387 }); 24388 }; 24389} 24390 24391/// <reference path='./import.ts' /> 24392class ArkMenuItemGroupComponent extends ArkComponent { 24393 constructor(nativePtr, classType) { 24394 super(nativePtr, classType); 24395 } 24396} 24397// @ts-ignore 24398if (globalThis.MenuItemGroup !== undefined) { 24399 globalThis.MenuItemGroup.attributeModifier = function (modifier) { 24400 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24401 return new ArkMenuItemGroupComponent(nativePtr); 24402 }, (nativePtr, classType, modifierJS) => { 24403 return new modifierJS.CommonModifier(nativePtr, classType); 24404 }); 24405 }; 24406} 24407 24408/// <reference path='./import.ts' /> 24409class ArkPluginComponent extends ArkComponent { 24410 constructor(nativePtr, classType) { 24411 super(nativePtr, classType); 24412 } 24413 onComplete(callback) { 24414 throw new Error('Method not implemented.'); 24415 } 24416 onError(callback) { 24417 throw new Error('Method not implemented.'); 24418 } 24419 size(value) { 24420 modifierWithKey(this._modifiersWithKeys, PluginSizeModifier.identity, PluginSizeModifier, value); 24421 return this; 24422 } 24423 width(value) { 24424 modifierWithKey(this._modifiersWithKeys, PluginWidthModifier.identity, PluginWidthModifier, value); 24425 return this; 24426 } 24427 height(value) { 24428 modifierWithKey(this._modifiersWithKeys, PluginHeightModifier.identity, PluginHeightModifier, value); 24429 return this; 24430 } 24431} 24432class PluginWidthModifier extends ModifierWithKey { 24433 constructor(value) { 24434 super(value); 24435 } 24436 applyPeer(node, reset) { 24437 if (reset) { 24438 getUINativeModule().plugin.resetWidth(node); 24439 } 24440 else { 24441 getUINativeModule().plugin.setWidth(node, this.value); 24442 } 24443 } 24444 checkObjectDiff() { 24445 if (isResource(this.stageValue) && isResource(this.value)) { 24446 return !isResourceEqual(this.stageValue, this.value); 24447 } 24448 else { 24449 return true; 24450 } 24451 } 24452} 24453PluginWidthModifier.identity = Symbol('pluginWidth'); 24454class PluginHeightModifier extends ModifierWithKey { 24455 constructor(value) { 24456 super(value); 24457 } 24458 applyPeer(node, reset) { 24459 if (reset) { 24460 getUINativeModule().plugin.resetHeight(node); 24461 } 24462 else { 24463 getUINativeModule().plugin.setHeight(node, this.value); 24464 } 24465 } 24466 checkObjectDiff() { 24467 if (isResource(this.stageValue) && isResource(this.value)) { 24468 return !isResourceEqual(this.stageValue, this.value); 24469 } 24470 else { 24471 return true; 24472 } 24473 } 24474} 24475PluginHeightModifier.identity = Symbol('pluginHeight'); 24476class PluginSizeModifier extends ModifierWithKey { 24477 constructor(value) { 24478 super(value); 24479 } 24480 applyPeer(node, reset) { 24481 if (reset) { 24482 getUINativeModule().plugin.resetSize(node); 24483 } 24484 else { 24485 getUINativeModule().plugin.setSize(node, this.value.width, this.value.height); 24486 } 24487 } 24488 checkObjectDiff() { 24489 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 24490 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 24491 } 24492} 24493PluginSizeModifier.identity = Symbol('size'); 24494// @ts-ignore 24495if (globalThis.PluginComponent !== undefined) { 24496 globalThis.PluginComponent.attributeModifier = function (modifier) { 24497 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24498 return new ArkPluginComponent(nativePtr); 24499 }, (nativePtr, classType, modifierJS) => { 24500 return new modifierJS.PluginComponentModifier(nativePtr, classType); 24501 }); 24502 }; 24503} 24504 24505/// <reference path='./import.ts' /> 24506class ArkProgressComponent extends ArkComponent { 24507 constructor(nativePtr, classType) { 24508 super(nativePtr, classType); 24509 } 24510 initialize(value) { 24511 if (value[0] !== undefined) { 24512 modifierWithKey(this._modifiersWithKeys, 24513 ProgressInitializeModifier.identity, ProgressInitializeModifier, value[0]); 24514 } 24515 return this; 24516 } 24517 allowChildCount() { 24518 return 0; 24519 } 24520 value(value) { 24521 modifierWithKey(this._modifiersWithKeys, ProgressValueModifier.identity, ProgressValueModifier, value); 24522 return this; 24523 } 24524 color(value) { 24525 modifierWithKey(this._modifiersWithKeys, ProgressColorModifier.identity, ProgressColorModifier, value); 24526 return this; 24527 } 24528 style(value) { 24529 modifierWithKey(this._modifiersWithKeys, ProgressStyleModifier.identity, ProgressStyleModifier, value); 24530 return this; 24531 } 24532 backgroundColor(value) { 24533 modifierWithKey(this._modifiersWithKeys, ProgressBackgroundColorModifier.identity, ProgressBackgroundColorModifier, value); 24534 return this; 24535 } 24536 contentModifier(value) { 24537 modifierWithKey(this._modifiersWithKeys, ProgressContentModifier.identity, ProgressContentModifier, value); 24538 return this; 24539 } 24540 setContentModifier(modifier) { 24541 if (modifier === undefined || modifier === null) { 24542 getUINativeModule().progress.setContentModifierBuilder(this.nativePtr, false); 24543 return; 24544 } 24545 this.needRebuild = false; 24546 if (this.builder !== modifier.applyContent()) { 24547 this.needRebuild = true; 24548 } 24549 this.builder = modifier.applyContent(); 24550 this.modifier = modifier; 24551 getUINativeModule().progress.setContentModifierBuilder(this.nativePtr, this); 24552 return this; 24553 } 24554 makeContentModifierNode(context, progressConfig) { 24555 progressConfig.contentModifier = this.modifier; 24556 if (isUndefined(this.progressNode) || this.needRebuild) { 24557 let xNode = globalThis.requireNapi('arkui.node'); 24558 this.progressNode = new xNode.BuilderNode(context); 24559 this.progressNode.build(this.builder, progressConfig); 24560 this.needRebuild = false; 24561 } else { 24562 this.progressNode.update(progressConfig); 24563 } 24564 return this.progressNode.getFrameNode(); 24565 } 24566} 24567class ProgressInitializeModifier extends ModifierWithKey { 24568 constructor(value) { 24569 super(value); 24570 } 24571 applyPeer(node, reset) { 24572 if (reset) { 24573 getUINativeModule().progress.resetProgressInitialize(node); 24574 } 24575 else { 24576 getUINativeModule().progress.setProgressInitialize(node, this.value.value, 24577 this.value.total, this.value.style, this.value.type); 24578 } 24579 } 24580} 24581ProgressInitializeModifier.identity = Symbol('progressInitialize'); 24582class ProgressValueModifier extends ModifierWithKey { 24583 applyPeer(node, reset) { 24584 if (reset) { 24585 getUINativeModule().progress.ResetProgressValue(node); 24586 } 24587 else { 24588 getUINativeModule().progress.SetProgressValue(node, this.value); 24589 } 24590 } 24591 checkObjectDiff() { 24592 return true; 24593 } 24594} 24595ProgressValueModifier.identity = Symbol('value'); 24596class ProgressColorModifier extends ModifierWithKey { 24597 applyPeer(node, reset) { 24598 if (reset) { 24599 getUINativeModule().progress.resetProgressColor(node); 24600 } 24601 else { 24602 getUINativeModule().progress.setProgressColor(node, this.value); 24603 } 24604 } 24605 checkObjectDiff() { 24606 return this.stageValue !== this.value; 24607 } 24608} 24609ProgressColorModifier.identity = Symbol('color'); 24610class ProgressStyleModifier extends ModifierWithKey { 24611 applyPeer(node, reset) { 24612 if (reset) { 24613 getUINativeModule().progress.ResetProgressStyle(node); 24614 } 24615 else { 24616 let strokeWidth = this.value.strokeWidth; 24617 let scaleCount = this.value.scaleCount; 24618 let scaleWidth = this.value.scaleWidth; 24619 let enableSmoothEffect = this.value.enableSmoothEffect; 24620 let borderColor = this.value.borderColor; 24621 let borderWidth = this.value.borderWidth; 24622 let content = this.value.content; 24623 let fontSize; 24624 let fontWeight; 24625 let fontFamily; 24626 let fontStyle; 24627 if (this.value.font) { 24628 fontSize = this.value.font.size; 24629 fontWeight = this.value.font.weight; 24630 fontFamily = this.value.font.family; 24631 fontStyle = this.value.font.style; 24632 } 24633 let fontColor = this.value.fontColor; 24634 let enableScanEffect = this.value.enableScanEffect; 24635 let showDefaultPercentage = this.value.showDefaultPercentage; 24636 let shadow = this.value.shadow; 24637 let status = this.value.status; 24638 let strokeRadius = this.value.strokeRadius; 24639 getUINativeModule().progress.SetProgressStyle(node, strokeWidth, scaleCount, 24640 scaleWidth, enableSmoothEffect, borderColor, borderWidth, content, fontSize, 24641 fontWeight, fontFamily, fontStyle, fontColor, enableScanEffect, showDefaultPercentage, 24642 shadow, status, strokeRadius); 24643 } 24644 } 24645 checkObjectDiff() { 24646 return true; 24647 } 24648} 24649ProgressStyleModifier.identity = Symbol('style'); 24650class ProgressBackgroundColorModifier extends ModifierWithKey { 24651 applyPeer(node, reset) { 24652 if (reset) { 24653 getUINativeModule().progress.resetProgressBackgroundColor(node); 24654 } 24655 else { 24656 getUINativeModule().progress.setProgressBackgroundColor(node, this.value); 24657 } 24658 } 24659 checkObjectDiff() { 24660 return !isBaseOrResourceEqual(this.stageValue, this.value); 24661 } 24662} 24663ProgressBackgroundColorModifier.identity = Symbol('progressBackgroundColor'); 24664class ProgressContentModifier extends ModifierWithKey { 24665 constructor(value) { 24666 super(value); 24667 } 24668 applyPeer(node, reset, component) { 24669 let progressComponent = component; 24670 progressComponent.setContentModifier(this.value); 24671 } 24672} 24673ProgressContentModifier.identity = Symbol('progressContentModifier'); 24674// @ts-ignore 24675if (globalThis.Progress !== undefined) { 24676 globalThis.Progress.attributeModifier = function (modifier) { 24677 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24678 return new ArkProgressComponent(nativePtr); 24679 }, (nativePtr, classType, modifierJS) => { 24680 return new modifierJS.ProgressModifier(nativePtr, classType); 24681 }); 24682 }; 24683 24684 globalThis.Progress.contentModifier = function (modifier) { 24685 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 24686 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 24687 let component = this.createOrGetNode(elmtId, () => { 24688 return new ArkProgressComponent(nativeNode); 24689 }); 24690 component.setContentModifier(modifier); 24691 }; 24692} 24693 24694/// <reference path='./import.ts' /> 24695class ArkQRCodeComponent extends ArkComponent { 24696 constructor(nativePtr, classType) { 24697 super(nativePtr, classType); 24698 } 24699 allowChildCount() { 24700 return 0; 24701 } 24702 initialize(value) { 24703 modifierWithKey(this._modifiersWithKeys, QRValueModifier.identity, QRValueModifier, value[0]); 24704 return this; 24705 } 24706 color(value) { 24707 modifierWithKey(this._modifiersWithKeys, QRColorModifier.identity, QRColorModifier, value); 24708 return this; 24709 } 24710 backgroundColor(value) { 24711 modifierWithKey(this._modifiersWithKeys, QRBackgroundColorModifier.identity, QRBackgroundColorModifier, value); 24712 return this; 24713 } 24714 contentOpacity(value) { 24715 modifierWithKey(this._modifiersWithKeys, QRContentOpacityModifier.identity, QRContentOpacityModifier, value); 24716 return this; 24717 } 24718} 24719class QRValueModifier extends ModifierWithKey { 24720 constructor(value) { 24721 super(value); 24722 } 24723 applyPeer(node, reset) { 24724 getUINativeModule().qrcode.setQRValue(node, this.value); 24725 } 24726 checkObjectDiff() { 24727 return !isBaseOrResourceEqual(this.stageValue, this.value); 24728 } 24729} 24730QRValueModifier.identity = Symbol('QRCodeValue'); 24731class QRColorModifier extends ModifierWithKey { 24732 constructor(value) { 24733 super(value); 24734 } 24735 applyPeer(node, reset) { 24736 if (reset) { 24737 getUINativeModule().qrcode.resetQRColor(node); 24738 } 24739 else { 24740 getUINativeModule().qrcode.setQRColor(node, this.value); 24741 } 24742 } 24743 checkObjectDiff() { 24744 return !isBaseOrResourceEqual(this.stageValue, this.value); 24745 } 24746} 24747QRColorModifier.identity = Symbol('color'); 24748class QRBackgroundColorModifier extends ModifierWithKey { 24749 constructor(value) { 24750 super(value); 24751 } 24752 applyPeer(node, reset) { 24753 if (reset) { 24754 getUINativeModule().qrcode.resetQRBackgroundColor(node); 24755 } 24756 else { 24757 getUINativeModule().qrcode.setQRBackgroundColor(node, this.value); 24758 } 24759 } 24760 checkObjectDiff() { 24761 return !isBaseOrResourceEqual(this.stageValue, this.value); 24762 } 24763} 24764QRBackgroundColorModifier.identity = Symbol('qrBackgroundColor'); 24765class QRContentOpacityModifier extends ModifierWithKey { 24766 constructor(value) { 24767 super(value); 24768 } 24769 applyPeer(node, reset) { 24770 if (reset) { 24771 getUINativeModule().qrcode.resetContentOpacity(node); 24772 } 24773 else { 24774 getUINativeModule().qrcode.setContentOpacity(node, this.value); 24775 } 24776 } 24777 checkObjectDiff() { 24778 return !isBaseOrResourceEqual(this.stageValue, this.value); 24779 } 24780} 24781QRContentOpacityModifier.identity = Symbol('qrContentOpacity'); 24782// @ts-ignore 24783if (globalThis.QRCode !== undefined) { 24784 globalThis.QRCode.attributeModifier = function (modifier) { 24785 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24786 return new ArkQRCodeComponent(nativePtr); 24787 }, (nativePtr, classType, modifierJS) => { 24788 return new modifierJS.QRCodeModifier(nativePtr, classType); 24789 }); 24790 }; 24791} 24792 24793/// <reference path='./import.ts' /> 24794class ArkRichTextComponent extends ArkComponent { 24795 constructor(nativePtr, classType) { 24796 super(nativePtr, classType); 24797 } 24798 onStart(callback) { 24799 throw new Error('Method not implemented.'); 24800 } 24801 onComplete(callback) { 24802 throw new Error('Method not implemented.'); 24803 } 24804} 24805// @ts-ignore 24806if (globalThis.RichText !== undefined) { 24807 globalThis.RichText.attributeModifier = function (modifier) { 24808 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24809 return new ArkRichTextComponent(nativePtr); 24810 }, (nativePtr, classType, modifierJS) => { 24811 return new modifierJS.CommonModifier(nativePtr, classType); 24812 }); 24813 }; 24814} 24815 24816class ScrollBarEnableNestedScrollModifier extends ModifierWithKey { 24817 applyPeer(node, reset) { 24818 if (reset) { 24819 getUINativeModule().ScrollBar.resetScrollBarEnableNestedScroll(node); 24820 } else { 24821 getUINativeModule().ScrollBar.setScrollBarEnableNestedScroll(node, this.value); 24822 } 24823 } 24824} 24825ScrollBarEnableNestedScrollModifier.identity = Symbol('enableNestedScroll'); 24826 24827/// <reference path='./import.ts' /> 24828class ArkScrollBarComponent extends ArkComponent { 24829 constructor(nativePtr, classType) { 24830 super(nativePtr, classType); 24831 } 24832 enableNestedScroll(value) { 24833 modifierWithKey(this._modifiersWithKeys, ScrollBarEnableNestedScrollModifier.identity, 24834 ScrollBarEnableNestedScrollModifier, value); 24835 return this; 24836 } 24837} 24838// @ts-ignore 24839if (globalThis.ScrollBar !== undefined) { 24840 globalThis.ScrollBar.attributeModifier = function (modifier) { 24841 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24842 return new ArkScrollBarComponent(nativePtr); 24843 }, (nativePtr, classType, modifierJS) => { 24844 return new modifierJS.CommonModifier(nativePtr, classType); 24845 }); 24846 }; 24847} 24848 24849/// <reference path='./import.ts' /> 24850class ArkStepperComponent extends ArkComponent { 24851 constructor(nativePtr, classType) { 24852 super(nativePtr, classType); 24853 } 24854 onFinish(callback) { 24855 throw new Error('Method not implemented.'); 24856 } 24857 onSkip(callback) { 24858 throw new Error('Method not implemented.'); 24859 } 24860 onChange(callback) { 24861 throw new Error('Method not implemented.'); 24862 } 24863 onNext(callback) { 24864 throw new Error('Method not implemented.'); 24865 } 24866 onPrevious(callback) { 24867 throw new Error('Method not implemented.'); 24868 } 24869} 24870// @ts-ignore 24871if (globalThis.Stepper !== undefined) { 24872 globalThis.Stepper.attributeModifier = function (modifier) { 24873 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24874 return new ArkStepperComponent(nativePtr); 24875 }, (nativePtr, classType, modifierJS) => { 24876 return new modifierJS.CommonModifier(nativePtr, classType); 24877 }); 24878 }; 24879} 24880 24881/// <reference path='./import.ts' /> 24882class ArkStepperItemComponent extends ArkComponent { 24883 constructor(nativePtr, classType) { 24884 super(nativePtr, classType); 24885 } 24886 prevLabel(value) { 24887 modifierWithKey(this._modifiersWithKeys, PrevLabelModifier.identity, PrevLabelModifier, value); 24888 return this; 24889 } 24890 nextLabel(value) { 24891 modifierWithKey(this._modifiersWithKeys, NextLabelModifier.identity, NextLabelModifier, value); 24892 return this; 24893 } 24894 status(value) { 24895 modifierWithKey(this._modifiersWithKeys, StatusModifier.identity, StatusModifier, value); 24896 return this; 24897 } 24898} 24899class NextLabelModifier extends ModifierWithKey { 24900 constructor(value) { 24901 super(value); 24902 } 24903 applyPeer(node, reset) { 24904 if (reset) { 24905 getUINativeModule().stepperItem.resetNextLabel(node); 24906 } 24907 else { 24908 getUINativeModule().stepperItem.setNextLabel(node, this.value); 24909 } 24910 } 24911} 24912NextLabelModifier.identity = Symbol('NextLabel'); 24913 24914class PrevLabelModifier extends ModifierWithKey { 24915 constructor(value) { 24916 super(value); 24917 } 24918 static identity = Symbol('prevLabel'); 24919 applyPeer(node, reset) { 24920 if (reset) { 24921 getUINativeModule().stepperItem.resetPrevLabel(node); 24922 } 24923 else { 24924 getUINativeModule().stepperItem.setPrevLabel(node, this.value); 24925 } 24926 } 24927} 24928 24929class StatusModifier extends ModifierWithKey { 24930 constructor(value) { 24931 super(value); 24932 } 24933 static identity = Symbol('status'); 24934 applyPeer(node, reset) { 24935 if (reset) { 24936 getUINativeModule().stepperItem.resetStatus(node); 24937 } 24938 else { 24939 getUINativeModule().stepperItem.setStatus(node, this.value); 24940 } 24941 } 24942} 24943// @ts-ignore 24944if (globalThis.StepperItem !== undefined) { 24945 globalThis.StepperItem.attributeModifier = function (modifier) { 24946 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24947 return new ArkStepperItemComponent(nativePtr); 24948 }, (nativePtr, classType, modifierJS) => { 24949 return new modifierJS.StepperItemModifier(nativePtr, classType); 24950 }); 24951 }; 24952} 24953 24954/// <reference path='./import.ts' /> 24955class ArkTextClockComponent extends ArkComponent { 24956 constructor(nativePtr, classType) { 24957 super(nativePtr, classType); 24958 } 24959 allowChildCount() { 24960 return 0; 24961 } 24962 initialize(value) { 24963 let _a, _b; 24964 if (value.length === 1 && isObject(value[0])) { 24965 if (((_a = value[0]) === null || _a === void 0 ? void 0 : _a.timeZoneOffset) !== undefined) { 24966 modifierWithKey(this._modifiersWithKeys, TextClockTimeZoneOffsetModifier.identity, TextClockTimeZoneOffsetModifier, value[0].timeZoneOffset); 24967 } else { 24968 modifierWithKey(this._modifiersWithKeys, TextClockTimeZoneOffsetModifier.identity, TextClockTimeZoneOffsetModifier, undefined); 24969 } 24970 if (((_b = value[0]) === null || _b === void 0 ? void 0 : _b.controller) !== undefined) { 24971 modifierWithKey(this._modifiersWithKeys, TextClockControllerModifier.identity, TextClockControllerModifier, value[0].controller); 24972 } else { 24973 modifierWithKey(this._modifiersWithKeys, TextClockControllerModifier.identity, TextClockControllerModifier, undefined); 24974 } 24975 } 24976 else { 24977 modifierWithKey(this._modifiersWithKeys, TextClockTimeZoneOffsetModifier.identity, TextClockTimeZoneOffsetModifier, undefined); 24978 modifierWithKey(this._modifiersWithKeys, TextClockControllerModifier.identity, TextClockControllerModifier, undefined); 24979 } 24980 return this; 24981 } 24982 format(value) { 24983 modifierWithKey(this._modifiersWithKeys, TextClockFormatModifier.identity, TextClockFormatModifier, value); 24984 return this; 24985 } 24986 onDateChange(event) { 24987 throw new Error('Method not implemented.'); 24988 } 24989 fontColor(value) { 24990 modifierWithKey(this._modifiersWithKeys, TextClockFontColorModifier.identity, TextClockFontColorModifier, value); 24991 return this; 24992 } 24993 fontSize(value) { 24994 modifierWithKey(this._modifiersWithKeys, TextClockFontSizeModifier.identity, TextClockFontSizeModifier, value); 24995 return this; 24996 } 24997 fontStyle(value) { 24998 modifierWithKey(this._modifiersWithKeys, TextClockFontStyleModifier.identity, TextClockFontStyleModifier, value); 24999 return this; 25000 } 25001 fontWeight(value) { 25002 modifierWithKey(this._modifiersWithKeys, TextClockFontWeightModifier.identity, TextClockFontWeightModifier, value); 25003 return this; 25004 } 25005 fontFamily(value) { 25006 modifierWithKey(this._modifiersWithKeys, TextClockFontFamilyModifier.identity, TextClockFontFamilyModifier, value); 25007 return this; 25008 } 25009 textShadow(value) { 25010 modifierWithKey(this._modifiersWithKeys, TextClockTextShadowModifier.identity, TextClockTextShadowModifier, value); 25011 return this; 25012 } 25013 fontFeature(value) { 25014 modifierWithKey(this._modifiersWithKeys, TextClockFontFeatureModifier.identity, TextClockFontFeatureModifier, value); 25015 return this; 25016 } 25017 contentModifier(value) { 25018 modifierWithKey(this._modifiersWithKeys, TextClockContentModifier.identity, TextClockContentModifier, value); 25019 return this; 25020 } 25021 setContentModifier(modifier) { 25022 if (modifier === undefined || modifier === null) { 25023 getUINativeModule().textClock.setContentModifierBuilder(this.nativePtr, false); 25024 return; 25025 } 25026 this.needRebuild = false; 25027 if (this.builder !== modifier.applyContent()) { 25028 this.needRebuild = true; 25029 } 25030 this.builder = modifier.applyContent(); 25031 this.modifier = modifier; 25032 getUINativeModule().textClock.setContentModifierBuilder(this.nativePtr, this); 25033 } 25034 makeContentModifierNode(context, textClockConfiguration) { 25035 textClockConfiguration.contentModifier = this.modifier; 25036 if (isUndefined(this.textClockNode) || this.needRebuild) { 25037 const xNode = globalThis.requireNapi('arkui.node'); 25038 this.textClockNode = new xNode.BuilderNode(context); 25039 this.textClockNode.build(this.builder, textClockConfiguration); 25040 this.needRebuild = false; 25041 } else { 25042 this.textClockNode.update(textClockConfiguration); 25043 } 25044 return this.textClockNode.getFrameNode(); 25045 } 25046 dateTimeOptions(value) { 25047 modifierWithKey(this._modifiersWithKeys, TextClockDateTimeOptionsModifier.identity, TextClockDateTimeOptionsModifier, value); 25048 return this; 25049 } 25050} 25051class TextClockTimeZoneOffsetModifier extends ModifierWithKey { 25052 constructor(value) { 25053 super(value); 25054 } 25055 applyPeer(node, reset) { 25056 if (reset) { 25057 getUINativeModule().textClock.setTextClockTimeZoneOffset(node, undefined); 25058 } else { 25059 getUINativeModule().textClock.setTextClockTimeZoneOffset(node, this.value); 25060 } 25061 } 25062 checkObjectDiff() { 25063 return !isBaseOrResourceEqual(this.stageValue, this.value); 25064 } 25065} 25066TextClockTimeZoneOffsetModifier.identity = Symbol('textClockTimeZoneOffset'); 25067class TextClockControllerModifier extends ModifierWithKey { 25068 constructor(value) { 25069 super(value); 25070 } 25071 applyPeer(node, reset) { 25072 if (reset) { 25073 getUINativeModule().textClock.setTextClockController(node, undefined); 25074 } else { 25075 getUINativeModule().textClock.setTextClockController(node, this.value); 25076 } 25077 } 25078 checkObjectDiff() { 25079 return !isBaseOrResourceEqual(this.stageValue, this.value); 25080 } 25081} 25082TextClockControllerModifier.identity = Symbol('textClockController'); 25083class TextClockFormatModifier extends ModifierWithKey { 25084 constructor(value) { 25085 super(value); 25086 } 25087 applyPeer(node, reset) { 25088 if (reset) { 25089 getUINativeModule().textClock.resetFormat(node); 25090 } 25091 else { 25092 getUINativeModule().textClock.setFormat(node, this.value); 25093 } 25094 } 25095} 25096TextClockFormatModifier.identity = Symbol('textClockFormat'); 25097class TextClockFontColorModifier extends ModifierWithKey { 25098 constructor(value) { 25099 super(value); 25100 } 25101 applyPeer(node, reset) { 25102 if (reset) { 25103 getUINativeModule().textClock.resetFontColor(node); 25104 } 25105 else { 25106 getUINativeModule().textClock.setFontColor(node, this.value); 25107 } 25108 } 25109 checkObjectDiff() { 25110 return !isBaseOrResourceEqual(this.stageValue, this.value); 25111 } 25112} 25113TextClockFontColorModifier.identity = Symbol('textClockFontColor'); 25114class TextClockFontSizeModifier extends ModifierWithKey { 25115 constructor(value) { 25116 super(value); 25117 } 25118 applyPeer(node, reset) { 25119 if (reset) { 25120 getUINativeModule().textClock.resetFontSize(node); 25121 } 25122 else { 25123 getUINativeModule().textClock.setFontSize(node, this.value); 25124 } 25125 } 25126 checkObjectDiff() { 25127 return !isBaseOrResourceEqual(this.stageValue, this.value); 25128 } 25129} 25130TextClockFontSizeModifier.identity = Symbol('textClockFontSize'); 25131class TextClockFontStyleModifier extends ModifierWithKey { 25132 constructor(value) { 25133 super(value); 25134 } 25135 applyPeer(node, reset) { 25136 if (reset) { 25137 getUINativeModule().textClock.resetFontStyle(node); 25138 } 25139 else { 25140 getUINativeModule().textClock.setFontStyle(node, this.value); 25141 } 25142 } 25143} 25144TextClockFontStyleModifier.identity = Symbol('textClockFontStyle'); 25145class TextClockFontWeightModifier extends ModifierWithKey { 25146 constructor(value) { 25147 super(value); 25148 } 25149 applyPeer(node, reset) { 25150 if (reset) { 25151 getUINativeModule().textClock.resetFontWeight(node); 25152 } 25153 else { 25154 getUINativeModule().textClock.setFontWeight(node, this.value); 25155 } 25156 } 25157} 25158TextClockFontWeightModifier.identity = Symbol('textClockFontWeight'); 25159class TextClockFontFamilyModifier extends ModifierWithKey { 25160 constructor(value) { 25161 super(value); 25162 } 25163 applyPeer(node, reset) { 25164 if (reset) { 25165 getUINativeModule().textClock.resetFontFamily(node); 25166 } 25167 else { 25168 getUINativeModule().textClock.setFontFamily(node, this.value); 25169 } 25170 } 25171 checkObjectDiff() { 25172 return !isBaseOrResourceEqual(this.stageValue, this.value); 25173 } 25174} 25175TextClockFontFamilyModifier.identity = Symbol('textClockFontFamily'); 25176class TextClockFontFeatureModifier extends ModifierWithKey { 25177 constructor(value) { 25178 super(value); 25179 } 25180 applyPeer(node, reset) { 25181 if (reset) { 25182 getUINativeModule().textClock.resetFontFeature(node); 25183 } 25184 else { 25185 getUINativeModule().textClock.setFontFeature(node, this.value); 25186 } 25187 } 25188 checkObjectDiff() { 25189 return !isBaseOrResourceEqual(this.stageValue, this.value); 25190 } 25191} 25192TextClockFontFeatureModifier.identity = Symbol('textClockFontFeature'); 25193class TextClockContentModifier extends ModifierWithKey { 25194 constructor(value) { 25195 super(value); 25196 } 25197 applyPeer(node, reset, component) { 25198 let textClockComponent = component; 25199 textClockComponent.setContentModifier(this.value); 25200 } 25201} 25202TextClockContentModifier.identity = Symbol('textClockContentModifier'); 25203class TextClockTextShadowModifier extends ModifierWithKey { 25204 constructor(value) { 25205 super(value); 25206 } 25207 applyPeer(node, reset) { 25208 if (reset) { 25209 getUINativeModule().textClock.resetTextShadow(node); 25210 } 25211 else { 25212 let shadow = new ArkShadowInfoToArray(); 25213 if (!shadow.convertShadowOptions(this.value)) { 25214 getUINativeModule().textClock.resetTextShadow(node); 25215 } 25216 else { 25217 getUINativeModule().textClock.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 25218 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 25219 } 25220 } 25221 } 25222 checkObjectDiff() { 25223 let checkDiff = true; 25224 let arkShadow = new ArkShadowInfoToArray(); 25225 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 25226 Object.getPrototypeOf(this.value).constructor === Object) { 25227 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 25228 } 25229 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 25230 Object.getPrototypeOf(this.value).constructor === Array && 25231 this.stageValue.length === this.value.length) { 25232 let isDiffItem = false; 25233 for (let i = 0; i < this.value.length; i++) { 25234 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 25235 isDiffItem = true; 25236 break; 25237 } 25238 } 25239 if (!isDiffItem) { 25240 checkDiff = false; 25241 } 25242 } 25243 return checkDiff; 25244 } 25245} 25246TextClockTextShadowModifier.identity = Symbol('textClockTextShadow'); 25247 25248class TextClockDateTimeOptionsModifier extends ModifierWithKey { 25249 constructor(value) { 25250 super(value); 25251 } 25252 applyPeer(node, reset) { 25253 if (reset) { 25254 getUINativeModule().textClock.resetDateTimeOptions(node); 25255 } 25256 else { 25257 getUINativeModule().textClock.setDateTimeOptions(node, this.value.hour); 25258 } 25259 } 25260 checkObjectDiff() { 25261 return !isBaseOrResourceEqual(this.stageValue, this.value); 25262 } 25263} 25264TextClockDateTimeOptionsModifier.identity = Symbol('textClockDateTimeOptions'); 25265 25266// @ts-ignore 25267if (globalThis.TextClock !== undefined) { 25268 globalThis.TextClock.attributeModifier = function (modifier) { 25269 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25270 return new ArkTextClockComponent(nativePtr); 25271 }, (nativePtr, classType, modifierJS) => { 25272 return new modifierJS.TextClockModifier(nativePtr, classType); 25273 }); 25274 }; 25275 globalThis.TextClock.contentModifier = function (modifier) { 25276 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 25277 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 25278 let component = this.createOrGetNode(elmtId, () => { 25279 return new ArkTextClockComponent(nativeNode); 25280 }); 25281 component.setContentModifier(modifier); 25282 }; 25283} 25284 25285/// <reference path='./import.ts' /> 25286class ArkTextTimerComponent extends ArkComponent { 25287 constructor(nativePtr, classType) { 25288 super(nativePtr, classType); 25289 } 25290 allowChildCount() { 25291 return 0; 25292 } 25293 initialize(value) { 25294 if (value.length === 1 && isObject(value[0])) { 25295 modifierWithKey(this._modifiersWithKeys, TextTimerOptionsModifier.identity, TextTimerOptionsModifier, value[0]); 25296 } else { 25297 modifierWithKey(this._modifiersWithKeys, TextTimerOptionsModifier.identity, TextTimerOptionsModifier, undefined); 25298 } 25299 return this; 25300 } 25301 fontColor(value) { 25302 modifierWithKey(this._modifiersWithKeys, TextTimerFontColorModifier.identity, TextTimerFontColorModifier, value); 25303 return this; 25304 } 25305 fontSize(value) { 25306 modifierWithKey(this._modifiersWithKeys, TextTimerFontSizeModifier.identity, TextTimerFontSizeModifier, value); 25307 return this; 25308 } 25309 fontWeight(value) { 25310 modifierWithKey(this._modifiersWithKeys, TextTimerFontWeightModifier.identity, TextTimerFontWeightModifier, value); 25311 return this; 25312 } 25313 fontStyle(value) { 25314 modifierWithKey(this._modifiersWithKeys, TextTimerFontStyleModifier.identity, TextTimerFontStyleModifier, value); 25315 return this; 25316 } 25317 fontFamily(value) { 25318 modifierWithKey(this._modifiersWithKeys, TextTimerFontFamilyModifier.identity, TextTimerFontFamilyModifier, value); 25319 return this; 25320 } 25321 format(value) { 25322 modifierWithKey(this._modifiersWithKeys, TextTimerFormatModifier.identity, TextTimerFormatModifier, value); 25323 return this; 25324 } 25325 textShadow(value) { 25326 modifierWithKey(this._modifiersWithKeys, TextTimerTextShadowModifier.identity, TextTimerTextShadowModifier, value); 25327 return this; 25328 } 25329 contentModifier(value) { 25330 modifierWithKey(this._modifiersWithKeys, TextTimerContentModifier.identity, TextTimerContentModifier, value); 25331 return this; 25332 } 25333 setContentModifier(modifier) { 25334 if (modifier === undefined || modifier === null) { 25335 getUINativeModule().textTimer.setContentModifierBuilder(this.nativePtr, false); 25336 return; 25337 } 25338 this.builder = modifier.applyContent(); 25339 this.modifier = modifier; 25340 getUINativeModule().textTimer.setContentModifierBuilder(this.nativePtr, this); 25341 } 25342 makeContentModifierNode(context, textTimerConfiguration) { 25343 textTimerConfiguration.contentModifier = this.modifier; 25344 if (isUndefined(this.textTimerNode)) { 25345 let xNode = globalThis.requireNapi('arkui.node'); 25346 this.textTimerNode = new xNode.BuilderNode(context); 25347 this.textTimerNode.build(this.builder, textTimerConfiguration); 25348 } else { 25349 this.textTimerNode.update(textTimerConfiguration); 25350 } 25351 return this.textTimerNode.getFrameNode(); 25352 } 25353 onTimer(event) { 25354 throw new Error('Method not implemented.'); 25355 } 25356} 25357class TextTimerOptionsModifier extends ModifierWithKey { 25358 constructor(value) { 25359 super(value); 25360 } 25361 applyPeer(node, reset) { 25362 let _a, _b, _c; 25363 if (reset) { 25364 getUINativeModule().textTimer.setTextTimerOptions(node, undefined, undefined, undefined); 25365 } 25366 else { 25367 getUINativeModule().textTimer.setTextTimerOptions(node, 25368 (_a = this.value) === null || _a === void 0 ? void 0 : _a.isCountDown, 25369 (_b = this.value) === null || _b === void 0 ? void 0 : _b.count, 25370 (_c = this.value) === null || _c === void 0 ? void 0 : _c.controller); 25371 } 25372 } 25373 checkObjectDiff() { 25374 let _a, _b, _c, _d, _e, _f; 25375 return !isBaseOrResourceEqual((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.isCountDown, 25376 (_b = this.value) === null || _b === void 0 ? void 0 : _b.isCountDown) || 25377 !isBaseOrResourceEqual((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.count, 25378 (_d = this.value) === null || _d === void 0 ? void 0 : _d.count) || 25379 !isBaseOrResourceEqual((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.controller, 25380 (_f = this.value) === null || _f === void 0 ? void 0 : _f.controller); 25381 } 25382} 25383TextTimerOptionsModifier.identity = Symbol('textTimerOptions'); 25384class TextTimerFontColorModifier extends ModifierWithKey { 25385 applyPeer(node, reset) { 25386 if (reset) { 25387 getUINativeModule().textTimer.resetFontColor(node); 25388 } 25389 else { 25390 getUINativeModule().textTimer.setFontColor(node, this.value); 25391 } 25392 } 25393 checkObjectDiff() { 25394 return !isBaseOrResourceEqual(this.stageValue, this.value); 25395 } 25396} 25397TextTimerFontColorModifier.identity = Symbol('fontColor'); 25398class TextTimerFontSizeModifier extends ModifierWithKey { 25399 applyPeer(node, reset) { 25400 if (reset) { 25401 getUINativeModule().textTimer.resetFontSize(node); 25402 } 25403 else { 25404 getUINativeModule().textTimer.setFontSize(node, this.value); 25405 } 25406 } 25407 checkObjectDiff() { 25408 return !isBaseOrResourceEqual(this.stageValue, this.value); 25409 } 25410} 25411TextTimerFontSizeModifier.identity = Symbol('fontSize'); 25412class TextTimerFontWeightModifier extends ModifierWithKey { 25413 applyPeer(node, reset) { 25414 if (reset) { 25415 getUINativeModule().textTimer.resetFontWeight(node); 25416 } 25417 else { 25418 getUINativeModule().textTimer.setFontWeight(node, this.value); 25419 } 25420 } 25421} 25422TextTimerFontWeightModifier.identity = Symbol('fontWeight'); 25423class TextTimerFontStyleModifier extends ModifierWithKey { 25424 applyPeer(node, reset) { 25425 if (reset) { 25426 getUINativeModule().textTimer.resetFontStyle(node); 25427 } 25428 else { 25429 getUINativeModule().textTimer.setFontStyle(node, this.value); 25430 } 25431 } 25432 checkObjectDiff() { 25433 return !isBaseOrResourceEqual(this.stageValue, this.value); 25434 } 25435} 25436TextTimerFontStyleModifier.identity = Symbol('fontStyle'); 25437class TextTimerFontFamilyModifier extends ModifierWithKey { 25438 applyPeer(node, reset) { 25439 if (reset) { 25440 getUINativeModule().textTimer.resetFontFamily(node); 25441 } 25442 else { 25443 getUINativeModule().textTimer.setFontFamily(node, this.value); 25444 } 25445 } 25446 checkObjectDiff() { 25447 return !isBaseOrResourceEqual(this.stageValue, this.value); 25448 } 25449} 25450TextTimerFontFamilyModifier.identity = Symbol('fontFamily'); 25451class TextTimerFormatModifier extends ModifierWithKey { 25452 applyPeer(node, reset) { 25453 if (reset) { 25454 getUINativeModule().textTimer.resetFormat(node); 25455 } 25456 else { 25457 getUINativeModule().textTimer.setFormat(node, this.value); 25458 } 25459 } 25460} 25461TextTimerFormatModifier.identity = Symbol('textTimerFormat'); 25462class TextTimerTextShadowModifier extends ModifierWithKey { 25463 constructor(value) { 25464 super(value); 25465 } 25466 applyPeer(node, reset) { 25467 if (reset) { 25468 getUINativeModule().textTimer.resetTextShadow(node); 25469 } 25470 else { 25471 let shadow = new ArkShadowInfoToArray(); 25472 if (!shadow.convertShadowOptions(this.value)) { 25473 getUINativeModule().textTimer.resetTextShadow(node); 25474 } 25475 else { 25476 getUINativeModule().textTimer.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 25477 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 25478 } 25479 } 25480 } 25481 checkObjectDiff() { 25482 let checkDiff = true; 25483 let arkShadow = new ArkShadowInfoToArray(); 25484 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 25485 Object.getPrototypeOf(this.value).constructor === Object) { 25486 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 25487 } 25488 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 25489 Object.getPrototypeOf(this.value).constructor === Array && 25490 this.stageValue.length === this.value.length) { 25491 let isDiffItem = false; 25492 for (let i = 0; i < this.value.length; i++) { 25493 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 25494 isDiffItem = true; 25495 break; 25496 } 25497 } 25498 if (!isDiffItem) { 25499 checkDiff = false; 25500 } 25501 } 25502 return checkDiff; 25503 } 25504} 25505TextTimerTextShadowModifier.identity = Symbol('textTimerTextShadow'); 25506class TextTimerContentModifier extends ModifierWithKey { 25507 constructor(value) { 25508 super(value); 25509 } 25510 applyPeer(node, reset, component) { 25511 let textTimerComponent = component; 25512 textTimerComponent.setContentModifier(this.value); 25513 } 25514} 25515TextTimerContentModifier.identity = Symbol('textTimerContentModifier'); 25516// @ts-ignore 25517if (globalThis.TextTimer !== undefined) { 25518 globalThis.TextTimer.attributeModifier = function (modifier) { 25519 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25520 return new ArkTextTimerComponent(nativePtr); 25521 }, (nativePtr, classType, modifierJS) => { 25522 return new modifierJS.TextTimerModifier(nativePtr, classType); 25523 }); 25524 }; 25525 globalThis.TextTimer.contentModifier = function (modifier) { 25526 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 25527 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 25528 let component = this.createOrGetNode(elmtId, () => { 25529 return new ArkTextTimerComponent(nativeNode); 25530 }); 25531 component.setContentModifier(modifier); 25532 }; 25533} 25534 25535/// <reference path='./import.ts' /> 25536class ArkWebComponent extends ArkComponent { 25537 constructor(nativePtr, classType) { 25538 super(nativePtr, classType); 25539 } 25540 javaScriptAccess(javaScriptAccess) { 25541 throw new Error('Method not implemented.'); 25542 } 25543 fileAccess(fileAccess) { 25544 throw new Error('Method not implemented.'); 25545 } 25546 onlineImageAccess(onlineImageAccess) { 25547 throw new Error('Method not implemented.'); 25548 } 25549 domStorageAccess(domStorageAccess) { 25550 throw new Error('Method not implemented.'); 25551 } 25552 imageAccess(imageAccess) { 25553 throw new Error('Method not implemented.'); 25554 } 25555 mixedMode(mixedMode) { 25556 throw new Error('Method not implemented.'); 25557 } 25558 zoomAccess(zoomAccess) { 25559 throw new Error('Method not implemented.'); 25560 } 25561 geolocationAccess(geolocationAccess) { 25562 throw new Error('Method not implemented.'); 25563 } 25564 javaScriptProxy(javaScriptProxy) { 25565 throw new Error('Method not implemented.'); 25566 } 25567 password(password) { 25568 throw new Error('Method not implemented.'); 25569 } 25570 cacheMode(cacheMode) { 25571 throw new Error('Method not implemented.'); 25572 } 25573 darkMode(mode) { 25574 throw new Error('Method not implemented.'); 25575 } 25576 forceDarkAccess(access) { 25577 throw new Error('Method not implemented.'); 25578 } 25579 mediaOptions(options) { 25580 throw new Error('Method not implemented.'); 25581 } 25582 tableData(tableData) { 25583 throw new Error('Method not implemented.'); 25584 } 25585 wideViewModeAccess(wideViewModeAccess) { 25586 throw new Error('Method not implemented.'); 25587 } 25588 overviewModeAccess(overviewModeAccess) { 25589 throw new Error('Method not implemented.'); 25590 } 25591 overScrollMode(mode) { 25592 throw new Error('Method not implemented.'); 25593 } 25594 textZoomAtio(textZoomAtio) { 25595 throw new Error('Method not implemented.'); 25596 } 25597 textZoomRatio(textZoomRatio) { 25598 throw new Error('Method not implemented.'); 25599 } 25600 databaseAccess(databaseAccess) { 25601 throw new Error('Method not implemented.'); 25602 } 25603 initialScale(percent) { 25604 throw new Error('Method not implemented.'); 25605 } 25606 userAgent(userAgent) { 25607 throw new Error('Method not implemented.'); 25608 } 25609 onPageEnd(callback) { 25610 throw new Error('Method not implemented.'); 25611 } 25612 onPageBegin(callback) { 25613 throw new Error('Method not implemented.'); 25614 } 25615 onProgressChange(callback) { 25616 throw new Error('Method not implemented.'); 25617 } 25618 onTitleReceive(callback) { 25619 throw new Error('Method not implemented.'); 25620 } 25621 onGeolocationHide(callback) { 25622 throw new Error('Method not implemented.'); 25623 } 25624 onGeolocationShow(callback) { 25625 throw new Error('Method not implemented.'); 25626 } 25627 onRequestSelected(callback) { 25628 throw new Error('Method not implemented.'); 25629 } 25630 onAlert(callback) { 25631 throw new Error('Method not implemented.'); 25632 } 25633 onBeforeUnload(callback) { 25634 throw new Error('Method not implemented.'); 25635 } 25636 onConfirm(callback) { 25637 throw new Error('Method not implemented.'); 25638 } 25639 onPrompt(callback) { 25640 throw new Error('Method not implemented.'); 25641 } 25642 onConsole(callback) { 25643 throw new Error('Method not implemented.'); 25644 } 25645 onErrorReceive(callback) { 25646 throw new Error('Method not implemented.'); 25647 } 25648 onHttpErrorReceive(callback) { 25649 throw new Error('Method not implemented.'); 25650 } 25651 onDownloadStart(callback) { 25652 throw new Error('Method not implemented.'); 25653 } 25654 onRefreshAccessedHistory(callback) { 25655 throw new Error('Method not implemented.'); 25656 } 25657 onUrlLoadIntercept(callback) { 25658 throw new Error('Method not implemented.'); 25659 } 25660 onSslErrorReceive(callback) { 25661 throw new Error('Method not implemented.'); 25662 } 25663 onRenderExited(callback) { 25664 throw new Error('Method not implemented.'); 25665 } 25666 onShowFileSelector(callback) { 25667 throw new Error('Method not implemented.'); 25668 } 25669 onFileSelectorShow(callback) { 25670 throw new Error('Method not implemented.'); 25671 } 25672 onResourceLoad(callback) { 25673 throw new Error('Method not implemented.'); 25674 } 25675 onFullScreenExit(callback) { 25676 throw new Error('Method not implemented.'); 25677 } 25678 onFullScreenEnter(callback) { 25679 throw new Error('Method not implemented.'); 25680 } 25681 onScaleChange(callback) { 25682 throw new Error('Method not implemented.'); 25683 } 25684 onHttpAuthRequest(callback) { 25685 throw new Error('Method not implemented.'); 25686 } 25687 onInterceptRequest(callback) { 25688 throw new Error('Method not implemented.'); 25689 } 25690 onPermissionRequest(callback) { 25691 throw new Error('Method not implemented.'); 25692 } 25693 onScreenCaptureRequest(callback) { 25694 throw new Error('Method not implemented.'); 25695 } 25696 onContextMenuShow(callback) { 25697 throw new Error('Method not implemented.'); 25698 } 25699 mediaPlayGestureAccess(access) { 25700 throw new Error('Method not implemented.'); 25701 } 25702 onSearchResultReceive(callback) { 25703 throw new Error('Method not implemented.'); 25704 } 25705 onScroll(callback) { 25706 throw new Error('Method not implemented.'); 25707 } 25708 onSslErrorEventReceive(callback) { 25709 throw new Error('Method not implemented.'); 25710 } 25711 onSslErrorEvent(callback) { 25712 throw new Error('Method not implemented.'); 25713 } 25714 onClientAuthenticationRequest(callback) { 25715 throw new Error('Method not implemented.'); 25716 } 25717 onWindowNew(callback) { 25718 throw new Error('Method not implemented.'); 25719 } 25720 onWindowExit(callback) { 25721 throw new Error('Method not implemented.'); 25722 } 25723 multiWindowAccess(multiWindow) { 25724 throw new Error('Method not implemented.'); 25725 } 25726 onInterceptKeyEvent(callback) { 25727 throw new Error('Method not implemented.'); 25728 } 25729 webStandardFont(family) { 25730 throw new Error('Method not implemented.'); 25731 } 25732 webSerifFont(family) { 25733 throw new Error('Method not implemented.'); 25734 } 25735 webSansSerifFont(family) { 25736 throw new Error('Method not implemented.'); 25737 } 25738 webFixedFont(family) { 25739 throw new Error('Method not implemented.'); 25740 } 25741 webFantasyFont(family) { 25742 throw new Error('Method not implemented.'); 25743 } 25744 webCursiveFont(family) { 25745 throw new Error('Method not implemented.'); 25746 } 25747 defaultFixedFontSize(size) { 25748 throw new Error('Method not implemented.'); 25749 } 25750 defaultFontSize(size) { 25751 throw new Error('Method not implemented.'); 25752 } 25753 minFontSize(size) { 25754 throw new Error('Method not implemented.'); 25755 } 25756 minLogicalFontSize(size) { 25757 throw new Error('Method not implemented.'); 25758 } 25759 blockNetwork(block) { 25760 throw new Error('Method not implemented.'); 25761 } 25762 horizontalScrollBarAccess(horizontalScrollBar) { 25763 throw new Error('Method not implemented.'); 25764 } 25765 verticalScrollBarAccess(verticalScrollBar) { 25766 throw new Error('Method not implemented.'); 25767 } 25768 onTouchIconUrlReceived(callback) { 25769 throw new Error('Method not implemented.'); 25770 } 25771 onFaviconReceived(callback) { 25772 throw new Error('Method not implemented.'); 25773 } 25774 onPageVisible(callback) { 25775 throw new Error('Method not implemented.'); 25776 } 25777 onDataResubmitted(callback) { 25778 throw new Error('Method not implemented.'); 25779 } 25780 pinchSmooth(isEnabled) { 25781 throw new Error('Method not implemented.'); 25782 } 25783 allowWindowOpenMethod(flag) { 25784 throw new Error('Method not implemented.'); 25785 } 25786 onAudioStateChanged(callback) { 25787 throw new Error('Method not implemented.'); 25788 } 25789 onFirstContentfulPaint(callback) { 25790 throw new Error('Method not implemented.'); 25791 } 25792 onLoadIntercept(callback) { 25793 throw new Error('Method not implemented.'); 25794 } 25795 onControllerAttached(callback) { 25796 throw new Error('Method not implemented.'); 25797 } 25798 onOverScroll(callback) { 25799 throw new Error('Method not implemented.'); 25800 } 25801 javaScriptOnDocumentStart(scripts) { 25802 throw new Error('Method not implemented.'); 25803 } 25804 layoutMode(mode) { 25805 throw new Error('Method not implemented.'); 25806 } 25807 nestedScroll(value) { 25808 throw new Error('Method not implemented.'); 25809 } 25810 onOverrideUrlLoading(callback) { 25811 throw new Error('Method not implemented.'); 25812 } 25813 enableNativeMediaPlayer(config) { 25814 throw new Error('Method not implemented.'); 25815 } 25816 onRenderProcessNotResponding(callback) { 25817 throw new Error('Method not implemented.'); 25818 } 25819 onRenderProcessResponding(callback) { 25820 throw new Error('Method not implemented.'); 25821 } 25822 onViewportFitChanged(callback) { 25823 throw new Error('Method not implemented.'); 25824 } 25825 onAdsBlocked(callback) { 25826 throw new Error('Method not implemented.'); 25827 } 25828} 25829// @ts-ignore 25830if (globalThis.Web !== undefined) { 25831 globalThis.Web.attributeModifier = function (modifier) { 25832 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25833 return new ArkWebComponent(nativePtr); 25834 }, (nativePtr, classType, modifierJS) => { 25835 return new modifierJS.CommonModifier(nativePtr, classType); 25836 }); 25837 }; 25838} 25839 25840/// <reference path='./import.ts' /> 25841class ArkXComponentComponent extends ArkComponent { 25842 constructor(nativePtr, classType) { 25843 super(nativePtr, classType); 25844 } 25845 allowChildCount() { 25846 return 0; 25847 } 25848 initialize(value) { 25849 if (value[0]) { 25850 modifierWithKey(this._modifiersWithKeys, XComponentInitializeModifier.identity, 25851 XComponentInitializeModifier, value[0]); 25852 } 25853 return this; 25854 } 25855 applyModifierPatch() { 25856 let expiringItemsWithKeys = []; 25857 this._modifiersWithKeys.forEach((value, key) => { 25858 if (value.applyStage(this.nativePtr)) { 25859 expiringItemsWithKeys.push(key); 25860 } 25861 }); 25862 expiringItemsWithKeys.forEach(key => { 25863 this._modifiersWithKeys.delete(key); 25864 }); 25865 } 25866 outline(value) { 25867 throw new Error('Method not implemented.'); 25868 } 25869 outlineColor(value) { 25870 throw new Error('Method not implemented.'); 25871 } 25872 outlineRadius(value) { 25873 throw new Error('Method not implemented.'); 25874 } 25875 outlineStyle(value) { 25876 throw new Error('Method not implemented.'); 25877 } 25878 outlineWidth(value) { 25879 throw new Error('Method not implemented.'); 25880 } 25881 expandSafeArea(types, edges) { 25882 throw new Error('Method not implemented.'); 25883 } 25884 responseRegion(value) { 25885 throw new Error('Method not implemented.'); 25886 } 25887 mouseResponseRegion(value) { 25888 throw new Error('Method not implemented.'); 25889 } 25890 size(value) { 25891 throw new Error('Method not implemented.'); 25892 } 25893 constraintSize(value) { 25894 throw new Error('Method not implemented.'); 25895 } 25896 touchable(value) { 25897 throw new Error('Method not implemented.'); 25898 } 25899 hitTestBehavior(value) { 25900 throw new Error('Method not implemented.'); 25901 } 25902 layoutWeight(value) { 25903 throw new Error('Method not implemented.'); 25904 } 25905 padding(value) { 25906 throw new Error('Method not implemented.'); 25907 } 25908 margin(value) { 25909 throw new Error('Method not implemented.'); 25910 } 25911 background(builder, options) { 25912 throw new Error('Method not implemented.'); 25913 } 25914 backgroundColor(value) { 25915 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundColorModifier.identity, XComponentBackgroundColorModifier, value); 25916 return this; 25917 } 25918 backgroundImage(src, repeat) { 25919 let arkBackgroundImage = new ArkBackgroundImage(); 25920 arkBackgroundImage.src = src; 25921 arkBackgroundImage.repeat = repeat; 25922 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundImageModifier.identity, XComponentBackgroundImageModifier, arkBackgroundImage); 25923 return this; 25924 } 25925 backgroundImageSize(value) { 25926 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundImageSizeModifier.identity, XComponentBackgroundImageSizeModifier, value); 25927 return this; 25928 } 25929 backgroundImagePosition(value) { 25930 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundImagePositionModifier.identity, XComponentBackgroundImagePositionModifier, value); 25931 return this; 25932 } 25933 backgroundBlurStyle(value, options) { 25934 throw new Error('Method not implemented.'); 25935 } 25936 foregroundBlurStyle(value, options) { 25937 throw new Error('Method not implemented.'); 25938 } 25939 opacity(value) { 25940 modifierWithKey(this._modifiersWithKeys, XComponentOpacityModifier.identity, XComponentOpacityModifier, value); 25941 return this; 25942 } 25943 border(value) { 25944 throw new Error('Method not implemented.'); 25945 } 25946 borderStyle(value) { 25947 throw new Error('Method not implemented.'); 25948 } 25949 borderWidth(value) { 25950 throw new Error('Method not implemented.'); 25951 } 25952 borderColor(value) { 25953 throw new Error('Method not implemented.'); 25954 } 25955 borderRadius(value) { 25956 throw new Error('Method not implemented.'); 25957 } 25958 borderImage(value) { 25959 throw new Error('Method not implemented.'); 25960 } 25961 foregroundColor(value) { 25962 throw new Error('Method not implemented.'); 25963 } 25964 onClick(event) { 25965 throw new Error('Method not implemented.'); 25966 } 25967 onHover(event) { 25968 throw new Error('Method not implemented.'); 25969 } 25970 hoverEffect(value) { 25971 throw new Error('Method not implemented.'); 25972 } 25973 onHoverMove(event) { 25974 if (this.xComponentType === XComponentType.NODE || isUndefined(this.libraryname)) { 25975 modifierWithKey(this._modifiersWithKeys, OnHoverMoveModifier.identity, OnHoverMoveModifier, event); 25976 } 25977 return this; 25978 } 25979 onMouse(event) { 25980 throw new Error('Method not implemented.'); 25981 } 25982 onTouch(event) { 25983 throw new Error('Method not implemented.'); 25984 } 25985 onKeyEvent(event) { 25986 throw new Error('Method not implemented.'); 25987 } 25988 onFocus(event) { 25989 throw new Error('Method not implemented.'); 25990 } 25991 onBlur(event) { 25992 throw new Error('Method not implemented.'); 25993 } 25994 tabIndex(index) { 25995 throw new Error('Method not implemented.'); 25996 } 25997 groupDefaultFocus(value) { 25998 throw new Error('Method not implemented.'); 25999 } 26000 animation(value) { 26001 throw new Error('Method not implemented.'); 26002 } 26003 transition(value) { 26004 throw new Error('Method not implemented.'); 26005 } 26006 gesture(gesture, mask) { 26007 throw new Error('Method not implemented.'); 26008 } 26009 priorityGesture(gesture, mask) { 26010 throw new Error('Method not implemented.'); 26011 } 26012 parallelGesture(gesture, mask) { 26013 throw new Error('Method not implemented.'); 26014 } 26015 blur(value) { 26016 modifierWithKey(this._modifiersWithKeys, XComponentBlurModifier.identity, XComponentBlurModifier, value); 26017 return this; 26018 } 26019 linearGradientBlur(value, options) { 26020 if (isUndefined(value) || isNull(value) || isUndefined(options) || isNull(options)) { 26021 modifierWithKey(this._modifiersWithKeys, XComponentLinearGradientBlurModifier.identity, XComponentLinearGradientBlurModifier, undefined); 26022 return this; 26023 } 26024 let arkLinearGradientBlur = new ArkLinearGradientBlur(); 26025 arkLinearGradientBlur.blurRadius = value; 26026 arkLinearGradientBlur.fractionStops = options.fractionStops; 26027 arkLinearGradientBlur.direction = options.direction; 26028 modifierWithKey(this._modifiersWithKeys, XComponentLinearGradientBlurModifier.identity, XComponentLinearGradientBlurModifier, arkLinearGradientBlur); 26029 return this; 26030 } 26031 brightness(value) { 26032 modifierWithKey(this._modifiersWithKeys, XComponentBrightnessModifier.identity, XComponentBrightnessModifier, value); 26033 return this; 26034 } 26035 contrast(value) { 26036 modifierWithKey(this._modifiersWithKeys, XComponentContrastModifier.identity, XComponentContrastModifier, value); 26037 return this; 26038 } 26039 grayscale(value) { 26040 modifierWithKey(this._modifiersWithKeys, XComponentGrayscaleModifier.identity, XComponentGrayscaleModifier, value); 26041 return this; 26042 } 26043 colorBlend(value) { 26044 modifierWithKey(this._modifiersWithKeys, XComponentColorBlendModifier.identity, XComponentColorBlendModifier, value); 26045 return this; 26046 } 26047 saturate(value) { 26048 modifierWithKey(this._modifiersWithKeys, XComponentSaturateModifier.identity, XComponentSaturateModifier, value); 26049 return this; 26050 } 26051 sepia(value) { 26052 modifierWithKey(this._modifiersWithKeys, XComponentSepiaModifier.identity, XComponentSepiaModifier, value); 26053 return this; 26054 } 26055 invert(value) { 26056 modifierWithKey(this._modifiersWithKeys, XComponentInvertModifier.identity, XComponentInvertModifier, value); 26057 return this; 26058 } 26059 hueRotate(value) { 26060 modifierWithKey(this._modifiersWithKeys, XComponentHueRotateModifier.identity, XComponentHueRotateModifier, value); 26061 return this; 26062 } 26063 useEffect(value) { 26064 throw new Error('Method not implemented.'); 26065 } 26066 backdropBlur(value) { 26067 modifierWithKey(this._modifiersWithKeys, XComponentBackdropBlurModifier.identity, XComponentBackdropBlurModifier, value); 26068 return this; 26069 } 26070 renderGroup(value) { 26071 throw new Error('Method not implemented.'); 26072 } 26073 translate(value) { 26074 throw new Error('Method not implemented.'); 26075 } 26076 scale(value) { 26077 throw new Error('Method not implemented.'); 26078 } 26079 gridSpan(value) { 26080 throw new Error('Method not implemented.'); 26081 } 26082 gridOffset(value) { 26083 throw new Error('Method not implemented.'); 26084 } 26085 rotate(value) { 26086 throw new Error('Method not implemented.'); 26087 } 26088 transform(value) { 26089 throw new Error('Method not implemented.'); 26090 } 26091 onAppear(event) { 26092 throw new Error('Method not implemented.'); 26093 } 26094 onDisAppear(event) { 26095 throw new Error('Method not implemented.'); 26096 } 26097 onAttach(event) { 26098 throw new Error('Method not implemented.'); 26099 } 26100 onDetach(event) { 26101 throw new Error('Method not implemented.'); 26102 } 26103 onAreaChange(event) { 26104 throw new Error('Method not implemented.'); 26105 } 26106 visibility(value) { 26107 throw new Error('Method not implemented.'); 26108 } 26109 flexGrow(value) { 26110 throw new Error('Method not implemented.'); 26111 } 26112 flexShrink(value) { 26113 throw new Error('Method not implemented.'); 26114 } 26115 flexBasis(value) { 26116 throw new Error('Method not implemented.'); 26117 } 26118 alignSelf(value) { 26119 throw new Error('Method not implemented.'); 26120 } 26121 displayPriority(value) { 26122 throw new Error('Method not implemented.'); 26123 } 26124 zIndex(value) { 26125 throw new Error('Method not implemented.'); 26126 } 26127 sharedTransition(id, options) { 26128 throw new Error('Method not implemented.'); 26129 } 26130 direction(value) { 26131 throw new Error('Method not implemented.'); 26132 } 26133 align(value) { 26134 throw new Error('Method not implemented.'); 26135 } 26136 position(value) { 26137 throw new Error('Method not implemented.'); 26138 } 26139 markAnchor(value) { 26140 throw new Error('Method not implemented.'); 26141 } 26142 offset(value) { 26143 throw new Error('Method not implemented.'); 26144 } 26145 enabled(value) { 26146 throw new Error('Method not implemented.'); 26147 } 26148 useSizeType(value) { 26149 throw new Error('Method not implemented.'); 26150 } 26151 alignRules(value) { 26152 throw new Error('Method not implemented.'); 26153 } 26154 aspectRatio(value) { 26155 throw new Error('Method not implemented.'); 26156 } 26157 clickEffect(value) { 26158 throw new Error('Method not implemented.'); 26159 } 26160 allowDrop(value) { 26161 throw new Error('Method not implemented.'); 26162 } 26163 privacySensitive(value) { 26164 throw new Error('Method not implemented.'); 26165 } 26166 overlay(value, options) { 26167 throw new Error('Method not implemented.'); 26168 } 26169 linearGradient(value) { 26170 throw new Error('Method not implemented.'); 26171 } 26172 sweepGradient(value) { 26173 throw new Error('Method not implemented.'); 26174 } 26175 radialGradient(value) { 26176 throw new Error('Method not implemented.'); 26177 } 26178 motionPath(value) { 26179 throw new Error('Method not implemented.'); 26180 } 26181 motionBlur(value) { 26182 throw new Error('Method not implemented.'); 26183 } 26184 shadow(value) { 26185 modifierWithKey(this._modifiersWithKeys, ShadowModifier.identity, ShadowModifier, value); 26186 return this; 26187 } 26188 blendMode(value) { 26189 throw new Error('Method not implemented.'); 26190 } 26191 clip(value) { 26192 throw new Error('Method not implemented.'); 26193 } 26194 mask(value) { 26195 throw new Error('Method not implemented.'); 26196 } 26197 key(value) { 26198 throw new Error('Method not implemented.'); 26199 } 26200 id(value) { 26201 throw new Error('Method not implemented.'); 26202 } 26203 geometryTransition(id) { 26204 throw new Error('Method not implemented.'); 26205 } 26206 bindPopup(show, popup) { 26207 throw new Error('Method not implemented.'); 26208 } 26209 bindMenu(content, options) { 26210 throw new Error('Method not implemented.'); 26211 } 26212 bindContextMenu(content, responseType, options) { 26213 throw new Error('Method not implemented.'); 26214 } 26215 bindContentCover(isShow, builder, options) { 26216 throw new Error('Method not implemented.'); 26217 } 26218 bindSheet(isShow, builder, options) { 26219 throw new Error('Method not implemented.'); 26220 } 26221 stateStyles(value) { 26222 throw new Error('Method not implemented.'); 26223 } 26224 restoreId(value) { 26225 throw new Error('Method not implemented.'); 26226 } 26227 onVisibleAreaChange(ratios, event) { 26228 throw new Error('Method not implemented.'); 26229 } 26230 sphericalEffect(value) { 26231 modifierWithKey(this._modifiersWithKeys, XComponentSphericalEffectModifier.identity, XComponentSphericalEffectModifier, value); 26232 return this; 26233 } 26234 lightUpEffect(value) { 26235 modifierWithKey(this._modifiersWithKeys, XComponentLightUpEffectModifier.identity, XComponentLightUpEffectModifier, value); 26236 return this; 26237 } 26238 pixelStretchEffect(options) { 26239 modifierWithKey(this._modifiersWithKeys, XComponentPixelStretchEffectModifier.identity, XComponentPixelStretchEffectModifier, options); 26240 return this; 26241 } 26242 keyboardShortcut(value, keys, action) { 26243 throw new Error('Method not implemented.'); 26244 } 26245 accessibilityGroup(value) { 26246 throw new Error('Method not implemented.'); 26247 } 26248 accessibilityText(value) { 26249 throw new Error('Method not implemented.'); 26250 } 26251 accessibilityDescription(value) { 26252 throw new Error('Method not implemented.'); 26253 } 26254 accessibilityLevel(value) { 26255 throw new Error('Method not implemented.'); 26256 } 26257 obscured(reasons) { 26258 throw new Error('Method not implemented.'); 26259 } 26260 reuseId(id) { 26261 throw new Error('Method not implemented.'); 26262 } 26263 renderFit(fitMode) { 26264 modifierWithKey(this._modifiersWithKeys, XComponentRenderFitModifier.identity, XComponentRenderFitModifier, fitMode); 26265 return this; 26266 } 26267 attributeModifier(modifier) { 26268 return this; 26269 } 26270 onGestureJudgeBegin(callback) { 26271 throw new Error('Method not implemented.'); 26272 } 26273 onLoad(callback) { 26274 modifierWithKey(this._modifiersWithKeys, XComponentOnLoadModifier.identity, XComponentOnLoadModifier, callback); 26275 return this; 26276 } 26277 onDestroy(event) { 26278 modifierWithKey(this._modifiersWithKeys, XComponentOnDestroyModifier.identity, XComponentOnDestroyModifier, event); 26279 return this; 26280 } 26281 enableAnalyzer(value) { 26282 modifierWithKey(this._modifiersWithKeys, XComponentEnableAnalyzerModifier.identity, XComponentEnableAnalyzerModifier, value); 26283 return this; 26284 } 26285 enableSecure(value) { 26286 modifierWithKey(this._modifiersWithKeys, XComponentEnableSecureModifier.identity, XComponentEnableSecureModifier, value); 26287 return this; 26288 } 26289} 26290// @ts-ignore 26291if (globalThis.XComponent !== undefined) { 26292 globalThis.XComponent.attributeModifier = function (modifier) { 26293 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 26294 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 26295 let component = this.createOrGetNode(elmtId, () => { 26296 return new ArkXComponentComponent(nativeNode); 26297 }); 26298 applyUIAttributes(modifier, nativeNode, component); 26299 component.applyModifierPatch(); 26300 }; 26301 globalThis.DataPanel.contentModifier = function (style) { 26302 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 26303 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 26304 let component = this.createOrGetNode(elmtId, () => { 26305 return new ArkDataPanelComponent(nativeNode); 26306 }); 26307 component.setContentModifier(style); 26308 }; 26309} 26310 26311class XComponentInitializeModifier extends ModifierWithKey { 26312 constructor(value) { 26313 super(value); 26314 } 26315 applyPeer(node, reset) { 26316 if (reset) { 26317 getUINativeModule().xComponent.resetXComponentInitialize(node); 26318 } 26319 else { 26320 getUINativeModule().xComponent.setXComponentInitialize(node, this.value?.id, 26321 this.value?.type, this.value?.imageAIOptions, this.value?.libraryname, this.value?.controller); 26322 26323 } 26324 } 26325} 26326XComponentInitializeModifier.identity = Symbol('xComponentInitialize'); 26327class XComponentOpacityModifier extends ModifierWithKey { 26328 constructor(value) { 26329 super(value); 26330 } 26331 applyPeer(node, reset) { 26332 if (reset) { 26333 getUINativeModule().xComponent.resetOpacity(node); 26334 } 26335 else { 26336 getUINativeModule().xComponent.setOpacity(node, this.value); 26337 } 26338 } 26339 checkObjectDiff() { 26340 return !isBaseOrResourceEqual(this.stageValue, this.value); 26341 } 26342} 26343XComponentOpacityModifier.identity = Symbol('xComponentOpacity'); 26344class XComponentBackgroundColorModifier extends ModifierWithKey { 26345 constructor(value) { 26346 super(value); 26347 } 26348 applyPeer(node, reset) { 26349 if (reset) { 26350 getUINativeModule().xComponent.resetBackgroundColor(node); 26351 } 26352 else { 26353 getUINativeModule().xComponent.setBackgroundColor(node, this.value); 26354 } 26355 } 26356 checkObjectDiff() { 26357 return !isBaseOrResourceEqual(this.stageValue, this.value); 26358 } 26359} 26360XComponentBackgroundColorModifier.identity = Symbol('xComponentBackgroundColor'); 26361class XComponentBackgroundImageModifier extends ModifierWithKey { 26362 constructor(value) { 26363 super(value); 26364 } 26365 applyPeer(node, reset) { 26366 if (reset) { 26367 getUINativeModule().xComponent.resetBackgroundImage(node); 26368 } 26369 else { 26370 getUINativeModule().xComponent.setBackgroundImage(node, this.value.src, this.value.repeat); 26371 } 26372 } 26373 checkObjectDiff() { 26374 return !(this.stageValue.src === this.value.src && 26375 this.stageValue.repeat === this.value.repeat); 26376 } 26377} 26378XComponentBackgroundImageModifier.identity = Symbol('xComponentBackgroundImage'); 26379class XComponentBackgroundImageSizeModifier extends ModifierWithKey { 26380 constructor(value) { 26381 super(value); 26382 } 26383 applyPeer(node, reset) { 26384 let _a, _b; 26385 if (reset) { 26386 getUINativeModule().xComponent.resetBackgroundImageSize(node); 26387 } 26388 else { 26389 if (isNumber(this.value)) { 26390 getUINativeModule().xComponent.setBackgroundImageSize(node, this.value, undefined, undefined); 26391 } 26392 else { 26393 getUINativeModule().xComponent.setBackgroundImageSize(node, undefined, (_a = this.value) === null || 26394 _a === void 0 ? void 0 : _a.width, (_b = this.value) === null || _b === void 0 ? void 0 : _b.height); 26395 } 26396 } 26397 } 26398 checkObjectDiff() { 26399 return !(this.value.width === this.stageValue.width && 26400 this.value.height === this.stageValue.height); 26401 } 26402} 26403XComponentBackgroundImageSizeModifier.identity = Symbol('xComponentBackgroundImageSize'); 26404class XComponentBackgroundImagePositionModifier extends ModifierWithKey { 26405 constructor(value) { 26406 super(value); 26407 } 26408 applyPeer(node, reset) { 26409 let _a, _b; 26410 if (reset) { 26411 getUINativeModule().xComponent.resetBackgroundImagePosition(node); 26412 } 26413 else { 26414 if (isNumber(this.value)) { 26415 getUINativeModule().xComponent.setBackgroundImagePosition(node, this.value, undefined, undefined); 26416 } 26417 else { 26418 getUINativeModule().xComponent.setBackgroundImagePosition(node, undefined, (_a = this.value) === null || 26419 _a === void 0 ? void 0 : _a.x, (_b = this.value) === null || _b === void 0 ? void 0 : _b.y); 26420 } 26421 } 26422 } 26423 checkObjectDiff() { 26424 let _a, _b, _c, _d; 26425 return !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.x) === ((_b = this.stageValue) === null || _b === void 0 ? void 0 : _b.x) && 26426 ((_c = this.value) === null || _c === void 0 ? void 0 : _c.y) === ((_d = this.stageValue) === null || _d === void 0 ? void 0 : _d.y)); 26427 } 26428} 26429XComponentBackgroundImagePositionModifier.identity = Symbol('xComponentBackgroundImagePosition'); 26430class XComponentBlurModifier extends ModifierWithKey { 26431 constructor(value) { 26432 super(value); 26433 } 26434 applyPeer(node, reset) { 26435 if (reset) { 26436 getUINativeModule().xComponent.resetBlur(node); 26437 } 26438 else { 26439 getUINativeModule().xComponent.setBlur(node, this.value); 26440 } 26441 } 26442} 26443XComponentBlurModifier.identity = Symbol('xComponentBlur'); 26444class XComponentBackdropBlurModifier extends ModifierWithKey { 26445 constructor(value) { 26446 super(value); 26447 } 26448 applyPeer(node, reset) { 26449 if (reset) { 26450 getUINativeModule().xComponent.resetBackdropBlur(node); 26451 } 26452 else { 26453 getUINativeModule().xComponent.setBackdropBlur(node, this.value); 26454 } 26455 } 26456} 26457XComponentBackdropBlurModifier.identity = Symbol('xComponentBackdropBlur'); 26458class XComponentGrayscaleModifier extends ModifierWithKey { 26459 constructor(value) { 26460 super(value); 26461 } 26462 applyPeer(node, reset) { 26463 if (reset) { 26464 getUINativeModule().xComponent.resetGrayscale(node); 26465 } 26466 else { 26467 getUINativeModule().xComponent.setGrayscale(node, this.value); 26468 } 26469 } 26470} 26471XComponentGrayscaleModifier.identity = Symbol('xComponentGrayscale'); 26472class XComponentBrightnessModifier extends ModifierWithKey { 26473 constructor(value) { 26474 super(value); 26475 } 26476 applyPeer(node, reset) { 26477 if (reset) { 26478 getUINativeModule().xComponent.resetBrightness(node); 26479 } 26480 else { 26481 getUINativeModule().xComponent.setBrightness(node, this.value); 26482 } 26483 } 26484} 26485XComponentBrightnessModifier.identity = Symbol('xComponentBrightness'); 26486class XComponentSaturateModifier extends ModifierWithKey { 26487 constructor(value) { 26488 super(value); 26489 } 26490 applyPeer(node, reset) { 26491 if (reset) { 26492 getUINativeModule().xComponent.resetSaturate(node); 26493 } 26494 else { 26495 getUINativeModule().xComponent.setSaturate(node, this.value); 26496 } 26497 } 26498} 26499XComponentSaturateModifier.identity = Symbol('xComponentSaturate'); 26500class XComponentContrastModifier extends ModifierWithKey { 26501 constructor(value) { 26502 super(value); 26503 } 26504 applyPeer(node, reset) { 26505 if (reset) { 26506 getUINativeModule().xComponent.resetContrast(node); 26507 } 26508 else { 26509 getUINativeModule().xComponent.setContrast(node, this.value); 26510 } 26511 } 26512} 26513XComponentContrastModifier.identity = Symbol('xComponentContrast'); 26514class XComponentInvertModifier extends ModifierWithKey { 26515 constructor(value) { 26516 super(value); 26517 } 26518 applyPeer(node, reset) { 26519 if (reset) { 26520 getUINativeModule().xComponent.resetInvert(node); 26521 } 26522 else { 26523 getUINativeModule().xComponent.setInvert(node, this.value); 26524 } 26525 } 26526} 26527XComponentInvertModifier.identity = Symbol('xComponentInvert'); 26528class XComponentSepiaModifier extends ModifierWithKey { 26529 constructor(value) { 26530 super(value); 26531 } 26532 applyPeer(node, reset) { 26533 if (reset) { 26534 getUINativeModule().xComponent.resetSepia(node); 26535 } 26536 else { 26537 getUINativeModule().xComponent.setSepia(node, this.value); 26538 } 26539 } 26540} 26541XComponentSepiaModifier.identity = Symbol('xComponentSepia'); 26542class XComponentHueRotateModifier extends ModifierWithKey { 26543 constructor(value) { 26544 super(value); 26545 } 26546 applyPeer(node, reset) { 26547 if (reset) { 26548 getUINativeModule().xComponent.resetHueRotate(node); 26549 } 26550 else { 26551 getUINativeModule().xComponent.setHueRotate(node, this.value); 26552 } 26553 } 26554} 26555XComponentHueRotateModifier.identity = Symbol('xComponentHueRotate'); 26556class XComponentColorBlendModifier extends ModifierWithKey { 26557 constructor(value) { 26558 super(value); 26559 } 26560 applyPeer(node, reset) { 26561 if (reset) { 26562 getUINativeModule().xComponent.resetColorBlend(node); 26563 } 26564 else { 26565 getUINativeModule().xComponent.setColorBlend(node, this.value); 26566 } 26567 } 26568 checkObjectDiff() { 26569 return !isBaseOrResourceEqual(this.stageValue, this.value); 26570 } 26571} 26572XComponentColorBlendModifier.identity = Symbol('xComponentColorBlend'); 26573class XComponentSphericalEffectModifier extends ModifierWithKey { 26574 constructor(value) { 26575 super(value); 26576 } 26577 applyPeer(node, reset) { 26578 if (reset) { 26579 getUINativeModule().xComponent.resetSphericalEffect(node); 26580 } 26581 else { 26582 getUINativeModule().xComponent.setSphericalEffect(node, this.value); 26583 } 26584 } 26585} 26586XComponentSphericalEffectModifier.identity = Symbol('xComponentSphericalEffect'); 26587class XComponentLightUpEffectModifier extends ModifierWithKey { 26588 constructor(value) { 26589 super(value); 26590 } 26591 applyPeer(node, reset) { 26592 if (reset) { 26593 getUINativeModule().xComponent.resetLightUpEffect(node); 26594 } 26595 else { 26596 getUINativeModule().xComponent.setLightUpEffect(node, this.value); 26597 } 26598 } 26599} 26600XComponentLightUpEffectModifier.identity = Symbol('xComponentLightUpEffect'); 26601class XComponentPixelStretchEffectModifier extends ModifierWithKey { 26602 constructor(value) { 26603 super(value); 26604 } 26605 applyPeer(node, reset) { 26606 if (reset) { 26607 getUINativeModule().xComponent.resetPixelStretchEffect(node); 26608 } 26609 else { 26610 getUINativeModule().xComponent.setPixelStretchEffect(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 26611 } 26612 } 26613 checkObjectDiff() { 26614 return !(this.stageValue.left === this.value.left && 26615 this.stageValue.right === this.value.right && 26616 this.stageValue.top === this.value.top && 26617 this.stageValue.bottom === this.value.bottom); 26618 } 26619} 26620XComponentPixelStretchEffectModifier.identity = Symbol('xComponentPixelStretchEffect'); 26621class XComponentLinearGradientBlurModifier extends ModifierWithKey { 26622 constructor(value) { 26623 super(value); 26624 } 26625 applyPeer(node, reset) { 26626 if (reset) { 26627 getUINativeModule().xComponent.resetLinearGradientBlur(node); 26628 } 26629 else { 26630 getUINativeModule().xComponent.setLinearGradientBlur(node, this.value.blurRadius, this.value.fractionStops, this.value.direction); 26631 } 26632 } 26633 checkObjectDiff() { 26634 return !this.value.isEqual(this.stageValue); 26635 } 26636} 26637XComponentLinearGradientBlurModifier.identity = Symbol('xComponentlinearGradientBlur'); 26638class XComponentOnLoadModifier extends ModifierWithKey { 26639 constructor(value) { 26640 super(value); 26641 } 26642 applyPeer(node, reset) { 26643 if (reset) { 26644 getUINativeModule().xComponent.resetOnLoad(node); 26645 } 26646 else { 26647 getUINativeModule().xComponent.setOnLoad(node, this.value); 26648 } 26649 } 26650} 26651XComponentOnLoadModifier.identity = Symbol('xComponentOnLoad'); 26652class XComponentOnDestroyModifier extends ModifierWithKey { 26653 constructor(value) { 26654 super(value); 26655 } 26656 applyPeer(node, reset) { 26657 if (reset) { 26658 getUINativeModule().xComponent.resetOnDestroy(node); 26659 } 26660 else { 26661 getUINativeModule().xComponent.setOnDestroy(node, this.value); 26662 } 26663 } 26664} 26665XComponentOnDestroyModifier.identity = Symbol('xComponentOnDestroy'); 26666class XComponentEnableAnalyzerModifier extends ModifierWithKey { 26667 constructor(value) { 26668 super(value); 26669 } 26670 applyPeer(node, reset) { 26671 if (reset) { 26672 getUINativeModule().xComponent.resetEnableAnalyzer(node); 26673 } 26674 else { 26675 getUINativeModule().xComponent.setEnableAnalyzer(node, this.value); 26676 } 26677 } 26678 checkObjectDiff() { 26679 return !isBaseOrResourceEqual(this.stageValue, this.value); 26680 } 26681} 26682XComponentEnableAnalyzerModifier.identity = Symbol('xComponentEnableAnalyzer'); 26683class XComponentEnableSecureModifier extends ModifierWithKey { 26684 constructor(value) { 26685 super(value); 26686 } 26687 applyPeer(node, reset) { 26688 if (reset) { 26689 getUINativeModule().xComponent.resetEnableSecure(node); 26690 } 26691 else { 26692 getUINativeModule().xComponent.setEnableSecure(node, this.value); 26693 } 26694 } 26695 checkObjectDiff() { 26696 return !isBaseOrResourceEqual(this.stageValue, this.value); 26697 } 26698} 26699XComponentEnableSecureModifier.identity = Symbol('xComponentEnableSecure'); 26700class XComponentRenderFitModifier extends ModifierWithKey { 26701 constructor(value) { 26702 super(value); 26703 } 26704 applyPeer(node, reset) { 26705 if (reset) { 26706 getUINativeModule().xComponent.resetRenderFit(node); 26707 } 26708 else { 26709 getUINativeModule().xComponent.setRenderFit(node, this.value); 26710 } 26711 } 26712} 26713XComponentRenderFitModifier.identity = Symbol('xComponentRenderFit'); 26714/// <reference path='./import.ts' /> 26715class ArkBadgeComponent extends ArkComponent { 26716 constructor(nativePtr, classType) { 26717 super(nativePtr, classType); 26718 } 26719 allowChildCount() { 26720 return 1; 26721 } 26722 initialize(value) { 26723 let _a, _b; 26724 if (value.length === 1 && isObject(value[0])) { 26725 if (((_a = value[0]) === null || _a === void 0 ? void 0 : _a.count) !== undefined) { 26726 modifierWithKey( 26727 this._modifiersWithKeys, BadgeParamWithNumberModifier.identity, BadgeParamWithNumberModifier, value[0]); 26728 } 26729 else if (((_b = value[0]) === null || _b === void 0 ? void 0 : _b.value) !== undefined) { 26730 modifierWithKey( 26731 this._modifiersWithKeys, BadgeParamWithStringModifier.identity, BadgeParamWithStringModifier, value[0]); 26732 } 26733 else { 26734 modifierWithKey( 26735 this._modifiersWithKeys, BadgeParamWithNumberModifier.identity, BadgeParamWithNumberModifier, undefined); 26736 } 26737 return this; 26738 } 26739 modifierWithKey( 26740 this._modifiersWithKeys, BadgeParamWithNumberModifier.identity, BadgeParamWithNumberModifier, undefined); 26741 return this; 26742 } 26743} 26744class BadgeParamWithNumberModifier extends ModifierWithKey { 26745 constructor(value) { 26746 super(value); 26747 } 26748 applyPeer(node, reset) { 26749 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1; 26750 if (reset) { 26751 getUINativeModule().badge.setBadgeParamWithNumber(node, undefined, undefined, undefined, undefined, undefined, 26752 undefined, undefined, undefined, undefined, undefined, undefined, 0, undefined); 26753 } 26754 else { 26755 if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.style) === undefined) { 26756 getUINativeModule().badge.setBadgeParamWithNumber(node, 26757 isNumber((_b = this.value) === null || _b === void 0 ? void 0 : _b.position) ? this.value.position : undefined, 26758 isObject((_c = this.value) === null || _c === void 0 ? void 0 : _c.position) ? 26759 (_d = this.value.position) === null || _d === void 0 ? void 0 : _d.x : undefined, 26760 isObject((_e = this.value) === null || _e === void 0 ? void 0 : _e.position) ? 26761 (_f = this.value.position) === null || _f === void 0 ? void 0 : _f.y : undefined, 26762 undefined, undefined, undefined, undefined, undefined, undefined, undefined, 26763 isObject((_g = this.value) === null || _g === void 0 ? void 0 : _g.position) && 26764 !isNull((_h = this.value) === null || _h === void 0 ? void 0 : _h.position), 26765 (_j = this.value) === null || _j === void 0 ? void 0 : _j.count, 26766 (_k = this.value) === null || _k === void 0 ? void 0 : _k.maxCount); 26767 } 26768 else { 26769 getUINativeModule().badge.setBadgeParamWithNumber(node, 26770 isNumber((_l = this.value) === null || _l === void 0 ? void 0 : _l.position) ? this.value.position : undefined, 26771 isObject((_m = this.value) === null || _m === void 0 ? void 0 : _m.position) ? 26772 (_o = this.value.position) === null || _o === void 0 ? void 0 : _o.x : undefined, 26773 isObject((_p = this.value) === null || _p === void 0 ? void 0 : _p.position) ? 26774 (_q = this.value.position) === null || _q === void 0 ? void 0 : _q.y : undefined, 26775 (_r = this.value.style) === null || _r === void 0 ? void 0 : _r.badgeColor, 26776 (_s = this.value.style) === null || _s === void 0 ? void 0 : _s.badgeSize, 26777 (_t = this.value.style) === null || _t === void 0 ? void 0 : _t.borderColor, 26778 (_u = this.value.style) === null || _u === void 0 ? void 0 : _u.borderWidth, 26779 (_v = this.value.style) === null || _v === void 0 ? void 0 : _v.color, 26780 (_w = this.value.style) === null || _w === void 0 ? void 0 : _w.fontSize, 26781 (_x = this.value.style) === null || _x === void 0 ? void 0 : _x.fontWeight, 26782 isObject((_y = this.value) === null || _y === void 0 ? void 0 : _y.position) && 26783 !isNull((_z = this.value) === null || _z === void 0 ? void 0 : _z.position), 26784 (_0 = this.value) === null || _0 === void 0 ? void 0 : _0.count, 26785 (_1 = this.value) === null || _1 === void 0 ? void 0 : _1.maxCount); 26786 } 26787 } 26788 } 26789 checkObjectDiff() { 26790 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7; 26791 let positionResult = false; 26792 let badgeSizeResult = false; 26793 let borderWidthResult = false; 26794 let badgeColorResult = false; 26795 let borderColorResult = false; 26796 let colorResult = false; 26797 let fontSizeResult = false; 26798 let fontWeightResult = false; 26799 if (isNumber((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.position) && 26800 isNumber((_b = this.value) === null || _b === void 0 ? void 0 : _b.position)) { 26801 positionResult = !isBaseOrResourceEqual(this.stageValue.position, this.value.position); 26802 } 26803 else if (isObject((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.position) && 26804 isObject((_d = this.value) === null || _d === void 0 ? void 0 : _d.position)) { 26805 positionResult = !isBaseOrResourceEqual((_e = this.stageValue.position) === null || _e === void 0 ? void 0 : _e.x, 26806 (_f = this.value.position) === null || _f === void 0 ? void 0 : _f.x) || 26807 !isBaseOrResourceEqual((_g = this.stageValue.position) === null || _g === void 0 ? void 0 : _g.y, 26808 (_h = this.value.position) === null || _h === void 0 ? void 0 : _h.y); 26809 } 26810 else if (((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.position) !== undefined || 26811 ((_k = this.value) === null || _k === void 0 ? void 0 : _k.position) !== undefined) { 26812 positionResult = true; 26813 } 26814 if (isObject((_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.style) && 26815 isObject((_m = this.value) === null || _m === void 0 ? void 0 : _m.style)) { 26816 badgeSizeResult = !isBaseOrResourceEqual((_o = this.stageValue.style) === null || _o === void 0 ? void 0 : _o.badgeSize, 26817 (_p = this.value.style) === null || _p === void 0 ? void 0 : _p.badgeSize); 26818 borderWidthResult = !isBaseOrResourceEqual((_q = this.stageValue.style) === null || _q === void 0 ? void 0 : _q.borderWidth, 26819 (_r = this.value.style) === null || _r === void 0 ? void 0 : _r.borderWidth); 26820 badgeColorResult = !isBaseOrResourceEqual((_s = this.stageValue.style) === null || _s === void 0 ? void 0 : _s.badgeColor, 26821 (_t = this.value.style) === null || _t === void 0 ? void 0 : _t.badgeColor); 26822 borderColorResult = !isBaseOrResourceEqual((_u = this.stageValue.style) === null || _u === void 0 ? void 0 : _u.borderColor, 26823 (_v = this.value.style) === null || _v === void 0 ? void 0 : _v.borderColor); 26824 colorResult = !isBaseOrResourceEqual((_w = this.stageValue.style) === null || _w === void 0 ? void 0 : _w.color, 26825 (_x = this.value.style) === null || _x === void 0 ? void 0 : _x.color); 26826 fontSizeResult = !isBaseOrResourceEqual((_y = this.stageValue.style) === null || _y === void 0 ? void 0 : _y.fontSize, 26827 (_z = this.value.style) === null || _z === void 0 ? void 0 : _z.fontSize); 26828 fontWeightResult = !isBaseOrResourceEqual((_0 = this.stageValue.style) === null || _0 === void 0 ? void 0 : _0.fontWeight, 26829 (_1 = this.value.style) === null || _1 === void 0 ? void 0 : _1.fontWeight); 26830 } 26831 else if (((_2 = this.stageValue) === null || _2 === void 0 ? void 0 : _2.style) !== undefined || 26832 ((_3 = this.value) === null || _3 === void 0 ? void 0 : _3.style) !== undefined) { 26833 badgeSizeResult = true; 26834 borderWidthResult = true; 26835 badgeColorResult = true; 26836 borderColorResult = true; 26837 colorResult = true; 26838 fontSizeResult = true; 26839 fontWeightResult = true; 26840 } 26841 return positionResult || badgeSizeResult || borderWidthResult || badgeColorResult || borderColorResult || colorResult || 26842 fontSizeResult || fontWeightResult || !isBaseOrResourceEqual((_4 = this.stageValue) === null || _4 === void 0 ? void 0 : _4.count, 26843 (_5 = this.value) === null || _5 === void 0 ? void 0 : _5.count) || 26844 !isBaseOrResourceEqual((_6 = this.stageValue) === null || _6 === void 0 ? void 0 : _6.maxCount, 26845 (_7 = this.value) === null || _7 === void 0 ? void 0 : _7.maxCount); 26846 } 26847} 26848BadgeParamWithNumberModifier.identity = Symbol('BadgeParamWithNumber'); 26849class BadgeParamWithStringModifier extends ModifierWithKey { 26850 constructor(value) { 26851 super(value); 26852 } 26853 applyPeer(node, reset) { 26854 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; 26855 if (reset) { 26856 getUINativeModule().badge.setBadgeParamWithString(node, undefined, undefined, undefined, undefined, undefined, 26857 undefined, undefined, undefined, undefined, undefined, undefined, undefined); 26858 } 26859 else { 26860 if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.style) === undefined) { 26861 getUINativeModule().badge.setBadgeParamWithString(node, 26862 isNumber((_b = this.value) === null || _b === void 0 ? void 0 : _b.position) ? this.value.position : undefined, 26863 isObject((_c = this.value) === null || _c === void 0 ? void 0 : _c.position) ? 26864 (_d = this.value.position) === null || _d === void 0 ? void 0 : _d.x : undefined, 26865 isObject((_e = this.value) === null || _e === void 0 ? void 0 : _e.position) ? 26866 (_f = this.value.position) === null || _f === void 0 ? void 0 : _f.y : undefined, 26867 undefined, undefined, undefined, undefined, undefined, undefined, undefined, 26868 isObject((_g = this.value) === null || _g === void 0 ? void 0 : _g.position) && 26869 !isNull((_h = this.value) === null || _h === void 0 ? void 0 : _h.position), 26870 (_j = this.value) === null || _j === void 0 ? void 0 : _j.value); 26871 } 26872 else { 26873 getUINativeModule().badge.setBadgeParamWithString(node, 26874 isNumber((_k = this.value) === null || _k === void 0 ? void 0 : _k.position) ? this.value.position : undefined, 26875 isObject((_l = this.value) === null || _l === void 0 ? void 0 : _l.position) ? 26876 (_m = this.value.position) === null || _m === void 0 ? void 0 : _m.x : undefined, 26877 isObject((_o = this.value) === null || _o === void 0 ? void 0 : _o.position) ? 26878 (_p = this.value.position) === null || _p === void 0 ? void 0 : _p.y : undefined, 26879 (_q = this.value.style) === null || _q === void 0 ? void 0 : _q.badgeColor, 26880 (_r = this.value.style) === null || _r === void 0 ? void 0 : _r.badgeSize, 26881 (_s = this.value.style) === null || _s === void 0 ? void 0 : _s.borderColor, 26882 (_t = this.value.style) === null || _t === void 0 ? void 0 : _t.borderWidth, 26883 (_u = this.value.style) === null || _u === void 0 ? void 0 : _u.color, 26884 (_v = this.value.style) === null || _v === void 0 ? void 0 : _v.fontSize, 26885 (_w = this.value.style) === null || _w === void 0 ? void 0 : _w.fontWeight, 26886 isObject((_x = this.value) === null || _x === void 0 ? void 0 : _x.position) && 26887 !isNull((_y = this.value) === null || _y === void 0 ? void 0 : _y.position), 26888 (_z = this.value) === null || _z === void 0 ? void 0 : _z.value); 26889 } 26890 } 26891 } 26892 checkObjectDiff() { 26893 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5; 26894 let positionResult = false; 26895 let badgeSizeResult = false; 26896 let borderWidthResult = false; 26897 let badgeColorResult = false; 26898 let borderColorResult = false; 26899 let colorResult = false; 26900 let fontSizeResult = false; 26901 let fontWeightResult = false; 26902 if (isNumber((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.position) && 26903 isNumber((_b = this.value) === null || _b === void 0 ? void 0 : _b.position)) { 26904 positionResult = !isBaseOrResourceEqual(this.stageValue.position, this.value.position); 26905 } 26906 else if (isObject((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.position) && 26907 isObject((_d = this.value) === null || _d === void 0 ? void 0 : _d.position)) { 26908 positionResult = !isBaseOrResourceEqual((_e = this.stageValue.position) === null || _e === void 0 ? void 0 : _e.x, 26909 (_f = this.value.position) === null || _f === void 0 ? void 0 : _f.x) || 26910 !isBaseOrResourceEqual((_g = this.stageValue.position) === null || _g === void 0 ? void 0 : _g.y, 26911 (_h = this.value.position) === null || _h === void 0 ? void 0 : _h.y); 26912 } 26913 else if (((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.position) !== undefined || 26914 ((_k = this.value) === null || _k === void 0 ? void 0 : _k.position) !== undefined) { 26915 positionResult = true; 26916 } 26917 if (isObject((_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.style) && 26918 isObject((_m = this.value) === null || _m === void 0 ? void 0 : _m.style)) { 26919 badgeSizeResult = !isBaseOrResourceEqual((_o = this.stageValue.style) === null || _o === void 0 ? void 0 : _o.badgeSize, 26920 (_p = this.value.style) === null || _p === void 0 ? void 0 : _p.badgeSize); 26921 borderWidthResult = !isBaseOrResourceEqual((_q = this.stageValue.style) === null || _q === void 0 ? void 0 : _q.borderWidth, 26922 (_r = this.value.style) === null || _r === void 0 ? void 0 : _r.borderWidth); 26923 badgeColorResult = !isBaseOrResourceEqual((_s = this.stageValue.style) === null || _s === void 0 ? void 0 : _s.badgeColor, 26924 (_t = this.value.style) === null || _t === void 0 ? void 0 : _t.badgeColor); 26925 borderColorResult = !isBaseOrResourceEqual((_u = this.stageValue.style) === null || _u === void 0 ? void 0 : _u.borderColor, 26926 (_v = this.value.style) === null || _v === void 0 ? void 0 : _v.borderColor); 26927 colorResult = !isBaseOrResourceEqual((_w = this.stageValue.style) === null || _w === void 0 ? void 0 : _w.color, 26928 (_x = this.value.style) === null || _x === void 0 ? void 0 : _x.color); 26929 fontSizeResult = !isBaseOrResourceEqual((_y = this.stageValue.style) === null || _y === void 0 ? void 0 : _y.fontSize, 26930 (_z = this.value.style) === null || _z === void 0 ? void 0 : _z.fontSize); 26931 fontWeightResult = !isBaseOrResourceEqual((_0 = this.stageValue.style) === null || _0 === void 0 ? void 0 : _0.fontWeight, 26932 (_1 = this.value.style) === null || _1 === void 0 ? void 0 : _1.fontWeight); 26933 } 26934 else if (((_2 = this.stageValue) === null || _2 === void 0 ? void 0 : _2.style) !== undefined || 26935 ((_3 = this.value) === null || _3 === void 0 ? void 0 : _3.style) !== undefined) { 26936 badgeSizeResult = true; 26937 borderWidthResult = true; 26938 badgeColorResult = true; 26939 borderColorResult = true; 26940 colorResult = true; 26941 fontSizeResult = true; 26942 fontWeightResult = true; 26943 } 26944 return positionResult || badgeSizeResult || borderWidthResult || badgeColorResult || borderColorResult || colorResult || 26945 fontSizeResult || fontWeightResult || !isBaseOrResourceEqual((_4 = this.stageValue) === null || _4 === void 0 ? void 0 : _4.value, 26946 (_5 = this.value) === null || _5 === void 0 ? void 0 : _5.value); 26947 } 26948} 26949BadgeParamWithStringModifier.identity = Symbol('BadgeParamWithString'); 26950// @ts-ignore 26951if (globalThis.Badge !== undefined) { 26952 globalThis.Badge.attributeModifier = function (modifier) { 26953 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26954 return new ArkBadgeComponent(nativePtr); 26955 }, (nativePtr, classType, modifierJS) => { 26956 return new modifierJS.CommonModifier(nativePtr, classType); 26957 }); 26958 }; 26959} 26960 26961/// <reference path='./import.ts' /> 26962class ArkFlowItemComponent extends ArkComponent { 26963 constructor(nativePtr, classType) { 26964 super(nativePtr, classType); 26965 } 26966 initialize(value) { 26967 return this; 26968 } 26969 allowChildCount() { 26970 return 1; 26971 } 26972} 26973// @ts-ignore 26974if (globalThis.FlowItem !== undefined) { 26975 globalThis.FlowItem.attributeModifier = function (modifier) { 26976 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26977 return new ArkFlowItemComponent(nativePtr); 26978 }, (nativePtr, classType, modifierJS) => { 26979 return new modifierJS.CommonModifier(nativePtr, classType); 26980 }); 26981 }; 26982} 26983 26984/// <reference path='./import.ts' /> 26985class ArkFormLinkComponent extends ArkComponent { 26986 constructor(nativePtr, classType) { 26987 super(nativePtr, classType); 26988 } 26989} 26990// @ts-ignore 26991if (globalThis.FormLink !== undefined) { 26992 globalThis.FormLink.attributeModifier = function (modifier) { 26993 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26994 return new ArkFormLinkComponent(nativePtr); 26995 }, (nativePtr, classType, modifierJS) => { 26996 return new modifierJS.CommonModifier(nativePtr, classType); 26997 }); 26998 }; 26999} 27000 27001/// <reference path='./import.ts' /> 27002class GridItemSelectableModifier extends ModifierWithKey { 27003 applyPeer(node, reset) { 27004 if (reset) { 27005 getUINativeModule().gridItem.resetGridItemSelectable(node); 27006 } 27007 else { 27008 getUINativeModule().gridItem.setGridItemSelectable(node, this.value); 27009 } 27010 } 27011} 27012GridItemSelectableModifier.identity = Symbol('gridItemSelectable'); 27013class GridItemSelectedModifier extends ModifierWithKey { 27014 applyPeer(node, reset) { 27015 if (reset) { 27016 getUINativeModule().gridItem.resetGridItemSelected(node); 27017 } 27018 else { 27019 getUINativeModule().gridItem.setGridItemSelected(node, this.value); 27020 } 27021 } 27022} 27023GridItemSelectedModifier.identity = Symbol('gridItemSelected'); 27024class GridItemRowStartModifier extends ModifierWithKey { 27025 applyPeer(node, reset) { 27026 if (reset) { 27027 getUINativeModule().gridItem.resetGridItemRowStart(node); 27028 } 27029 else { 27030 getUINativeModule().gridItem.setGridItemRowStart(node, this.value); 27031 } 27032 } 27033} 27034GridItemRowStartModifier.identity = Symbol('gridItemRowStart'); 27035class GridItemRowEndModifier extends ModifierWithKey { 27036 applyPeer(node, reset) { 27037 if (reset) { 27038 getUINativeModule().gridItem.resetGridItemRowEnd(node); 27039 } 27040 else { 27041 getUINativeModule().gridItem.setGridItemRowEnd(node, this.value); 27042 } 27043 } 27044} 27045GridItemRowEndModifier.identity = Symbol('gridItemRowEnd'); 27046class GridItemColumnStartModifier extends ModifierWithKey { 27047 applyPeer(node, reset) { 27048 if (reset) { 27049 getUINativeModule().gridItem.resetGridItemColumnStart(node); 27050 } 27051 else { 27052 getUINativeModule().gridItem.setGridItemColumnStart(node, this.value); 27053 } 27054 } 27055} 27056GridItemColumnStartModifier.identity = Symbol('gridItemColumnStart'); 27057class GridItemColumnEndModifier extends ModifierWithKey { 27058 applyPeer(node, reset) { 27059 if (reset) { 27060 getUINativeModule().gridItem.resetGridItemColumnEnd(node); 27061 } 27062 else { 27063 getUINativeModule().gridItem.setGridItemColumnEnd(node, this.value); 27064 } 27065 } 27066} 27067GridItemColumnEndModifier.identity = Symbol('gridItemColumnEnd'); 27068class GridItemOptionsModifier extends ModifierWithKey { 27069 applyPeer(node, reset) { 27070 let _a; 27071 if (reset) { 27072 getUINativeModule().gridItem.setGridItemOptions(node, undefined); 27073 } 27074 else { 27075 if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.style) === undefined) { 27076 getUINativeModule().gridItem.setGridItemOptions(node, undefined); 27077 } 27078 else { 27079 getUINativeModule().gridItem.setGridItemOptions(node, this.value.style); 27080 } 27081 } 27082 } 27083 checkObjectDiff() { 27084 let _a, _b; 27085 return !isBaseOrResourceEqual((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.style, 27086 (_b = this.value) === null || _b === void 0 ? void 0 : _b.style); 27087 } 27088} 27089GridItemOptionsModifier.identity = Symbol('gridItemOptions'); 27090class ArkGridItemComponent extends ArkComponent { 27091 constructor(nativePtr, classType) { 27092 super(nativePtr, classType); 27093 } 27094 allowChildCount() { 27095 return 1; 27096 } 27097 initialize(value) { 27098 if (value.length === 1 && isObject(value[0])) { 27099 modifierWithKey(this._modifiersWithKeys, GridItemOptionsModifier.identity, GridItemOptionsModifier, value[0]); 27100 } 27101 return this; 27102 } 27103 rowStart(value) { 27104 modifierWithKey(this._modifiersWithKeys, GridItemRowStartModifier.identity, GridItemRowStartModifier, value); 27105 return this; 27106 } 27107 rowEnd(value) { 27108 modifierWithKey(this._modifiersWithKeys, GridItemRowEndModifier.identity, GridItemRowEndModifier, value); 27109 return this; 27110 } 27111 columnStart(value) { 27112 modifierWithKey(this._modifiersWithKeys, GridItemColumnStartModifier.identity, GridItemColumnStartModifier, value); 27113 return this; 27114 } 27115 columnEnd(value) { 27116 modifierWithKey(this._modifiersWithKeys, GridItemColumnEndModifier.identity, GridItemColumnEndModifier, value); 27117 return this; 27118 } 27119 forceRebuild(value) { 27120 throw new Error('Method not implemented.'); 27121 } 27122 selectable(value) { 27123 modifierWithKey(this._modifiersWithKeys, GridItemSelectableModifier.identity, GridItemSelectableModifier, value); 27124 return this; 27125 } 27126 selected(value) { 27127 modifierWithKey(this._modifiersWithKeys, GridItemSelectedModifier.identity, GridItemSelectedModifier, value); 27128 return this; 27129 } 27130 onSelect(event) { 27131 throw new Error('Method not implemented.'); 27132 } 27133} 27134// @ts-ignore 27135if (globalThis.GridItem !== undefined) { 27136 globalThis.GridItem.attributeModifier = function (modifier) { 27137 attributeModifierFunc.call(this, modifier, (nativePtr) => { 27138 return new ArkGridItemComponent(nativePtr); 27139 }, (nativePtr, classType, modifierJS) => { 27140 return new modifierJS.GridItemModifier(nativePtr, classType); 27141 }); 27142 }; 27143} 27144 27145/// <reference path='./import.ts' /> 27146class ArkHyperlinkComponent extends ArkComponent { 27147 constructor(nativePtr, classType) { 27148 super(nativePtr, classType); 27149 } 27150 color(value) { 27151 modifierWithKey(this._modifiersWithKeys, HyperlinkColorModifier.identity, HyperlinkColorModifier, value); 27152 return this; 27153 } 27154 draggable(value) { 27155 modifierWithKey(this._modifiersWithKeys, HyperlinkDraggableModifier.identity, HyperlinkDraggableModifier, value); 27156 return this; 27157 } 27158 responseRegion(value) { 27159 modifierWithKey(this._modifiersWithKeys, HyperlinkResponseRegionModifier.identity, HyperlinkResponseRegionModifier, value); 27160 return this; 27161 } 27162} 27163class HyperlinkColorModifier extends ModifierWithKey { 27164 constructor(value) { 27165 super(value); 27166 } 27167 applyPeer(node, reset) { 27168 if (reset) { 27169 getUINativeModule().hyperlink.resetColor(node); 27170 } 27171 else { 27172 getUINativeModule().hyperlink.setColor(node, this.value); 27173 } 27174 } 27175 checkObjectDiff() { 27176 return !isBaseOrResourceEqual(this.stageValue, this.value); 27177 } 27178} 27179HyperlinkColorModifier.identity = Symbol('hyperlinkColor'); 27180class HyperlinkDraggableModifier extends ModifierWithKey { 27181 constructor(value) { 27182 super(value); 27183 } 27184 applyPeer(node, reset) { 27185 if (reset) { 27186 getUINativeModule().hyperlink.resetDraggable(node); 27187 } 27188 else { 27189 getUINativeModule().hyperlink.setDraggable(node, this.value); 27190 } 27191 } 27192} 27193HyperlinkDraggableModifier.identity = Symbol('hyperlinkDraggable'); 27194class HyperlinkResponseRegionModifier extends ModifierWithKey { 27195 constructor(value) { 27196 super(value); 27197 } 27198 applyPeer(node, reset) { 27199 let _a, _b, _c, _d, _e, _f, _g, _h; 27200 if (reset) { 27201 getUINativeModule().hyperlink.resetResponseRegion(node); 27202 } 27203 else { 27204 let responseRegion = []; 27205 if (Array.isArray(this.value)) { 27206 for (let i = 0; i < this.value.length; i++) { 27207 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 27208 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 27209 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 27210 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 27211 } 27212 } 27213 else { 27214 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 27215 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 27216 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 27217 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 27218 } 27219 getUINativeModule().hyperlink.setResponseRegion(node, responseRegion, responseRegion.length); 27220 } 27221 } 27222 checkObjectDiff() { 27223 return !isBaseOrResourceEqual(this.stageValue, this.value); 27224 } 27225} 27226HyperlinkResponseRegionModifier.identity = Symbol('hyperlinkResponseRegion'); 27227// @ts-ignore 27228if (globalThis.Hyperlink !== undefined) { 27229 globalThis.Hyperlink.attributeModifier = function (modifier) { 27230 attributeModifierFunc.call(this, modifier, (nativePtr) => { 27231 return new ArkHyperlinkComponent(nativePtr); 27232 }, (nativePtr, classType, modifierJS) => { 27233 return new modifierJS.HyperlinkModifier(nativePtr, classType); 27234 }); 27235 }; 27236} 27237 27238/// <reference path='./import.ts' /> 27239class ListEditModeModifier extends ModifierWithKey { 27240 constructor(value) { 27241 super(value); 27242 } 27243 applyPeer(node, reset) { 27244 if (reset) { 27245 getUINativeModule().list.resetEditMode(node); 27246 } 27247 else { 27248 getUINativeModule().list.setEditMode(node, this.value); 27249 } 27250 } 27251} 27252ListEditModeModifier.identity = Symbol('editMode'); 27253class ListMultiSelectableModifier extends ModifierWithKey { 27254 constructor(value) { 27255 super(value); 27256 } 27257 applyPeer(node, reset) { 27258 if (reset) { 27259 getUINativeModule().list.resetMultiSelectable(node); 27260 } 27261 else { 27262 getUINativeModule().list.setMultiSelectable(node, this.value); 27263 } 27264 } 27265} 27266ListMultiSelectableModifier.identity = Symbol('listMultiSelectable'); 27267class ListAlignListItemModifier extends ModifierWithKey { 27268 constructor(value) { 27269 super(value); 27270 } 27271 applyPeer(node, reset) { 27272 if (reset) { 27273 getUINativeModule().list.resetAlignListItem(node); 27274 } 27275 else { 27276 getUINativeModule().list.setAlignListItem(node, this.value); 27277 } 27278 } 27279} 27280ListAlignListItemModifier.identity = Symbol('listAlignListItem'); 27281class ListScrollSnapAlignModifier extends ModifierWithKey { 27282 constructor(value) { 27283 super(value); 27284 } 27285 applyPeer(node, reset) { 27286 if (reset) { 27287 getUINativeModule().list.resetScrollSnapAlign(node); 27288 } 27289 else { 27290 getUINativeModule().list.setScrollSnapAlign(node, this.value); 27291 } 27292 } 27293} 27294ListScrollSnapAlignModifier.identity = Symbol('listScrollSnapAlign'); 27295class ContentStartOffsetModifier extends ModifierWithKey { 27296 constructor(value) { 27297 super(value); 27298 } 27299 applyPeer(node, reset) { 27300 if (reset) { 27301 getUINativeModule().list.resetContentStartOffset(node); 27302 } 27303 else { 27304 getUINativeModule().list.setContentStartOffset(node, this.value); 27305 } 27306 } 27307} 27308ContentStartOffsetModifier.identity = Symbol('contentStartOffset'); 27309class ContentEndOffsetModifier extends ModifierWithKey { 27310 constructor(value) { 27311 super(value); 27312 } 27313 applyPeer(node, reset) { 27314 if (reset) { 27315 getUINativeModule().list.resetContentEndOffset(node); 27316 } 27317 else { 27318 getUINativeModule().list.setContentEndOffset(node, this.value); 27319 } 27320 } 27321} 27322ContentEndOffsetModifier.identity = Symbol('contentEndOffset'); 27323class ListDividerModifier extends ModifierWithKey { 27324 constructor(value) { 27325 super(value); 27326 } 27327 applyPeer(node, reset) { 27328 let _a, _b, _c, _d; 27329 if (reset) { 27330 getUINativeModule().list.resetDivider(node); 27331 } 27332 else { 27333 getUINativeModule().list.setDivider(node, (_a = this.value) === null || 27334 _a === void 0 ? void 0 : _a.strokeWidth, (_b = this.value) === null || 27335 _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || 27336 _c === void 0 ? void 0 : _c.startMargin, (_d = this.value) === null || 27337 _d === void 0 ? void 0 : _d.endMargin); 27338 } 27339 } 27340 checkObjectDiff() { 27341 let _a, _b, _c, _d, _e, _f, _g, _h; 27342 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 27343 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 27344 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 27345 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 27346 } 27347} 27348ListDividerModifier.identity = Symbol('listDivider'); 27349class ChainAnimationOptionsModifier extends ModifierWithKey { 27350 constructor(value) { 27351 super(value); 27352 } 27353 applyPeer(node, reset) { 27354 let _a, _b, _c, _d, _e, _f, _g; 27355 if (reset) { 27356 getUINativeModule().list.resetChainAnimationOptions(node); 27357 } 27358 else { 27359 getUINativeModule().list.setChainAnimationOptions(node, (_a = this.value) === null || 27360 _a === void 0 ? void 0 : _a.minSpace, (_b = this.value) === null || 27361 _b === void 0 ? void 0 : _b.maxSpace, (_c = this.value) === null || 27362 _c === void 0 ? void 0 : _c.conductivity, (_d = this.value) === null || 27363 _d === void 0 ? void 0 : _d.intensity, (_e = this.value) === null || 27364 _e === void 0 ? void 0 : _e.edgeEffect, (_f = this.value) === null || 27365 _f === void 0 ? void 0 : _f.stiffness, (_g = this.value) === null || 27366 _g === void 0 ? void 0 : _g.damping); 27367 } 27368 } 27369 checkObjectDiff() { 27370 return !(this.stageValue.minSpace === this.value.minSpace && this.stageValue.maxSpace === this.value.maxSpace && 27371 this.stageValue.conductivity === this.value.conductivity && this.stageValue.intensity === this.value.intensity && 27372 this.stageValue.edgeEffect === this.value.edgeEffect && this.stageValue.stiffness === this.value.stiffness && 27373 this.stageValue.damping === this.value.damping); 27374 } 27375} 27376ChainAnimationOptionsModifier.identity = Symbol('chainAnimationOptions'); 27377class ListChainAnimationModifier extends ModifierWithKey { 27378 constructor(value) { 27379 super(value); 27380 } 27381 applyPeer(node, reset) { 27382 if (reset) { 27383 getUINativeModule().list.resetChainAnimation(node); 27384 } 27385 else { 27386 getUINativeModule().list.setChainAnimation(node, this.value); 27387 } 27388 } 27389} 27390ListChainAnimationModifier.identity = Symbol('listChainAnimation'); 27391class ListCachedCountModifier extends ModifierWithKey { 27392 constructor(value) { 27393 super(value); 27394 } 27395 applyPeer(node, reset) { 27396 if (reset) { 27397 getUINativeModule().list.resetCachedCount(node); 27398 } 27399 else { 27400 getUINativeModule().list.setCachedCount(node, this.value.count, this.value.show); 27401 } 27402 } 27403} 27404ListCachedCountModifier.identity = Symbol('listCachedCount'); 27405class ListEnableScrollInteractionModifier extends ModifierWithKey { 27406 constructor(value) { 27407 super(value); 27408 } 27409 applyPeer(node, reset) { 27410 if (reset) { 27411 getUINativeModule().list.resetEnableScrollInteraction(node); 27412 } 27413 else { 27414 getUINativeModule().list.setEnableScrollInteraction(node, this.value); 27415 } 27416 } 27417} 27418ListEnableScrollInteractionModifier.identity = Symbol('listEnableScrollInteraction'); 27419class ListStickyModifier extends ModifierWithKey { 27420 constructor(value) { 27421 super(value); 27422 } 27423 applyPeer(node, reset) { 27424 if (reset) { 27425 getUINativeModule().list.resetSticky(node); 27426 } 27427 else { 27428 getUINativeModule().list.setSticky(node, this.value); 27429 } 27430 } 27431} 27432ListStickyModifier.identity = Symbol('listSticky'); 27433class ListEdgeEffectModifier extends ModifierWithKey { 27434 constructor(value) { 27435 super(value); 27436 } 27437 applyPeer(node, reset) { 27438 let _a; 27439 if (reset) { 27440 getUINativeModule().list.resetListEdgeEffect(node); 27441 } 27442 else { 27443 getUINativeModule().list.setListEdgeEffect(node, this.value.value, (_a = this.value.options) === null || 27444 _a === void 0 ? void 0 : _a.alwaysEnabled); 27445 } 27446 } 27447 checkObjectDiff() { 27448 return !((this.stageValue.value === this.value.value) && 27449 (this.stageValue.options === this.value.options)); 27450 } 27451} 27452ListEdgeEffectModifier.identity = Symbol('listEdgeEffect'); 27453class ListListDirectionModifier extends ModifierWithKey { 27454 constructor(value) { 27455 super(value); 27456 } 27457 applyPeer(node, reset) { 27458 if (reset) { 27459 getUINativeModule().list.resetListDirection(node); 27460 } 27461 else { 27462 getUINativeModule().list.setListDirection(node, this.value); 27463 } 27464 } 27465} 27466ListListDirectionModifier.identity = Symbol('listListDirection'); 27467class ListFrictionModifier extends ModifierWithKey { 27468 constructor(value) { 27469 super(value); 27470 } 27471 applyPeer(node, reset) { 27472 if (reset) { 27473 getUINativeModule().list.resetListFriction(node); 27474 } 27475 else { 27476 if (!isNumber(this.value) && !isResource(this.value)) { 27477 getUINativeModule().list.resetListFriction(node); 27478 } 27479 else { 27480 getUINativeModule().list.setListFriction(node, this.value); 27481 } 27482 } 27483 } 27484 checkObjectDiff() { 27485 return !isBaseOrResourceEqual(this.stageValue, this.value); 27486 } 27487} 27488ListFrictionModifier.identity = Symbol('listFriction'); 27489class ListMaintainVisibleContentPositionModifier extends ModifierWithKey { 27490 constructor(value) { 27491 super(value); 27492 } 27493 applyPeer(node, reset) { 27494 if (reset) { 27495 getUINativeModule().list.resetListMaintainVisibleContentPosition(node); 27496 } else { 27497 getUINativeModule().list.setListMaintainVisibleContentPosition(node, this.value); 27498 } 27499 } 27500} 27501ListMaintainVisibleContentPositionModifier.identity = Symbol('listMaintainVisibleContentPosition'); 27502class ListNestedScrollModifier extends ModifierWithKey { 27503 constructor(value) { 27504 super(value); 27505 } 27506 applyPeer(node, reset) { 27507 let _a, _b; 27508 if (reset) { 27509 getUINativeModule().list.resetListNestedScroll(node); 27510 } 27511 else { 27512 getUINativeModule().list.setListNestedScroll(node, (_a = this.value) === null || 27513 _a === void 0 ? void 0 : _a.scrollForward, (_b = this.value) === null || 27514 _b === void 0 ? void 0 : _b.scrollBackward); 27515 } 27516 } 27517} 27518ListNestedScrollModifier.identity = Symbol('listNestedScroll'); 27519class ListScrollBarModifier extends ModifierWithKey { 27520 constructor(value) { 27521 super(value); 27522 } 27523 applyPeer(node, reset) { 27524 if (reset) { 27525 getUINativeModule().list.resetListScrollBar(node); 27526 } 27527 else { 27528 getUINativeModule().list.setListScrollBar(node, this.value); 27529 } 27530 } 27531} 27532ListScrollBarModifier.identity = Symbol('listScrollBar'); 27533class ListScrollBarWidthModifier extends ModifierWithKey { 27534 constructor(value) { 27535 super(value); 27536 } 27537 applyPeer(node, reset) { 27538 if (reset) { 27539 getUINativeModule().list.resetListScrollBarWidth(node); 27540 } 27541 else { 27542 getUINativeModule().list.setListScrollBarWidth(node, this.value); 27543 } 27544 } 27545} 27546ListScrollBarWidthModifier.identity = Symbol('listScrollBarWidth'); 27547class ListScrollBarColorModifier extends ModifierWithKey { 27548 constructor(value) { 27549 super(value); 27550 } 27551 applyPeer(node, reset) { 27552 if (reset) { 27553 getUINativeModule().list.resetListScrollBarColor(node); 27554 } 27555 else { 27556 getUINativeModule().list.setListScrollBarColor(node, this.value); 27557 } 27558 } 27559} 27560ListScrollBarColorModifier.identity = Symbol('listScrollBarColor'); 27561class ListFlingSpeedLimitModifier extends ModifierWithKey { 27562 constructor(value) { 27563 super(value); 27564 } 27565 applyPeer(node, reset) { 27566 if (reset) { 27567 getUINativeModule().list.resetFlingSpeedLimit(node); 27568 } 27569 else { 27570 getUINativeModule().list.setFlingSpeedLimit(node, this.value); 27571 } 27572 } 27573} 27574ListFlingSpeedLimitModifier.identity = Symbol('listFlingSpeedLimit'); 27575class ListLanesModifier extends ModifierWithKey { 27576 constructor(value) { 27577 super(value); 27578 } 27579 applyPeer(node, reset) { 27580 if (reset) { 27581 getUINativeModule().list.resetListLanes(node); 27582 } 27583 else { 27584 getUINativeModule().list.setListLanes(node, this.value.lanesNum, this.value.minLength, this.value.maxLength, this.value.gutter); 27585 } 27586 } 27587 checkObjectDiff() { 27588 return true; 27589 } 27590} 27591ListLanesModifier.identity = Symbol('listLanes'); 27592class ListClipModifier extends ModifierWithKey { 27593 constructor(value) { 27594 super(value); 27595 } 27596 applyPeer(node, reset) { 27597 if (reset) { 27598 getUINativeModule().common.resetClipWithEdge(node); 27599 } 27600 else { 27601 getUINativeModule().common.setClipWithEdge(node, this.value); 27602 } 27603 } 27604 checkObjectDiff() { 27605 return true; 27606 } 27607} 27608ListClipModifier.identity = Symbol('listClip'); 27609class ListOnScrollIndexModifier extends ModifierWithKey { 27610 constructor(value) { 27611 super(value); 27612 } 27613 applyPeer(node, reset) { 27614 if (reset) { 27615 getUINativeModule().list.resetOnScrollIndex(node); 27616 } else { 27617 getUINativeModule().list.setOnScrollIndex(node, this.value); 27618 } 27619 } 27620} 27621ListOnScrollIndexModifier.identity = Symbol('listOnScrollIndex'); 27622class ListOnScrollVisibleContentChangeModifier extends ModifierWithKey { 27623 constructor(value) { 27624 super(value); 27625 } 27626 applyPeer(node, reset) { 27627 if (reset) { 27628 getUINativeModule().list.resetOnScrollVisibleContentChange(node); 27629 } else { 27630 getUINativeModule().list.setOnScrollVisibleContentChange(node, this.value); 27631 } 27632 } 27633} 27634ListOnScrollVisibleContentChangeModifier.identity = Symbol('listOnScrollVisibleContentChange'); 27635class ListOnItemMoveModifier extends ModifierWithKey { 27636 constructor(value) { 27637 super(value); 27638 } 27639 applyPeer(node, reset) { 27640 if (reset) { 27641 getUINativeModule().list.resetOnItemMove(node); 27642 } else { 27643 getUINativeModule().list.setOnItemMove(node, this.value); 27644 } 27645 } 27646} 27647ListOnItemMoveModifier.identity = Symbol('listOnItemMove'); 27648class ListOnItemDragStartModifier extends ModifierWithKey { 27649 constructor(value) { 27650 super(value); 27651 } 27652 applyPeer(node, reset) { 27653 if (reset) { 27654 getUINativeModule().list.resetOnItemDragStart(node); 27655 } else { 27656 getUINativeModule().list.setOnItemDragStart(node, this.value); 27657 } 27658 } 27659} 27660ListOnItemDragStartModifier.identity = Symbol('listOnItemDragStart'); 27661class ListOnItemDragEnterModifier extends ModifierWithKey { 27662 constructor(value) { 27663 super(value); 27664 } 27665 applyPeer(node, reset) { 27666 if (reset) { 27667 getUINativeModule().list.resetOnItemDragEnter(node); 27668 } else { 27669 getUINativeModule().list.setOnItemDragEnter(node, this.value); 27670 } 27671 } 27672} 27673ListOnItemDragEnterModifier.identity = Symbol('listOnItemDragEnter'); 27674class ListOnItemDragMoveModifier extends ModifierWithKey { 27675 constructor(value) { 27676 super(value); 27677 } 27678 applyPeer(node, reset) { 27679 if (reset) { 27680 getUINativeModule().list.resetOnItemDragMove(node); 27681 } else { 27682 getUINativeModule().list.setOnItemDragMove(node, this.value); 27683 } 27684 } 27685} 27686ListOnItemDragMoveModifier.identity = Symbol('listOnItemDragMove'); 27687class ListOnItemDragLeaveModifier extends ModifierWithKey { 27688 constructor(value) { 27689 super(value); 27690 } 27691 applyPeer(node, reset) { 27692 if (reset) { 27693 getUINativeModule().list.resetOnItemDragLeave(node); 27694 } else { 27695 getUINativeModule().list.setOnItemDragLeave(node, this.value); 27696 } 27697 } 27698} 27699ListOnItemDragLeaveModifier.identity = Symbol('listOnItemDragLeave'); 27700class ListOnItemDropModifier extends ModifierWithKey { 27701 constructor(value) { 27702 super(value); 27703 } 27704 applyPeer(node, reset) { 27705 if (reset) { 27706 getUINativeModule().list.resetOnItemDrop(node); 27707 } else { 27708 getUINativeModule().list.setOnItemDrop(node, this.value); 27709 } 27710 } 27711} 27712ListOnItemDropModifier.identity = Symbol('listOnItemDrop'); 27713class ListOnScrollFrameBeginModifier extends ModifierWithKey { 27714 constructor(value) { 27715 super(value); 27716 } 27717 applyPeer(node, reset) { 27718 if (reset) { 27719 getUINativeModule().list.resetOnScrollFrameBegin(node); 27720 } else { 27721 getUINativeModule().list.setOnScrollFrameBegin(node, this.value); 27722 } 27723 } 27724} 27725ListOnScrollFrameBeginModifier.identity = Symbol('listOnScrollFrameBegin'); 27726class ListOnWillScrollModifier extends ModifierWithKey { 27727 constructor(value) { 27728 super(value); 27729 } 27730 applyPeer(node, reset) { 27731 if (reset) { 27732 getUINativeModule().list.resetOnWillScroll(node); 27733 } else { 27734 getUINativeModule().list.setOnWillScroll(node, this.value); 27735 } 27736 } 27737} 27738ListOnWillScrollModifier.identity = Symbol('listOnWillScroll'); 27739class ListOnDidScrollModifier extends ModifierWithKey { 27740 constructor(value) { 27741 super(value); 27742 } 27743 applyPeer(node, reset) { 27744 if (reset) { 27745 getUINativeModule().list.resetOnDidScroll(node); 27746 } else { 27747 getUINativeModule().list.setOnDidScroll(node, this.value); 27748 } 27749 } 27750} 27751ListOnDidScrollModifier.identity = Symbol('listOnDidScroll'); 27752class ListOnReachStartModifier extends ModifierWithKey { 27753 constructor(value) { 27754 super(value); 27755 } 27756 applyPeer(node, reset) { 27757 if (reset) { 27758 getUINativeModule().list.resetOnReachStart(node); 27759 } else { 27760 getUINativeModule().list.setOnReachStart(node, this.value); 27761 } 27762 } 27763} 27764ListOnReachStartModifier.identity = Symbol('listOnReachStart'); 27765class ListOnReachEndModifier extends ModifierWithKey { 27766 constructor(value) { 27767 super(value); 27768 } 27769 applyPeer(node, reset) { 27770 if (reset) { 27771 getUINativeModule().list.resetOnReachEnd(node); 27772 } else { 27773 getUINativeModule().list.setOnReachEnd(node, this.value); 27774 } 27775 } 27776} 27777ListOnReachEndModifier.identity = Symbol('listOnReachEnd'); 27778class ListOnScrollStartModifier extends ModifierWithKey { 27779 constructor(value) { 27780 super(value); 27781 } 27782 applyPeer(node, reset) { 27783 if (reset) { 27784 getUINativeModule().list.resetOnScrollStart(node); 27785 } else { 27786 getUINativeModule().list.setOnScrollStart(node, this.value); 27787 } 27788 } 27789} 27790ListOnScrollStartModifier.identity = Symbol('listOnScrollStart'); 27791class ListOnScrollStopModifier extends ModifierWithKey { 27792 constructor(value) { 27793 super(value); 27794 } 27795 applyPeer(node, reset) { 27796 if (reset) { 27797 getUINativeModule().list.resetOnScrollStop(node); 27798 } else { 27799 getUINativeModule().list.setOnScrollStop(node, this.value); 27800 } 27801 } 27802} 27803ListOnScrollStopModifier.identity = Symbol('listOnScrollStop'); 27804class ListFadingEdgeModifier extends ModifierWithKey { 27805 constructor(value) { 27806 super(value); 27807 } 27808 applyPeer(node, reset) { 27809 if (reset) { 27810 getUINativeModule().list.resetFadingEdge(node); 27811 } 27812 else { 27813 getUINativeModule().list.setFadingEdge(node, this.value.value, this.value.options?.fadingEdgeLength); 27814 } 27815 } 27816 checkObjectDiff() { 27817 return !((this.stageValue.value === this.value.value) && 27818 (this.stageValue.options === this.value.options)); 27819 } 27820} 27821ListFadingEdgeModifier.identity = Symbol('listFadingEdge'); 27822 27823class ListChildrenMainSizeModifier extends ModifierWithKey { 27824 constructor(value) { 27825 super(value); 27826 } 27827 applyPeer(node, reset) { 27828 if (reset) { 27829 getUINativeModule().list.resetListChildrenMainSize(node); 27830 } 27831 else { 27832 getUINativeModule().list.setListChildrenMainSize(node, this.value); 27833 } 27834 } 27835 checkObjectDiff() { 27836 return true; 27837 } 27838} 27839ListChildrenMainSizeModifier.identity = Symbol('listChildrenMainSize'); 27840 27841class ListSpaceModifier extends ModifierWithKey { 27842 constructor(value) { 27843 super(value); 27844 } 27845 applyPeer(node, reset) { 27846 if (reset) { 27847 getUINativeModule().list.resetSpace(node); 27848 } 27849 else { 27850 getUINativeModule().list.setSpace(node, this.value); 27851 } 27852 } 27853} 27854ListSpaceModifier.identity = Symbol('listSpace'); 27855 27856class ListInitialIndexModifier extends ModifierWithKey { 27857 constructor(value) { 27858 super(value); 27859 } 27860 applyPeer(node, reset) { 27861 if (reset) { 27862 getUINativeModule().list.resetInitialIndex(node); 27863 } 27864 else { 27865 getUINativeModule().list.setInitialIndex(node, this.value); 27866 } 27867 } 27868} 27869ListInitialIndexModifier.identity = Symbol('listInitialIndex'); 27870 27871class ListInitialScrollerModifier extends ModifierWithKey { 27872 constructor(value) { 27873 super(value); 27874 } 27875 applyPeer(node, reset) { 27876 if (reset) { 27877 getUINativeModule().list.resetInitialScroller(node); 27878 } 27879 else { 27880 getUINativeModule().list.setInitialScroller(node, this.value); 27881 } 27882 } 27883} 27884ListInitialScrollerModifier.identity = Symbol('listInitialScroller'); 27885 27886class ArkListComponent extends ArkScrollable { 27887 constructor(nativePtr, classType) { 27888 super(nativePtr, classType); 27889 } 27890 27891 initialize(value) { 27892 if (value[0] !== undefined) { 27893 if (value[0].initialIndex !== undefined) { 27894 modifierWithKey(this._modifiersWithKeys, ListInitialIndexModifier.identity, ListInitialIndexModifier, value[0].initialIndex); 27895 } 27896 if (value[0].space !== undefined) { 27897 modifierWithKey(this._modifiersWithKeys, ListSpaceModifier.identity, ListSpaceModifier, value[0].space); 27898 } 27899 if (value[0].scroller !== undefined) { 27900 modifierWithKey(this._modifiersWithKeys, ListInitialScrollerModifier.identity, ListInitialScrollerModifier, value[0].scroller); 27901 } 27902 } 27903 return this; 27904 } 27905 allowChildTypes() { 27906 return ["ListItem", "ListItemGroup"]; 27907 } 27908 lanes(value, gutter) { 27909 let opt = new ArkLanesOpt(); 27910 opt.gutter = gutter; 27911 if (isUndefined(value)) { 27912 opt.lanesNum = undefined; 27913 } 27914 else if (isNumber(value)) { 27915 opt.lanesNum = value; 27916 } 27917 else { 27918 const lc = value; 27919 opt.minLength = lc.minLength; 27920 opt.maxLength = lc.maxLength; 27921 } 27922 modifierWithKey(this._modifiersWithKeys, ListLanesModifier.identity, ListLanesModifier, opt); 27923 return this; 27924 } 27925 alignListItem(value) { 27926 modifierWithKey(this._modifiersWithKeys, ListAlignListItemModifier.identity, ListAlignListItemModifier, value); 27927 return this; 27928 } 27929 listDirection(value) { 27930 modifierWithKey(this._modifiersWithKeys, ListListDirectionModifier.identity, ListListDirectionModifier, value); 27931 return this; 27932 } 27933 scrollBar(value) { 27934 modifierWithKey(this._modifiersWithKeys, ListScrollBarModifier.identity, ListScrollBarModifier, value); 27935 return this; 27936 } 27937 scrollBarWidth(value) { 27938 modifierWithKey(this._modifiersWithKeys, ListScrollBarWidthModifier.identity, ListScrollBarWidthModifier, value); 27939 return this; 27940 } 27941 scrollBarColor(value) { 27942 modifierWithKey(this._modifiersWithKeys, ListScrollBarColorModifier.identity, ListScrollBarColorModifier, value); 27943 return this; 27944 } 27945 flingSpeedLimit(value) { 27946 modifierWithKey(this._modifiersWithKeys, ListFlingSpeedLimitModifier.identity, ListFlingSpeedLimitModifier, value); 27947 return this; 27948 } 27949 edgeEffect(value, options) { 27950 let effect = new ArkListEdgeEffect(); 27951 effect.value = value; 27952 effect.options = options; 27953 modifierWithKey(this._modifiersWithKeys, ListEdgeEffectModifier.identity, ListEdgeEffectModifier, effect); 27954 return this; 27955 } 27956 contentStartOffset(value) { 27957 modifierWithKey(this._modifiersWithKeys, ContentStartOffsetModifier.identity, ContentStartOffsetModifier, value); 27958 return this; 27959 } 27960 contentEndOffset(value) { 27961 modifierWithKey(this._modifiersWithKeys, ContentEndOffsetModifier.identity, ContentEndOffsetModifier, value); 27962 return this; 27963 } 27964 divider(value) { 27965 modifierWithKey(this._modifiersWithKeys, ListDividerModifier.identity, ListDividerModifier, value); 27966 return this; 27967 } 27968 editMode(value) { 27969 modifierWithKey(this._modifiersWithKeys, ListEditModeModifier.identity, ListEditModeModifier, value); 27970 return this; 27971 } 27972 multiSelectable(value) { 27973 modifierWithKey(this._modifiersWithKeys, ListMultiSelectableModifier.identity, ListMultiSelectableModifier, value); 27974 return this; 27975 } 27976 cachedCount(count, show) { 27977 let opt = new ArkScrollableCacheOptions(count, show ? show : false); 27978 modifierWithKey(this._modifiersWithKeys, ListCachedCountModifier.identity, ListCachedCountModifier, opt); 27979 return this; 27980 } 27981 chainAnimation(value) { 27982 modifierWithKey(this._modifiersWithKeys, ListChainAnimationModifier.identity, ListChainAnimationModifier, value); 27983 return this; 27984 } 27985 chainAnimationOptions(value) { 27986 modifierWithKey(this._modifiersWithKeys, ChainAnimationOptionsModifier.identity, ChainAnimationOptionsModifier, value); 27987 return this; 27988 } 27989 sticky(value) { 27990 modifierWithKey(this._modifiersWithKeys, ListStickyModifier.identity, ListStickyModifier, value); 27991 return this; 27992 } 27993 scrollSnapAlign(value) { 27994 modifierWithKey(this._modifiersWithKeys, ListScrollSnapAlignModifier.identity, ListScrollSnapAlignModifier, value); 27995 return this; 27996 } 27997 nestedScroll(value) { 27998 modifierWithKey(this._modifiersWithKeys, ListNestedScrollModifier.identity, ListNestedScrollModifier, value); 27999 return this; 28000 } 28001 enableScrollInteraction(value) { 28002 modifierWithKey(this._modifiersWithKeys, ListEnableScrollInteractionModifier.identity, ListEnableScrollInteractionModifier, value); 28003 return this; 28004 } 28005 friction(value) { 28006 modifierWithKey(this._modifiersWithKeys, ListFrictionModifier.identity, ListFrictionModifier, value); 28007 return this; 28008 } 28009 maintainVisibleContentPosition(value) { 28010 modifierWithKey(this._modifiersWithKeys, ListMaintainVisibleContentPositionModifier.identity, 28011 ListMaintainVisibleContentPositionModifier, value); 28012 return this; 28013 } 28014 clip(value) { 28015 modifierWithKey(this._modifiersWithKeys, ListClipModifier.identity, ListClipModifier, value); 28016 return this; 28017 } 28018 onScroll(event) { 28019 throw new Error('Method not implemented.'); 28020 } 28021 onScrollIndex(event) { 28022 modifierWithKey(this._modifiersWithKeys, ListOnScrollIndexModifier.identity, ListOnScrollIndexModifier, event); 28023 return this; 28024 } 28025 onScrollVisibleContentChange(callback) { 28026 modifierWithKey(this._modifiersWithKeys, ListOnScrollVisibleContentChangeModifier.identity, ListOnScrollVisibleContentChangeModifier, callback); 28027 return this; 28028 } 28029 onItemDelete(event) { 28030 throw new Error('Method not implemented.'); 28031 } 28032 onItemMove(event) { 28033 modifierWithKey(this._modifiersWithKeys, ListOnItemMoveModifier.identity, ListOnItemMoveModifier, event); 28034 return this; 28035 } 28036 onItemDragStart(event) { 28037 modifierWithKey(this._modifiersWithKeys, ListOnItemDragStartModifier.identity, ListOnItemDragStartModifier, event); 28038 return this; 28039 } 28040 onItemDragEnter(event) { 28041 modifierWithKey(this._modifiersWithKeys, ListOnItemDragEnterModifier.identity, ListOnItemDragEnterModifier, event); 28042 return this; 28043 } 28044 onItemDragMove(event) { 28045 modifierWithKey(this._modifiersWithKeys, ListOnItemDragMoveModifier.identity, ListOnItemDragMoveModifier, event); 28046 return this; 28047 } 28048 onItemDragLeave(event) { 28049 modifierWithKey(this._modifiersWithKeys, ListOnItemDragLeaveModifier.identity, ListOnItemDragLeaveModifier, event); 28050 return this; 28051 } 28052 onItemDrop(event) { 28053 modifierWithKey(this._modifiersWithKeys, ListOnItemDropModifier.identity, ListOnItemDropModifier, event); 28054 return this; 28055 } 28056 onScrollFrameBegin(callback) { 28057 modifierWithKey(this._modifiersWithKeys, ListOnScrollFrameBeginModifier.identity, ListOnScrollFrameBeginModifier, callback); 28058 return this; 28059 } 28060 onWillScroll(callback) { 28061 modifierWithKey(this._modifiersWithKeys, ListOnWillScrollModifier.identity, ListOnWillScrollModifier, callback); 28062 return this; 28063 } 28064 onDidScroll(callback) { 28065 modifierWithKey(this._modifiersWithKeys, ListOnDidScrollModifier.identity, ListOnDidScrollModifier, callback); 28066 return this; 28067 } 28068 onReachStart(event) { 28069 modifierWithKey(this._modifiersWithKeys, ListOnReachStartModifier.identity, ListOnReachStartModifier, event); 28070 return this; 28071 } 28072 onReachEnd(event) { 28073 modifierWithKey(this._modifiersWithKeys, ListOnReachEndModifier.identity, ListOnReachEndModifier, event); 28074 return this; 28075 } 28076 onScrollStart(event) { 28077 modifierWithKey(this._modifiersWithKeys, ListOnScrollStartModifier.identity, ListOnScrollStartModifier, event); 28078 return this; 28079 } 28080 onScrollStop(event) { 28081 modifierWithKey(this._modifiersWithKeys, ListOnScrollStopModifier.identity, ListOnScrollStopModifier, event); 28082 return this; 28083 } 28084 fadingEdge(value, options) { 28085 let fadingEdge = new ArkFadingEdge(); 28086 fadingEdge.value = value; 28087 fadingEdge.options = options; 28088 modifierWithKey(this._modifiersWithKeys, ListFadingEdgeModifier.identity, ListFadingEdgeModifier, fadingEdge); 28089 return this; 28090 } 28091 childrenMainSize(value) { 28092 modifierWithKey(this._modifiersWithKeys, ListChildrenMainSizeModifier.identity, ListChildrenMainSizeModifier, value); 28093 return this; 28094 } 28095} 28096// @ts-ignore 28097if (globalThis.List !== undefined) { 28098 globalThis.List.attributeModifier = function (modifier) { 28099 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28100 return new ArkListComponent(nativePtr); 28101 }, (nativePtr, classType, modifierJS) => { 28102 return new modifierJS.ListModifier(nativePtr, classType); 28103 }); 28104 }; 28105} 28106 28107/// <reference path='./import.ts' /> 28108class ListItemSelectedModifier extends ModifierWithKey { 28109 applyPeer(node, reset) { 28110 if (reset) { 28111 getUINativeModule().listItem.resetListItemSelected(node); 28112 } 28113 else { 28114 getUINativeModule().listItem.setListItemSelected(node, this.value); 28115 } 28116 } 28117} 28118ListItemSelectedModifier.identity = Symbol('listItemSelected'); 28119class ListItemSelectableModifier extends ModifierWithKey { 28120 applyPeer(node, reset) { 28121 if (reset) { 28122 getUINativeModule().listItem.resetSelectable(node); 28123 } 28124 else { 28125 getUINativeModule().listItem.setSelectable(node, this.value); 28126 } 28127 } 28128} 28129ListItemSelectableModifier.identity = Symbol('listItemSelectable'); 28130class ListItemSwipeActionModifier extends ModifierWithKey { 28131 constructor(value) { 28132 super(value); 28133 } 28134 applyPeer(node, reset) { 28135 if (reset) { 28136 getUINativeModule().listItem.resetSwipeAction(node); 28137 } else { 28138 getUINativeModule().listItem.setSwipeAction(node, this.value); 28139 } 28140 } 28141 checkObjectDiff() { 28142 return true; 28143 } 28144} 28145ListItemSwipeActionModifier.identity = Symbol('listItemSwipeAction'); 28146class ArkListItemComponent extends ArkComponent { 28147 constructor(nativePtr, classType) { 28148 super(nativePtr, classType); 28149 } 28150 initialize(value) { 28151 return this; 28152 } 28153 sticky(value) { 28154 throw new Error('Method not implemented.'); 28155 } 28156 editable(value) { 28157 throw new Error('Method not implemented.'); 28158 } 28159 selectable(value) { 28160 modifierWithKey(this._modifiersWithKeys, ListItemSelectableModifier.identity, ListItemSelectableModifier, value); 28161 return this; 28162 } 28163 selected(value) { 28164 modifierWithKey(this._modifiersWithKeys, ListItemSelectedModifier.identity, ListItemSelectedModifier, value); 28165 return this; 28166 } 28167 swipeAction(value) { 28168 modifierWithKey(this._modifiersWithKeys, ListItemSwipeActionModifier.identity, ListItemSwipeActionModifier, value); 28169 return this; 28170 } 28171 onSelect(event) { 28172 throw new Error('Method not implemented.'); 28173 } 28174} 28175// @ts-ignore 28176if (globalThis.ListItem !== undefined) { 28177 globalThis.ListItem.attributeModifier = function (modifier) { 28178 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28179 return new ArkListItemComponent(nativePtr); 28180 }, (nativePtr, classType, modifierJS) => { 28181 return new modifierJS.ListItemModifier(nativePtr, classType); 28182 }); 28183 }; 28184} 28185 28186/// <reference path='./import.ts' /> 28187class ListItemGroupInitializeModifier extends ModifierWithKey { 28188 constructor(value) { 28189 super(value); 28190 } 28191 applyPeer(node, reset) { 28192 if (reset) { 28193 getUINativeModule().listItemGroup.resetListItemGroupInitialize(node); 28194 } else { 28195 getUINativeModule().listItemGroup.setListItemGroupInitialize(node, this.value?.space, this.value?.style); 28196 } 28197 } 28198} 28199ListItemGroupInitializeModifier.identity = Symbol('listItemGroupinitialize'); 28200class ListItemGroupDividerModifier extends ModifierWithKey { 28201 constructor(value) { 28202 super(value); 28203 } 28204 applyPeer(node, reset) { 28205 let _a, _b, _c, _d; 28206 if (reset) { 28207 getUINativeModule().listItemGroup.resetDivider(node); 28208 } 28209 else { 28210 getUINativeModule().listItemGroup.setDivider(node, (_a = this.value) === null || 28211 _a === void 0 ? void 0 : _a.strokeWidth, (_b = this.value) === null || 28212 _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || 28213 _c === void 0 ? void 0 : _c.startMargin, (_d = this.value) === null || 28214 _d === void 0 ? void 0 : _d.endMargin); 28215 } 28216 } 28217 checkObjectDiff() { 28218 let _a, _b, _c, _d, _e, _f, _g, _h; 28219 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 28220 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 28221 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 28222 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 28223 } 28224} 28225ListItemGroupDividerModifier.identity = Symbol('listItemGroupDivider'); 28226class ListItemGroupChildrenMainSizeModifier extends ModifierWithKey { 28227 constructor(value) { 28228 super(value); 28229 } 28230 applyPeer(node, reset) { 28231 if (reset) { 28232 getUINativeModule().listItemGroup.resetListItemGroupChildrenMainSize(node); 28233 } 28234 else { 28235 getUINativeModule().listItemGroup.setListItemGroupChildrenMainSize(node, this.value); 28236 } 28237 } 28238 checkObjectDiff() { 28239 return true; 28240 } 28241} 28242ListItemGroupChildrenMainSizeModifier.identity = Symbol('listItemGroupChildrenMainSize'); 28243class ArkListItemGroupComponent extends ArkComponent { 28244 constructor(nativePtr, classType) { 28245 super(nativePtr, classType); 28246 } 28247 divider(value) { 28248 modifierWithKey(this._modifiersWithKeys, ListItemGroupDividerModifier.identity, ListItemGroupDividerModifier, value); 28249 return this; 28250 } 28251 childrenMainSize(value) { 28252 modifierWithKey(this._modifiersWithKeys, ListItemGroupChildrenMainSizeModifier.identity, ListItemGroupChildrenMainSizeModifier, value); 28253 return this; 28254 } 28255 initialize(value) { 28256 if (value[0] !== undefined) { 28257 modifierWithKey(this._modifiersWithKeys, ListItemGroupInitializeModifier.identity, 28258 ListItemGroupInitializeModifier, value[0]); 28259 } else { 28260 modifierWithKey(this._modifiersWithKeys, ListItemGroupInitializeModifier.identity, 28261 ListItemGroupInitializeModifier, undefined); 28262 } 28263 return this; 28264 } 28265 allowChildTypes() { 28266 return ["ListItem"]; 28267 } 28268} 28269// @ts-ignore 28270if (globalThis.ListItemGroup !== undefined) { 28271 globalThis.ListItemGroup.attributeModifier = function (modifier) { 28272 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28273 return new ArkListItemGroupComponent(nativePtr); 28274 }, (nativePtr, classType, modifierJS) => { 28275 return new modifierJS.ListItemGroupModifier(nativePtr, classType); 28276 }); 28277 }; 28278} 28279 28280class ArkRelativeContainerGuideLine { 28281 constructor() { 28282 this.ids = undefined; 28283 this.directions = undefined; 28284 this.positions = undefined; 28285 } 28286 28287 isEqual(another) { 28288 return ( 28289 this.ids === another.ids && 28290 this.directions === another.directions && 28291 this.positions === another.positions 28292 ); 28293 } 28294} 28295 28296class ArkRelativeContainerBarrier { 28297 constructor() { 28298 this.ids = undefined; 28299 this.directions = undefined; 28300 this.referencedIds = undefined; 28301 } 28302 28303 isEqual(another) { 28304 return ( 28305 this.ids === another.ids && 28306 this.directions === another.directions && 28307 this.referencedIds === another.positions 28308 ); 28309 } 28310} 28311 28312class RelativeContainerGuideLineModifier extends ModifierWithKey { 28313 constructor(value) { 28314 super(value); 28315 } 28316 applyPeer(node, reset) { 28317 if (reset) { 28318 getUINativeModule().relativeContainer.resetGuideLine(node); 28319 } else { 28320 getUINativeModule().relativeContainer.setGuideLine(node, 28321 this.value.ids, this.value.directions, this.value.positions); 28322 } 28323 } 28324 checkObjectDiff() { 28325 return !isBaseOrResourceEqual(this.stageValue.ids, this.value.ids) || 28326 !isBaseOrResourceEqual(this.stageValue.directions, this.value.directions) || 28327 !isBaseOrResourceEqual(this.stageValue.positions, this.value.positions); 28328 } 28329} 28330RelativeContainerGuideLineModifier.identity = Symbol('relativeContainerGuideLine'); 28331class RelativeContainerBarrierModifier extends ModifierWithKey { 28332 constructor(value) { 28333 super(value); 28334 } 28335 applyPeer(node, reset) { 28336 if (reset) { 28337 getUINativeModule().relativeContainer.resetBarrier(node); 28338 } else { 28339 getUINativeModule().relativeContainer.setBarrier(node, 28340 this.value.ids, this.value.directions, this.value.referencedIds); 28341 } 28342 } 28343 checkObjectDiff() { 28344 return !isBaseOrResourceEqual(this.stageValue.ids, this.value.ids) || 28345 !isBaseOrResourceEqual(this.stageValue.directions, this.value.directions) || 28346 !isBaseOrResourceEqual(this.stageValue.referencedIds, this.value.referencedIds); 28347 } 28348} 28349RelativeContainerBarrierModifier.identity = Symbol('relativeContainerBarrier'); 28350/// <reference path='./import.ts' /> 28351class ArkRelativeContainerComponent extends ArkComponent { 28352 constructor(nativePtr, classType) { 28353 super(nativePtr, classType); 28354 } 28355 initialize(value) { 28356 return this; 28357 } 28358 guideLine(value) { 28359 let guideLineInfo = new ArkRelativeContainerGuideLine(); 28360 guideLineInfo.ids = value.map(item => { return item.id; }); 28361 guideLineInfo.directions = value.map(item => { return item.direction; }); 28362 guideLineInfo.positions = new Array(); 28363 for (let i = 0; i < value.length; i++) { 28364 guideLineInfo.positions.push(value[i].position.start); 28365 guideLineInfo.positions.push(value[i].position.end); 28366 } 28367 modifierWithKey(this._modifiersWithKeys, RelativeContainerGuideLineModifier.identity, RelativeContainerGuideLineModifier, guideLineInfo); 28368 return this; 28369 } 28370 barrier(value) { 28371 let barrierInfo = new ArkRelativeContainerBarrier(); 28372 barrierInfo.ids = value.map(item => { return item.id; }); 28373 barrierInfo.directions = value.map(item => { return item.direction; }); 28374 barrierInfo.referencedIds = value.map(item => { return item.referencedId; }); 28375 modifierWithKey(this._modifiersWithKeys, RelativeContainerBarrierModifier.identity, RelativeContainerBarrierModifier, barrierInfo); 28376 return this; 28377 } 28378} 28379// @ts-ignore 28380if (globalThis.RelativeContainer !== undefined) { 28381 globalThis.RelativeContainer.attributeModifier = function (modifier) { 28382 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28383 return new ArkRelativeContainerComponent(nativePtr); 28384 }, (nativePtr, classType, modifierJS) => { 28385 return new modifierJS.RelativeContainerModifier(nativePtr, classType); 28386 }); 28387 }; 28388} 28389 28390/// <reference path='./import.ts' /> 28391class ArkSwiperComponent extends ArkComponent { 28392 constructor(nativePtr, classType) { 28393 super(nativePtr, classType); 28394 } 28395 initialize(value) { 28396 if (value[0] !== undefined) { 28397 modifierWithKey(this._modifiersWithKeys, SwiperInitializeModifier.identity, SwiperInitializeModifier, value[0]); 28398 } 28399 return this; 28400 } 28401 index(value) { 28402 modifierWithKey(this._modifiersWithKeys, SwiperIndexModifier.identity, SwiperIndexModifier, value); 28403 return this; 28404 } 28405 autoPlay(value) { 28406 modifierWithKey(this._modifiersWithKeys, SwiperAutoPlayModifier.identity, SwiperAutoPlayModifier, value); 28407 return this; 28408 } 28409 interval(value) { 28410 modifierWithKey(this._modifiersWithKeys, SwiperIntervalModifier.identity, SwiperIntervalModifier, value); 28411 return this; 28412 } 28413 indicator(value) { 28414 modifierWithKey(this._modifiersWithKeys, SwiperIndicatorModifier.identity, SwiperIndicatorModifier, value); 28415 return this; 28416 } 28417 displayArrow(value, isHoverShow) { 28418 let arkDisplayArrow = new ArkDisplayArrow(); 28419 arkDisplayArrow.value = value; 28420 arkDisplayArrow.isHoverShow = isHoverShow; 28421 modifierWithKey(this._modifiersWithKeys, SwiperDisplayArrowModifier.identity, SwiperDisplayArrowModifier, arkDisplayArrow); 28422 return this; 28423 } 28424 loop(value) { 28425 modifierWithKey(this._modifiersWithKeys, SwiperLoopModifier.identity, SwiperLoopModifier, value); 28426 return this; 28427 } 28428 duration(value) { 28429 modifierWithKey(this._modifiersWithKeys, SwiperDurationModifier.identity, SwiperDurationModifier, value); 28430 return this; 28431 } 28432 vertical(value) { 28433 modifierWithKey(this._modifiersWithKeys, SwiperVerticalModifier.identity, SwiperVerticalModifier, value); 28434 return this; 28435 } 28436 itemSpace(value) { 28437 modifierWithKey(this._modifiersWithKeys, SwiperItemSpaceModifier.identity, SwiperItemSpaceModifier, value); 28438 return this; 28439 } 28440 displayMode(value) { 28441 modifierWithKey(this._modifiersWithKeys, SwiperDisplayModeModifier.identity, SwiperDisplayModeModifier, value); 28442 return this; 28443 } 28444 cachedCount(value, isShown) { 28445 let arkCachedCount = new ArkSwiperCachedCount(); 28446 arkCachedCount.value = value; 28447 arkCachedCount.isShown = isShown; 28448 modifierWithKey(this._modifiersWithKeys, SwiperCachedCountModifier.identity, SwiperCachedCountModifier, arkCachedCount); 28449 return this; 28450 } 28451 displayCount(value, swipeByGroup) { 28452 let arkDisplayCount = new ArkDisplayCount(); 28453 arkDisplayCount.value = value; 28454 arkDisplayCount.swipeByGroup = swipeByGroup; 28455 modifierWithKey(this._modifiersWithKeys, SwiperDisplayCountModifier.identity, SwiperDisplayCountModifier, arkDisplayCount); 28456 return this; 28457 } 28458 effectMode(value) { 28459 modifierWithKey(this._modifiersWithKeys, SwiperEffectModeModifier.identity, SwiperEffectModeModifier, value); 28460 return this; 28461 } 28462 disableSwipe(value) { 28463 modifierWithKey(this._modifiersWithKeys, SwiperDisableSwipeModifier.identity, SwiperDisableSwipeModifier, value); 28464 return this; 28465 } 28466 curve(value) { 28467 modifierWithKey(this._modifiersWithKeys, SwiperCurveModifier.identity, SwiperCurveModifier, value); 28468 return this; 28469 } 28470 onChange(value) { 28471 modifierWithKey(this._modifiersWithKeys, SwiperOnChangeModifier.identity, SwiperOnChangeModifier, value); 28472 return this; 28473 } 28474 indicatorStyle(value) { 28475 throw new Error('Method not implemented.'); 28476 } 28477 prevMargin(value) { 28478 modifierWithKey(this._modifiersWithKeys, SwiperPrevMarginModifier.identity, SwiperPrevMarginModifier, value); 28479 return this; 28480 } 28481 nextMargin(value) { 28482 modifierWithKey(this._modifiersWithKeys, SwiperNextMarginModifier.identity, SwiperNextMarginModifier, value); 28483 return this; 28484 } 28485 enabled(value) { 28486 modifierWithKey(this._modifiersWithKeys, SwiperEnabledModifier.identity, SwiperEnabledModifier, value); 28487 return this; 28488 } 28489 onAnimationStart(value) { 28490 modifierWithKey(this._modifiersWithKeys, SwiperOnAnimationStartModifier.identity, SwiperOnAnimationStartModifier, value); 28491 return this; 28492 } 28493 onAnimationEnd(value) { 28494 modifierWithKey(this._modifiersWithKeys, SwiperOnAnimationEndModifier.identity, SwiperOnAnimationEndModifier, value); 28495 return this; 28496 } 28497 onGestureSwipe(value) { 28498 modifierWithKey(this._modifiersWithKeys, SwiperOnGestureSwipeModifier.identity, SwiperOnGestureSwipeModifier, value); 28499 return this; 28500 } 28501 nestedScroll(value) { 28502 modifierWithKey(this._modifiersWithKeys, SwiperNestedScrollModifier.identity, SwiperNestedScrollModifier, value); 28503 return this; 28504 } 28505 indicatorInteractive(value) { 28506 modifierWithKey(this._modifiersWithKeys, SwiperIndicatorInteractiveModifier.identity, SwiperIndicatorInteractiveModifier, value); 28507 return this; 28508 } 28509 customContentTransition(value) { 28510 modifierWithKey(this._modifiersWithKeys, SwiperCustomContentTransitionModifier.identity, SwiperCustomContentTransitionModifier, value); 28511 return this; 28512 } 28513 onContentDidScroll(value) { 28514 modifierWithKey(this._modifiersWithKeys, SwiperOnContentDidScrollModifier.identity, SwiperOnContentDidScrollModifier, value); 28515 return this; 28516 } 28517 pageFlipMode(value) { 28518 modifierWithKey(this._modifiersWithKeys, SwiperPageFlipModeModifier.identity, SwiperPageFlipModeModifier, value); 28519 return this; 28520 } 28521 onContentWillScroll(value) { 28522 modifierWithKey(this._modifiersWithKeys, SwiperOnContentWillScrollModifier.identity, SwiperOnContentWillScrollModifier, value); 28523 return this; 28524 } 28525} 28526class SwiperInitializeModifier extends ModifierWithKey { 28527 applyPeer(node, reset) { 28528 if (reset) { 28529 getUINativeModule().swiper.resetSwiperInitialize(node); 28530 } 28531 else { 28532 getUINativeModule().swiper.setSwiperInitialize(node, this.value); 28533 } 28534 } 28535} 28536SwiperInitializeModifier.identity = Symbol('swiperInitialize'); 28537class SwiperNextMarginModifier extends ModifierWithKey { 28538 applyPeer(node, reset) { 28539 if (reset) { 28540 getUINativeModule().swiper.resetSwiperNextMargin(node); 28541 } 28542 else { 28543 getUINativeModule().swiper.setSwiperNextMargin(node, this.value); 28544 } 28545 } 28546 checkObjectDiff() { 28547 return !isBaseOrResourceEqual(this.stageValue, this.value); 28548 } 28549} 28550SwiperNextMarginModifier.identity = Symbol('swiperNextMargin'); 28551class SwiperPrevMarginModifier extends ModifierWithKey { 28552 applyPeer(node, reset) { 28553 if (reset) { 28554 getUINativeModule().swiper.resetSwiperPrevMargin(node); 28555 } 28556 else { 28557 getUINativeModule().swiper.setSwiperPrevMargin(node, this.value); 28558 } 28559 } 28560 checkObjectDiff() { 28561 return !isBaseOrResourceEqual(this.stageValue, this.value); 28562 } 28563} 28564SwiperPrevMarginModifier.identity = Symbol('swiperPrevMargin'); 28565class SwiperDisplayCountModifier extends ModifierWithKey { 28566 applyPeer(node, reset) { 28567 if (reset) { 28568 getUINativeModule().swiper.resetSwiperSwipeByGroup(node); 28569 getUINativeModule().swiper.resetSwiperDisplayCount(node); 28570 } 28571 else { 28572 if (!isNull(this.value) && !isUndefined(this.value)) { 28573 let swipeByGroup; 28574 if (typeof this.value.swipeByGroup === 'boolean') { 28575 swipeByGroup = this.value.swipeByGroup; 28576 } 28577 28578 getUINativeModule().swiper.setSwiperSwipeByGroup(node, swipeByGroup); 28579 28580 if (typeof this.value.value === 'object') { 28581 let minSize = this.value.value.minSize.toString(); 28582 getUINativeModule().swiper.setSwiperDisplayCount(node, minSize, typeof this.value.value); 28583 } else { 28584 getUINativeModule().swiper.setSwiperDisplayCount(node, this.value.value, typeof this.value.value, swipeByGroup); 28585 } 28586 } else { 28587 getUINativeModule().swiper.resetSwiperSwipeByGroup(node); 28588 getUINativeModule().swiper.resetSwiperDisplayCount(node); 28589 } 28590 } 28591 } 28592 checkObjectDiff() { 28593 if (this.stageValue.swipeByGroup !== this.value.swipeByGroup || 28594 typeof this.stageValue.value !== typeof this.value.value) { 28595 return true; 28596 } 28597 else if (typeof this.stageValue.value === 'object' && 28598 typeof this.value.value === 'object') { 28599 return this.stageValue.value.minSize !== this.value.value.minSize; 28600 } 28601 else { 28602 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value); 28603 } 28604 } 28605} 28606SwiperDisplayCountModifier.identity = Symbol('swiperDisplayCount'); 28607class SwiperDisplayArrowModifier extends ModifierWithKey { 28608 applyPeer(node, reset) { 28609 if (reset) { 28610 getUINativeModule().swiper.resetSwiperDisplayArrow(node); 28611 } 28612 else { 28613 if (!isNull(this.value.value) && !isUndefined(this.value.value) && typeof this.value === 'object') { 28614 let displayArrowValue = 3; 28615 let showBackground; 28616 let isSidebarMiddle; 28617 let backgroundSize; 28618 let backgroundColor; 28619 let arrowSize; 28620 let arrowColor; 28621 if (typeof this.value.value === 'boolean') { 28622 if (this.value.value) { 28623 displayArrowValue = 1; 28624 } 28625 else { 28626 displayArrowValue = 0; 28627 } 28628 } 28629 else if (typeof this.value.value === 'object') { 28630 displayArrowValue = 2; 28631 showBackground = this.value.value.showBackground; 28632 isSidebarMiddle = this.value.value.isSidebarMiddle; 28633 backgroundSize = this.value.value.backgroundSize; 28634 backgroundColor = this.value.value.backgroundColor; 28635 arrowSize = this.value.value.arrowSize; 28636 arrowColor = this.value.value.arrowColor; 28637 } 28638 let isHoverShow; 28639 if (typeof this.value.isHoverShow === 'boolean') { 28640 isHoverShow = this.value.isHoverShow; 28641 } 28642 getUINativeModule().swiper.setSwiperDisplayArrow(node, displayArrowValue, showBackground, 28643 isSidebarMiddle, backgroundSize, backgroundColor, arrowSize, arrowColor, isHoverShow); 28644 } 28645 else { 28646 getUINativeModule().swiper.resetSwiperDisplayArrow(node); 28647 } 28648 } 28649 } 28650 checkObjectDiff() { 28651 if (this.stageValue.isHoverShow !== this.value.isHoverShow || 28652 typeof this.stageValue.value !== typeof this.value.value) { 28653 return true; 28654 } 28655 if (typeof this.stageValue.value === 'boolean' && 28656 typeof this.value.value === 'boolean' && 28657 this.stageValue.value !== this.value.value) { 28658 return true; 28659 } 28660 else if (typeof this.stageValue.value === 'object' && typeof this.value.value === 'object') { 28661 return (!isBaseOrResourceEqual(this.stageValue.value.showBackground, this.value.value.showBackground) || 28662 !isBaseOrResourceEqual(this.stageValue.value.isSidebarMiddle, this.value.value.isSidebarMiddle) || 28663 !isBaseOrResourceEqual(this.stageValue.value.backgroundSize, this.value.value.backgroundSize) || 28664 !isBaseOrResourceEqual(this.stageValue.value.backgroundColor, this.value.value.backgroundColor) || 28665 !isBaseOrResourceEqual(this.stageValue.value.arrowSize, this.value.value.arrowSize) || 28666 !isBaseOrResourceEqual(this.stageValue.value.arrowColor, this.value.value.arrowColor)); 28667 } 28668 else { 28669 return true; 28670 } 28671 } 28672} 28673SwiperDisplayArrowModifier.identity = Symbol('swiperDisplayArrow'); 28674class SwiperIndicatorModifier extends ModifierWithKey { 28675 applyPeer(node, reset) { 28676 if (reset) { 28677 getUINativeModule().swiper.resetSwiperIndicator(node); 28678 } 28679 else { 28680 let left; 28681 let top; 28682 let right; 28683 let bottom; 28684 let itemWidth; 28685 let itemHeight; 28686 let selectedItemWidth; 28687 let selectedItemHeight; 28688 let mask; 28689 let color; 28690 let selectedColor; 28691 let fontColor; 28692 let selectedFontColor; 28693 let digitFontSize; 28694 let digitFontWeight; 28695 let selectedDigitFontSize; 28696 let selectedDigitFontWeight; 28697 let maxDisplayCount; 28698 if (typeof this.value === 'boolean') { 28699 getUINativeModule().swiper.setSwiperIndicator(node, 'boolean', this.value); 28700 } 28701 else if (typeof this.value === 'object' && this.value.type === 'DotIndicator') { 28702 left = this.value.leftValue; 28703 top = this.value.topValue; 28704 right = this.value.rightValue; 28705 bottom = this.value.bottomValue; 28706 itemWidth = this.value.itemWidthValue; 28707 itemHeight = this.value.itemHeightValue; 28708 selectedItemWidth = this.value.selectedItemWidthValue; 28709 selectedItemHeight = this.value.selectedItemHeightValue; 28710 mask = this.value.maskValue; 28711 color = this.value.colorValue; 28712 selectedColor = this.value.selectedColorValue; 28713 maxDisplayCount = this.value.maxDisplayCountValue; 28714 getUINativeModule().swiper.setSwiperIndicator(node, 'ArkDotIndicator', itemWidth, itemHeight, selectedItemWidth, 28715 selectedItemHeight, mask, color, selectedColor, left, top, right, bottom, maxDisplayCount); 28716 } 28717 else if (typeof this.value === 'object' && this.value.type === 'DigitIndicator') { 28718 left = this.value.leftValue; 28719 top = this.value.topValue; 28720 right = this.value.rightValue; 28721 bottom = this.value.bottomValue; 28722 fontColor = this.value.fontColorValue; 28723 selectedFontColor = this.value.selectedFontColorValue; 28724 let arkDigitFont = new ArkDigitFont(); 28725 if (typeof this.value.digitFontValue === 'object') { 28726 digitFontSize = this.value.digitFontValue.size; 28727 digitFontWeight = arkDigitFont.parseFontWeight(this.value.digitFontValue.weight); 28728 } 28729 if (typeof this.value.selectedDigitFontValue === 'object') { 28730 selectedDigitFontSize = this.value.selectedDigitFontValue.size; 28731 selectedDigitFontWeight = arkDigitFont.parseFontWeight(this.value.selectedDigitFontValue.weight); 28732 } 28733 getUINativeModule().swiper.setSwiperIndicator(node, 'ArkDigitIndicator', fontColor, selectedFontColor, digitFontSize, 28734 digitFontWeight, selectedDigitFontSize, selectedDigitFontWeight, left, top, right, bottom); 28735 } 28736 else { 28737 getUINativeModule().swiper.setSwiperIndicator(node, 'IndicatorComponentController', this.value ); 28738 } 28739 } 28740 } 28741 checkObjectDiff() { 28742 if (typeof this.stageValue !== typeof this.value) { 28743 return true; 28744 } 28745 if (typeof this.stageValue === 'boolean' && typeof this.value === 'boolean') { 28746 return this.stageValue !== this.value; 28747 } 28748 if (this.stageValue instanceof ArkDotIndicator && this.value instanceof ArkDotIndicator) { 28749 return (!isBaseOrResourceEqual(this.stageValue.itemWidthValue, this.value.itemWidthValue) || 28750 !isBaseOrResourceEqual(this.stageValue.itemHeightValue, this.value.itemHeightValue) || 28751 !isBaseOrResourceEqual(this.stageValue.selectedItemWidthValue, this.value.selectedItemWidthValue) || 28752 !isBaseOrResourceEqual(this.stageValue.selectedItemHeightValue, this.value.selectedItemHeightValue) || 28753 !isBaseOrResourceEqual(this.stageValue.maskValue, this.value.maskValue) || 28754 !isBaseOrResourceEqual(this.stageValue.colorValue, this.value.colorValue) || 28755 !isBaseOrResourceEqual(this.stageValue.selectedColorValue, this.value.selectedColorValue) || 28756 !isBaseOrResourceEqual(this.stageValue.maxDisplayCountValue, this.value.maxDisplayCountValue)); 28757 } 28758 else if (this.stageValue instanceof ArkDigitIndicator && this.value instanceof ArkDigitIndicator) { 28759 return (!isBaseOrResourceEqual(this.stageValue.fontColorValue, this.value.fontColorValue) || 28760 !isBaseOrResourceEqual(this.stageValue.selectedFontColorValue, this.value.selectedFontColorValue) || 28761 !isBaseOrResourceEqual(this.stageValue.digitFontValue.size, this.value.digitFontValue.size) || 28762 !isBaseOrResourceEqual(this.stageValue.digitFontValue.weight, this.value.digitFontValue.weight) || 28763 !isBaseOrResourceEqual(this.stageValue.selectedDigitFontValue.size, this.value.selectedDigitFontValue.size) || 28764 !isBaseOrResourceEqual(this.stageValue.selectedDigitFontValue.weight, this.value.selectedDigitFontValue.weight)); 28765 } 28766 else { 28767 return true; 28768 } 28769 } 28770} 28771SwiperIndicatorModifier.identity = Symbol('swiperIndicator'); 28772class SwiperCurveModifier extends ModifierWithKey { 28773 applyPeer(node, reset) { 28774 if (reset) { 28775 getUINativeModule().swiper.resetSwiperCurve(node); 28776 } 28777 else { 28778 const curveMap = { 28779 [0]: 'linear', 28780 [1]: 'ease', 28781 [2]: 'ease-in', 28782 [3]: 'ease-out', 28783 [4]: 'ease-in-out', 28784 [5]: 'fast-out-slow-in', 28785 [6]: 'linear-out-slow-in', 28786 [7]: 'fast-out-linear-in', 28787 [8]: 'extreme-deceleration', 28788 [9]: 'sharp', 28789 [10]: 'rhythm', 28790 [11]: 'smooth', 28791 [12]: 'friction' 28792 }; 28793 if (typeof this.value === 'number') { 28794 if (this.value in curveMap) { 28795 this.value = curveMap[this.value]; 28796 } 28797 else { 28798 this.value = this.value.toString(); 28799 } 28800 } 28801 getUINativeModule().swiper.setSwiperCurve(node, this.value); 28802 } 28803 } 28804 checkObjectDiff() { 28805 return !isBaseOrResourceEqual(this.stageValue, this.value); 28806 } 28807} 28808SwiperCurveModifier.identity = Symbol('swiperCurve'); 28809class SwiperDisableSwipeModifier extends ModifierWithKey { 28810 applyPeer(node, reset) { 28811 if (reset) { 28812 getUINativeModule().swiper.resetSwiperDisableSwipe(node); 28813 } 28814 else { 28815 getUINativeModule().swiper.setSwiperDisableSwipe(node, this.value); 28816 } 28817 } 28818 checkObjectDiff() { 28819 return !isBaseOrResourceEqual(this.stageValue, this.value); 28820 } 28821} 28822SwiperDisableSwipeModifier.identity = Symbol('swiperDisableSwipe'); 28823class SwiperOnChangeModifier extends ModifierWithKey { 28824 constructor(value) { 28825 super(value); 28826 } 28827 applyPeer(node, reset) { 28828 if (reset) { 28829 getUINativeModule().swiper.resetSwiperOnChange(node); 28830 } else { 28831 getUINativeModule().swiper.setSwiperOnChange(node, this.value); 28832 } 28833 } 28834 checkObjectDiff() { 28835 return !isBaseOrResourceEqual(this.stageValue, this.value); 28836 } 28837} 28838SwiperOnChangeModifier.identity = Symbol('swiperOnChange'); 28839class SwiperEffectModeModifier extends ModifierWithKey { 28840 applyPeer(node, reset) { 28841 if (reset) { 28842 getUINativeModule().swiper.resetSwiperEffectMode(node); 28843 } 28844 else { 28845 getUINativeModule().swiper.setSwiperEffectMode(node, this.value); 28846 } 28847 } 28848 checkObjectDiff() { 28849 return !isBaseOrResourceEqual(this.stageValue, this.value); 28850 } 28851} 28852SwiperEffectModeModifier.identity = Symbol('swiperEffectMode'); 28853class SwiperCachedCountModifier extends ModifierWithKey { 28854 applyPeer(node, reset) { 28855 if (reset) { 28856 getUINativeModule().swiper.resetSwiperCachedCount(node); 28857 getUINativeModule().swiper.resetSwiperIsShown(node); 28858 } 28859 else { 28860 getUINativeModule().swiper.setSwiperCachedCount(node, this.value.value); 28861 getUINativeModule().swiper.setSwiperIsShown(node, this.value.isShown); 28862 } 28863 } 28864 checkObjectDiff() { 28865 return (!isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 28866 !isBaseOrResourceEqual(this.stageValue.isShown, this.value.isShown)); 28867 } 28868} 28869SwiperCachedCountModifier.identity = Symbol('swiperCachedCount'); 28870class SwiperDisplayModeModifier extends ModifierWithKey { 28871 applyPeer(node, reset) { 28872 if (reset) { 28873 getUINativeModule().swiper.resetSwiperDisplayMode(node); 28874 } 28875 else { 28876 getUINativeModule().swiper.setSwiperDisplayMode(node, this.value); 28877 } 28878 } 28879 checkObjectDiff() { 28880 return !isBaseOrResourceEqual(this.stageValue, this.value); 28881 } 28882} 28883SwiperDisplayModeModifier.identity = Symbol('swiperDisplayMode'); 28884class SwiperItemSpaceModifier extends ModifierWithKey { 28885 applyPeer(node, reset) { 28886 if (reset) { 28887 getUINativeModule().swiper.resetSwiperItemSpace(node); 28888 } 28889 else { 28890 getUINativeModule().swiper.setSwiperItemSpace(node, this.value); 28891 } 28892 } 28893 checkObjectDiff() { 28894 return !isBaseOrResourceEqual(this.stageValue, this.value); 28895 } 28896} 28897SwiperItemSpaceModifier.identity = Symbol('swiperItemSpace'); 28898class SwiperVerticalModifier extends ModifierWithKey { 28899 applyPeer(node, reset) { 28900 if (reset) { 28901 getUINativeModule().swiper.resetSwiperVertical(node); 28902 } 28903 else { 28904 getUINativeModule().swiper.setSwiperVertical(node, this.value); 28905 } 28906 } 28907 checkObjectDiff() { 28908 return !isBaseOrResourceEqual(this.stageValue, this.value); 28909 } 28910} 28911SwiperVerticalModifier.identity = Symbol('swiperVertical'); 28912class SwiperLoopModifier extends ModifierWithKey { 28913 applyPeer(node, reset) { 28914 if (reset) { 28915 getUINativeModule().swiper.resetSwiperLoop(node); 28916 } 28917 else { 28918 getUINativeModule().swiper.setSwiperLoop(node, this.value); 28919 } 28920 } 28921 checkObjectDiff() { 28922 return !isBaseOrResourceEqual(this.stageValue, this.value); 28923 } 28924} 28925SwiperLoopModifier.identity = Symbol('swiperLoop'); 28926class SwiperIntervalModifier extends ModifierWithKey { 28927 applyPeer(node, reset) { 28928 if (reset) { 28929 getUINativeModule().swiper.resetSwiperInterval(node); 28930 } 28931 else { 28932 getUINativeModule().swiper.setSwiperInterval(node, this.value); 28933 } 28934 } 28935 checkObjectDiff() { 28936 return !isBaseOrResourceEqual(this.stageValue, this.value); 28937 } 28938} 28939SwiperIntervalModifier.identity = Symbol('swiperInterval'); 28940class SwiperAutoPlayModifier extends ModifierWithKey { 28941 applyPeer(node, reset) { 28942 if (reset) { 28943 getUINativeModule().swiper.resetSwiperAutoPlay(node); 28944 } 28945 else { 28946 getUINativeModule().swiper.setSwiperAutoPlay(node, this.value); 28947 } 28948 } 28949 checkObjectDiff() { 28950 return !isBaseOrResourceEqual(this.stageValue, this.value); 28951 } 28952} 28953SwiperAutoPlayModifier.identity = Symbol('swiperAutoPlay'); 28954class SwiperIndexModifier extends ModifierWithKey { 28955 applyPeer(node, reset) { 28956 if (reset) { 28957 getUINativeModule().swiper.resetSwiperIndex(node); 28958 } 28959 else { 28960 getUINativeModule().swiper.setSwiperIndex(node, this.value); 28961 } 28962 } 28963 checkObjectDiff() { 28964 return !isBaseOrResourceEqual(this.stageValue, this.value); 28965 } 28966} 28967SwiperIndexModifier.identity = Symbol('swiperIndex'); 28968class SwiperDurationModifier extends ModifierWithKey { 28969 applyPeer(node, reset) { 28970 if (reset) { 28971 getUINativeModule().swiper.resetSwiperDuration(node); 28972 } 28973 else { 28974 getUINativeModule().swiper.setSwiperDuration(node, this.value); 28975 } 28976 } 28977 checkObjectDiff() { 28978 return !isBaseOrResourceEqual(this.stageValue, this.value); 28979 } 28980} 28981SwiperDurationModifier.identity = Symbol('swiperDuration'); 28982class SwiperEnabledModifier extends ModifierWithKey { 28983 constructor(value) { 28984 super(value); 28985 } 28986 applyPeer(node, reset) { 28987 if (reset) { 28988 getUINativeModule().swiper.resetSwiperEnabled(node); 28989 } 28990 else { 28991 getUINativeModule().swiper.setSwiperEnabled(node, this.value); 28992 } 28993 } 28994} 28995SwiperEnabledModifier.identity = Symbol('swiperenabled'); 28996class SwiperNestedScrollModifier extends ModifierWithKey { 28997 constructor(value) { 28998 super(value); 28999 } 29000 applyPeer(node, reset) { 29001 if (reset) { 29002 getUINativeModule().swiper.resetNestedScroll(node); 29003 } else { 29004 getUINativeModule().swiper.setNestedScroll(node, this.value); 29005 } 29006 } 29007 checkObjectDiff() { 29008 return !isBaseOrResourceEqual(this.stageValue, this.value); 29009 } 29010} 29011SwiperNestedScrollModifier.identity = Symbol('nestedScroll'); 29012class SwiperOnAnimationStartModifier extends ModifierWithKey { 29013 constructor(value) { 29014 super(value); 29015 } 29016 applyPeer(node, reset) { 29017 if (reset) { 29018 getUINativeModule().swiper.resetSwiperOnAnimationStart(node); 29019 } else { 29020 getUINativeModule().swiper.setSwiperOnAnimationStart(node, this.value); 29021 } 29022 } 29023 checkObjectDiff() { 29024 return !isBaseOrResourceEqual(this.stageValue, this.value); 29025 } 29026} 29027SwiperOnAnimationStartModifier.identity = Symbol('swiperOnAnimationStart'); 29028class SwiperOnAnimationEndModifier extends ModifierWithKey { 29029 constructor(value) { 29030 super(value); 29031 } 29032 applyPeer(node, reset) { 29033 if (reset) { 29034 getUINativeModule().swiper.resetSwiperOnAnimationEnd(node); 29035 } else { 29036 getUINativeModule().swiper.setSwiperOnAnimationEnd(node, this.value); 29037 } 29038 } 29039 checkObjectDiff() { 29040 return !isBaseOrResourceEqual(this.stageValue, this.value); 29041 } 29042} 29043SwiperOnAnimationEndModifier.identity = Symbol('swiperOnAnimationEnd'); 29044class SwiperOnGestureSwipeModifier extends ModifierWithKey { 29045 constructor(value) { 29046 super(value); 29047 } 29048 applyPeer(node, reset) { 29049 if (reset) { 29050 getUINativeModule().swiper.resetSwiperOnGestureSwipe(node); 29051 } else { 29052 getUINativeModule().swiper.setSwiperOnGestureSwipe(node, this.value); 29053 } 29054 } 29055 checkObjectDiff() { 29056 return !isBaseOrResourceEqual(this.stageValue, this.value); 29057 } 29058} 29059SwiperOnGestureSwipeModifier.identity = Symbol('swiperOnGestureSwipe'); 29060class SwiperIndicatorInteractiveModifier extends ModifierWithKey { 29061 constructor(value) { 29062 super(value); 29063 } 29064 applyPeer(node, reset) { 29065 if (reset) { 29066 getUINativeModule().swiper.resetIndicatorInteractive(node); 29067 } else { 29068 getUINativeModule().swiper.setIndicatorInteractive(node, this.value); 29069 } 29070 } 29071} 29072SwiperIndicatorInteractiveModifier.identity = Symbol('indicatorInteractive'); 29073class SwiperCustomContentTransitionModifier extends ModifierWithKey { 29074 constructor(value) { 29075 super(value); 29076 } 29077 applyPeer(node, reset) { 29078 if (reset) { 29079 getUINativeModule().swiper.resetSwiperCustomContentTransition(node); 29080 } else { 29081 getUINativeModule().swiper.setSwiperCustomContentTransition(node, this.value); 29082 } 29083 } 29084 checkObjectDiff() { 29085 return !isBaseOrResourceEqual(this.stageValue, this.value); 29086 } 29087} 29088SwiperCustomContentTransitionModifier.identity = Symbol('swiperCustomContentTransition'); 29089class SwiperOnContentDidScrollModifier extends ModifierWithKey { 29090 constructor(value) { 29091 super(value); 29092 } 29093 applyPeer(node, reset) { 29094 if (reset) { 29095 getUINativeModule().swiper.resetSwiperOnContentDidScroll(node); 29096 } else { 29097 getUINativeModule().swiper.setSwiperOnContentDidScroll(node, this.value); 29098 } 29099 } 29100 checkObjectDiff() { 29101 return !isBaseOrResourceEqual(this.stageValue, this.value); 29102 } 29103} 29104SwiperOnContentDidScrollModifier.identity = Symbol('swiperOnContentDidScroll'); 29105class SwiperPageFlipModeModifier extends ModifierWithKey { 29106 constructor(value) { 29107 super(value); 29108 } 29109 applyPeer(node, reset) { 29110 if (reset) { 29111 getUINativeModule().swiper.resetSwiperPageFlipMode(node); 29112 } else { 29113 getUINativeModule().swiper.setSwiperPageFlipMode(node, this.value); 29114 } 29115 } 29116 checkObjectDiff() { 29117 return !isBaseOrResourceEqual(this.stageValue, this.value); 29118 } 29119} 29120SwiperPageFlipModeModifier.identity = Symbol('swiperPageFlipMode'); 29121class SwiperOnContentWillScrollModifier extends ModifierWithKey { 29122 constructor(value) { 29123 super(value); 29124 } 29125 applyPeer(node, reset) { 29126 if (reset) { 29127 getUINativeModule().swiper.resetSwiperOnContentWillScroll(node); 29128 } else { 29129 getUINativeModule().swiper.setSwiperOnContentWillScroll(node, this.value); 29130 } 29131 } 29132 checkObjectDiff() { 29133 return !isBaseOrResourceEqual(this.stageValue, this.value); 29134 } 29135} 29136SwiperOnContentWillScrollModifier.identity = Symbol('swiperOnContentWillScroll'); 29137// @ts-ignore 29138if (globalThis.Swiper !== undefined) { 29139 globalThis.Swiper.attributeModifier = function (modifier) { 29140 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29141 return new ArkSwiperComponent(nativePtr); 29142 }, (nativePtr, classType, modifierJS) => { 29143 return new modifierJS.SwiperModifier(nativePtr, classType); 29144 }); 29145 }; 29146} 29147 29148class IndicatorComponentInitialIndexModifier extends ModifierWithKey { 29149 constructor(value) { 29150 super(value); 29151 } 29152 applyPeer(node, reset) { 29153 if (reset) { 29154 getUINativeModule().indicatorComponent.resetInitialIndex(node); 29155 } else { 29156 getUINativeModule().indicatorComponent.setInitialIndex(node, this.value); 29157 } 29158 } 29159 checkObjectDiff() { 29160 return !isBaseOrResourceEqual(this.stageValue, this.value); 29161 } 29162} 29163IndicatorComponentInitialIndexModifier.identity = Symbol('indicatorComponentInitialIndex'); 29164 29165class IndicatorComponentCountModifier extends ModifierWithKey { 29166 constructor(value) { 29167 super(value); 29168 } 29169 applyPeer(node, reset) { 29170 if (reset) { 29171 getUINativeModule().indicatorComponent.resetCount(node); 29172 } else { 29173 getUINativeModule().indicatorComponent.setCount(node, this.value); 29174 } 29175 } 29176 checkObjectDiff() { 29177 return !isBaseOrResourceEqual(this.stageValue, this.value); 29178 } 29179} 29180IndicatorComponentCountModifier.identity = Symbol('indicatorComponentCount'); 29181 29182class IndicatorComponentStyleModifier extends ModifierWithKey { 29183 constructor(value) { 29184 super(value); 29185 } 29186 applyPeer(node, reset) { 29187 if (reset) { 29188 getUINativeModule().indicatorComponent.resetStyle(node); 29189 } 29190 else { 29191 let left; 29192 let top; 29193 let right; 29194 let bottom; 29195 let itemWidth; 29196 let itemHeight; 29197 let selectedItemWidth; 29198 let selectedItemHeight; 29199 let mask; 29200 let color; 29201 let selectedColor; 29202 let fontColor; 29203 let selectedFontColor; 29204 let digitFontSize; 29205 let digitFontWeight; 29206 let selectedDigitFontSize; 29207 let selectedDigitFontWeight; 29208 let maxDisplayCount; 29209 if (typeof this.value === 'object' && this.value.type === 'DigitIndicator') { 29210 left = this.value.leftValue; 29211 top = this.value.topValue; 29212 right = this.value.rightValue; 29213 bottom = this.value.bottomValue; 29214 fontColor = this.value.fontColorValue; 29215 selectedFontColor = this.value.selectedFontColorValue; 29216 let arkDigitFont = new ArkDigitFont(); 29217 if (typeof this.value.digitFontValue === 'object') { 29218 digitFontSize = this.value.digitFontValue.size; 29219 digitFontWeight = arkDigitFont.parseFontWeight(this.value.digitFontValue.weight); 29220 } 29221 if (typeof this.value.selectedDigitFontValue === 'object') { 29222 selectedDigitFontSize = this.value.selectedDigitFontValue.size; 29223 selectedDigitFontWeight = arkDigitFont.parseFontWeight(this.value.selectedDigitFontValue.weight); 29224 } 29225 getUINativeModule().indicatorComponent.setStyle(node, 'ArkDigitIndicator', fontColor, selectedFontColor, digitFontSize, 29226 digitFontWeight, selectedDigitFontSize, selectedDigitFontWeight, left, top, right, bottom); 29227 } else { 29228 left = this.value.leftValue; 29229 top = this.value.topValue; 29230 right = this.value.rightValue; 29231 bottom = this.value.bottomValue; 29232 itemWidth = this.value.itemWidthValue; 29233 itemHeight = this.value.itemHeightValue; 29234 selectedItemWidth = this.value.selectedItemWidthValue; 29235 selectedItemHeight = this.value.selectedItemHeightValue; 29236 mask = this.value.maskValue; 29237 color = this.value.colorValue; 29238 selectedColor = this.value.selectedColorValue; 29239 maxDisplayCount = this.value.maxDisplayCountValue; 29240 getUINativeModule().indicatorComponent.setStyle(node, 'ArkDotIndicator', itemWidth, itemHeight, selectedItemWidth, 29241 selectedItemHeight, mask, color, selectedColor, left, top, right, bottom, maxDisplayCount); 29242 } 29243 } 29244 } 29245 checkObjectDiff() { 29246 if (typeof this.stageValue !== typeof this.value) { 29247 return true; 29248 } 29249 if (this.stageValue instanceof ArkDotIndicator && this.value instanceof ArkDotIndicator) { 29250 return (!isBaseOrResourceEqual(this.stageValue.itemWidthValue, this.value.itemWidthValue) || 29251 !isBaseOrResourceEqual(this.stageValue.itemHeightValue, this.value.itemHeightValue) || 29252 !isBaseOrResourceEqual(this.stageValue.selectedItemWidthValue, this.value.selectedItemWidthValue) || 29253 !isBaseOrResourceEqual(this.stageValue.selectedItemHeightValue, this.value.selectedItemHeightValue) || 29254 !isBaseOrResourceEqual(this.stageValue.maskValue, this.value.maskValue) || 29255 !isBaseOrResourceEqual(this.stageValue.colorValue, this.value.colorValue) || 29256 !isBaseOrResourceEqual(this.stageValue.selectedColorValue, this.value.selectedColorValue) || 29257 !isBaseOrResourceEqual(this.stageValue.maxDisplayCountValue, this.value.maxDisplayCountValue)); 29258 } 29259 else if (this.stageValue instanceof ArkDigitIndicator && this.value instanceof ArkDigitIndicator) { 29260 return (!isBaseOrResourceEqual(this.stageValue.fontColorValue, this.value.fontColorValue) || 29261 !isBaseOrResourceEqual(this.stageValue.selectedFontColorValue, this.value.selectedFontColorValue) || 29262 !isBaseOrResourceEqual(this.stageValue.digitFontValue.size, this.value.digitFontValue.size) || 29263 !isBaseOrResourceEqual(this.stageValue.digitFontValue.weight, this.value.digitFontValue.weight) || 29264 !isBaseOrResourceEqual(this.stageValue.selectedDigitFontValue.size, this.value.selectedDigitFontValue.size) || 29265 !isBaseOrResourceEqual(this.stageValue.selectedDigitFontValue.weight, this.value.selectedDigitFontValue.weight)); 29266 } 29267 else { 29268 return true; 29269 } 29270 } 29271} 29272IndicatorComponentStyleModifier.identity = Symbol('indicatorComponentStyle'); 29273 29274class IndicatorComponentLoopModifier extends ModifierWithKey { 29275 constructor(value) { 29276 super(value); 29277 } 29278 applyPeer(node, reset) { 29279 if (reset) { 29280 getUINativeModule().indicatorComponent.resetLoop(node); 29281 } else { 29282 getUINativeModule().indicatorComponent.setLoop(node, this.value); 29283 } 29284 } 29285 checkObjectDiff() { 29286 return !isBaseOrResourceEqual(this.stageValue, this.value); 29287 } 29288} 29289IndicatorComponentLoopModifier.identity = Symbol('indicatorComponentLoop'); 29290 29291class IndicatorComponentVerticalModifier extends ModifierWithKey { 29292 constructor(value) { 29293 super(value); 29294 } 29295 applyPeer(node, reset) { 29296 if (reset) { 29297 getUINativeModule().indicatorComponent.resetVertical(node); 29298 } else { 29299 getUINativeModule().indicatorComponent.setVertical(node, this.value); 29300 } 29301 } 29302 checkObjectDiff() { 29303 return !isBaseOrResourceEqual(this.stageValue, this.value); 29304 } 29305} 29306IndicatorComponentVerticalModifier.identity = Symbol('indicatorComponentVertical'); 29307 29308class IndicatorComponentOnChangeModifier extends ModifierWithKey { 29309 constructor(value) { 29310 super(value); 29311 } 29312 applyPeer(node, reset) { 29313 if (reset) { 29314 getUINativeModule().indicatorComponent.resetOnChange(node); 29315 } else { 29316 getUINativeModule().indicatorComponent.setOnChange(node, this.value); 29317 } 29318 } 29319 checkObjectDiff() { 29320 return !isBaseOrResourceEqual(this.stageValue, this.value); 29321 } 29322} 29323IndicatorComponentOnChangeModifier.identity = Symbol('indicatorComponentOnChange'); 29324 29325class ArkIndicatorComponentComponent extends ArkComponent { 29326 constructor(nativePtr, classType) { 29327 super(nativePtr, classType); 29328 } 29329 29330 initialIndex(value) { 29331 modifierWithKey(this._modifiersWithKeys, IndicatorComponentInitialIndexModifier.identity, IndicatorComponentInitialIndexModifier, value); 29332 return this; 29333 } 29334 29335 count(value) { 29336 modifierWithKey(this._modifiersWithKeys, IndicatorComponentCountModifier.identity, IndicatorComponentCountModifier, value); 29337 return this; 29338 } 29339 29340 style(value) { 29341 modifierWithKey(this._modifiersWithKeys, IndicatorComponentStyleModifier.identity, IndicatorComponentStyleModifier, value); 29342 return this; 29343 } 29344 29345 loop(value) { 29346 modifierWithKey(this._modifiersWithKeys, IndicatorComponentLoopModifier.identity, IndicatorComponentLoopModifier, value); 29347 return this; 29348 } 29349 29350 vertical(value) { 29351 modifierWithKey(this._modifiersWithKeys, IndicatorComponentVerticalModifier.identity, IndicatorComponentVerticalModifier, value); 29352 return this; 29353 } 29354 29355 onChange(value) { 29356 modifierWithKey(this._modifiersWithKeys, IndicatorComponentOnChangeModifier.identity, IndicatorComponentOnChangeModifier, value); 29357 return this; 29358 } 29359} 29360 29361// @ts-ignore 29362if (globalThis.IndicatorComponent !== undefined) { 29363 globalThis.IndicatorComponent.attributeModifier = function (modifier) { 29364 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29365 return new ArkIndicatorComponentComponent(nativePtr); 29366 }, (nativePtr, classType, modifierJS) => { 29367 return new modifierJS.IndicatorComponentModifier(nativePtr, classType); 29368 }); 29369 }; 29370} 29371 29372/// <reference path='./import.ts' /> 29373class ArkTabsComponent extends ArkComponent { 29374 constructor(nativePtr, classType) { 29375 super(nativePtr, classType); 29376 } 29377 onAnimationStart(handler) { 29378 throw new Error('Method not implemented.'); 29379 } 29380 onAnimationEnd(handler) { 29381 throw new Error('Method not implemented.'); 29382 } 29383 onGestureSwipe(handler) { 29384 throw new Error('Method not implemented.'); 29385 } 29386 vertical(value) { 29387 modifierWithKey(this._modifiersWithKeys, TabsVerticalModifier.identity, TabsVerticalModifier, value); 29388 return this; 29389 } 29390 barPosition(value) { 29391 modifierWithKey(this._modifiersWithKeys, BarPositionModifier.identity, BarPositionModifier, value); 29392 return this; 29393 } 29394 scrollable(value) { 29395 modifierWithKey(this._modifiersWithKeys, ScrollableModifier.identity, ScrollableModifier, value); 29396 return this; 29397 } 29398 barMode(value, options) { 29399 let arkBarMode = new ArkBarMode(); 29400 arkBarMode.barMode = value; 29401 arkBarMode.options = options; 29402 modifierWithKey(this._modifiersWithKeys, TabBarModeModifier.identity, TabBarModeModifier, arkBarMode); 29403 return this; 29404 } 29405 barWidth(value) { 29406 modifierWithKey(this._modifiersWithKeys, BarWidthModifier.identity, BarWidthModifier, value); 29407 return this; 29408 } 29409 barHeight(value) { 29410 if (isUndefined(value) || isNull(value)) { 29411 modifierWithKey(this._modifiersWithKeys, BarHeightModifier.identity, BarHeightModifier, undefined); 29412 } 29413 else { 29414 modifierWithKey(this._modifiersWithKeys, BarHeightModifier.identity, BarHeightModifier, value); 29415 } 29416 return this; 29417 } 29418 animationDuration(value) { 29419 modifierWithKey(this._modifiersWithKeys, AnimationDurationModifier.identity, AnimationDurationModifier, value); 29420 return this; 29421 } 29422 animationMode(value) { 29423 modifierWithKey(this._modifiersWithKeys, AnimationModeModifier.identity, AnimationModeModifier, value); 29424 return this; 29425 } 29426 onChange(event) { 29427 throw new Error('Method not implemented.'); 29428 } 29429 onTabBarClick(event) { 29430 throw new Error('Method not implemented.'); 29431 } 29432 fadingEdge(value) { 29433 modifierWithKey(this._modifiersWithKeys, FadingEdgeModifier.identity, FadingEdgeModifier, value); 29434 return this; 29435 } 29436 divider(value) { 29437 modifierWithKey(this._modifiersWithKeys, TabsDividerModifier.identity, TabsDividerModifier, value); 29438 return this; 29439 } 29440 barOverlap(value) { 29441 modifierWithKey(this._modifiersWithKeys, BarOverlapModifier.identity, BarOverlapModifier, value); 29442 return this; 29443 } 29444 barBackgroundColor(value) { 29445 modifierWithKey(this._modifiersWithKeys, BarBackgroundColorModifier.identity, BarBackgroundColorModifier, value); 29446 return this; 29447 } 29448 barBackgroundBlurStyle(value) { 29449 modifierWithKey(this._modifiersWithKeys, BarBackgroundBlurStyleModifier.identity, BarBackgroundBlurStyleModifier, value); 29450 return this; 29451 } 29452 barGridAlign(value) { 29453 modifierWithKey(this._modifiersWithKeys, BarGridAlignModifier.identity, BarGridAlignModifier, value); 29454 return this; 29455 } 29456 clip(value) { 29457 modifierWithKey(this._modifiersWithKeys, TabClipModifier.identity, TabClipModifier, value); 29458 return this; 29459 } 29460 pageFlipMode(value) { 29461 modifierWithKey(this._modifiersWithKeys, TabPageFlipModeModifier.identity, TabPageFlipModeModifier, value); 29462 return this; 29463 } 29464 width(value) { 29465 modifierWithKey(this._modifiersWithKeys, TabWidthModifier.identity, TabWidthModifier, value); 29466 return this; 29467 } 29468 height(value) { 29469 modifierWithKey(this._modifiersWithKeys, TabHeightModifier.identity, TabHeightModifier, value); 29470 return this; 29471 } 29472} 29473class BarGridAlignModifier extends ModifierWithKey { 29474 constructor(value) { 29475 super(value); 29476 } 29477 applyPeer(node, reset) { 29478 if (reset) { 29479 getUINativeModule().tabs.resetBarGridAlign(node); 29480 } 29481 else { 29482 getUINativeModule().tabs.setBarGridAlign(node, this.value.sm, this.value.md, this.value.lg, this.value.gutter, this.value.margin); 29483 } 29484 } 29485 checkObjectDiff() { 29486 return !(this.stageValue.sm === this.value.sm && 29487 this.stageValue.md === this.value.md && 29488 this.stageValue.lg === this.value.lg && 29489 this.stageValue.gutter === this.value.gutter && 29490 this.stageValue.margin === this.value.margin); 29491 } 29492} 29493BarGridAlignModifier.identity = Symbol('barGridAlign'); 29494class TabsDividerModifier extends ModifierWithKey { 29495 constructor(value) { 29496 super(value); 29497 } 29498 applyPeer(node, reset) { 29499 if (reset) { 29500 getUINativeModule().tabs.resetDivider(node); 29501 } 29502 else { 29503 getUINativeModule().tabs.setDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 29504 } 29505 } 29506 checkObjectDiff() { 29507 return !(this.stageValue.strokeWidth === this.value.strokeWidth && 29508 this.stageValue.color === this.value.color && 29509 this.stageValue.startMargin === this.value.startMargin && 29510 this.stageValue.endMargin === this.value.endMargin); 29511 } 29512} 29513TabsDividerModifier.identity = Symbol('tabsDivider'); 29514class BarWidthModifier extends ModifierWithKey { 29515 constructor(value) { 29516 super(value); 29517 } 29518 applyPeer(node, reset) { 29519 if (reset) { 29520 getUINativeModule().tabs.resetTabBarWidth(node); 29521 } 29522 else { 29523 getUINativeModule().tabs.setTabBarWidth(node, this.value); 29524 } 29525 } 29526 checkObjectDiff() { 29527 return !isBaseOrResourceEqual(this.stageValue, this.value); 29528 } 29529} 29530BarWidthModifier.identity = Symbol('barWidth'); 29531class BarAdaptiveHeightModifier extends ModifierWithKey { 29532 constructor(value) { 29533 super(value); 29534 } 29535 applyPeer(node, reset) { 29536 if (reset) { 29537 getUINativeModule().tabs.resetBarAdaptiveHeight(node); 29538 } 29539 else { 29540 getUINativeModule().tabs.setBarAdaptiveHeight(node, this.value); 29541 } 29542 } 29543} 29544BarAdaptiveHeightModifier.identity = Symbol('barAdaptiveHeight'); 29545class BarHeightModifier extends ModifierWithKey { 29546 constructor(value) { 29547 super(value); 29548 } 29549 applyPeer(node, reset) { 29550 if (reset) { 29551 getUINativeModule().tabs.resetTabBarHeight(node); 29552 } 29553 else { 29554 getUINativeModule().tabs.setTabBarHeight(node, this.value); 29555 } 29556 } 29557 checkObjectDiff() { 29558 return !isBaseOrResourceEqual(this.stageValue, this.value); 29559 } 29560} 29561BarHeightModifier.identity = Symbol('barHeight'); 29562class BarOverlapModifier extends ModifierWithKey { 29563 constructor(value) { 29564 super(value); 29565 } 29566 applyPeer(node, reset) { 29567 if (reset) { 29568 getUINativeModule().tabs.resetBarOverlap(node); 29569 } 29570 else { 29571 getUINativeModule().tabs.setBarOverlap(node, this.value); 29572 } 29573 } 29574} 29575BarOverlapModifier.identity = Symbol('barOverlap'); 29576class TabsVerticalModifier extends ModifierWithKey { 29577 constructor(value) { 29578 super(value); 29579 } 29580 applyPeer(node, reset) { 29581 if (reset) { 29582 getUINativeModule().tabs.resetIsVertical(node); 29583 } 29584 else { 29585 getUINativeModule().tabs.setIsVertical(node, this.value); 29586 } 29587 } 29588} 29589TabsVerticalModifier.identity = Symbol('vertical'); 29590class AnimationDurationModifier extends ModifierWithKey { 29591 constructor(value) { 29592 super(value); 29593 } 29594 applyPeer(node, reset) { 29595 if (reset) { 29596 getUINativeModule().tabs.resetAnimationDuration(node); 29597 } 29598 else { 29599 getUINativeModule().tabs.setAnimationDuration(node, this.value); 29600 } 29601 } 29602} 29603AnimationDurationModifier.identity = Symbol('animationduration'); 29604class AnimationModeModifier extends ModifierWithKey { 29605 constructor(value) { 29606 super(value); 29607 } 29608 applyPeer(node, reset) { 29609 if (reset) { 29610 getUINativeModule().tabs.resetAnimateMode(node); 29611 } 29612 else { 29613 getUINativeModule().tabs.setAnimateMode(node, this.value); 29614 } 29615 } 29616 checkObjectDiff() { 29617 return !isBaseOrResourceEqual(this.stageValue, this.value); 29618 } 29619} 29620AnimationModeModifier.identity = Symbol('animationMode'); 29621class ScrollableModifier extends ModifierWithKey { 29622 constructor(value) { 29623 super(value); 29624 } 29625 applyPeer(node, reset) { 29626 if (reset) { 29627 getUINativeModule().tabs.resetScrollable(node); 29628 } 29629 else { 29630 getUINativeModule().tabs.setScrollable(node, this.value); 29631 } 29632 } 29633} 29634ScrollableModifier.identity = Symbol('scrollable'); 29635class TabBarModeModifier extends ModifierWithKey { 29636 constructor(value) { 29637 super(value); 29638 } 29639 applyPeer(node, reset) { 29640 let _a, _b; 29641 if (reset) { 29642 getUINativeModule().tabs.resetTabBarMode(node); 29643 } 29644 else { 29645 getUINativeModule().tabs.setTabBarMode(node, this.value.barMode, 29646 (_a = this.value.options) === null || _a === void 0 ? void 0 : _a.margin, 29647 (_b = this.value.options) === null || _b === void 0 ? void 0 : _b.nonScrollableLayoutStyle); 29648 } 29649 } 29650 checkObjectDiff() { 29651 let _a, _b, _c, _d; 29652 if (isResource(this.stageValue) && isResource(this.value)) { 29653 return !isResourceEqual(this.stageValue, this.value); 29654 } 29655 else if (!isResource(this.stageValue) && !isResource(this.value)) { 29656 return !(this.value.barMode === this.stageValue.barMode && 29657 ((_a = this.value.options) === null || _a === void 0 ? void 0 : _a.margin) === ((_b = this.stageValue.options) === null || 29658 _b === void 0 ? void 0 : _b.margin) && 29659 ((_c = this.value.options) === null || _c === void 0 ? void 0 : _c.nonScrollableLayoutStyle) === ((_d = this.stageValue.options) === null || 29660 _d === void 0 ? void 0 : _d.nonScrollableLayoutStyle)); 29661 } 29662 else { 29663 return true; 29664 } 29665 } 29666} 29667TabBarModeModifier.identity = Symbol('tabsbarMode'); 29668class BarPositionModifier extends ModifierWithKey { 29669 constructor(value) { 29670 super(value); 29671 } 29672 applyPeer(node, reset) { 29673 if (reset) { 29674 getUINativeModule().tabs.resetTabBarPosition(node); 29675 } 29676 else { 29677 getUINativeModule().tabs.setTabBarPosition(node, this.value); 29678 } 29679 } 29680} 29681BarPositionModifier.identity = Symbol('barPosition'); 29682class TabsHideTitleBarModifier extends ModifierWithKey { 29683 constructor(value) { 29684 super(value); 29685 } 29686 applyPeer(node, reset) { 29687 if (reset) { 29688 getUINativeModule().tabs.resetHideTitleBar(node); 29689 } 29690 else { 29691 getUINativeModule().tabs.setHideTitleBar(node, this.value); 29692 } 29693 } 29694} 29695TabsHideTitleBarModifier.identity = Symbol('hideTitleBar'); 29696class BarBackgroundColorModifier extends ModifierWithKey { 29697 constructor(value) { 29698 super(value); 29699 } 29700 applyPeer(node, reset) { 29701 if (reset) { 29702 getUINativeModule().tabs.resetBarBackgroundColor(node); 29703 } 29704 else { 29705 getUINativeModule().tabs.setBarBackgroundColor(node, this.value); 29706 } 29707 } 29708 checkObjectDiff() { 29709 return !isBaseOrResourceEqual(this.stageValue, this.value); 29710 } 29711} 29712BarBackgroundColorModifier.identity = Symbol('barbackgroundcolor'); 29713class BarBackgroundBlurStyleModifier extends ModifierWithKey { 29714 constructor(value) { 29715 super(value); 29716 } 29717 applyPeer(node, reset) { 29718 if (reset) { 29719 getUINativeModule().tabs.resetBarBackgroundBlurStyle(node); 29720 } 29721 else { 29722 getUINativeModule().tabs.setBarBackgroundBlurStyle(node, this.value); 29723 } 29724 } 29725 checkObjectDiff() { 29726 return !isBaseOrResourceEqual(this.stageValue, this.value); 29727 } 29728} 29729BarBackgroundBlurStyleModifier.identity = Symbol('barbackgroundblurstyle'); 29730class FadingEdgeModifier extends ModifierWithKey { 29731 constructor(value) { 29732 super(value); 29733 } 29734 applyPeer(node, reset) { 29735 if (reset) { 29736 getUINativeModule().tabs.resetFadingEdge(node); 29737 } 29738 else { 29739 getUINativeModule().tabs.setFadingEdge(node, this.value); 29740 } 29741 } 29742} 29743FadingEdgeModifier.identity = Symbol('fadingedge'); 29744class TabClipModifier extends ModifierWithKey { 29745 constructor(value) { 29746 super(value); 29747 } 29748 applyPeer(node, reset) { 29749 if (reset) { 29750 getUINativeModule().tabs.resetTabClip(node); 29751 } 29752 else { 29753 getUINativeModule().tabs.setTabClip(node, this.value); 29754 } 29755 } 29756 checkObjectDiff() { 29757 return true; 29758 } 29759} 29760TabClipModifier.identity = Symbol('tabclip'); 29761class TabEdgeEffectModifier extends ModifierWithKey { 29762 applyPeer(node, reset) { 29763 if (reset) { 29764 getUINativeModule().tabs.resetTabEdgeEffect(node); 29765 } else { 29766 getUINativeModule().tabs.setTabEdgeEffect(node, this.value); 29767 } 29768 } 29769 checkObjectDiff() { 29770 return !isBaseOrResourceEqual(this.stageValue, this.value); 29771 } 29772} 29773TabClipModifier.identity = Symbol('tabedgeEffect'); 29774class TabPageFlipModeModifier extends ModifierWithKey { 29775 applyPeer(node, reset) { 29776 if (reset) { 29777 getUINativeModule().tabs.resetTabPageFlipMode(node); 29778 } else { 29779 getUINativeModule().tabs.setTabPageFlipMode(node, this.value); 29780 } 29781 } 29782 checkObjectDiff() { 29783 return !isBaseOrResourceEqual(this.stageValue, this.value); 29784 } 29785} 29786TabPageFlipModeModifier.identity = Symbol('tabPageFlipMode'); 29787class TabWidthModifier extends ModifierWithKey { 29788 constructor(value) { 29789 super(value); 29790 } 29791 applyPeer(node, reset) { 29792 if (reset) { 29793 getUINativeModule().tabs.resetTabWidth(node); 29794 } 29795 else { 29796 getUINativeModule().tabs.setTabWidth(node, this.value); 29797 } 29798 } 29799} 29800TabWidthModifier.identity = Symbol('tabWidth'); 29801class TabHeightModifier extends ModifierWithKey { 29802 constructor(value) { 29803 super(value); 29804 } 29805 applyPeer(node, reset) { 29806 if (reset) { 29807 getUINativeModule().tabs.resetTabHeight(node); 29808 } 29809 else { 29810 getUINativeModule().tabs.setTabHeight(node, this.value); 29811 } 29812 } 29813} 29814TabHeightModifier.identity = Symbol('tabHeight'); 29815// @ts-ignore 29816if (globalThis.Tabs !== undefined) { 29817 globalThis.Tabs.attributeModifier = function (modifier) { 29818 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29819 return new ArkTabsComponent(nativePtr); 29820 }, (nativePtr, classType, modifierJS) => { 29821 return new modifierJS.TabsModifier(nativePtr, classType); 29822 }); 29823 }; 29824} 29825 29826/// <reference path='./import.ts' /> 29827class ArkTabContentComponent extends ArkComponent { 29828 constructor(nativePtr, classType) { 29829 super(nativePtr, classType); 29830 } 29831 tabBar(value) { 29832 modifierWithKey(this._modifiersWithKeys, TabContentTabBarModifier.identity, TabContentTabBarModifier, value); 29833 return this; 29834 } 29835 size(value) { 29836 modifierWithKey(this._modifiersWithKeys, TabContentSizeModifier.identity, TabContentSizeModifier, value); 29837 return this; 29838 } 29839 width(value) { 29840 modifierWithKey(this._modifiersWithKeys, TabContentWidthModifier.identity, TabContentWidthModifier, value); 29841 return this; 29842 } 29843 height(value) { 29844 modifierWithKey(this._modifiersWithKeys, TabContentHeightModifier.identity, TabContentHeightModifier, value); 29845 return this; 29846 } 29847} 29848class TabContentTabBarModifier extends ModifierWithKey { 29849 constructor(value) { 29850 super(value); 29851 } 29852 applyPeer(node, reset) { 29853 if (reset) { 29854 getUINativeModule().tabContent.resetTabBar(node); 29855 } else { 29856 getUINativeModule().tabContent.setTabBar(this.value); 29857 } 29858 } 29859 checkObjectDiff() { 29860 return !isBaseOrResourceEqual(this.stageValue, this.value); 29861 } 29862} 29863TabContentTabBarModifier.identity = Symbol('tabContentTabBar'); 29864class TabContentWidthModifier extends ModifierWithKey { 29865 constructor(value) { 29866 super(value); 29867 } 29868 applyPeer(node, reset) { 29869 if (reset) { 29870 getUINativeModule().tabContent.resetTabContentWidth(node); 29871 } 29872 else { 29873 getUINativeModule().tabContent.setTabContentWidth(node, this.value); 29874 } 29875 } 29876 checkObjectDiff() { 29877 return !isBaseOrResourceEqual(this.stageValue, this.value); 29878 } 29879} 29880TabContentWidthModifier.identity = Symbol('tabcontentwidth'); 29881class TabContentHeightModifier extends ModifierWithKey { 29882 constructor(value) { 29883 super(value); 29884 } 29885 applyPeer(node, reset) { 29886 if (reset) { 29887 getUINativeModule().tabContent.resetTabContentHeight(node); 29888 } 29889 else { 29890 getUINativeModule().tabContent.setTabContentHeight(node, this.value); 29891 } 29892 } 29893 checkObjectDiff() { 29894 return !isBaseOrResourceEqual(this.stageValue, this.value); 29895 } 29896} 29897TabContentHeightModifier.identity = Symbol('tabcontentheight'); 29898class TabContentSizeModifier extends ModifierWithKey { 29899 constructor(value) { 29900 super(value); 29901 } 29902 applyPeer(node, reset) { 29903 if (reset) { 29904 getUINativeModule().tabContent.resetTabContentSize(node); 29905 } 29906 else { 29907 getUINativeModule().tabContent.setTabContentSize(node, this.value.width, this.value.height); 29908 } 29909 } 29910 checkObjectDiff() { 29911 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 29912 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 29913 } 29914} 29915TabContentSizeModifier.identity = Symbol('tabcontentsize'); 29916// @ts-ignore 29917if (globalThis.TabContent !== undefined) { 29918 globalThis.TabContent.attributeModifier = function (modifier) { 29919 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29920 return new ArkTabContentComponent(nativePtr); 29921 }, (nativePtr, classType, modifierJS) => { 29922 return new modifierJS.TabContentModifier(nativePtr, classType); 29923 }); 29924 }; 29925} 29926 29927/// <reference path='./import.ts' /> 29928class ArkUIExtensionComponentComponent extends ArkComponent { 29929 constructor(nativePtr, classType) { 29930 super(nativePtr, classType); 29931 } 29932 onRemoteReady(callback) { 29933 throw new Error('Method not implemented.'); 29934 } 29935 onReceive(callback) { 29936 throw new Error('Method not implemented.'); 29937 } 29938 onResult(callback) { 29939 throw new Error('Method not implemented.'); 29940 } 29941 onRelease(callback) { 29942 throw new Error('Method not implemented.'); 29943 } 29944 onError(callback) { 29945 throw new Error('Method not implemented.'); 29946 } 29947} 29948// @ts-ignore 29949if (globalThis.UIExtensionComponent !== undefined) { 29950 globalThis.UIExtensionComponent.attributeModifier = function (modifier) { 29951 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29952 return new ArkUIExtensionComponentComponent(nativePtr); 29953 }, (nativePtr, classType, modifierJS) => { 29954 return new modifierJS.CommonModifier(nativePtr, classType); 29955 }); 29956 }; 29957} 29958 29959/// <reference path='./import.ts' /> 29960class ItemConstraintSizeModifier extends ModifierWithKey { 29961 constructor(value) { 29962 super(value); 29963 } 29964 applyPeer(node, reset) { 29965 if (reset) { 29966 getUINativeModule().waterFlow.resetItemConstraintSize(node); 29967 } 29968 else { 29969 getUINativeModule().waterFlow.setItemConstraintSize(node, this.value.minWidth, this.value.maxWidth, this.value.minHeight, this.value.maxHeight); 29970 } 29971 } 29972 checkObjectDiff() { 29973 return !isBaseOrResourceEqual(this.stageValue.minWidth, this.value.minWidth) || 29974 !isBaseOrResourceEqual(this.stageValue.maxWidth, this.value.maxWidth) || 29975 !isBaseOrResourceEqual(this.stageValue.minHeight, this.value.minHeight) || 29976 !isBaseOrResourceEqual(this.stageValue.maxHeight, this.value.maxHeight); 29977 } 29978} 29979ItemConstraintSizeModifier.identity = Symbol('itemConstraintSize'); 29980class ColumnsTemplateModifier extends ModifierWithKey { 29981 constructor(value) { 29982 super(value); 29983 } 29984 applyPeer(node, reset) { 29985 if (reset) { 29986 getUINativeModule().waterFlow.resetColumnsTemplate(node); 29987 } 29988 else { 29989 getUINativeModule().waterFlow.setColumnsTemplate(node, this.value); 29990 } 29991 } 29992} 29993ColumnsTemplateModifier.identity = Symbol('columnsTemplate'); 29994class RowsTemplateModifier extends ModifierWithKey { 29995 constructor(value) { 29996 super(value); 29997 } 29998 applyPeer(node, reset) { 29999 if (reset) { 30000 getUINativeModule().waterFlow.resetRowsTemplate(node); 30001 } 30002 else { 30003 getUINativeModule().waterFlow.setRowsTemplate(node, this.value); 30004 } 30005 } 30006} 30007RowsTemplateModifier.identity = Symbol('rowsTemplate'); 30008class EnableScrollInteractionModifier extends ModifierWithKey { 30009 constructor(value) { 30010 super(value); 30011 } 30012 applyPeer(node, reset) { 30013 if (reset) { 30014 getUINativeModule().waterFlow.resetEnableScrollInteraction(node); 30015 } 30016 else { 30017 getUINativeModule().waterFlow.setEnableScrollInteraction(node, this.value); 30018 } 30019 } 30020} 30021EnableScrollInteractionModifier.identity = Symbol('enableScrollInteraction'); 30022class RowsGapModifier extends ModifierWithKey { 30023 constructor(value) { 30024 super(value); 30025 } 30026 applyPeer(node, reset) { 30027 if (reset) { 30028 getUINativeModule().waterFlow.resetRowsGap(node); 30029 } 30030 else { 30031 getUINativeModule().waterFlow.setRowsGap(node, this.value); 30032 } 30033 } 30034 checkObjectDiff() { 30035 return !isBaseOrResourceEqual(this.stageValue, this.value); 30036 } 30037} 30038RowsGapModifier.identity = Symbol('rowsGap'); 30039class WaterFlowClipModifier extends ModifierWithKey { 30040 constructor(value) { 30041 super(value); 30042 } 30043 applyPeer(node, reset) { 30044 if (reset) { 30045 getUINativeModule().common.resetClipWithEdge(node); 30046 } 30047 else { 30048 getUINativeModule().common.setClipWithEdge(node, this.value); 30049 } 30050 } 30051 checkObjectDiff() { 30052 return true; 30053 } 30054} 30055WaterFlowClipModifier.identity = Symbol('waterFlowclip'); 30056class ColumnsGapModifier extends ModifierWithKey { 30057 constructor(value) { 30058 super(value); 30059 } 30060 applyPeer(node, reset) { 30061 if (reset) { 30062 getUINativeModule().waterFlow.resetColumnsGap(node); 30063 } 30064 else { 30065 getUINativeModule().waterFlow.setColumnsGap(node, this.value); 30066 } 30067 } 30068 checkObjectDiff() { 30069 return !isBaseOrResourceEqual(this.stageValue, this.value); 30070 } 30071} 30072ColumnsGapModifier.identity = Symbol('columnsGap'); 30073class LayoutDirectionModifier extends ModifierWithKey { 30074 constructor(value) { 30075 super(value); 30076 } 30077 applyPeer(node, reset) { 30078 if (reset) { 30079 getUINativeModule().waterFlow.resetLayoutDirection(node); 30080 } 30081 else { 30082 getUINativeModule().waterFlow.setLayoutDirection(node, this.value); 30083 } 30084 } 30085} 30086LayoutDirectionModifier.identity = Symbol('layoutDirection'); 30087class NestedScrollModifier extends ModifierWithKey { 30088 constructor(value) { 30089 super(value); 30090 } 30091 applyPeer(node, reset) { 30092 if (reset) { 30093 getUINativeModule().waterFlow.resetNestedScroll(node); 30094 } 30095 else { 30096 getUINativeModule().waterFlow.setNestedScroll(node, this.value.scrollForward, this.value.scrollBackward); 30097 } 30098 } 30099} 30100NestedScrollModifier.identity = Symbol('nestedScroll'); 30101class FrictionModifier extends ModifierWithKey { 30102 constructor(value) { 30103 super(value); 30104 } 30105 applyPeer(node, reset) { 30106 if (reset) { 30107 getUINativeModule().waterFlow.resetFriction(node); 30108 } 30109 else { 30110 getUINativeModule().waterFlow.setFriction(node, this.value); 30111 } 30112 } 30113 checkObjectDiff() { 30114 return !isBaseOrResourceEqual(this.stageValue, this.value); 30115 } 30116} 30117FrictionModifier.identity = Symbol('friction'); 30118 30119class WaterFlowEdgeEffectModifier extends ModifierWithKey { 30120 constructor(value) { 30121 super(value); 30122 } 30123 applyPeer(node, reset) { 30124 let _a, _b; 30125 if (reset) { 30126 getUINativeModule().waterFlow.resetEdgeEffect(node); 30127 } 30128 else { 30129 getUINativeModule().waterFlow.setEdgeEffect(node, (_a = this.value) === null || 30130 _a === void 0 ? void 0 : _a.value, (_b = this.value.options) === null || 30131 _b === void 0 ? void 0 : _b.alwaysEnabled); 30132 } 30133 } 30134 checkObjectDiff() { 30135 return !((this.stageValue.value === this.value.value) && 30136 (this.stageValue.options === this.value.options)); 30137 } 30138} 30139WaterFlowEdgeEffectModifier.identity = Symbol('waterFlowEdgeEffect'); 30140class WaterFlowFadingEdgeModifier extends ModifierWithKey { 30141 constructor(value) { 30142 super(value); 30143 } 30144 applyPeer(node, reset) { 30145 if (reset) { 30146 getUINativeModule().waterFlow.resetFadingEdge(node); 30147 } 30148 else { 30149 getUINativeModule().waterFlow.setFadingEdge(node, this.value.value, this.value.options?.fadingEdgeLength); 30150 } 30151 } 30152 checkObjectDiff() { 30153 return !((this.stageValue.value === this.value.value) && 30154 (this.stageValue.options === this.value.options)); 30155 } 30156} 30157WaterFlowFadingEdgeModifier.identity = Symbol('waterFlowFadingEdge'); 30158 30159class WaterFlowScrollBarWidthModifier extends ModifierWithKey { 30160 constructor(value) { 30161 super(value); 30162 } 30163 applyPeer(node, reset) { 30164 if (reset) { 30165 getUINativeModule().waterFlow.resetScrollBarWidth(node); 30166 } 30167 else { 30168 getUINativeModule().waterFlow.setScrollBarWidth(node, this.value); 30169 } 30170 } 30171} 30172WaterFlowScrollBarWidthModifier.identity = Symbol('waterFlowScrollBarWidth'); 30173class WaterFlowScrollBarModifier extends ModifierWithKey { 30174 constructor(value) { 30175 super(value); 30176 } 30177 applyPeer(node, reset) { 30178 if (reset) { 30179 getUINativeModule().waterFlow.resetScrollBar(node); 30180 } 30181 else { 30182 getUINativeModule().waterFlow.setScrollBar(node, this.value); 30183 } 30184 } 30185} 30186WaterFlowScrollBarModifier.identity = Symbol('waterFlowScrollBar'); 30187class WaterFlowScrollBarColorModifier extends ModifierWithKey { 30188 constructor(value) { 30189 super(value); 30190 } 30191 applyPeer(node, reset) { 30192 if (reset) { 30193 getUINativeModule().waterFlow.resetScrollBarColor(node); 30194 } 30195 else { 30196 getUINativeModule().waterFlow.setScrollBarColor(node, this.value); 30197 } 30198 } 30199} 30200WaterFlowScrollBarColorModifier.identity = Symbol('waterFlowScrollBarColor'); 30201 30202class WaterFlowCachedCountModifier extends ModifierWithKey { 30203 constructor(value) { 30204 super(value); 30205 } 30206 applyPeer(node, reset) { 30207 if (reset) { 30208 getUINativeModule().waterFlow.resetCachedCount(node); 30209 } 30210 else { 30211 getUINativeModule().waterFlow.setCachedCount(node, this.value.count, this.value.show); 30212 } 30213 } 30214} 30215WaterFlowCachedCountModifier.identity = Symbol('waterFlowCachedCount'); 30216 30217class WaterFlowFlingSpeedLimitModifier extends ModifierWithKey { 30218 constructor(value) { 30219 super(value); 30220 } 30221 applyPeer(node, reset) { 30222 if (reset) { 30223 getUINativeModule().waterFlow.resetFlingSpeedLimit(node); 30224 } 30225 else { 30226 getUINativeModule().waterFlow.setFlingSpeedLimit(node, this.value); 30227 } 30228 } 30229} 30230WaterFlowFlingSpeedLimitModifier.identity = Symbol('waterFlowFlingSpeedLimit'); 30231 30232class WaterFlowInitializeModifier extends ModifierWithKey { 30233 constructor(value) { 30234 super(value); 30235 } 30236 applyPeer(node, reset) { 30237 if (reset) { 30238 getUINativeModule().waterFlow.resetWaterFlowInitialize(node); 30239 } else { 30240 getUINativeModule().waterFlow.setWaterFlowInitialize(node, 30241 this.value?.scroller, this.value?.sections, this.value?.layoutMode); 30242 } 30243 } 30244} 30245WaterFlowInitializeModifier.identity = Symbol('waterFlowInitialize'); 30246 30247class ArkWaterFlowComponent extends ArkScrollable { 30248 constructor(nativePtr, classType) { 30249 super(nativePtr, classType); 30250 } 30251 columnsTemplate(value) { 30252 modifierWithKey(this._modifiersWithKeys, ColumnsTemplateModifier.identity, ColumnsTemplateModifier, value); 30253 return this; 30254 } 30255 rowsTemplate(value) { 30256 modifierWithKey(this._modifiersWithKeys, RowsTemplateModifier.identity, RowsTemplateModifier, value); 30257 return this; 30258 } 30259 itemConstraintSize(value) { 30260 if (!value) { 30261 modifierWithKey(this._modifiersWithKeys, ItemConstraintSizeModifier.identity, ItemConstraintSizeModifier, undefined); 30262 return this; 30263 } 30264 let arkValue = new ArkConstraintSizeOptions(); 30265 arkValue.minWidth = value.minWidth; 30266 arkValue.maxWidth = value.maxWidth; 30267 arkValue.minHeight = value.minHeight; 30268 arkValue.maxHeight = value.maxHeight; 30269 modifierWithKey(this._modifiersWithKeys, ItemConstraintSizeModifier.identity, ItemConstraintSizeModifier, arkValue); 30270 return this; 30271 } 30272 columnsGap(value) { 30273 modifierWithKey(this._modifiersWithKeys, ColumnsGapModifier.identity, ColumnsGapModifier, value); 30274 return this; 30275 } 30276 rowsGap(value) { 30277 modifierWithKey(this._modifiersWithKeys, RowsGapModifier.identity, RowsGapModifier, value); 30278 return this; 30279 } 30280 layoutDirection(value) { 30281 modifierWithKey(this._modifiersWithKeys, LayoutDirectionModifier.identity, LayoutDirectionModifier, value); 30282 return this; 30283 } 30284 nestedScroll(value) { 30285 let options = new ArkNestedScrollOptions(); 30286 if (value) { 30287 if (value.scrollForward) { 30288 options.scrollForward = value.scrollForward; 30289 } 30290 if (value.scrollBackward) { 30291 options.scrollBackward = value.scrollBackward; 30292 } 30293 modifierWithKey(this._modifiersWithKeys, NestedScrollModifier.identity, NestedScrollModifier, options); 30294 } 30295 return this; 30296 } 30297 enableScrollInteraction(value) { 30298 modifierWithKey(this._modifiersWithKeys, EnableScrollInteractionModifier.identity, EnableScrollInteractionModifier, value); 30299 return this; 30300 } 30301 friction(value) { 30302 modifierWithKey(this._modifiersWithKeys, FrictionModifier.identity, FrictionModifier, value); 30303 return this; 30304 } 30305 cachedCount(count, show) { 30306 let opt = new ArkScrollableCacheOptions(count, show ? show : false); 30307 modifierWithKey(this._modifiersWithKeys, WaterFlowCachedCountModifier.identity, WaterFlowCachedCountModifier, opt); 30308 return this; 30309 } 30310 onReachStart(event) { 30311 throw new Error('Method not implemented.'); 30312 } 30313 onReachEnd(event) { 30314 throw new Error('Method not implemented.'); 30315 } 30316 onScrollFrameBegin(event) { 30317 throw new Error('Method not implemented.'); 30318 } 30319 clip(value) { 30320 modifierWithKey(this._modifiersWithKeys, WaterFlowClipModifier.identity, WaterFlowClipModifier, value); 30321 return this; 30322 } 30323 edgeEffect(value, options) { 30324 let effect = new ArkWaterFlowEdgeEffect(); 30325 effect.value = value; 30326 effect.options = options; 30327 modifierWithKey(this._modifiersWithKeys, WaterFlowEdgeEffectModifier.identity, WaterFlowEdgeEffectModifier, effect); 30328 return this; 30329 } 30330 fadingEdge(value, options) { 30331 let fadingEdge = new ArkFadingEdge(); 30332 fadingEdge.value = value; 30333 fadingEdge.options = options; 30334 modifierWithKey(this._modifiersWithKeys, WaterFlowFadingEdgeModifier.identity, WaterFlowFadingEdgeModifier, fadingEdge); 30335 return this; 30336 } 30337 scrollBarWidth(value) { 30338 modifierWithKey(this._modifiersWithKeys, WaterFlowScrollBarWidthModifier.identity, WaterFlowScrollBarWidthModifier, value); 30339 return this; 30340 } 30341 scrollBarColor(value) { 30342 modifierWithKey(this._modifiersWithKeys, WaterFlowScrollBarColorModifier.identity, WaterFlowScrollBarColorModifier, value); 30343 return this; 30344 } 30345 scrollBar(value) { 30346 modifierWithKey(this._modifiersWithKeys, WaterFlowScrollBarModifier.identity, WaterFlowScrollBarModifier, value); 30347 return this; 30348 } 30349 flingSpeedLimit(value) { 30350 modifierWithKey(this._modifiersWithKeys, WaterFlowFlingSpeedLimitModifier.identity, WaterFlowFlingSpeedLimitModifier, value); 30351 return this; 30352 } 30353 initialize(value) { 30354 if (value[0] !== undefined) { 30355 modifierWithKey(this._modifiersWithKeys, WaterFlowInitializeModifier.identity, 30356 WaterFlowInitializeModifier, value[0]); 30357 } else { 30358 modifierWithKey(this._modifiersWithKeys, WaterFlowInitializeModifier.identity, 30359 WaterFlowInitializeModifier, undefined); 30360 } 30361 return this; 30362 } 30363 allowChildTypes() { 30364 return ["FlowItem"]; 30365 } 30366} 30367 30368// @ts-ignore 30369if (globalThis.WaterFlow !== undefined) { 30370 globalThis.WaterFlow.attributeModifier = function (modifier) { 30371 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30372 return new ArkWaterFlowComponent(nativePtr); 30373 }, (nativePtr, classType, modifierJS) => { 30374 return new modifierJS.WaterFlowModifier(nativePtr, classType); 30375 }); 30376 }; 30377} 30378 30379/// <reference path='./import.ts' /> 30380class ArkCommonShapeComponent extends ArkComponent { 30381 constructor(nativePtr, classType) { 30382 super(nativePtr, classType); 30383 } 30384 viewPort(value) { 30385 throw new Error('Method not implemented.'); 30386 } 30387 stroke(value) { 30388 modifierWithKey(this._modifiersWithKeys, StrokeModifier.identity, StrokeModifier, value); 30389 return this; 30390 } 30391 fill(value) { 30392 modifierWithKey(this._modifiersWithKeys, FillModifier.identity, FillModifier, value); 30393 return this; 30394 } 30395 strokeDashOffset(value) { 30396 modifierWithKey(this._modifiersWithKeys, StrokeDashOffsetModifier.identity, StrokeDashOffsetModifier, value); 30397 return this; 30398 } 30399 strokeLineCap(value) { 30400 modifierWithKey(this._modifiersWithKeys, StrokeLineCapModifier.identity, StrokeLineCapModifier, value); 30401 return this; 30402 } 30403 strokeLineJoin(value) { 30404 modifierWithKey(this._modifiersWithKeys, StrokeLineJoinModifier.identity, StrokeLineJoinModifier, value); 30405 return this; 30406 } 30407 strokeMiterLimit(value) { 30408 modifierWithKey(this._modifiersWithKeys, StrokeMiterLimitModifier.identity, StrokeMiterLimitModifier, value); 30409 return this; 30410 } 30411 strokeOpacity(value) { 30412 modifierWithKey(this._modifiersWithKeys, StrokeOpacityModifier.identity, StrokeOpacityModifier, value); 30413 return this; 30414 } 30415 fillOpacity(value) { 30416 modifierWithKey(this._modifiersWithKeys, FillOpacityModifier.identity, FillOpacityModifier, value); 30417 return this; 30418 } 30419 strokeWidth(value) { 30420 modifierWithKey(this._modifiersWithKeys, StrokeWidthModifier.identity, StrokeWidthModifier, value); 30421 return this; 30422 } 30423 antiAlias(value) { 30424 modifierWithKey(this._modifiersWithKeys, AntiAliasModifier.identity, AntiAliasModifier, value); 30425 return this; 30426 } 30427 strokeDashArray(value) { 30428 modifierWithKey(this._modifiersWithKeys, StrokeDashArrayModifier.identity, StrokeDashArrayModifier, value); 30429 return this; 30430 } 30431 mesh(value, column, row) { 30432 throw new Error('Method not implemented.'); 30433 } 30434 height(value) { 30435 modifierWithKey(this._modifiersWithKeys, CommonShapeHeightModifier.identity, CommonShapeHeightModifier, value); 30436 return this; 30437 } 30438 width(value) { 30439 modifierWithKey(this._modifiersWithKeys, CommonShapeWidthModifier.identity, CommonShapeWidthModifier, value); 30440 return this; 30441 } 30442 foregroundColor(value) { 30443 modifierWithKey( 30444 this._modifiersWithKeys, CommonShapeForegroundColorModifier.identity, CommonShapeForegroundColorModifier, value); 30445 return this; 30446 } 30447} 30448class StrokeDashArrayModifier extends ModifierWithKey { 30449 constructor(value) { 30450 super(value); 30451 } 30452 applyPeer(node, reset) { 30453 if (reset) { 30454 getUINativeModule().commonShape.resetStrokeDashArray(node); 30455 } 30456 else { 30457 getUINativeModule().commonShape.setStrokeDashArray(node, this.value); 30458 } 30459 } 30460 checkObjectDiff() { 30461 return !isBaseOrResourceEqual(this.stageValue, this.value); 30462 } 30463} 30464StrokeDashArrayModifier.identity = Symbol('strokeDashArray'); 30465class StrokeModifier extends ModifierWithKey { 30466 constructor(value) { 30467 super(value); 30468 } 30469 applyPeer(node, reset) { 30470 if (reset) { 30471 getUINativeModule().commonShape.resetStroke(node); 30472 } 30473 else { 30474 getUINativeModule().commonShape.setStroke(node, this.value); 30475 } 30476 } 30477 checkObjectDiff() { 30478 return !isBaseOrResourceEqual(this.stageValue, this.value); 30479 } 30480} 30481StrokeModifier.identity = Symbol('stroke'); 30482class FillModifier extends ModifierWithKey { 30483 constructor(value) { 30484 super(value); 30485 } 30486 applyPeer(node, reset) { 30487 if (reset) { 30488 getUINativeModule().commonShape.resetFill(node); 30489 } 30490 else { 30491 getUINativeModule().commonShape.setFill(node, this.value); 30492 } 30493 } 30494 checkObjectDiff() { 30495 return !isBaseOrResourceEqual(this.stageValue, this.value); 30496 } 30497} 30498FillModifier.identity = Symbol('fill'); 30499class StrokeDashOffsetModifier extends ModifierWithKey { 30500 constructor(value) { 30501 super(value); 30502 } 30503 applyPeer(node, reset) { 30504 if (reset) { 30505 getUINativeModule().commonShape.resetStrokeDashOffset(node); 30506 } 30507 else { 30508 getUINativeModule().commonShape.setStrokeDashOffset(node, this.value); 30509 } 30510 } 30511 checkObjectDiff() { 30512 return !isBaseOrResourceEqual(this.stageValue, this.value); 30513 } 30514} 30515StrokeDashOffsetModifier.identity = Symbol('strokeDashOffset'); 30516class StrokeLineCapModifier extends ModifierWithKey { 30517 constructor(value) { 30518 super(value); 30519 } 30520 applyPeer(node, reset) { 30521 if (reset) { 30522 getUINativeModule().commonShape.resetStrokeLineCap(node); 30523 } 30524 else { 30525 getUINativeModule().commonShape.setStrokeLineCap(node, this.value); 30526 } 30527 } 30528} 30529StrokeLineCapModifier.identity = Symbol('strokeLineCap'); 30530class StrokeLineJoinModifier extends ModifierWithKey { 30531 constructor(value) { 30532 super(value); 30533 } 30534 applyPeer(node, reset) { 30535 if (reset) { 30536 getUINativeModule().commonShape.resetStrokeLineJoin(node); 30537 } 30538 else { 30539 getUINativeModule().commonShape.setStrokeLineJoin(node, this.value); 30540 } 30541 } 30542} 30543StrokeLineJoinModifier.identity = Symbol('strokeLineJoin'); 30544class StrokeMiterLimitModifier extends ModifierWithKey { 30545 constructor(value) { 30546 super(value); 30547 } 30548 applyPeer(node, reset) { 30549 if (reset) { 30550 getUINativeModule().commonShape.resetStrokeMiterLimit(node); 30551 } 30552 else { 30553 getUINativeModule().commonShape.setStrokeMiterLimit(node, this.value); 30554 } 30555 } 30556} 30557StrokeMiterLimitModifier.identity = Symbol('strokeMiterLimit'); 30558class FillOpacityModifier extends ModifierWithKey { 30559 constructor(value) { 30560 super(value); 30561 } 30562 applyPeer(node, reset) { 30563 if (reset) { 30564 getUINativeModule().commonShape.resetFillOpacity(node); 30565 } 30566 else { 30567 getUINativeModule().commonShape.setFillOpacity(node, this.value); 30568 } 30569 } 30570 checkObjectDiff() { 30571 return !isBaseOrResourceEqual(this.stageValue, this.value); 30572 } 30573} 30574FillOpacityModifier.identity = Symbol('FillOpacity'); 30575class StrokeOpacityModifier extends ModifierWithKey { 30576 constructor(value) { 30577 super(value); 30578 } 30579 applyPeer(node, reset) { 30580 if (reset) { 30581 getUINativeModule().commonShape.resetStrokeOpacity(node); 30582 } 30583 else { 30584 getUINativeModule().commonShape.setStrokeOpacity(node, this.value); 30585 } 30586 } 30587 checkObjectDiff() { 30588 return !isBaseOrResourceEqual(this.stageValue, this.value); 30589 } 30590} 30591StrokeOpacityModifier.identity = Symbol('StrokeOpacity'); 30592class StrokeWidthModifier extends ModifierWithKey { 30593 constructor(value) { 30594 super(value); 30595 } 30596 applyPeer(node, reset) { 30597 if (reset) { 30598 getUINativeModule().commonShape.resetStrokeWidth(node); 30599 } 30600 else { 30601 getUINativeModule().commonShape.setStrokeWidth(node, this.value); 30602 } 30603 } 30604} 30605StrokeWidthModifier.identity = Symbol('strokeWidth'); 30606class AntiAliasModifier extends ModifierWithKey { 30607 constructor(value) { 30608 super(value); 30609 } 30610 applyPeer(node, reset) { 30611 if (reset) { 30612 getUINativeModule().commonShape.resetAntiAlias(node); 30613 } 30614 else { 30615 getUINativeModule().commonShape.setAntiAlias(node, this.value); 30616 } 30617 } 30618} 30619AntiAliasModifier.identity = Symbol('antiAlias'); 30620class CommonShapeHeightModifier extends ModifierWithKey { 30621 constructor(value) { 30622 super(value); 30623 } 30624 applyPeer(node, reset) { 30625 if (reset) { 30626 getUINativeModule().commonShape.resetHeight(node); 30627 } 30628 else { 30629 getUINativeModule().commonShape.setHeight(node, this.value); 30630 } 30631 } 30632 checkObjectDiff() { 30633 return !isBaseOrResourceEqual(this.stageValue, this.value); 30634 } 30635} 30636CommonShapeHeightModifier.identity = Symbol('commonShapeHeight'); 30637class CommonShapeWidthModifier extends ModifierWithKey { 30638 constructor(value) { 30639 super(value); 30640 } 30641 applyPeer(node, reset) { 30642 if (reset) { 30643 getUINativeModule().commonShape.resetWidth(node); 30644 } 30645 else { 30646 getUINativeModule().commonShape.setWidth(node, this.value); 30647 } 30648 } 30649 checkObjectDiff() { 30650 return !isBaseOrResourceEqual(this.stageValue, this.value); 30651 } 30652} 30653CommonShapeWidthModifier.identity = Symbol('commonShapeWidth'); 30654class CommonShapeForegroundColorModifier extends ModifierWithKey { 30655 constructor(value) { 30656 super(value); 30657 } 30658 applyPeer(node, reset) { 30659 if (reset) { 30660 getUINativeModule().commonShape.resetForegroundColor(node); 30661 } 30662 else { 30663 getUINativeModule().commonShape.setForegroundColor(node, this.value); 30664 } 30665 } 30666 checkObjectDiff() { 30667 return !isBaseOrResourceEqual(this.stageValue, this.value); 30668 } 30669} 30670CommonShapeForegroundColorModifier.identity = Symbol('commonShapeForegroundColor'); 30671 30672/// <reference path='./import.ts' /> 30673class ArkCircleComponent extends ArkCommonShapeComponent { 30674} 30675// @ts-ignore 30676if (globalThis.Circle !== undefined) { 30677 globalThis.Circle.attributeModifier = function (modifier) { 30678 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30679 return new ArkCircleComponent(nativePtr); 30680 }, (nativePtr, classType, modifierJS) => { 30681 return new modifierJS.CircleModifier(nativePtr, classType); 30682 }); 30683 }; 30684} 30685 30686/// <reference path='./import.ts' /> 30687class ArkEllipseComponent extends ArkCommonShapeComponent { 30688 constructor(nativePtr, classType) { 30689 super(nativePtr, classType); 30690 } 30691} 30692// @ts-ignore 30693if (globalThis.Ellipse !== undefined) { 30694 globalThis.Ellipse.attributeModifier = function (modifier) { 30695 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30696 return new ArkEllipseComponent(nativePtr); 30697 }, (nativePtr, classType, modifierJS) => { 30698 return new modifierJS.CommonModifier(nativePtr, classType); 30699 }); 30700 }; 30701} 30702 30703/// <reference path='./import.ts' /> 30704/// <reference path='./ArkCommonShape.ts' /> 30705class ArkLineComponent extends ArkCommonShapeComponent { 30706 constructor(nativePtr, classType) { 30707 super(nativePtr, classType); 30708 } 30709 startPoint(value) { 30710 modifierWithKey(this._modifiersWithKeys, LineStartPointModifier.identity, LineStartPointModifier, value); 30711 return this; 30712 } 30713 endPoint(value) { 30714 modifierWithKey(this._modifiersWithKeys, LineEndPointModifier.identity, LineEndPointModifier, value); 30715 return this; 30716 } 30717} 30718class LineStartPointModifier extends ModifierWithKey { 30719 constructor(value) { 30720 super(value); 30721 } 30722 applyPeer(node, reset) { 30723 if (reset) { 30724 getUINativeModule().line.resetStartPoint(node); 30725 } 30726 else { 30727 getUINativeModule().line.setStartPoint(node, this.value); 30728 } 30729 } 30730 checkObjectDiff() { 30731 return this.stageValue !== this.value; 30732 } 30733} 30734LineStartPointModifier.identity = Symbol('startPoint'); 30735class LineEndPointModifier extends ModifierWithKey { 30736 constructor(value) { 30737 super(value); 30738 } 30739 applyPeer(node, reset) { 30740 if (reset) { 30741 getUINativeModule().line.resetEndPoint(node); 30742 } 30743 else { 30744 getUINativeModule().line.setEndPoint(node, this.value); 30745 } 30746 } 30747 checkObjectDiff() { 30748 return this.stageValue !== this.value; 30749 } 30750} 30751LineEndPointModifier.identity = Symbol('endPoint'); 30752// @ts-ignore 30753if (globalThis.Line !== undefined) { 30754 globalThis.Line.attributeModifier = function (modifier) { 30755 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30756 return new ArkLineComponent(nativePtr); 30757 }, (nativePtr, classType, modifierJS) => { 30758 return new modifierJS.LineModifier(nativePtr, classType); 30759 }); 30760 }; 30761} 30762 30763/// <reference path='./import.ts' /> 30764/// <reference path='./ArkCommonShape.ts' /> 30765const ARRAY_LENGTH = 2; 30766class ArkPolylineComponent extends ArkCommonShapeComponent { 30767 constructor(nativePtr, classType) { 30768 super(nativePtr, classType); 30769 } 30770 points(value) { 30771 modifierWithKey(this._modifiersWithKeys, PolylinePointsModifier.identity, PolylinePointsModifier, value); 30772 return this; 30773 } 30774} 30775class PolylinePointsModifier extends ModifierWithKey { 30776 constructor(value) { 30777 super(value); 30778 } 30779 applyPeer(node, reset) { 30780 let xPoint = []; 30781 let yPoint = []; 30782 if (Array.isArray(this.value)) { 30783 for (let i = 0; i <= this.value.length; i++) { 30784 let item = this.value[i]; 30785 if (!Array.isArray(item)) { 30786 continue; 30787 } 30788 if (item.length < ARRAY_LENGTH || isUndefined(item[0]) || isUndefined(item[1])) { 30789 reset = true; 30790 break; 30791 } 30792 xPoint.push(item[0]); 30793 yPoint.push(item[1]); 30794 } 30795 } 30796 else { 30797 reset = true; 30798 } 30799 if (reset) { 30800 getUINativeModule().polyline.resetPoints(node); 30801 } 30802 else { 30803 getUINativeModule().polyline.setPoints(node, xPoint, yPoint); 30804 } 30805 } 30806 checkObjectDiff() { 30807 return this.stageValue !== this.value; 30808 } 30809} 30810PolylinePointsModifier.identity = Symbol('points'); 30811// @ts-ignore 30812if (globalThis.Polyline !== undefined) { 30813 globalThis.Polyline.attributeModifier = function (modifier) { 30814 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30815 return new ArkPolylineComponent(nativePtr); 30816 }, (nativePtr, classType, modifierJS) => { 30817 return new modifierJS.PolylineModifier(nativePtr, classType); 30818 }); 30819 }; 30820} 30821 30822/// <reference path='./import.ts' /> 30823class ArkPolygonComponent extends ArkCommonShapeComponent { 30824 constructor(nativePtr, classType) { 30825 super(nativePtr, classType); 30826 } 30827 points(value) { 30828 modifierWithKey(this._modifiersWithKeys, PolygonPointsModifier.identity, PolygonPointsModifier, value); 30829 return this; 30830 } 30831} 30832class PolygonPointsModifier extends ModifierWithKey { 30833 constructor(value) { 30834 super(value); 30835 } 30836 applyPeer(node, reset) { 30837 let xPoint = []; 30838 let yPoint = []; 30839 if (Array.isArray(this.value)) { 30840 for (let i = 0; i <= this.value.length; i++) { 30841 let item = this.value[i]; 30842 if (!Array.isArray(item)) { 30843 continue; 30844 } 30845 if (item.length < ARRAY_LENGTH || isUndefined(item[0]) || isUndefined(item[1])) { 30846 reset = true; 30847 break; 30848 } 30849 xPoint.push(item[0]); 30850 yPoint.push(item[1]); 30851 } 30852 } 30853 else { 30854 reset = true; 30855 } 30856 if (reset) { 30857 getUINativeModule().polygon.resetPolygonPoints(node); 30858 } 30859 else { 30860 getUINativeModule().polygon.setPolygonPoints(node, xPoint, yPoint); 30861 } 30862 } 30863 checkObjectDiff() { 30864 return this.stageValue !== this.value; 30865 } 30866} 30867PolygonPointsModifier.identity = Symbol('polygonPoints'); 30868// @ts-ignore 30869if (globalThis.Polygon !== undefined) { 30870 globalThis.Polygon.attributeModifier = function (modifier) { 30871 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30872 return new ArkPolygonComponent(nativePtr); 30873 }, (nativePtr, classType, modifierJS) => { 30874 return new modifierJS.PolygonModifier(nativePtr, classType); 30875 }); 30876 }; 30877} 30878 30879/// <reference path='./import.ts' /> 30880class ArkPathComponent extends ArkCommonShapeComponent { 30881 constructor(nativePtr, classType) { 30882 super(nativePtr, classType); 30883 } 30884 commands(value) { 30885 modifierWithKey(this._modifiersWithKeys, CommandsModifier.identity, CommandsModifier, value); 30886 return this; 30887 } 30888} 30889class CommandsModifier extends ModifierWithKey { 30890 constructor(value) { 30891 super(value); 30892 } 30893 applyPeer(node, reset) { 30894 if (reset) { 30895 getUINativeModule().path.resetPathCommands(node); 30896 } 30897 else { 30898 getUINativeModule().path.setPathCommands(node, this.value); 30899 } 30900 } 30901 checkObjectDiff() { 30902 if (isString(this.stageValue) && isString(this.value)) { 30903 return this.stageValue !== this.value; 30904 } 30905 else { 30906 return true; 30907 } 30908 } 30909} 30910CommandsModifier.identity = Symbol('commands'); 30911// @ts-ignore 30912if (globalThis.Path !== undefined) { 30913 globalThis.Path.attributeModifier = function (modifier) { 30914 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30915 return new ArkPathComponent(nativePtr); 30916 }, (nativePtr, classType, modifierJS) => { 30917 return new modifierJS.PathModifier(nativePtr, classType); 30918 }); 30919 }; 30920} 30921 30922/// <reference path='./import.ts' /> 30923/// <reference path='./ArkCommonShape.ts' /> 30924class RectRadiusWidthModifier extends ModifierWithKey { 30925 constructor(value) { 30926 super(value); 30927 } 30928 applyPeer(node, reset) { 30929 if (reset) { 30930 getUINativeModule().rect.resetRectRadiusWidth(node); 30931 } 30932 else { 30933 getUINativeModule().rect.setRectRadiusWidth(node, this.value); 30934 } 30935 } 30936} 30937RectRadiusWidthModifier.identity = Symbol('rectRadiusWidth'); 30938class RectRadiusHeightModifier extends ModifierWithKey { 30939 constructor(value) { 30940 super(value); 30941 } 30942 applyPeer(node, reset) { 30943 if (reset) { 30944 getUINativeModule().rect.resetRectRadiusHeight(node); 30945 } 30946 else { 30947 getUINativeModule().rect.setRectRadiusHeight(node, this.value); 30948 } 30949 } 30950} 30951RectRadiusHeightModifier.identity = Symbol('rectRadiusHeight'); 30952class RectRadiusModifier extends ModifierWithKey { 30953 constructor(value) { 30954 super(value); 30955 } 30956 applyPeer(node, reset) { 30957 if (reset) { 30958 getUINativeModule().rect.resetRectRadius(node); 30959 } 30960 else { 30961 getUINativeModule().rect.setRectRadius(node, this.value); 30962 } 30963 } 30964 checkObjectDiff() { 30965 return !(this.stageValue === this.value); 30966 } 30967} 30968RectRadiusModifier.identity = Symbol('rectRadius'); 30969class ArkRectComponent extends ArkCommonShapeComponent { 30970 constructor(nativePtr, classType) { 30971 super(nativePtr, classType); 30972 } 30973 radiusWidth(value) { 30974 modifierWithKey(this._modifiersWithKeys, RectRadiusWidthModifier.identity, RectRadiusWidthModifier, value); 30975 return this; 30976 } 30977 radiusHeight(value) { 30978 modifierWithKey(this._modifiersWithKeys, RectRadiusHeightModifier.identity, RectRadiusHeightModifier, value); 30979 return this; 30980 } 30981 radius(value) { 30982 modifierWithKey(this._modifiersWithKeys, RectRadiusModifier.identity, RectRadiusModifier, value); 30983 return this; 30984 } 30985} 30986// @ts-ignore 30987if (globalThis.Rect !== undefined) { 30988 globalThis.Rect.attributeModifier = function (modifier) { 30989 attributeModifierFunc.call(this, modifier, (nativePtr) => { 30990 return new ArkRectComponent(nativePtr); 30991 }, (nativePtr, classType, modifierJS) => { 30992 return new modifierJS.RectModifier(nativePtr, classType); 30993 }); 30994 }; 30995} 30996 30997/// <reference path='./import.ts' /> 30998/// <reference path='./ArkCommonShape.ts' /> 30999class ShapeViewPortModifier extends ModifierWithKey { 31000 constructor(value) { 31001 super(value); 31002 } 31003 applyPeer(node, reset) { 31004 if (reset) { 31005 getUINativeModule().shape.resetShapeViewPort(node); 31006 } 31007 else { 31008 getUINativeModule().shape.setShapeViewPort(node, this.value.x, this.value.y, this.value.width, this.value.height); 31009 } 31010 } 31011 checkObjectDiff() { 31012 return !(this.stageValue.x === this.value.x && this.stageValue.y === this.value.y && 31013 this.stageValue.width === this.value.width && this.stageValue.height === this.value.height); 31014 } 31015} 31016ShapeViewPortModifier.identity = Symbol('shapeViewPort'); 31017class ShapeMeshModifier extends ModifierWithKey { 31018 constructor(value) { 31019 super(value); 31020 } 31021 applyPeer(node, reset) { 31022 if (reset) { 31023 getUINativeModule().shape.resetShapeMesh(node); 31024 } 31025 else { 31026 getUINativeModule().shape.setShapeMesh(node, this.value.value, this.value.column, this.value.row); 31027 } 31028 } 31029 checkObjectDiff() { 31030 return !this.stageValue.isEqual(this.value); 31031 } 31032} 31033ShapeMeshModifier.identity = Symbol('shapeMesh'); 31034class ShapeHeightModifier extends ModifierWithKey { 31035 constructor(value) { 31036 super(value); 31037 } 31038 applyPeer(node, reset) { 31039 if (reset) { 31040 getUINativeModule().common.resetHeight(node); 31041 } 31042 else { 31043 getUINativeModule().common.setHeight(node, this.value); 31044 } 31045 } 31046 checkObjectDiff() { 31047 return !isBaseOrResourceEqual(this.stageValue, this.value); 31048 } 31049} 31050ShapeHeightModifier.identity = Symbol('shapeHeight'); 31051class ShapeWidthModifier extends ModifierWithKey { 31052 constructor(value) { 31053 super(value); 31054 } 31055 applyPeer(node, reset) { 31056 if (reset) { 31057 getUINativeModule().common.resetWidth(node); 31058 } 31059 else { 31060 getUINativeModule().common.setWidth(node, this.value); 31061 } 31062 } 31063 checkObjectDiff() { 31064 return !isBaseOrResourceEqual(this.stageValue, this.value); 31065 } 31066} 31067ShapeWidthModifier.identity = Symbol('shapeWidth'); 31068class ArkShapeComponent extends ArkCommonShapeComponent { 31069 constructor(nativePtr, classType) { 31070 super(nativePtr, classType); 31071 } 31072 viewPort(value) { 31073 if (value === null) { 31074 value = undefined; 31075 } 31076 modifierWithKey(this._modifiersWithKeys, ShapeViewPortModifier.identity, ShapeViewPortModifier, value); 31077 return this; 31078 } 31079 mesh(value, column, row) { 31080 let arkMesh = new ArkMesh(); 31081 if (value !== null && column !== null && row !== null) { 31082 arkMesh.value = value; 31083 arkMesh.column = column; 31084 arkMesh.row = row; 31085 } 31086 modifierWithKey(this._modifiersWithKeys, ShapeMeshModifier.identity, ShapeMeshModifier, arkMesh); 31087 return this; 31088 } 31089 height(value) { 31090 modifierWithKey(this._modifiersWithKeys, ShapeHeightModifier.identity, ShapeHeightModifier, value); 31091 return this; 31092 } 31093 width(value) { 31094 modifierWithKey(this._modifiersWithKeys, ShapeWidthModifier.identity, ShapeWidthModifier, value); 31095 return this; 31096 } 31097} 31098// @ts-ignore 31099if (globalThis.Shape !== undefined) { 31100 globalThis.Shape.attributeModifier = function (modifier) { 31101 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31102 return new ArkShapeComponent(nativePtr); 31103 }, (nativePtr, classType, modifierJS) => { 31104 return new modifierJS.ShapeModifier(nativePtr, classType); 31105 }); 31106 }; 31107} 31108 31109/// <reference path='./import.ts' /> 31110class ArkCanvasComponent extends ArkComponent { 31111 constructor(nativePtr, classType) { 31112 super(nativePtr, classType); 31113 } 31114 onReady(event) { 31115 throw new Error('Method not implemented.'); 31116 } 31117} 31118// @ts-ignore 31119if (globalThis.Canvas !== undefined) { 31120 globalThis.Canvas.attributeModifier = function (modifier) { 31121 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31122 return new ArkCanvasComponent(nativePtr); 31123 }, (nativePtr, classType, modifierJS) => { 31124 return new modifierJS.CommonModifier(nativePtr, classType); 31125 }); 31126 }; 31127} 31128 31129/// <reference path='./import.ts' /> 31130class ArkGridContainerComponent extends ArkComponent { 31131 constructor(nativePtr, classType) { 31132 super(nativePtr, classType); 31133 } 31134 alignItems(value) { 31135 throw new Error('Method not implemented.'); 31136 } 31137 justifyContent(value) { 31138 throw new Error('Method not implemented.'); 31139 } 31140 pointLight(value) { 31141 throw new Error('Method not implemented.'); 31142 } 31143} 31144// @ts-ignore 31145if (globalThis.GridContainer !== undefined) { 31146 globalThis.GridContainer.attributeModifier = function (modifier) { 31147 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31148 return new ArkGridContainerComponent(nativePtr); 31149 }, (nativePtr, classType, modifierJS) => { 31150 return new modifierJS.CommonModifier(nativePtr, classType); 31151 }); 31152 }; 31153} 31154 31155/// <reference path='./import.ts' /> 31156class ArkEffectComponentComponent extends ArkComponent { 31157} 31158// @ts-ignore 31159if (globalThis.EffectComponent !== undefined) { 31160 // @ts-ignore 31161 globalThis.EffectComponent.attributeModifier = function (modifier) { 31162 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31163 return new ArkEffectComponentComponent(nativePtr); 31164 }, (nativePtr, classType, modifierJS) => { 31165 return new modifierJS.CommonModifier(nativePtr, classType); 31166 }); 31167 }; 31168} 31169 31170/// <reference path='./import.ts' /> 31171class ArkRemoteWindowComponent extends ArkComponent { 31172} 31173// @ts-ignore 31174if (globalThis.RemoteWindow !== undefined) { 31175 // @ts-ignore 31176 globalThis.RemoteWindow.attributeModifier = function (modifier) { 31177 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31178 return new ArkRemoteWindowComponent(nativePtr); 31179 }, (nativePtr, classType, modifierJS) => { 31180 return new modifierJS.CommonModifier(nativePtr, classType); 31181 }); 31182 }; 31183} 31184 31185class ParticleDisturbanceFieldModifier extends ModifierWithKey { 31186 constructor(value) { 31187 super(value); 31188 } 31189 31190 applyPeer(node, reset) { 31191 if (reset) { 31192 getUINativeModule().particle.resetDisturbanceField(node); 31193 } 31194 else { 31195 let dataArray = []; 31196 if (!Array.isArray(this.value)) { 31197 return; 31198 } 31199 for (let i = 0; i < this.value.length; i++) { 31200 let data = this.value[i]; 31201 dataArray.push(parseWithDefaultNumber(data.strength, 0)); 31202 dataArray.push(parseWithDefaultNumber(data.shape, 0)); 31203 if (isObject(data.size)) { 31204 dataArray.push(parseWithDefaultNumber(data.size.width, 0)); 31205 dataArray.push(parseWithDefaultNumber(data.size.height, 0)); 31206 } 31207 else { 31208 dataArray.push(0); 31209 dataArray.push(0); 31210 } 31211 if (isObject(data.position)) { 31212 dataArray.push(parseWithDefaultNumber(data.position.x, 0)); 31213 dataArray.push(parseWithDefaultNumber(data.position.y, 0)); 31214 } 31215 else { 31216 dataArray.push(0); 31217 dataArray.push(0); 31218 } 31219 dataArray.push(parseWithDefaultNumber(data.feather, 0)); 31220 dataArray.push(parseWithDefaultNumber(data.noiseScale, 1)); 31221 dataArray.push(parseWithDefaultNumber(data.noiseFrequency, 1)); 31222 dataArray.push(parseWithDefaultNumber(data.noiseAmplitude, 1)); 31223 } 31224 getUINativeModule().particle.setDisturbanceField(node, dataArray); 31225 } 31226 } 31227 checkObjectDiff() { 31228 return !isBaseOrResourceEqual(this.stageValue, this.value); 31229 } 31230} 31231 31232ParticleDisturbanceFieldModifier.identity = Symbol('disturbanceFields'); 31233 31234class ParticleEmitterModifier extends ModifierWithKey { 31235 constructor(value) { 31236 super(value); 31237 } 31238 31239 applyPeer(node, reset) { 31240 let _a, _b, _c, _d, _e; 31241 if (reset) { 31242 getUINativeModule().particle.resetEmitter(node); 31243 } 31244 else { 31245 let dataArray = []; 31246 if (!Array.isArray(this.value)) { 31247 return; 31248 } 31249 for (let i = 0; i < this.value.length; i++) { 31250 let data = this.value[i]; 31251 let indexValue = 0; 31252 if (data.index > 0) { 31253 indexValue = data.index; 31254 } 31255 dataArray.push(indexValue); 31256 31257 let emitRateValue = 5; 31258 if (isNumber(data.emitRate)) { 31259 dataArray.push(1); 31260 if (data.emitRate >= 0) { 31261 emitRateValue = data.emitRate; 31262 } 31263 dataArray.push(emitRateValue); 31264 } else { 31265 dataArray.push(0); 31266 dataArray.push(_a); 31267 } 31268 31269 if (isObject(data.position)) { 31270 if (isNumber(data.position.x) && isNumber(data.position.y)) { 31271 dataArray.push(1); 31272 dataArray.push(data.position.x); 31273 dataArray.push(data.position.y); 31274 } else { 31275 dataArray.push(0); 31276 dataArray.push(_b); 31277 dataArray.push(_c); 31278 } 31279 } else { 31280 dataArray.push(0); 31281 dataArray.push(_b); 31282 dataArray.push(_c); 31283 } 31284 31285 if (isObject(data.size)) { 31286 if (data.size.width > 0 && data.size.height > 0) { 31287 dataArray.push(1); 31288 dataArray.push(data.size.width); 31289 dataArray.push(data.size.height); 31290 } else { 31291 dataArray.push(0); 31292 dataArray.push(_d); 31293 dataArray.push(_e); 31294 } 31295 } 31296 else { 31297 dataArray.push(0); 31298 dataArray.push(_d); 31299 dataArray.push(_e); 31300 } 31301 } 31302 getUINativeModule().particle.setEmitter(node, dataArray); 31303 } 31304 } 31305 31306 checkObjectDiff() { 31307 return !isBaseOrResourceEqual(this.stageValue, this.value); 31308 } 31309} 31310 31311ParticleEmitterModifier.identity = Symbol('emitter'); 31312 31313/// <reference path='./import.ts' /> 31314class ArkParticleComponent extends ArkComponent { 31315 constructor(nativePtr, classType) { 31316 super(nativePtr, classType); 31317 } 31318 disturbanceFields(value) { 31319 modifierWithKey(this._modifiersWithKeys, ParticleDisturbanceFieldModifier.identity, ParticleDisturbanceFieldModifier, value); 31320 return this; 31321 } 31322 31323 emitter(value) { 31324 modifierWithKey(this._modifiersWithKeys, ParticleEmitterModifier.identity, ParticleEmitterModifier, value); 31325 return this; 31326 } 31327} 31328// @ts-ignore 31329if (globalThis.Particle !== undefined) { 31330 31331 // @ts-ignore 31332 globalThis.Particle.attributeModifier = function (modifier) { 31333 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31334 return new ArkParticleComponent(nativePtr); 31335 }, (nativePtr, classType, modifierJS) => { 31336 return new modifierJS.ParticleModifier(nativePtr, classType); 31337 }); 31338 }; 31339} 31340 31341let arkUINativeAdvancedModule = undefined; 31342function getUINativeAdvancedModule() { 31343 if (arkUINativeAdvancedModule) { 31344 return arkUINativeAdvancedModule; 31345 } else if (globalThis.getArkUIAdvancedModule !== undefined) { 31346 arkUINativeAdvancedModule = globalThis.getArkUIAdvancedModule(); 31347 } 31348 return arkUINativeAdvancedModule; 31349} 31350 31351class MediaCachedImageSrcModifier extends ModifierWithKey { 31352 constructor(value) { 31353 super(value); 31354 } 31355 applyPeer(node, reset) { 31356 if (getUINativeAdvancedModule() === undefined) { 31357 return; 31358 } 31359 if (reset) { 31360 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc(node, ''); 31361 } else { 31362 if (isResource(this.value) || isString(this.value)) { 31363 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc(node, 0, this.value); 31364 } else if (Array.isArray(this.value.sources)) { 31365 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc( 31366 node, 1, this.value.sources, this.value.sources.length, this.value.column); 31367 } else { 31368 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc(node, 0, this.value); 31369 } 31370 } 31371 } 31372} 31373MediaCachedImageSrcModifier.identity = Symbol('mediaCachedImageSrc'); 31374class MediaCachedImageAltModifier extends ModifierWithKey { 31375 constructor(value) { 31376 super(value); 31377 } 31378 applyPeer(node, reset) { 31379 if (getUINativeAdvancedModule() === undefined) { 31380 return; 31381 } 31382 if (reset) { 31383 getUINativeAdvancedModule().mediaCachedImage.resetAlt(node); 31384 } else { 31385 getUINativeAdvancedModule().mediaCachedImage.setAlt(node, this.value); 31386 } 31387 } 31388 checkObjectDiff() { 31389 return true; 31390 } 31391} 31392MediaCachedImageAltModifier.identity = Symbol('mediaCachedImageAlt'); 31393class ArkMediaCachedImageComponent extends ArkImageComponent { 31394 constructor(nativePtr, classType) { 31395 super(nativePtr, classType); 31396 } 31397 initialize(value) { 31398 if (value[0] !== undefined) { 31399 modifierWithKey(this._modifiersWithKeys, MediaCachedImageSrcModifier.identity, MediaCachedImageSrcModifier, value[0]); 31400 } 31401 return this; 31402 } 31403 alt(value) { 31404 modifierWithKey(this._modifiersWithKeys, MediaCachedImageAltModifier.identity, MediaCachedImageAltModifier, value); 31405 return this; 31406 } 31407} 31408// @ts-ignore 31409if (globalThis.MediaCachedImage !== undefined) { 31410 globalThis.MediaCachedImage.attributeModifier = function (modifier) { 31411 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31412 return new ArkMediaCachedImageComponent(nativePtr); 31413 }, (nativePtr, classType, modifierJS) => { 31414 return new modifierJS.MediaCachedImageModifier(nativePtr, classType); 31415 }); 31416 }; 31417} 31418 31419class SymbolFontColorModifier extends ModifierWithKey { 31420 constructor(value) { 31421 super(value); 31422 } 31423 applyPeer(node, reset) { 31424 if (reset) { 31425 getUINativeModule().symbolGlyph.resetFontColor(node); 31426 } 31427 else { 31428 getUINativeModule().symbolGlyph.setFontColor(node, this.value); 31429 } 31430 } 31431 checkObjectDiff() { 31432 return !isBaseOrResourceEqual(this.stageValue, this.value); 31433 } 31434} 31435SymbolFontColorModifier.identity = Symbol('symbolGlyphFontColor'); 31436 31437class SymbolFontSizeModifier extends ModifierWithKey { 31438 constructor(value) { 31439 super(value); 31440 } 31441 applyPeer(node, reset) { 31442 if (reset) { 31443 getUINativeModule().symbolGlyph.resetFontSize(node); 31444 } 31445 else { 31446 getUINativeModule().symbolGlyph.setFontSize(node, this.value); 31447 } 31448 } 31449 checkObjectDiff() { 31450 return !isBaseOrResourceEqual(this.stageValue, this.value); 31451 } 31452} 31453SymbolFontSizeModifier.identity = Symbol('symbolGlyphFontSize'); 31454 31455class SymbolFontWeightModifier extends ModifierWithKey { 31456 constructor(value) { 31457 super(value); 31458 } 31459 applyPeer(node, reset) { 31460 if (reset) { 31461 getUINativeModule().symbolGlyph.resetFontWeight(node); 31462 } 31463 else { 31464 getUINativeModule().symbolGlyph.setFontWeight(node, this.value); 31465 } 31466 } 31467} 31468SymbolFontWeightModifier.identity = Symbol('symbolGlyphFontWeight'); 31469 31470class RenderingStrategyModifier extends ModifierWithKey { 31471 constructor(value) { 31472 super(value); 31473 } 31474 applyPeer(node, reset) { 31475 if (reset) { 31476 getUINativeModule().symbolGlyph.resetRenderingStrategy(node); 31477 } 31478 else { 31479 getUINativeModule().symbolGlyph.setRenderingStrategy(node, this.value); 31480 } 31481 } 31482} 31483RenderingStrategyModifier.identity = Symbol('symbolGlyphRenderingStrategy'); 31484 31485class EffectStrategyModifier extends ModifierWithKey { 31486 constructor(value) { 31487 super(value); 31488 } 31489 applyPeer(node, reset) { 31490 if (reset) { 31491 getUINativeModule().symbolGlyph.resetEffectStrategy(node); 31492 } 31493 else { 31494 getUINativeModule().symbolGlyph.setEffectStrategy(node, this.value); 31495 } 31496 } 31497} 31498EffectStrategyModifier.identity = Symbol('symbolGlyphEffectStrategy'); 31499 31500class SymbolContentModifier extends ModifierWithKey { 31501 constructor(value) { 31502 super(value); 31503 } 31504 applyPeer(node, reset) { 31505 if (reset) { 31506 getUINativeModule().symbolGlyph.resetSymbolGlyphInitialize(node); 31507 } else { 31508 getUINativeModule().symbolGlyph.setSymbolGlyphInitialize(node, this.value); 31509 } 31510 } 31511} 31512SymbolContentModifier.identity = Symbol('symbolContent'); 31513 31514class SymbolEffectModifier extends ModifierWithKey { 31515 constructor(value) { 31516 super(value); 31517 } 31518 applyPeer(node, reset) { 31519 if (reset) { 31520 getUINativeModule().symbolGlyph.resetSymbolEffectOptions(node); 31521 } else { 31522 getUINativeModule().symbolGlyph.setSymbolEffectOptions(node, this.value.symbolEffect, this.value.action); 31523 } 31524 } 31525} 31526SymbolEffectModifier.identity = Symbol('symbolEffect'); 31527 31528/// <reference path='./import.ts' /> 31529class ArkSymbolGlyphComponent extends ArkComponent { 31530 constructor(nativePtr, classType) { 31531 super(nativePtr, classType); 31532 } 31533 initialize(value) { 31534 if (value[0] !== undefined) { 31535 modifierWithKey(this._modifiersWithKeys, SymbolContentModifier.identity, SymbolContentModifier, value[0]); 31536 } 31537 else { 31538 modifierWithKey(this._modifiersWithKeys, SymbolContentModifier.identity, SymbolContentModifier, undefined); 31539 } 31540 return this; 31541 } 31542 fontColor(value) { 31543 modifierWithKey(this._modifiersWithKeys, SymbolFontColorModifier.identity, SymbolFontColorModifier, value); 31544 return this; 31545 } 31546 fontSize(value) { 31547 modifierWithKey(this._modifiersWithKeys, SymbolFontSizeModifier.identity, SymbolFontSizeModifier, value); 31548 return this; 31549 } 31550 fontWeight(value) { 31551 modifierWithKey(this._modifiersWithKeys, SymbolFontWeightModifier.identity, SymbolFontWeightModifier, value); 31552 return this; 31553 } 31554 renderingStrategy(value) { 31555 modifierWithKey(this._modifiersWithKeys, RenderingStrategyModifier.identity, RenderingStrategyModifier, value); 31556 return this; 31557 } 31558 effectStrategy(value) { 31559 modifierWithKey(this._modifiersWithKeys, EffectStrategyModifier.identity, EffectStrategyModifier, value); 31560 return this; 31561 } 31562 symbolEffect(effect, action) { 31563 let symbolEffect = new ArkSymbolEffect(); 31564 symbolEffect.symbolEffect = effect; 31565 symbolEffect.action = action; 31566 modifierWithKey(this._modifiersWithKeys, SymbolEffectModifier.identity, SymbolEffectModifier, symbolEffect); 31567 return this; 31568 } 31569} 31570 31571class SystemBarEffectModifier extends ModifierWithKey { 31572 constructor(value) { 31573 super(value); 31574 } 31575 applyPeer(node, reset) { 31576 getUINativeModule().common.setSystemBarEffect(node, true); 31577 } 31578} 31579SystemBarEffectModifier.identity = Symbol('systemBarEffect'); 31580 31581// @ts-ignore 31582if (globalThis.SymbolGlyph !== undefined) { 31583 globalThis.SymbolGlyph.attributeModifier = function (modifier) { 31584 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31585 return new ArkSymbolGlyphComponent(nativePtr); 31586 }, (nativePtr, classType, modifierJS) => { 31587 return new modifierJS.SymbolGlyphModifier(undefined, nativePtr, classType); 31588 }); 31589 }; 31590} 31591 31592class SymbolSpanFontColorModifier extends ModifierWithKey { 31593 constructor(value) { 31594 super(value); 31595 } 31596 applyPeer(node, reset) { 31597 if (reset) { 31598 getUINativeModule().symbolSpan.resetFontColor(node); 31599 } else { 31600 getUINativeModule().symbolSpan.setFontColor(node, this.value); 31601 } 31602 } 31603 checkObjectDiff() { 31604 if (isResource(this.stageValue) && isResource(this.value)) { 31605 return !isResourceEqual(this.stageValue, this.value); 31606 } else { 31607 return true; 31608 } 31609 } 31610} 31611SymbolSpanFontColorModifier.identity = Symbol('symbolSpanFontColor'); 31612class SymbolSpanFontSizeModifier extends ModifierWithKey { 31613 constructor(value) { 31614 super(value); 31615 } 31616 applyPeer(node, reset) { 31617 if (reset) { 31618 getUINativeModule().symbolSpan.resetFontSize(node); 31619 } else { 31620 getUINativeModule().symbolSpan.setFontSize(node, this.value); 31621 } 31622 } 31623 checkObjectDiff() { 31624 if (isResource(this.stageValue) && isResource(this.value)) { 31625 return !isResourceEqual(this.stageValue, this.value); 31626 } else { 31627 return true; 31628 } 31629 } 31630} 31631SymbolSpanFontSizeModifier.identity = Symbol('symbolSpanFontSize'); 31632class SymbolSpanFontWeightModifier extends ModifierWithKey { 31633 constructor(value) { 31634 super(value); 31635 } 31636 applyPeer(node, reset) { 31637 if (reset) { 31638 getUINativeModule().symbolSpan.resetFontWeight(node); 31639 } else { 31640 getUINativeModule().symbolSpan.setFontWeight(node, this.value); 31641 } 31642 } 31643 checkObjectDiff() { 31644 if (isResource(this.stageValue) && isResource(this.value)) { 31645 return !isResourceEqual(this.stageValue, this.value); 31646 } else { 31647 return true; 31648 } 31649 } 31650} 31651SymbolSpanFontWeightModifier.identity = Symbol('symbolSpanFontWeight'); 31652class SymbolSpanEffectStrategyModifier extends ModifierWithKey { 31653 constructor(value) { 31654 super(value); 31655 } 31656 applyPeer(node, reset) { 31657 if (reset) { 31658 getUINativeModule().symbolSpan.resetEffectStrategy(node); 31659 } else { 31660 getUINativeModule().symbolSpan.setEffectStrategy(node, this.value); 31661 } 31662 } 31663 checkObjectDiff() { 31664 if (isResource(this.stageValue) && isResource(this.value)) { 31665 return !isResourceEqual(this.stageValue, this.value); 31666 } else { 31667 return true; 31668 } 31669 } 31670} 31671SymbolSpanEffectStrategyModifier.identity = Symbol('symbolSpanEffectStrategy'); 31672class SymbolSpanRenderingStrategyModifier extends ModifierWithKey { 31673 constructor(value) { 31674 super(value); 31675 } 31676 applyPeer(node, reset) { 31677 if (reset) { 31678 getUINativeModule().symbolSpan.resetRenderingStrategy(node); 31679 } else { 31680 getUINativeModule().symbolSpan.setRenderingStrategy(node, this.value); 31681 } 31682 } 31683 checkObjectDiff() { 31684 if (isResource(this.stageValue) && isResource(this.value)) { 31685 return !isResourceEqual(this.stageValue, this.value); 31686 } else { 31687 return true; 31688 } 31689 } 31690} 31691SymbolSpanRenderingStrategyModifier.identity = Symbol('symbolSpanRenderingStrategy'); 31692class SymbolSpanIdModifier extends ModifierWithKey { 31693 constructor(value) { 31694 super(value); 31695 } 31696 applyPeer(node, reset) { 31697 if (reset) { 31698 getUINativeModule().symbolSpan.setId(node, ''); 31699 } 31700 else { 31701 getUINativeModule().symbolSpan.setId(node, this.value); 31702 } 31703 } 31704} 31705SymbolSpanIdModifier.identity = Symbol('symbolSpanId'); 31706/// <reference path='./import.ts' /> 31707class ArkSymbolSpanComponent extends ArkComponent { 31708 constructor(nativePtr, classType) { 31709 super(nativePtr, classType); 31710 } 31711 initialize(value) { 31712 if (value[0] !== undefined) { 31713 modifierWithKey(this._modifiersWithKeys, SymbolSpanIdModifier.identity, SymbolSpanIdModifier, value[0]); 31714 } 31715 return this; 31716 } 31717 fontSize(value) { 31718 modifierWithKey(this._modifiersWithKeys, SymbolSpanFontSizeModifier.identity, 31719 SymbolSpanFontSizeModifier, value); 31720 return this; 31721 } 31722 fontColor(value) { 31723 modifierWithKey(this._modifiersWithKeys, SymbolSpanFontColorModifier.identity, 31724 SymbolSpanFontColorModifier, value); 31725 return this; 31726 } 31727 fontWeight(value) { 31728 let fontWeightStr = '400'; 31729 if (isNumber(value)) { 31730 fontWeightStr = value.toString(); 31731 } else if (isString(value)) { 31732 fontWeightStr = String(value); 31733 } 31734 modifierWithKey(this._modifiersWithKeys, SymbolSpanFontWeightModifier.identity, 31735 SymbolSpanFontWeightModifier, fontWeightStr); 31736 return this; 31737 } 31738 effectStrategy(value) { 31739 modifierWithKey(this._modifiersWithKeys, SymbolSpanEffectStrategyModifier.identity, 31740 SymbolSpanEffectStrategyModifier, value); 31741 return this; 31742 } 31743 renderingStrategy(value) { 31744 modifierWithKey(this._modifiersWithKeys, SymbolSpanRenderingStrategyModifier.identity, 31745 SymbolSpanRenderingStrategyModifier, value); 31746 return this; 31747 } 31748} 31749 31750// @ts-ignore 31751if (globalThis.SymbolSpan !== undefined) { 31752 globalThis.SymbolSpan.attributeModifier = function (modifier) { 31753 attributeModifierFuncWithoutStateStyles.call(this, modifier, (nativePtr) => { 31754 return new ArkSymbolSpanComponent(nativePtr); 31755 }, (nativePtr, classType, modifierJS) => { 31756 return new modifierJS.SymbolSpanModifier(undefined, nativePtr, classType); 31757 }); 31758 }; 31759} 31760 31761class ShaderInputBufferModifier extends ModifierWithKey { 31762 constructor(value) { 31763 super(value); 31764 } 31765 applyPeer(node, reset) { 31766 if (reset) { 31767 getUINativeModule().component3D.resetShaderInputBuffer(node); 31768 } else { 31769 getUINativeModule().component3D.setShaderInputBuffer(node, this.value); 31770 } 31771 } 31772 checkObjectDiff() { 31773 return !isBaseOrResourceEqual(this.stageValue, this.value); 31774 } 31775} 31776ShaderInputBufferModifier.identity = Symbol('shaderInputBuffer'); 31777 31778/// <reference path='./import.ts' /> 31779class ArkComponent3DComponent extends ArkComponent { 31780 constructor(nativePtr, classType) { 31781 super(nativePtr, classType); 31782 } 31783 environment(uri) { 31784 throw new Error('Method not implemented.'); 31785 }; 31786 customRender(uri, selfRenderUpdate) { 31787 throw new Error('Method not implemented.'); 31788 }; 31789 shader(uri) { 31790 throw new Error('Method not implemented.'); 31791 }; 31792 shaderImageTexture(uri) { 31793 throw new Error('Method not implemented.'); 31794 }; 31795 shaderInputBuffer(buffer) { 31796 modifierWithKey(this._modifiersWithKeys, ShaderInputBufferModifier.identity, ShaderInputBufferModifier, buffer); 31797 return this; 31798 }; 31799 renderWidth(value) { 31800 throw new Error('Method not implemented.'); 31801 }; 31802 renderHeight(value) { 31803 throw new Error('Method not implemented.'); 31804 }; 31805} 31806// @ts-ignore 31807if (globalThis.Component3D !== undefined) { 31808 globalThis.Component3D.attributeModifier = function (modifier) { 31809 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31810 return new ArkComponent3DComponent(nativePtr); 31811 }, (nativePtr, classType, modifierJS) => { 31812 return new modifierJS.Component3DModifier(nativePtr, classType); 31813 }); 31814 }; 31815} 31816 31817class ContainerSpanTextBackgroundStyleModifier extends ModifierWithKey { 31818 constructor(value) { 31819 super(value); 31820 } 31821 applyPeer(node, reset) { 31822 if (reset) { 31823 getUINativeModule().containerSpan.resetTextBackgroundStyle(node); 31824 } else { 31825 let textBackgroundStyle = new ArkTextBackGroundStyle(); 31826 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value)) { 31827 getUINativeModule().containerSpan.resetTextBackgroundStyle(node); 31828 } else { 31829 getUINativeModule().containerSpan.setTextBackgroundStyle(node, 31830 textBackgroundStyle.color, 31831 textBackgroundStyle.radius.topLeft, 31832 textBackgroundStyle.radius.topRight, 31833 textBackgroundStyle.radius.bottomLeft, 31834 textBackgroundStyle.radius.bottomRight); 31835 } 31836 } 31837 } 31838 checkObjectDiff() { 31839 let textBackgroundStyle = new ArkTextBackGroundStyle(); 31840 let stageTextBackGroundStyle = new ArkTextBackGroundStyle(); 31841 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value) || !stageTextBackGroundStyle.convertTextBackGroundStyleOptions(this.stageValue)) { 31842 return false; 31843 } else { 31844 return textBackgroundStyle.checkObjectDiff(stageTextBackGroundStyle); 31845 } 31846 } 31847} 31848ContainerSpanTextBackgroundStyleModifier.identity = Symbol('containerSpanTextBackgroundStyle'); 31849/// <reference path='./import.ts' /> 31850class ArkContainerSpanComponent extends ArkComponent { 31851 constructor(nativePtr, classType) { 31852 super(nativePtr, classType); 31853 } 31854 textBackgroundStyle(value) { 31855 modifierWithKey(this._modifiersWithKeys, ContainerSpanTextBackgroundStyleModifier.identity, ContainerSpanTextBackgroundStyleModifier, value); 31856 return this; 31857 } 31858} 31859// @ts-ignore 31860if (globalThis.ContainerSpan !== undefined) { 31861 globalThis.ContainerSpan.attributeModifier = function (modifier) { 31862 attributeModifierFunc.call(this, modifier, (nativePtr) => { 31863 return new ArkContainerSpanComponent(nativePtr); 31864 }, (nativePtr, classType, modifierJS) => { 31865 return new modifierJS.ContainerSpanModifier(nativePtr, classType); 31866 }); 31867 }; 31868} 31869 31870function getArkUINodeFromNapi() { 31871 if (globalThis.__XNode__ === undefined) { 31872 globalThis.__XNode__ = globalThis.requireNapi('arkui.node'); 31873 } 31874 return globalThis.__XNode__; 31875} 31876 31877globalThis.__getArkUINode__ = getArkUINodeFromNapi; 31878