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 } 964 } 965 checkObjectDiff() { 966 return this.value.checkObjectDiff(this.stageValue); 967 } 968} 969BorderModifier.identity = Symbol('border'); 970class OutlineColorModifier extends ModifierWithKey { 971 constructor(value) { 972 super(value); 973 } 974 applyPeer(node, reset) { 975 if (reset) { 976 getUINativeModule().common.resetOutlineColor(node); 977 } 978 else { 979 const valueType = typeof this.value; 980 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 981 getUINativeModule().common.setOutlineColor(node, this.value, this.value, this.value, this.value); 982 } 983 else { 984 getUINativeModule().common.setOutlineColor(node, this.value.left, this.value.right, this.value.top, this.value.bottom); 985 } 986 } 987 } 988 checkObjectDiff() { 989 if (isResource(this.stageValue) && isResource(this.value)) { 990 return !isResourceEqual(this.stageValue, this.value); 991 } 992 else if (!isResource(this.stageValue) && !isResource(this.value)) { 993 return !(this.stageValue.left === this.value.left && 994 this.stageValue.right === this.value.right && 995 this.stageValue.top === this.value.top && 996 this.stageValue.bottom === this.value.bottom); 997 } 998 else { 999 return true; 1000 } 1001 } 1002} 1003OutlineColorModifier.identity = Symbol('outlineColor'); 1004class OutlineRadiusModifier extends ModifierWithKey { 1005 constructor(value) { 1006 super(value); 1007 } 1008 applyPeer(node, reset) { 1009 if (reset) { 1010 getUINativeModule().common.resetOutlineRadius(node); 1011 } 1012 else { 1013 const valueType = typeof this.value; 1014 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 1015 getUINativeModule().common.setOutlineRadius(node, this.value, this.value, this.value, this.value); 1016 } 1017 else { 1018 getUINativeModule().common.setOutlineRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 1019 } 1020 } 1021 } 1022 checkObjectDiff() { 1023 if (isResource(this.stageValue) && isResource(this.value)) { 1024 return !isResourceEqual(this.stageValue, this.value); 1025 } 1026 else if (!isResource(this.stageValue) && !isResource(this.value)) { 1027 return !(this.stageValue.topLeft === this.value.topLeft && 1028 this.stageValue.topRight === this.value.topRight && 1029 this.stageValue.bottomLeft === this.value.bottomLeft && 1030 this.stageValue.bottomRight === this.value.bottomRight); 1031 } 1032 else { 1033 return true; 1034 } 1035 } 1036} 1037OutlineRadiusModifier.identity = Symbol('outlineRadius'); 1038class OutlineStyleModifier extends ModifierWithKey { 1039 constructor(value) { 1040 super(value); 1041 } 1042 applyPeer(node, reset) { 1043 if (reset) { 1044 getUINativeModule().common.resetOutlineStyle(node); 1045 } 1046 else { 1047 if (isNumber(this.value)) { 1048 getUINativeModule().common.setOutlineStyle(node, this.value, this.value, this.value, this.value); 1049 } 1050 else { 1051 getUINativeModule().common.setOutlineStyle(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 1052 } 1053 } 1054 } 1055 checkObjectDiff() { 1056 return !(this.value.top === this.stageValue.top && 1057 this.value.right === this.stageValue.right && 1058 this.value.bottom === this.stageValue.bottom && 1059 this.value.left === this.stageValue.left); 1060 } 1061} 1062OutlineStyleModifier.identity = Symbol('outlineStyle'); 1063class OutlineWidthModifier extends ModifierWithKey { 1064 constructor(value) { 1065 super(value); 1066 } 1067 applyPeer(node, reset) { 1068 if (reset) { 1069 getUINativeModule().common.resetOutlineWidth(node); 1070 } 1071 else { 1072 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 1073 getUINativeModule().common.setOutlineWidth(node, this.value, this.value, this.value, this.value); 1074 } 1075 else { 1076 getUINativeModule().common.setOutlineWidth(node, this.value.left, this.value.right, this.value.top, this.value.bottom); 1077 } 1078 } 1079 } 1080 checkObjectDiff() { 1081 if (isResource(this.stageValue) && isResource(this.value)) { 1082 return !isResourceEqual(this.stageValue, this.value); 1083 } 1084 else if (!isResource(this.stageValue) && !isResource(this.value)) { 1085 return !(this.stageValue.left === this.value.left && 1086 this.stageValue.right === this.value.right && 1087 this.stageValue.top === this.value.top && 1088 this.stageValue.bottom === this.value.bottom); 1089 } 1090 else { 1091 return true; 1092 } 1093 } 1094} 1095OutlineWidthModifier.identity = Symbol('outlineWidth'); 1096class OutlineModifier extends ModifierWithKey { 1097 constructor(value) { 1098 super(value); 1099 } 1100 applyPeer(node, reset) { 1101 if (reset) { 1102 getUINativeModule().common.resetOutline(node); 1103 } 1104 else { 1105 let widthLeft; 1106 let widthRight; 1107 let widthTop; 1108 let widthBottom; 1109 if (!isUndefined(this.value.width) && this.value.width != null) { 1110 if (isNumber(this.value.width) || isString(this.value.width) || isResource(this.value.width)) { 1111 widthLeft = this.value.width; 1112 widthRight = this.value.width; 1113 widthTop = this.value.width; 1114 widthBottom = this.value.width; 1115 } 1116 else { 1117 widthLeft = this.value.width.left; 1118 widthRight = this.value.width.right; 1119 widthTop = this.value.width.top; 1120 widthBottom = this.value.width.bottom; 1121 } 1122 } 1123 let leftColor; 1124 let rightColor; 1125 let topColor; 1126 let bottomColor; 1127 if (!isUndefined(this.value.color) && this.value.color != null) { 1128 if (isNumber(this.value.color) || isString(this.value.color) || isResource(this.value.color)) { 1129 leftColor = this.value.color; 1130 rightColor = this.value.color; 1131 topColor = this.value.color; 1132 bottomColor = this.value.color; 1133 } 1134 else { 1135 leftColor = this.value.color.left; 1136 rightColor = this.value.color.right; 1137 topColor = this.value.color.top; 1138 bottomColor = this.value.color.bottom; 1139 } 1140 } 1141 let topLeft; 1142 let topRight; 1143 let bottomLeft; 1144 let bottomRight; 1145 if (!isUndefined(this.value.radius) && this.value.radius != null) { 1146 if (isNumber(this.value.radius) || isString(this.value.radius) || isResource(this.value.radius)) { 1147 topLeft = this.value.radius; 1148 topRight = this.value.radius; 1149 bottomLeft = this.value.radius; 1150 bottomRight = this.value.radius; 1151 } 1152 else { 1153 topLeft = this.value.radius.topLeft; 1154 topRight = this.value.radius.topRight; 1155 bottomLeft = this.value.radius.bottomLeft; 1156 bottomRight = this.value.radius.bottomRight; 1157 } 1158 } 1159 let styleTop; 1160 let styleRight; 1161 let styleBottom; 1162 let styleLeft; 1163 if (!isUndefined(this.value.style) && this.value.style != null) { 1164 if (isNumber(this.value.style) || isString(this.value.style) || isResource(this.value.style)) { 1165 styleTop = this.value.style; 1166 styleRight = this.value.style; 1167 styleBottom = this.value.style; 1168 styleLeft = this.value.style; 1169 } 1170 else { 1171 styleTop = this.value.style.top; 1172 styleRight = this.value.style.right; 1173 styleBottom = this.value.style.bottom; 1174 styleLeft = this.value.style.left; 1175 } 1176 } 1177 getUINativeModule().common.setOutline(node, widthLeft, widthRight, widthTop, widthBottom, 1178 leftColor, rightColor, topColor, bottomColor, 1179 topLeft, topRight, bottomLeft, bottomRight, 1180 styleTop, styleRight, styleBottom, styleLeft); 1181 } 1182 } 1183 checkObjectDiff() { 1184 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 1185 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 1186 !isBaseOrResourceEqual(this.stageValue.radius, this.value.radius) || 1187 !isBaseOrResourceEqual(this.stageValue.style, this.value.style); 1188 } 1189} 1190OutlineModifier.identity = Symbol('outline'); 1191class ForegroundBlurStyleModifier extends ModifierWithKey { 1192 constructor(value) { 1193 super(value); 1194 } 1195 applyPeer(node, reset) { 1196 if (reset) { 1197 getUINativeModule().common.resetForegroundBlurStyle(node); 1198 } 1199 else { 1200 getUINativeModule().common.setForegroundBlurStyle(node, this.value.blurStyle, this.value.colorMode, this.value.adaptiveColor, this.value.scale, 1201 (_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale); 1202 } 1203 } 1204 checkObjectDiff() { 1205 return !(this.stageValue.blurStyle === this.value.blurStyle && 1206 this.stageValue.colorMode === this.value.colorMode && 1207 this.stageValue.adaptiveColor === this.value.adaptiveColor && 1208 this.stageValue.scale === this.value.scale && 1209 this.stageValue.blurOptions === this.value.blurOptions); 1210 } 1211} 1212ForegroundBlurStyleModifier.identity = Symbol('foregroundBlurStyle'); 1213class BackgroundImagePositionModifier extends ModifierWithKey { 1214 constructor(value) { 1215 super(value); 1216 } 1217 applyPeer(node, reset) { 1218 let _a, _b; 1219 if (reset) { 1220 getUINativeModule().common.resetBackgroundImagePosition(node); 1221 } 1222 else { 1223 if (isNumber(this.value)) { 1224 getUINativeModule().common.setBackgroundImagePosition(node, this.value, undefined, undefined); 1225 } 1226 else { 1227 getUINativeModule().common.setBackgroundImagePosition(node, undefined, 1228 (_a = this.value) === null || _a === void 0 ? void 0 : _a.x, 1229 (_b = this.value) === null || _b === void 0 ? void 0 : _b.y); 1230 } 1231 } 1232 } 1233 checkObjectDiff() { 1234 let _a, _b, _c, _d; 1235 return !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.x) === ((_b = this.stageValue) === null || _b === void 0 ? void 0 : _b.x) && 1236 ((_c = this.value) === null || _c === void 0 ? void 0 : _c.y) === ((_d = this.stageValue) === null || _d === void 0 ? void 0 : _d.y)); 1237 } 1238} 1239BackgroundImagePositionModifier.identity = Symbol('backgroundImagePosition'); 1240class BackgroundImageResizableModifier extends ModifierWithKey { 1241 constructor(value) { 1242 super(value); 1243 } 1244 applyPeer(node, reset) { 1245 if (reset) { 1246 getUINativeModule().common.resetBackgroundImageResizable(node); 1247 } 1248 else { 1249 let sliceTop, sliceBottom, sliceLeft, sliceRight; 1250 if (!isUndefined(this.value.slice)) { 1251 let tempSlice = this.value.slice; 1252 sliceTop = tempSlice.top; 1253 sliceBottom = tempSlice.bottom; 1254 sliceLeft = tempSlice.left; 1255 sliceRight = tempSlice.right; 1256 } 1257 getUINativeModule().common.setBackgroundImageResizable(node, sliceTop, sliceBottom, sliceLeft, sliceRight); 1258 } 1259 } 1260 checkObjectDiff() { 1261 return !isBaseOrResourceEqual(this.stageValue, this.value); 1262 } 1263} 1264BackgroundImageResizableModifier.identity = Symbol('backgroundImageResizable'); 1265class LinearGradientBlurModifier extends ModifierWithKey { 1266 constructor(value) { 1267 super(value); 1268 } 1269 applyPeer(node, reset) { 1270 if (reset) { 1271 getUINativeModule().common.resetLinearGradientBlur(node); 1272 } 1273 else { 1274 getUINativeModule().common.setLinearGradientBlur(node, this.value.blurRadius, this.value.fractionStops, this.value.direction); 1275 } 1276 } 1277 checkObjectDiff() { 1278 return !this.value.isEqual(this.stageValue); 1279 } 1280} 1281LinearGradientBlurModifier.identity = Symbol('linearGradientBlur'); 1282class BackgroundImageModifier extends ModifierWithKey { 1283 constructor(value) { 1284 super(value); 1285 } 1286 applyPeer(node, reset) { 1287 if (reset) { 1288 getUINativeModule().common.resetBackgroundImage(node); 1289 } 1290 else { 1291 getUINativeModule().common.setBackgroundImage(node, this.value.src, this.value.repeat); 1292 } 1293 } 1294 checkObjectDiff() { 1295 return !(this.stageValue.src === this.value.src && 1296 this.stageValue.repeat === this.value.repeat); 1297 } 1298} 1299BackgroundImageModifier.identity = Symbol('backgroundImage'); 1300class BackgroundBlurStyleModifier extends ModifierWithKey { 1301 constructor(value) { 1302 super(value); 1303 } 1304 applyPeer(node, reset) { 1305 if (reset) { 1306 getUINativeModule().common.resetBackgroundBlurStyle(node); 1307 } 1308 else { 1309 getUINativeModule().common.setBackgroundBlurStyle(node, this.value.blurStyle, this.value.colorMode, this.value.adaptiveColor, this.value.scale, 1310 (_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale); 1311 } 1312 } 1313} 1314BackgroundBlurStyleModifier.identity = Symbol('backgroundBlurStyle'); 1315class BackgroundImageSizeModifier extends ModifierWithKey { 1316 constructor(value) { 1317 super(value); 1318 } 1319 applyPeer(node, reset) { 1320 let _a, _b; 1321 if (reset) { 1322 getUINativeModule().common.resetBackgroundImageSize(node); 1323 } 1324 else { 1325 if (isNumber(this.value)) { 1326 getUINativeModule().common.setBackgroundImageSize(node, this.value, undefined, undefined); 1327 } 1328 else { 1329 getUINativeModule().common.setBackgroundImageSize(node, undefined, 1330 (_a = this.value) === null || _a === void 0 ? void 0 : _a.width, 1331 (_b = this.value) === null || _b === void 0 ? void 0 : _b.height); 1332 } 1333 } 1334 } 1335 checkObjectDiff() { 1336 return !(this.value.width === this.stageValue.width && 1337 this.value.height === this.stageValue.height); 1338 } 1339} 1340BackgroundImageSizeModifier.identity = Symbol('backgroundImageSize'); 1341class TranslateModifier extends ModifierWithKey { 1342 constructor(value) { 1343 super(value); 1344 } 1345 applyPeer(node, reset) { 1346 if (reset) { 1347 getUINativeModule().common.resetTranslate(node); 1348 } 1349 else { 1350 getUINativeModule().common.setTranslate(node, this.value.x, this.value.y, this.value.z); 1351 } 1352 } 1353 checkObjectDiff() { 1354 return !(this.value.x === this.stageValue.x && 1355 this.value.y === this.stageValue.y && 1356 this.value.z === this.stageValue.z); 1357 } 1358} 1359TranslateModifier.identity = Symbol('translate'); 1360class ScaleModifier extends ModifierWithKey { 1361 constructor(value) { 1362 super(value); 1363 } 1364 applyPeer(node, reset) { 1365 if (reset) { 1366 getUINativeModule().common.resetScale(node); 1367 } 1368 else { 1369 getUINativeModule().common.setScale(node, this.value.x, this.value.y, this.value.z, this.value.centerX, this.value.centerY); 1370 } 1371 } 1372 checkObjectDiff() { 1373 return !(this.value.x === this.stageValue.x && 1374 this.value.y === this.stageValue.y && 1375 this.value.z === this.stageValue.z && 1376 this.value.centerX === this.stageValue.centerX && 1377 this.value.centerY === this.stageValue.centerY); 1378 } 1379} 1380ScaleModifier.identity = Symbol('scale'); 1381class RotateModifier extends ModifierWithKey { 1382 constructor(value) { 1383 super(value); 1384 } 1385 applyPeer(node, reset) { 1386 if (reset) { 1387 getUINativeModule().common.resetRotate(node); 1388 } 1389 else { 1390 getUINativeModule().common.setRotate(node, this.value.x, this.value.y, 1391 this.value.z, this.value.angle, this.value.centerX, this.value.centerY, 1392 this.value.centerY, this.value.perspective); 1393 } 1394 } 1395 checkObjectDiff() { 1396 return !(this.value.x === this.stageValue.x && 1397 this.value.y === this.stageValue.y && 1398 this.value.z === this.stageValue.z && 1399 this.value.angle === this.stageValue.angle && 1400 this.value.centerX === this.stageValue.centerX && 1401 this.value.centerY === this.stageValue.centerY && 1402 this.value.centerZ === this.stageValue.centerZ && 1403 this.value.perspective === this.stageValue.perspective); 1404 } 1405} 1406RotateModifier.identity = Symbol('rotate'); 1407class GeometryTransitionModifier extends ModifierWithKey { 1408 constructor(value) { 1409 super(value); 1410 } 1411 applyPeer(node, reset) { 1412 let _a, _b; 1413 if (reset) { 1414 getUINativeModule().common.resetGeometryTransition(node); 1415 } 1416 else { 1417 getUINativeModule().common.setGeometryTransition(node, this.value.id, 1418 (_a = this.value.options) === null || _a === void 0 ? void 0 : _a.follow, 1419 (_b = this.value.options) === null || _b === void 0 ? void 0 : _b.hierarchyStrategy); 1420 } 1421 } 1422} 1423GeometryTransitionModifier.identity = Symbol('geometryTransition'); 1424class BlendModeModifier extends ModifierWithKey { 1425 constructor(value) { 1426 super(value); 1427 } 1428 applyPeer(node, reset) { 1429 if (reset) { 1430 getUINativeModule().common.resetBlendMode(node); 1431 } 1432 else { 1433 getUINativeModule().common.setBlendMode(node, this.value.blendMode, this.value.blendApplyType); 1434 } 1435 } 1436} 1437BlendModeModifier.identity = Symbol('blendMode'); 1438class AdvancedBlendModeModifier extends ModifierWithKey { 1439 constructor(value) { 1440 super(value); 1441 } 1442 applyPeer(node, reset) { 1443 if (reset) { 1444 getUINativeModule().common.resetAdvancedBlendMode(node); 1445 } else { 1446 getUINativeModule().common.setAdvancedBlendMode(node, this.value.blendMode, this.value.blendApplyType); 1447 } 1448 } 1449} 1450AdvancedBlendModeModifier.identity = Symbol('advancedBlendMode'); 1451class ClipModifier extends ModifierWithKey { 1452 constructor(value) { 1453 super(value); 1454 } 1455 applyPeer(node, reset) { 1456 if (reset) { 1457 getUINativeModule().common.resetClip(node); 1458 } 1459 else { 1460 getUINativeModule().common.setClip(node, this.value); 1461 } 1462 } 1463 checkObjectDiff() { 1464 return true; 1465 } 1466} 1467ClipModifier.identity = Symbol('clip'); 1468class ClipShapeModifier extends ModifierWithKey { 1469 constructor(value) { 1470 super(value); 1471 } 1472 applyPeer(node, reset) { 1473 if (reset) { 1474 getUINativeModule().common.resetClipShape(node); 1475 } 1476 else { 1477 getUINativeModule().common.setClipShape(node, this.value); 1478 } 1479 } 1480 checkObjectDiff() { 1481 return true; 1482 } 1483} 1484ClipShapeModifier.identity = Symbol('clipShape'); 1485class MaskModifier extends ModifierWithKey { 1486 constructor(value) { 1487 super(value); 1488 } 1489 applyPeer(node, reset) { 1490 if (reset) { 1491 getUINativeModule().common.resetMask(node); 1492 } 1493 else { 1494 getUINativeModule().common.setMask(node, this.value); 1495 } 1496 } 1497 checkObjectDiff() { 1498 return true; 1499 } 1500} 1501MaskModifier.identity = Symbol('mask'); 1502class MaskShapeModifier extends ModifierWithKey { 1503 constructor(value) { 1504 super(value); 1505 } 1506 applyPeer(node, reset) { 1507 if (reset) { 1508 getUINativeModule().common.resetMaskShape(node); 1509 } 1510 else { 1511 getUINativeModule().common.setMaskShape(node, this.value); 1512 } 1513 } 1514 checkObjectDiff() { 1515 return true; 1516 } 1517} 1518MaskShapeModifier.identity = Symbol('maskShape'); 1519class PixelStretchEffectModifier extends ModifierWithKey { 1520 constructor(value) { 1521 super(value); 1522 } 1523 applyPeer(node, reset) { 1524 if (reset) { 1525 getUINativeModule().common.resetPixelStretchEffect(node); 1526 } 1527 else { 1528 getUINativeModule().common.setPixelStretchEffect(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 1529 } 1530 } 1531 checkObjectDiff() { 1532 return !(this.stageValue.left === this.value.left && 1533 this.stageValue.right === this.value.right && 1534 this.stageValue.top === this.value.top && 1535 this.stageValue.bottom === this.value.bottom); 1536 } 1537} 1538PixelStretchEffectModifier.identity = Symbol('pixelStretchEffect'); 1539class LightUpEffectModifier extends ModifierWithKey { 1540 constructor(value) { 1541 super(value); 1542 } 1543 applyPeer(node, reset) { 1544 if (reset) { 1545 getUINativeModule().common.resetLightUpEffect(node); 1546 } 1547 else { 1548 getUINativeModule().common.setLightUpEffect(node, this.value); 1549 } 1550 } 1551} 1552LightUpEffectModifier.identity = Symbol('lightUpEffect'); 1553class SphericalEffectModifier extends ModifierWithKey { 1554 constructor(value) { 1555 super(value); 1556 } 1557 applyPeer(node, reset) { 1558 if (reset) { 1559 getUINativeModule().common.resetSphericalEffect(node); 1560 } 1561 else { 1562 getUINativeModule().common.setSphericalEffect(node, this.value); 1563 } 1564 } 1565} 1566SphericalEffectModifier.identity = Symbol('sphericalEffect'); 1567class RenderGroupModifier extends ModifierWithKey { 1568 constructor(value) { 1569 super(value); 1570 } 1571 applyPeer(node, reset) { 1572 if (reset) { 1573 getUINativeModule().common.resetRenderGroup(node); 1574 } 1575 else { 1576 getUINativeModule().common.setRenderGroup(node, this.value); 1577 } 1578 } 1579} 1580RenderGroupModifier.identity = Symbol('renderGroup'); 1581class RenderFitModifier extends ModifierWithKey { 1582 constructor(value) { 1583 super(value); 1584 } 1585 applyPeer(node, reset) { 1586 if (reset) { 1587 getUINativeModule().common.resetRenderFit(node); 1588 } 1589 else { 1590 getUINativeModule().common.setRenderFit(node, this.value); 1591 } 1592 } 1593} 1594RenderFitModifier.identity = Symbol('renderFit'); 1595class UseEffectModifier extends ModifierWithKey { 1596 constructor(value) { 1597 super(value); 1598 } 1599 applyPeer(node, reset) { 1600 if (reset) { 1601 getUINativeModule().common.resetUseEffect(node); 1602 } 1603 else { 1604 getUINativeModule().common.setUseEffect(node, this.value); 1605 } 1606 } 1607} 1608UseEffectModifier.identity = Symbol('useEffect'); 1609class ForegroundEffectModifier extends ModifierWithKey { 1610 constructor(value) { 1611 super(value); 1612 } 1613 applyPeer(node, reset) { 1614 if (reset) { 1615 getUINativeModule().common.resetForegroundEffect(node); 1616 } 1617 else { 1618 getUINativeModule().common.setForegroundEffect(node, this.value.radius); 1619 } 1620 } 1621 checkObjectDiff() { 1622 return !(this.value.radius === this.stageValue.radius); 1623 } 1624} 1625ForegroundEffectModifier.identity = Symbol('foregroundEffect'); 1626class ForegroundColorModifier extends ModifierWithKey { 1627 constructor(value) { 1628 super(value); 1629 } 1630 applyPeer(node, reset) { 1631 if (reset) { 1632 getUINativeModule().common.resetForegroundColor(node); 1633 } 1634 else { 1635 getUINativeModule().common.setForegroundColor(node, this.value); 1636 } 1637 } 1638 checkObjectDiff() { 1639 return !isBaseOrResourceEqual(this.stageValue, this.value); 1640 } 1641} 1642ForegroundColorModifier.identity = Symbol('foregroundColor'); 1643class ClickModifier extends ModifierWithKey { 1644 constructor(value) { 1645 super(value); 1646 } 1647 applyPeer(node, reset) { 1648 if (reset) { 1649 getUINativeModule().common.resetOnClick(node); 1650 } else { 1651 getUINativeModule().common.setOnClick(node, this.value); 1652 } 1653 } 1654} 1655ClickModifier.identity = Symbol('onClick'); 1656class OnTouchModifier extends ModifierWithKey { 1657 constructor(value) { 1658 super(value); 1659 } 1660 applyPeer(node, reset) { 1661 if (reset) { 1662 getUINativeModule().common.resetOnTouch(node); 1663 } else { 1664 getUINativeModule().common.setOnTouch(node, this.value); 1665 } 1666 } 1667} 1668OnTouchModifier.identity = Symbol('onTouch'); 1669class OnAppearModifier extends ModifierWithKey { 1670 constructor(value) { 1671 super(value); 1672 } 1673 applyPeer(node, reset) { 1674 if (reset) { 1675 getUINativeModule().common.resetOnAppear(node); 1676 } else { 1677 getUINativeModule().common.setOnAppear(node, this.value); 1678 } 1679 } 1680} 1681OnAppearModifier.identity = Symbol('onAppear'); 1682class OnDisappearModifier extends ModifierWithKey { 1683 constructor(value) { 1684 super(value); 1685 } 1686 applyPeer(node, reset) { 1687 if (reset) { 1688 getUINativeModule().common.resetOnDisappear(node); 1689 } else { 1690 getUINativeModule().common.setOnDisappear(node, this.value); 1691 } 1692 } 1693} 1694OnDisappearModifier.identity = Symbol('onDisappear'); 1695class OnAttachModifier extends ModifierWithKey { 1696 constructor(value) { 1697 super(value); 1698 } 1699 applyPeer(node, reset) { 1700 if (reset) { 1701 getUINativeModule().common.resetOnAttach(node); 1702 } else { 1703 getUINativeModule().common.setOnAttach(node, this.value); 1704 } 1705 } 1706} 1707OnAttachModifier.identity = Symbol('onAttach'); 1708class OnDetachModifier extends ModifierWithKey { 1709 constructor(value) { 1710 super(value); 1711 } 1712 applyPeer(node, reset) { 1713 if (reset) { 1714 getUINativeModule().common.resetOnDetach(node); 1715 } else { 1716 getUINativeModule().common.setOnDetach(node, this.value); 1717 } 1718 } 1719} 1720OnDetachModifier.identity = Symbol('onDetach'); 1721class OnKeyEventModifier extends ModifierWithKey { 1722 constructor(value) { 1723 super(value); 1724 } 1725 applyPeer(node, reset) { 1726 if (reset) { 1727 getUINativeModule().common.resetOnKeyEvent(node); 1728 } else { 1729 getUINativeModule().common.setOnKeyEvent(node, this.value); 1730 } 1731 } 1732} 1733OnKeyEventModifier.identity = Symbol('onKeyEvent'); 1734class OnKeyPreImeModifier extends ModifierWithKey { 1735 constructor(value) { 1736 super(value); 1737 } 1738 applyPeer(node, reset) { 1739 if (reset) { 1740 getUINativeModule().common.resetOnKeyPreIme(node); 1741 } else { 1742 getUINativeModule().common.setOnKeyPreIme(node, this.value); 1743 } 1744 } 1745} 1746OnKeyPreImeModifier.identity = Symbol('onKeyPreIme'); 1747class OnFocusModifier extends ModifierWithKey { 1748 constructor(value) { 1749 super(value); 1750 } 1751 applyPeer(node, reset) { 1752 if (reset) { 1753 getUINativeModule().common.resetOnFocus(node); 1754 } else { 1755 getUINativeModule().common.setOnFocus(node, this.value); 1756 } 1757 } 1758} 1759OnFocusModifier.identity = Symbol('onFocus'); 1760class OnBlurModifier extends ModifierWithKey { 1761 constructor(value) { 1762 super(value); 1763 } 1764 applyPeer(node, reset) { 1765 if (reset) { 1766 getUINativeModule().common.resetOnBlur(node); 1767 } else { 1768 getUINativeModule().common.setOnBlur(node, this.value); 1769 } 1770 } 1771} 1772OnBlurModifier.identity = Symbol('onBlur'); 1773 1774class OnHoverModifier extends ModifierWithKey { 1775 constructor(value) { 1776 super(value); 1777 } 1778 applyPeer(node, reset) { 1779 if (reset) { 1780 getUINativeModule().common.resetOnHover(node); 1781 } else { 1782 getUINativeModule().common.setOnHover(node, this.value); 1783 } 1784 } 1785} 1786OnHoverModifier.identity = Symbol('onHover'); 1787class OnMouseModifier extends ModifierWithKey { 1788 constructor(value) { 1789 super(value); 1790 } 1791 applyPeer(node, reset) { 1792 if (reset) { 1793 getUINativeModule().common.resetOnMouse(node); 1794 } else { 1795 getUINativeModule().common.setOnMouse(node, this.value); 1796 } 1797 } 1798} 1799OnMouseModifier.identity = Symbol('onMouse'); 1800class OnSizeChangeModifier extends ModifierWithKey { 1801 constructor(value) { 1802 super(value); 1803 } 1804 applyPeer(node, reset) { 1805 if (reset) { 1806 getUINativeModule().common.resetOnSizeChange(node); 1807 } else { 1808 getUINativeModule().common.setOnSizeChange(node, this.value); 1809 } 1810 } 1811} 1812OnSizeChangeModifier.identity = Symbol('onSizeChange'); 1813class OnAreaChangeModifier extends ModifierWithKey { 1814 constructor(value) { 1815 super(value); 1816 } 1817 applyPeer(node, reset) { 1818 if (reset) { 1819 getUINativeModule().common.resetOnAreaChange(node); 1820 } else { 1821 getUINativeModule().common.setOnAreaChange(node, this.value); 1822 } 1823 } 1824} 1825OnSizeChangeModifier.identity = Symbol('onAreaChange'); 1826class OnGestureJudgeBeginModifier extends ModifierWithKey { 1827 constructor(value) { 1828 super(value); 1829 } 1830 applyPeer(node, reset) { 1831 if (reset) { 1832 getUINativeModule().common.resetOnGestureJudgeBegin(node); 1833 } else { 1834 getUINativeModule().common.setOnGestureJudgeBegin(node, this.value); 1835 } 1836 } 1837} 1838OnGestureJudgeBeginModifier.identity = Symbol('onGestureJudgeBegin'); 1839class OnGestureRecognizerJudgeBeginModifier extends ModifierWithKey { 1840 constructor(value) { 1841 super(value); 1842 } 1843 applyPeer(node, reset) { 1844 if (reset) { 1845 getUINativeModule().common.resetOnGestureRecognizerJudgeBegin(node); 1846 } else { 1847 getUINativeModule().common.setOnGestureRecognizerJudgeBegin(node, this.value); 1848 } 1849 } 1850} 1851OnGestureRecognizerJudgeBeginModifier.identity = Symbol('onGestureRecognizerJudgeBegin'); 1852class ShouldBuiltInRecognizerParallelWithModifier extends ModifierWithKey { 1853 constructor(value) { 1854 super(value); 1855 } 1856 applyPeer(node, reset) { 1857 if (reset) { 1858 getUINativeModule().common.resetShouldBuiltInRecognizerParallelWith(node); 1859 } else { 1860 getUINativeModule().common.setShouldBuiltInRecognizerParallelWith(node, this.value); 1861 } 1862 } 1863} 1864ShouldBuiltInRecognizerParallelWithModifier.identity = Symbol('shouldBuiltInRecognizerParallelWith'); 1865class MotionPathModifier extends ModifierWithKey { 1866 constructor(value) { 1867 super(value); 1868 } 1869 applyPeer(node, reset) { 1870 if (reset) { 1871 getUINativeModule().common.resetMotionPath(node); 1872 } 1873 else { 1874 let path; 1875 let rotatable; 1876 let from; 1877 let to; 1878 if (isString(this.value.path)) { 1879 path = this.value.path; 1880 } 1881 if (isBoolean(this.value.rotatable)) { 1882 rotatable = this.value.rotatable; 1883 } 1884 if (isNumber(this.value.from) && isNumber(this.value.to)) { 1885 from = this.value.from; 1886 to = this.value.to; 1887 } 1888 getUINativeModule().common.setMotionPath(node, path, from, to, rotatable); 1889 } 1890 } 1891 checkObjectDiff() { 1892 return !(this.value.path === this.stageValue.path && 1893 this.value.from === this.stageValue.from && 1894 this.value.to === this.stageValue.to && 1895 this.value.rotatable === this.stageValue.rotatable); 1896 } 1897} 1898MotionPathModifier.identity = Symbol('motionPath'); 1899class MotionBlurModifier extends ModifierWithKey { 1900 constructor(value) { 1901 super(value); 1902 } 1903 applyPeer(node, reset) { 1904 if (reset) { 1905 getUINativeModule().common.resetMotionBlur(node); 1906 } 1907 else { 1908 getUINativeModule().common.setMotionBlur(node, this.value.radius, this.value.anchor.x, this.value.anchor.y); 1909 } 1910 } 1911} 1912MotionBlurModifier.identity = Symbol('motionBlur'); 1913class GroupDefaultFocusModifier extends ModifierWithKey { 1914 constructor(value) { 1915 super(value); 1916 } 1917 applyPeer(node, reset) { 1918 if (reset) { 1919 getUINativeModule().common.resetGroupDefaultFocus(node); 1920 } 1921 else { 1922 getUINativeModule().common.setGroupDefaultFocus(node, this.value); 1923 } 1924 } 1925} 1926GroupDefaultFocusModifier.identity = Symbol('groupDefaultFocus'); 1927class FocusOnTouchModifier extends ModifierWithKey { 1928 constructor(value) { 1929 super(value); 1930 } 1931 applyPeer(node, reset) { 1932 if (reset) { 1933 getUINativeModule().common.resetFocusOnTouch(node); 1934 } 1935 else { 1936 getUINativeModule().common.setFocusOnTouch(node, this.value); 1937 } 1938 } 1939} 1940FocusOnTouchModifier.identity = Symbol('focusOnTouch'); 1941class OffsetModifier extends ModifierWithKey { 1942 constructor(value) { 1943 super(value); 1944 } 1945 applyPeer(node, reset) { 1946 if (reset) { 1947 getUINativeModule().common.resetOffset(node); 1948 } else { 1949 if (isUndefined(this.value)) { 1950 getUINativeModule().common.resetOffset(node); 1951 } else if (('x' in this.value) || ('y' in this.value)) { 1952 getUINativeModule().common.setOffset(node, false, this.value.x, this.value.y); 1953 } 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)) { 1954 if (('start' in this.value)) { 1955 this.value.left = this.value.start; 1956 } 1957 if (('end' in this.value)) { 1958 this.value.right = this.value.end; 1959 } 1960 getUINativeModule().common.setOffset(node, true, this.value.top, this.value.left, this.value.bottom, this.value.right); 1961 } else { 1962 getUINativeModule().common.resetOffset(node); 1963 } 1964 } 1965 } 1966 checkObjectDiff() { 1967 return !isBaseOrResourceEqual(this.stageValue.x, this.value.x) || 1968 !isBaseOrResourceEqual(this.stageValue.y, this.value.y) || 1969 !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 1970 !isBaseOrResourceEqual(this.stageValue.left, this.value.left) || 1971 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 1972 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 1973 !isBaseOrResourceEqual(this.stageValue.start, this.value.start) || 1974 !isBaseOrResourceEqual(this.stageValue.end, this.value.end); 1975 } 1976} 1977OffsetModifier.identity = Symbol('offset'); 1978class MarkAnchorModifier extends ModifierWithKey { 1979 constructor(value) { 1980 super(value); 1981 } 1982 applyPeer(node, reset) { 1983 if (reset) { 1984 getUINativeModule().common.resetMarkAnchor(node); 1985 } 1986 else { 1987 if (this.value === void 0) { 1988 getUINativeModule().common.resetMarkAnchor(node); 1989 } else { 1990 if ('start' in this.value) { 1991 this.value.x = this.value.start; 1992 } 1993 if ('top' in this.value) { 1994 this.value.y = this.value.top; 1995 } 1996 } 1997 getUINativeModule().common.setMarkAnchor(node, this.value.x, this.value.y); 1998 } 1999 } 2000 checkObjectDiff() { 2001 return !isBaseOrResourceEqual(this.stageValue.x, this.value.x) || 2002 !isBaseOrResourceEqual(this.stageValue.y, this.value.y) || 2003 !isBaseOrResourceEqual(this.stageValue.start, this.value.start) || 2004 !isBaseOrResourceEqual(this.stageValue.top, this.value.top); 2005 } 2006} 2007MarkAnchorModifier.identity = Symbol('markAnchor'); 2008class DefaultFocusModifier extends ModifierWithKey { 2009 constructor(value) { 2010 super(value); 2011 } 2012 applyPeer(node, reset) { 2013 if (reset) { 2014 getUINativeModule().common.resetDefaultFocus(node); 2015 } 2016 else { 2017 getUINativeModule().common.setDefaultFocus(node, this.value); 2018 } 2019 } 2020} 2021DefaultFocusModifier.identity = Symbol('defaultFocus'); 2022class FocusableModifier extends ModifierWithKey { 2023 constructor(value) { 2024 super(value); 2025 } 2026 applyPeer(node, reset) { 2027 getUINativeModule().common.setFocusable(node, this.value); 2028 } 2029} 2030FocusableModifier.identity = Symbol('focusable'); 2031class TouchableModifier extends ModifierWithKey { 2032 constructor(value) { 2033 super(value); 2034 } 2035 applyPeer(node, reset) { 2036 if (reset) { 2037 getUINativeModule().common.resetTouchable(node); 2038 } 2039 else { 2040 getUINativeModule().common.setTouchable(node, this.value); 2041 } 2042 } 2043} 2044TouchableModifier.identity = Symbol('touchable'); 2045class MarginModifier extends ModifierWithKey { 2046 constructor(value) { 2047 super(value); 2048 } 2049 applyPeer(node, reset) { 2050 if (reset) { 2051 getUINativeModule().common.resetMargin(node); 2052 } 2053 else { 2054 getUINativeModule().common.setMargin(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 2055 } 2056 } 2057 checkObjectDiff() { 2058 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2059 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2060 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 2061 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 2062 } 2063} 2064MarginModifier.identity = Symbol('margin'); 2065class PaddingModifier extends ModifierWithKey { 2066 constructor(value) { 2067 super(value); 2068 } 2069 applyPeer(node, reset) { 2070 if (reset) { 2071 getUINativeModule().common.resetPadding(node); 2072 } 2073 else { 2074 getUINativeModule().common.setPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 2075 } 2076 } 2077 checkObjectDiff() { 2078 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2079 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2080 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 2081 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 2082 } 2083} 2084PaddingModifier.identity = Symbol('padding'); 2085class VisibilityModifier extends ModifierWithKey { 2086 constructor(value) { 2087 super(value); 2088 } 2089 applyPeer(node, reset) { 2090 if (reset) { 2091 getUINativeModule().common.resetVisibility(node); 2092 } 2093 else { 2094 getUINativeModule().common.setVisibility(node, this.value); 2095 } 2096 } 2097 checkObjectDiff() { 2098 return this.stageValue !== this.value; 2099 } 2100} 2101VisibilityModifier.identity = Symbol('visibility'); 2102class AccessibilityTextModifier extends ModifierWithKey { 2103 constructor(value) { 2104 super(value); 2105 } 2106 applyPeer(node, reset) { 2107 if (reset) { 2108 getUINativeModule().common.resetAccessibilityText(node); 2109 } 2110 else { 2111 getUINativeModule().common.setAccessibilityText(node, this.value); 2112 } 2113 } 2114} 2115AccessibilityTextModifier.identity = Symbol('accessibilityText'); 2116class AllowDropModifier extends ModifierWithKey { 2117 constructor(value) { 2118 super(value); 2119 } 2120 applyPeer(node, reset) { 2121 if (reset) { 2122 getUINativeModule().common.resetAllowDrop(node); 2123 } 2124 else { 2125 getUINativeModule().common.setAllowDrop(node, this.value); 2126 } 2127 } 2128 checkObjectDiff() { 2129 return !(Array.isArray(this.value) && Array.isArray(this.stageValue) && 2130 this.value.length === this.stageValue.length && 2131 this.value.every((value, index) => value === this.stageValue[index])); 2132 } 2133} 2134AllowDropModifier.identity = Symbol('allowDrop'); 2135class AccessibilityLevelModifier extends ModifierWithKey { 2136 constructor(value) { 2137 super(value); 2138 } 2139 applyPeer(node, reset) { 2140 if (reset) { 2141 getUINativeModule().common.resetAccessibilityLevel(node); 2142 } 2143 else { 2144 getUINativeModule().common.setAccessibilityLevel(node, this.value); 2145 } 2146 } 2147} 2148AccessibilityLevelModifier.identity = Symbol('accessibilityLevel'); 2149class AccessibilityDescriptionModifier extends ModifierWithKey { 2150 constructor(value) { 2151 super(value); 2152 } 2153 applyPeer(node, reset) { 2154 if (reset) { 2155 getUINativeModule().common.resetAccessibilityDescription(node); 2156 } 2157 else { 2158 getUINativeModule().common.setAccessibilityDescription(node, this.value); 2159 } 2160 } 2161} 2162AccessibilityDescriptionModifier.identity = Symbol('accessibilityDescription'); 2163class DirectionModifier extends ModifierWithKey { 2164 constructor(value) { 2165 super(value); 2166 } 2167 applyPeer(node, reset) { 2168 if (reset) { 2169 getUINativeModule().common.resetDirection(node); 2170 } 2171 else { 2172 getUINativeModule().common.setDirection(node, this.value); 2173 } 2174 } 2175 checkObjectDiff() { 2176 return !isBaseOrResourceEqual(this.stageValue, this.value); 2177 } 2178} 2179DirectionModifier.identity = Symbol('direction'); 2180class AlignRulesModifier extends ModifierWithKey { 2181 constructor(value) { 2182 super(value); 2183 } 2184 applyPeer(node, reset) { 2185 if (reset) { 2186 getUINativeModule().common.resetAlignRules(node); 2187 } 2188 else { 2189 getUINativeModule().common.setAlignRules(node, this.value.left, this.value.middle, 2190 this.value.right, this.value.top, this.value.center, this.value.bottom); 2191 } 2192 } 2193 checkObjectDiff() { 2194 return !isBaseOrResourceEqual(this.stageValue.left, this.value.left) || 2195 !isBaseOrResourceEqual(this.stageValue.middle, this.value.middle) || 2196 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 2197 !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 2198 !isBaseOrResourceEqual(this.stageValue.center, this.value.center) || 2199 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom); 2200 } 2201} 2202AlignRulesModifier.identity = Symbol('alignRules'); 2203class ExpandSafeAreaModifier extends ModifierWithKey { 2204 constructor(value) { 2205 super(value); 2206 } 2207 applyPeer(node, reset) { 2208 if (reset) { 2209 getUINativeModule().common.resetExpandSafeArea(node); 2210 } 2211 else { 2212 getUINativeModule().common.setExpandSafeArea(node, this.value.type, this.value.edges); 2213 } 2214 } 2215 checkObjectDiff() { 2216 return !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 2217 !isBaseOrResourceEqual(this.stageValue.edges, this.value.edges); 2218 } 2219} 2220ExpandSafeAreaModifier.identity = Symbol('expandSafeArea'); 2221class GridSpanModifier extends ModifierWithKey { 2222 constructor(value) { 2223 super(value); 2224 } 2225 applyPeer(node, reset) { 2226 if (reset) { 2227 getUINativeModule().common.resetGridSpan(node); 2228 } 2229 else { 2230 getUINativeModule().common.setGridSpan(node, this.value); 2231 } 2232 } 2233} 2234GridSpanModifier.identity = Symbol('gridSpan'); 2235class GridOffsetModifier extends ModifierWithKey { 2236 constructor(value) { 2237 super(value); 2238 } 2239 applyPeer(node, reset) { 2240 if (reset) { 2241 getUINativeModule().common.resetGridOffset(node); 2242 } 2243 else { 2244 getUINativeModule().common.setGridOffset(node, this.value); 2245 } 2246 } 2247} 2248GridOffsetModifier.identity = Symbol('gridOffset'); 2249class AlignSelfModifier extends ModifierWithKey { 2250 constructor(value) { 2251 super(value); 2252 } 2253 applyPeer(node, reset) { 2254 if (reset) { 2255 getUINativeModule().common.resetAlignSelf(node); 2256 } 2257 else { 2258 getUINativeModule().common.setAlignSelf(node, this.value); 2259 } 2260 } 2261 checkObjectDiff() { 2262 return !isBaseOrResourceEqual(this.stageValue, this.value); 2263 } 2264} 2265AlignSelfModifier.identity = Symbol('alignSelf'); 2266class SizeModifier extends ModifierWithKey { 2267 constructor(value) { 2268 super(value); 2269 } 2270 applyPeer(node, reset) { 2271 if (reset) { 2272 getUINativeModule().common.resetSize(node); 2273 } 2274 else { 2275 getUINativeModule().common.setSize(node, this.value.width, this.value.height); 2276 } 2277 } 2278 checkObjectDiff() { 2279 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 2280 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 2281 } 2282} 2283SizeModifier.identity = Symbol('size'); 2284class DisplayPriorityModifier extends ModifierWithKey { 2285 constructor(value) { 2286 super(value); 2287 } 2288 applyPeer(node, reset) { 2289 if (reset) { 2290 getUINativeModule().common.resetDisplayPriority(node); 2291 } 2292 else { 2293 getUINativeModule().common.setDisplayPriority(node, this.value); 2294 } 2295 } 2296 checkObjectDiff() { 2297 return !isBaseOrResourceEqual(this.stageValue, this.value); 2298 } 2299} 2300DisplayPriorityModifier.identity = Symbol('displayPriority'); 2301class IdModifier extends ModifierWithKey { 2302 constructor(value) { 2303 super(value); 2304 } 2305 applyPeer(node, reset) { 2306 if (reset) { 2307 getUINativeModule().common.resetId(node); 2308 } 2309 else { 2310 getUINativeModule().common.setId(node, this.value); 2311 } 2312 } 2313} 2314IdModifier.identity = Symbol('id'); 2315class KeyModifier extends ModifierWithKey { 2316 constructor(value) { 2317 super(value); 2318 } 2319 applyPeer(node, reset) { 2320 if (reset) { 2321 getUINativeModule().common.resetKey(node); 2322 } 2323 else { 2324 getUINativeModule().common.setKey(node, this.value); 2325 } 2326 } 2327} 2328KeyModifier.identity = Symbol('key'); 2329class RestoreIdModifier extends ModifierWithKey { 2330 constructor(value) { 2331 super(value); 2332 } 2333 applyPeer(node, reset) { 2334 if (reset) { 2335 getUINativeModule().common.resetRestoreId(node); 2336 } 2337 else { 2338 getUINativeModule().common.setRestoreId(node, this.value); 2339 } 2340 } 2341} 2342RestoreIdModifier.identity = Symbol('restoreId'); 2343class TabIndexModifier extends ModifierWithKey { 2344 constructor(value) { 2345 super(value); 2346 } 2347 applyPeer(node, reset) { 2348 if (reset) { 2349 getUINativeModule().common.resetTabIndex(node); 2350 } 2351 else { 2352 getUINativeModule().common.setTabIndex(node, this.value); 2353 } 2354 } 2355} 2356TabIndexModifier.identity = Symbol('tabIndex'); 2357class ObscuredModifier extends ModifierWithKey { 2358 constructor(value) { 2359 super(value); 2360 } 2361 applyPeer(node, reset) { 2362 if (reset || (!Array.isArray(this.value))) { 2363 getUINativeModule().common.resetObscured(node); 2364 } 2365 else { 2366 getUINativeModule().common.setObscured(node, this.value); 2367 } 2368 } 2369 checkObjectDiff() { 2370 return !(Array.isArray(this.value) && Array.isArray(this.stageValue) && 2371 this.value.length === this.stageValue.length && 2372 this.value.every((value, index) => value === this.stageValue[index])); 2373 } 2374} 2375ObscuredModifier.identity = Symbol('obscured'); 2376class BackgroundEffectModifier extends ModifierWithKey { 2377 constructor(options) { 2378 super(options); 2379 } 2380 applyPeer(node, reset) { 2381 let _a; 2382 if (reset) { 2383 getUINativeModule().common.resetBackgroundEffect(node); 2384 } 2385 else { 2386 getUINativeModule().common.setBackgroundEffect(node, this.value.radius, this.value.saturation, this.value.brightness, this.value.color, 2387 this.value.adaptiveColor, (_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale); 2388 } 2389 } 2390 checkObjectDiff() { 2391 let _a; 2392 let _b; 2393 return !(this.value.radius === this.stageValue.radius && this.value.saturation === this.stageValue.saturation && 2394 this.value.brightness === this.stageValue.brightness && 2395 isBaseOrResourceEqual(this.stageValue.color, this.value.color) && 2396 this.value.adaptiveColor === this.stageValue.adaptiveColor && 2397 ((_a = this.value.blurOptions) === null || _a === void 0 ? void 0 : _a.grayscale) === ((_b = this.stageValue.blurOptions) === null || 2398 _b === void 0 ? void 0 : _b.grayscale)); 2399 } 2400} 2401BackgroundEffectModifier.identity = Symbol('backgroundEffect'); 2402class BackgroundBrightnessModifier extends ModifierWithKey { 2403 constructor(params) { 2404 super(params); 2405 } 2406 applyPeer(node, reset) { 2407 if (reset) { 2408 getUINativeModule().common.resetBackgroundBrightness(node); 2409 } 2410 else { 2411 getUINativeModule().common.setBackgroundBrightness(node, this.value.rate, this.value.lightUpDegree); 2412 } 2413 } 2414 checkObjectDiff() { 2415 return !(this.value.rate === this.stageValue.rate && this.value.lightUpDegree === this.stageValue.lightUpDegree); 2416 } 2417} 2418BackgroundBrightnessModifier.identity = Symbol('backgroundBrightness'); 2419class BackgroundBrightnessInternalModifier extends ModifierWithKey { 2420 constructor(params) { 2421 super(params); 2422 } 2423 applyPeer(node, reset) { 2424 if (reset) { 2425 getUINativeModule().common.resetBackgroundBrightnessInternal(node); 2426 } 2427 else { 2428 getUINativeModule().common.setBackgroundBrightnessInternal(node, this.value.rate, this.value.lightUpDegree, this.value.cubicCoeff, 2429 this.value.quadCoeff, this.value.saturation, this.value.posRGB, this.value.negRGB, this.value.fraction); 2430 } 2431 } 2432 checkObjectDiff() { 2433 return !(this.value.rate === this.stageValue.rate && this.value.lightUpDegree === this.stageValue.lightUpDegree && 2434 this.value.cubicCoeff === this.stageValue.cubicCoeff && this.value.quadCoeff === this.stageValue.quadCoeff && 2435 this.value.saturation === this.stageValue.saturation && this.value.posRGB === this.stageValue.posRGB && 2436 this.value.negRGB === this.stageValue.negRGB && this.value.fraction === this.stageValue.fraction); 2437 } 2438} 2439BackgroundBrightnessInternalModifier.identity = Symbol('backgroundBrightnessInternal'); 2440class ForegroundBrightnessModifier extends ModifierWithKey { 2441 constructor(params) { 2442 super(params); 2443 } 2444 applyPeer(node, reset) { 2445 if (reset) { 2446 getUINativeModule().common.resetForegroundBrightness(node); 2447 } 2448 else { 2449 getUINativeModule().common.setForegroundBrightness(node, this.value.rate, this.value.lightUpDegree, this.value.cubicCoeff, 2450 this.value.quadCoeff, this.value.saturation, this.value.posRGB, this.value.negRGB, this.value.fraction); 2451 } 2452 } 2453 checkObjectDiff() { 2454 return !(this.value.rate === this.stageValue.rate && this.value.lightUpDegree === this.stageValue.lightUpDegree && 2455 this.value.cubicCoeff === this.stageValue.cubicCoeff && this.value.quadCoeff === this.stageValue.quadCoeff && 2456 this.value.saturation === this.stageValue.saturation && this.value.posRGB === this.stageValue.posRGB && 2457 this.value.negRGB === this.stageValue.negRGB && this.value.fraction === this.stageValue.fraction); 2458 } 2459} 2460ForegroundBrightnessModifier.identity = Symbol('foregroundBrightness'); 2461class DragPreviewOptionsModifier extends ModifierWithKey { 2462 constructor(value) { 2463 super(value); 2464 } 2465 applyPeer(node, reset) { 2466 if (reset) { 2467 getUINativeModule().common.resetDragPreviewOptions(node); 2468 } 2469 else { 2470 getUINativeModule().common.setDragPreviewOptions(node, this.value.mode, this.value.numberBadge, 2471 this.value.isMultiSelectionEnabled, this.value.defaultAnimationBeforeLifting); 2472 } 2473 } 2474 checkObjectDiff() { 2475 return !(this.value.mode === this.stageValue.mode && 2476 this.value.numberBadge === this.stageValue.numberBadge && 2477 this.value.isMultiSelectionEnabled === this.stageValue.isMultiSelectionEnabled && 2478 this.value.defaultAnimationBeforeLifting === this.stageValue.defaultAnimationBeforeLifting); 2479 } 2480} 2481DragPreviewOptionsModifier.identity = Symbol('dragPreviewOptions'); 2482class DragPreviewModifier extends ModifierWithKey { 2483 constructor(value) { 2484 super(value); 2485 } 2486 applyPeer(node, reset) { 2487 if (reset) { 2488 getUINativeModule().common.resetDragPreview(node); 2489 } else { 2490 getUINativeModule().common.setDragPreview(node, this.value.inspetorId); 2491 } 2492 } 2493 2494 checkObjectDiff() { 2495 return this.value.inspetorId !== this.stageValue.inspetorId; 2496 } 2497} 2498DragPreviewModifier.identity = Symbol('dragPreview'); 2499class MouseResponseRegionModifier extends ModifierWithKey { 2500 constructor(value) { 2501 super(value); 2502 } 2503 applyPeer(node, reset) { 2504 let _a, _b, _c, _d, _e, _f, _g, _h; 2505 if (reset) { 2506 getUINativeModule().common.resetMouseResponseRegion(node); 2507 } 2508 else { 2509 let responseRegion = []; 2510 if (Array.isArray(this.value)) { 2511 for (let i = 0; i < this.value.length; i++) { 2512 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 2513 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 2514 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 2515 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 2516 } 2517 } 2518 else { 2519 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 2520 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 2521 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 2522 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 2523 } 2524 getUINativeModule().common.setMouseResponseRegion(node, responseRegion, responseRegion.length); 2525 } 2526 } 2527 checkObjectDiff() { 2528 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 2529 if (this.value.length !== this.stageValue.length) { 2530 return true; 2531 } 2532 else { 2533 for (let i = 0; i < this.value.length; i++) { 2534 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 2535 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 2536 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 2537 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 2538 return true; 2539 } 2540 } 2541 return false; 2542 } 2543 } 2544 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 2545 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 2546 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 2547 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 2548 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 2549 } 2550 else { 2551 return false; 2552 } 2553 } 2554} 2555MouseResponseRegionModifier.identity = Symbol('mouseResponseRegion'); 2556class ResponseRegionModifier extends ModifierWithKey { 2557 constructor(value) { 2558 super(value); 2559 } 2560 applyPeer(node, reset) { 2561 let _a, _b, _c, _d, _e, _f, _g, _h; 2562 if (reset) { 2563 getUINativeModule().common.resetResponseRegion(node); 2564 } 2565 else { 2566 let responseRegion = []; 2567 if (Array.isArray(this.value)) { 2568 for (let i = 0; i < this.value.length; i++) { 2569 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 2570 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 2571 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 2572 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 2573 } 2574 } 2575 else { 2576 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 2577 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 2578 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 2579 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 2580 } 2581 getUINativeModule().common.setResponseRegion(node, responseRegion, responseRegion.length); 2582 } 2583 } 2584 checkObjectDiff() { 2585 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 2586 if (this.value.length !== this.stageValue.length) { 2587 return true; 2588 } 2589 else { 2590 for (let i = 0; i < this.value.length; i++) { 2591 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 2592 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 2593 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 2594 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 2595 return true; 2596 } 2597 } 2598 return false; 2599 } 2600 } 2601 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 2602 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 2603 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 2604 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 2605 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 2606 } 2607 else { 2608 return false; 2609 } 2610 } 2611} 2612ResponseRegionModifier.identity = Symbol('responseRegion'); 2613class FlexGrowModifier extends ModifierWithKey { 2614 constructor(value) { 2615 super(value); 2616 } 2617 applyPeer(node, reset) { 2618 if (reset) { 2619 getUINativeModule().common.resetFlexGrow(node); 2620 } 2621 else { 2622 getUINativeModule().common.setFlexGrow(node, this.value); 2623 } 2624 } 2625 checkObjectDiff() { 2626 return this.stageValue !== this.value; 2627 } 2628} 2629FlexGrowModifier.identity = Symbol('flexGrow'); 2630class FlexShrinkModifier extends ModifierWithKey { 2631 constructor(value) { 2632 super(value); 2633 } 2634 applyPeer(node, reset) { 2635 if (reset) { 2636 getUINativeModule().common.resetFlexShrink(node); 2637 } 2638 else { 2639 getUINativeModule().common.setFlexShrink(node, this.value); 2640 } 2641 } 2642 checkObjectDiff() { 2643 return this.stageValue !== this.value; 2644 } 2645} 2646FlexShrinkModifier.identity = Symbol('flexShrink'); 2647class AspectRatioModifier extends ModifierWithKey { 2648 constructor(value) { 2649 super(value); 2650 } 2651 applyPeer(node, reset) { 2652 if (reset) { 2653 getUINativeModule().common.resetAspectRatio(node); 2654 } 2655 else { 2656 getUINativeModule().common.setAspectRatio(node, this.value); 2657 } 2658 } 2659 checkObjectDiff() { 2660 return this.stageValue !== this.value; 2661 } 2662} 2663AspectRatioModifier.identity = Symbol('aspectRatio'); 2664class ConstraintSizeModifier extends ModifierWithKey { 2665 constructor(value) { 2666 super(value); 2667 } 2668 applyPeer(node, reset) { 2669 if (reset) { 2670 getUINativeModule().common.resetConstraintSize(node); 2671 } 2672 else { 2673 getUINativeModule().common.setConstraintSize(node, this.value.minWidth, this.value.maxWidth, this.value.minHeight, this.value.maxHeight); 2674 } 2675 } 2676 checkObjectDiff() { 2677 return !isBaseOrResourceEqual(this.stageValue.minWidth, this.value.minWidth) || 2678 !isBaseOrResourceEqual(this.stageValue.maxWidth, this.value.maxWidth) || 2679 !isBaseOrResourceEqual(this.stageValue.minHeight, this.value.minHeight) || 2680 !isBaseOrResourceEqual(this.stageValue.maxHeight, this.value.maxHeight); 2681 } 2682} 2683ConstraintSizeModifier.identity = Symbol('constraintSize'); 2684class FlexBasisModifier extends ModifierWithKey { 2685 constructor(value) { 2686 super(value); 2687 } 2688 applyPeer(node, reset) { 2689 if (reset) { 2690 getUINativeModule().common.resetFlexBasis(node); 2691 } 2692 else { 2693 getUINativeModule().common.setFlexBasis(node, this.value); 2694 } 2695 } 2696 checkObjectDiff() { 2697 return this.stageValue !== this.value; 2698 } 2699} 2700FlexBasisModifier.identity = Symbol('flexBasis'); 2701class LayoutWeightModifier extends ModifierWithKey { 2702 constructor(value) { 2703 super(value); 2704 } 2705 applyPeer(node, reset) { 2706 if (reset) { 2707 getUINativeModule().common.resetLayoutWeight(node); 2708 } 2709 else { 2710 getUINativeModule().common.setLayoutWeight(node, this.value); 2711 } 2712 } 2713} 2714LayoutWeightModifier.identity = Symbol('layoutWeight'); 2715class EnabledModifier extends ModifierWithKey { 2716 constructor(value) { 2717 super(value); 2718 } 2719 applyPeer(node, reset) { 2720 if (reset) { 2721 getUINativeModule().common.resetEnabled(node); 2722 } 2723 else { 2724 getUINativeModule().common.setEnabled(node, this.value); 2725 } 2726 } 2727} 2728EnabledModifier.identity = Symbol('enabled'); 2729class UseShadowBatchingModifier extends ModifierWithKey { 2730 constructor(value) { 2731 super(value); 2732 } 2733 applyPeer(node, reset) { 2734 if (reset) { 2735 getUINativeModule().common.resetUseShadowBatching(node); 2736 } 2737 else { 2738 getUINativeModule().common.setUseShadowBatching(node, this.value); 2739 } 2740 } 2741} 2742UseShadowBatchingModifier.identity = Symbol('useShadowBatching'); 2743class MonopolizeEventsModifier extends ModifierWithKey { 2744 constructor(value) { 2745 super(value); 2746 } 2747 applyPeer(node, reset) { 2748 if (reset) { 2749 getUINativeModule().common.resetMonopolizeEvents(node); 2750 } 2751 else { 2752 getUINativeModule().common.setMonopolizeEvents(node, this.value); 2753 } 2754 } 2755} 2756MonopolizeEventsModifier.identity = Symbol('monopolizeEvents'); 2757class DraggableModifier extends ModifierWithKey { 2758 constructor(value) { 2759 super(value); 2760 } 2761 applyPeer(node, reset) { 2762 if (reset) { 2763 getUINativeModule().common.resetDraggable(node); 2764 } 2765 else { 2766 getUINativeModule().common.setDraggable(node, this.value); 2767 } 2768 } 2769} 2770DraggableModifier.identity = Symbol('draggable'); 2771class AccessibilityGroupModifier extends ModifierWithKey { 2772 constructor(value) { 2773 super(value); 2774 } 2775 applyPeer(node, reset) { 2776 if (reset) { 2777 getUINativeModule().common.resetAccessibilityGroup(node); 2778 } 2779 else { 2780 getUINativeModule().common.setAccessibilityGroup(node, this.value); 2781 } 2782 } 2783} 2784AccessibilityGroupModifier.identity = Symbol('accessibilityGroup'); 2785class HoverEffectModifier extends ModifierWithKey { 2786 constructor(value) { 2787 super(value); 2788 } 2789 applyPeer(node, reset) { 2790 if (reset) { 2791 getUINativeModule().common.resetHoverEffect(node); 2792 } 2793 else { 2794 getUINativeModule().common.setHoverEffect(node, this.value); 2795 } 2796 } 2797} 2798HoverEffectModifier.identity = Symbol('hoverEffect'); 2799class ClickEffectModifier extends ModifierWithKey { 2800 constructor(value) { 2801 super(value); 2802 } 2803 applyPeer(node, reset) { 2804 if (reset || !this.value) { 2805 getUINativeModule().common.resetClickEffect(node); 2806 } 2807 else { 2808 getUINativeModule().common.setClickEffect(node, this.value.level, this.value.scale); 2809 } 2810 } 2811 checkObjectDiff() { 2812 return !((this.value.level === this.stageValue.level) && (this.value.scale === this.stageValue.scale)); 2813 } 2814} 2815ClickEffectModifier.identity = Symbol('clickEffect'); 2816class KeyBoardShortCutModifier extends ModifierWithKey { 2817 constructor(value) { 2818 super(value); 2819 } 2820 applyPeer(node, reset) { 2821 if (reset) { 2822 getUINativeModule().common.resetKeyBoardShortCut(node); 2823 } 2824 else { 2825 getUINativeModule().common.setKeyBoardShortCut(node, this.value.value, this.value.keys); 2826 } 2827 } 2828 checkObjectDiff() { 2829 return !this.value.isEqual(this.stageValue); 2830 } 2831} 2832KeyBoardShortCutModifier.identity = Symbol('keyboardShortcut'); 2833 2834class CustomPropertyModifier extends ModifierWithKey { 2835 constructor(value) { 2836 super(value); 2837 } 2838 applyPeer(node, reset) { 2839 const nodeId = getUINativeModule().frameNode.getIdByNodePtr(node); 2840 if (reset) { 2841 __removeCustomProperty__(nodeId, this.value.key); 2842 } else { 2843 __setValidCustomProperty__(nodeId, this.value.key, this.value.value); 2844 } 2845 } 2846} 2847CustomPropertyModifier.identity = Symbol('customProperty'); 2848 2849class TransitionModifier extends ModifierWithKey { 2850 constructor(value) { 2851 super(value); 2852 } 2853 applyPeer(node, reset) { 2854 if (reset) { 2855 getUINativeModule().common.resetTransition(node); 2856 } 2857 else { 2858 getUINativeModule().common.setTransition(node, this.value); 2859 } 2860 } 2861} 2862TransitionModifier.identity = Symbol('transition'); 2863class SharedTransitionModifier extends ModifierWithKey { 2864 constructor(value) { 2865 super(value); 2866 } 2867 applyPeer(node, reset) { 2868 if (reset) { 2869 getUINativeModule().common.resetSharedTransition(node); 2870 } 2871 else { 2872 getUINativeModule().common.setSharedTransition(node, this.value.id, this.value.options); 2873 } 2874 } 2875} 2876SharedTransitionModifier.identity = Symbol('sharedTransition'); 2877 2878class FocusScopeIdModifier extends ModifierWithKey { 2879 constructor(value) { 2880 super(value); 2881 } 2882 applyPeer(node, reset) { 2883 if (reset) { 2884 getUINativeModule().common.resetFocusScopeId(node); 2885 } 2886 else { 2887 getUINativeModule().common.setFocusScopeId(node, this.value.id, this.value.isGroup); 2888 } 2889 } 2890} 2891FocusScopeIdModifier.identity = Symbol('focusScopeId'); 2892 2893class FocusScopePriorityModifier extends ModifierWithKey { 2894 constructor(value) { 2895 super(value); 2896 } 2897 applyPeer(node, reset) { 2898 if (reset) { 2899 getUINativeModule().common.resetFocusScopePriority(node); 2900 } 2901 else { 2902 getUINativeModule().common.setFocusScopePriority(node, this.value.scopeId, this.value.priority); 2903 } 2904 } 2905} 2906FocusScopePriorityModifier.identity = Symbol('focusScopePriority'); 2907 2908class PixelRoundModifier extends ModifierWithKey { 2909 constructor(value) { 2910 super(value); 2911 } 2912 applyPeer(node, reset) { 2913 if (reset) { 2914 getUINativeModule().common.resetPixelRound(node); 2915 } 2916 else { 2917 if (!isObject(this.value)) { 2918 getUINativeModule().common.resetPixelRound(node); 2919 } else { 2920 getUINativeModule().common.setPixelRound(node, this.value.start, this.value.top, this.value.end, this.value.bottom); 2921 } 2922 } 2923 } 2924 checkObjectDiff() { 2925 return !(this.stageValue.start === this.value.start && 2926 this.stageValue.end === this.value.end && 2927 this.stageValue.top === this.value.top && 2928 this.stageValue.bottom === this.value.bottom); 2929 } 2930} 2931PixelRoundModifier.identity = Symbol('pixelRound'); 2932class FocusBoxModifier extends ModifierWithKey { 2933 constructor(value) { 2934 super(value); 2935 } 2936 applyPeer(node, reset) { 2937 if (reset) { 2938 getUINativeModule().common.resetFocusBox(node); 2939 } 2940 else { 2941 getUINativeModule().common.setFocusBox(node, this.value?.margin, 2942 this.value?.strokeWidth, this.value?.strokeColor); 2943 } 2944 } 2945} 2946FocusBoxModifier.identity = Symbol('focusBox'); 2947const JSCallbackInfoType = { STRING: 0, NUMBER: 1, OBJECT: 2, BOOLEAN: 3, FUNCTION: 4 }; 2948const isString = (val) => typeof val === 'string'; 2949const isNumber = (val) => typeof val === 'number'; 2950const isBigint = (val) => typeof val === 'bigint'; 2951const isBoolean = (val) => typeof val === 'boolean'; 2952const isSymbol = (val) => typeof val === 'symbol'; 2953const isUndefined = (val) => typeof val === 'undefined'; 2954const isObject = (val) => typeof val === 'object'; 2955const isFunction = (val) => typeof val === 'function'; 2956const isLengthType = (val) => typeof val === 'string' || typeof val === 'number'; 2957function checkJsCallbackInfo(value, checklist) { 2958 let typeVerified = false; 2959 checklist.forEach(function (infoType) { 2960 switch (infoType) { 2961 case JSCallbackInfoType.STRING: 2962 if (isString(value)) { 2963 typeVerified = true; 2964 } 2965 break; 2966 case JSCallbackInfoType.NUMBER: 2967 if (isNumber(value)) { 2968 typeVerified = true; 2969 } 2970 break; 2971 case JSCallbackInfoType.OBJECT: 2972 if (isObject(value)) { 2973 typeVerified = true; 2974 } 2975 break; 2976 case JSCallbackInfoType.FUNCTION: 2977 if (isFunction(value)) { 2978 typeVerified = true; 2979 } 2980 break; 2981 default: 2982 break; 2983 } 2984 }); 2985 return typeVerified || checklist.length === 0; 2986} 2987function parseWithDefaultNumber(val, defaultValue) { 2988 if (isNumber(val)) { 2989 return val; 2990 } 2991 else { return defaultValue; } 2992} 2993function modifier(modifiers, modifierClass, value) { 2994 const identity = modifierClass['identity']; 2995 const item = modifiers.get(identity); 2996 if (item) { 2997 item.stageValue = value; 2998 } 2999 else { 3000 modifiers.set(identity, new modifierClass(value)); 3001 } 3002} 3003function modifierWithKey(modifiers, identity, modifierClass, value) { 3004 if (typeof modifiers.isFrameNode === 'function' && modifiers.isFrameNode()) { 3005 if (!modifierClass.instance) { 3006 modifierClass.instance = new modifierClass(value); 3007 } 3008 else { 3009 modifierClass.instance.stageValue = value; 3010 } 3011 modifiers.set(identity, modifierClass.instance); 3012 return; 3013 } 3014 const item = modifiers.get(identity); 3015 if (item) { 3016 item.stageValue = value; 3017 modifiers.set(identity, item); 3018 } 3019 else { 3020 modifiers.set(identity, new modifierClass(value)); 3021 } 3022} 3023 3024class ObservedMap { 3025 constructor() { 3026 this.map_ = new Map(); 3027 this.isFrameNode_ = false; 3028 } 3029 clear() { 3030 this.map_.clear(); 3031 } 3032 delete(key) { 3033 return this.map_.delete(key); 3034 } 3035 forEach(callbackfn, thisArg) { 3036 this.map_.forEach(callbackfn, thisArg); 3037 } 3038 get(key) { 3039 return this.map_.get(key); 3040 } 3041 has(key) { 3042 return this.map_.has(key); 3043 } 3044 set(key, value) { 3045 const _a = this.changeCallback; 3046 this.map_.set(key, value); 3047 _a === null || _a === void 0 ? void 0 : _a(key, value); 3048 return this; 3049 } 3050 get size() { 3051 return this.map_.size; 3052 } 3053 entries() { 3054 return this.map_.entries(); 3055 } 3056 keys() { 3057 return this.map_.keys(); 3058 } 3059 values() { 3060 return this.map_.values(); 3061 } 3062 [Symbol.iterator]() { 3063 return this.map_.entries(); 3064 } 3065 get [Symbol.toStringTag]() { 3066 return 'ObservedMapTag'; 3067 } 3068 setOnChange(callback) { 3069 this.changeCallback = callback; 3070 } 3071 setFrameNode(isFrameNode) { 3072 this.isFrameNode_ = isFrameNode; 3073 } 3074 isFrameNode() { 3075 return this.isFrameNode_; 3076 } 3077} 3078 3079class ArkComponent { 3080 constructor(nativePtr, classType) { 3081 this._modifiersWithKeys = new Map(); 3082 this.nativePtr = nativePtr; 3083 this._changed = false; 3084 this._classType = classType; 3085 if (classType === ModifierType.FRAME_NODE) { 3086 this._instanceId = -1; 3087 this._modifiersWithKeys = new ObservedMap(); 3088 this._modifiersWithKeys.setOnChange((key, value) => { 3089 if (this.nativePtr === undefined) { 3090 return; 3091 } 3092 if (this.nativePtr !== -1) { 3093 __JSScopeUtil__.syncInstanceId(this._instanceId); 3094 } 3095 value.applyStageImmediately(this.nativePtr, this); 3096 getUINativeModule().frameNode.propertyUpdate(this.nativePtr); 3097 if (this._instanceId !== -1) { 3098 __JSScopeUtil__.restoreInstanceId(); 3099 } 3100 }); 3101 this._modifiersWithKeys.setFrameNode(true); 3102 } else if (classType === ModifierType.EXPOSE_MODIFIER || classType === ModifierType.STATE) { 3103 this._modifiersWithKeys = new ObservedMap(); 3104 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nativePtr); 3105 } else { 3106 this._modifiersWithKeys = new Map(); 3107 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nativePtr); 3108 } 3109 this._nativePtrChanged = false; 3110 } 3111 setNodePtr(nodePtr) { 3112 this.nativePtr = nodePtr; 3113 } 3114 setInstanceId(instanceId) { 3115 this._instanceId = instanceId; 3116 } 3117 getOrCreateGestureEvent() { 3118 if (this._gestureEvent !== null) { 3119 this._gestureEvent = new UIGestureEvent(); 3120 this._gestureEvent.setNodePtr(this.nativePtr); 3121 this._gestureEvent.setWeakNodePtr(this._weakPtr); 3122 } 3123 return this._gestureEvent; 3124 } 3125 cleanStageValue(){ 3126 if (!this._modifiersWithKeys){ 3127 return; 3128 } 3129 this._modifiersWithKeys.forEach((value, key) => { 3130 value.stageValue = undefined; 3131 }); 3132 } 3133 applyStateUpdatePtr(instance) { 3134 if (this.nativePtr !== instance.nativePtr) { 3135 ArkLogConsole.info('modifier pointer changed to ' + (instance ? 3136 instance.constructor.name.toString() : 'undefined')); 3137 this.nativePtr = instance.nativePtr; 3138 this._nativePtrChanged = true; 3139 if (instance._weakPtr) { 3140 this._weakPtr = instance._weakPtr; 3141 } else { 3142 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(this.nativePtr); 3143 } 3144 } 3145 } 3146 applyModifierPatch() { 3147 let expiringItemsWithKeys = []; 3148 this._modifiersWithKeys.forEach((value, key) => { 3149 if (value.applyStage(this.nativePtr, this)) { 3150 expiringItemsWithKeys.push(key); 3151 } 3152 }); 3153 expiringItemsWithKeys.forEach(key => { 3154 this._modifiersWithKeys.delete(key); 3155 }); 3156 } 3157 onGestureJudgeBegin(callback) { 3158 modifierWithKey(this._modifiersWithKeys, OnGestureJudgeBeginModifier.identity, OnGestureJudgeBeginModifier, callback); 3159 return this; 3160 } 3161 onGestureRecognizerJudgeBegin(callback) { 3162 modifierWithKey(this._modifiersWithKeys, OnGestureRecognizerJudgeBeginModifier.identity, OnGestureRecognizerJudgeBeginModifier, callback); 3163 return this; 3164 } 3165 shouldBuiltInRecognizerParallelWith(callback) { 3166 modifierWithKey(this._modifiersWithKeys, ShouldBuiltInRecognizerParallelWithModifier.identity, ShouldBuiltInRecognizerParallelWithModifier, callback); 3167 return this; 3168 } 3169 onSizeChange(callback) { 3170 modifierWithKey(this._modifiersWithKeys, OnSizeChangeModifier.identity, OnSizeChangeModifier, callback); 3171 return this; 3172 } 3173 outline(value) { 3174 modifierWithKey(this._modifiersWithKeys, OutlineModifier.identity, OutlineModifier, value); 3175 return this; 3176 } 3177 outlineColor(value) { 3178 modifierWithKey(this._modifiersWithKeys, OutlineColorModifier.identity, OutlineColorModifier, value); 3179 return this; 3180 } 3181 outlineRadius(value) { 3182 modifierWithKey(this._modifiersWithKeys, OutlineRadiusModifier.identity, OutlineRadiusModifier, value); 3183 return this; 3184 } 3185 outlineStyle(value) { 3186 modifierWithKey(this._modifiersWithKeys, OutlineStyleModifier.identity, OutlineStyleModifier, value); 3187 return this; 3188 } 3189 outlineWidth(value) { 3190 modifierWithKey(this._modifiersWithKeys, OutlineWidthModifier.identity, OutlineWidthModifier, value); 3191 return this; 3192 } 3193 width(value) { 3194 modifierWithKey(this._modifiersWithKeys, WidthModifier.identity, WidthModifier, value); 3195 return this; 3196 } 3197 height(value) { 3198 modifierWithKey(this._modifiersWithKeys, HeightModifier.identity, HeightModifier, value); 3199 return this; 3200 } 3201 expandSafeArea(types, edges) { 3202 let opts = new ArkSafeAreaExpandOpts(); 3203 if (types && types.length > 0) { 3204 let safeAreaType = ''; 3205 for (let param of types) { 3206 if (!isNumber(param) || param >= SAFE_AREA_TYPE_LIMIT) { 3207 safeAreaType = undefined; 3208 break; 3209 } 3210 if (safeAreaType) { 3211 safeAreaType += '|'; 3212 safeAreaType += param.toString(); 3213 } 3214 else { 3215 safeAreaType += param.toString(); 3216 } 3217 } 3218 opts.type = safeAreaType; 3219 } 3220 if (edges && edges.length > 0) { 3221 let safeAreaEdge = ''; 3222 for (let param of edges) { 3223 if (!isNumber(param) || param >= SAFE_AREA_EDGE_LIMIT) { 3224 safeAreaEdge = undefined; 3225 break; 3226 } 3227 if (safeAreaEdge) { 3228 safeAreaEdge += '|'; 3229 safeAreaEdge += param.toString(); 3230 } 3231 else { 3232 safeAreaEdge += param.toString(); 3233 } 3234 } 3235 opts.edges = safeAreaEdge; 3236 } 3237 if (opts.type === undefined && opts.edges === undefined) { 3238 modifierWithKey(this._modifiersWithKeys, ExpandSafeAreaModifier.identity, ExpandSafeAreaModifier, undefined); 3239 } 3240 else { 3241 modifierWithKey(this._modifiersWithKeys, ExpandSafeAreaModifier.identity, ExpandSafeAreaModifier, opts); 3242 } 3243 return this; 3244 } 3245 backgroundEffect(options) { 3246 modifierWithKey(this._modifiersWithKeys, BackgroundEffectModifier.identity, BackgroundEffectModifier, options); 3247 return this; 3248 } 3249 backgroundBrightness(params) { 3250 modifierWithKey(this._modifiersWithKeys, BackgroundBrightnessModifier.identity, BackgroundBrightnessModifier, params); 3251 return this; 3252 } 3253 backgroundBrightnessInternal(params) { 3254 modifierWithKey(this._modifiersWithKeys, BackgroundBrightnessInternalModifier.identity, BackgroundBrightnessInternalModifier, params); 3255 return this; 3256 } 3257 foregroundBrightness(params) { 3258 modifierWithKey(this._modifiersWithKeys, ForegroundBrightnessModifier.identity, ForegroundBrightnessModifier, params); 3259 return this; 3260 } 3261 dragPreviewOptions(value, options) { 3262 if (isUndefined(value)) { 3263 modifierWithKey(this._modifiersWithKeys, DragPreviewOptionsModifier.identity, DragPreviewOptionsModifier, undefined); 3264 return this; 3265 } 3266 let arkDragPreviewOptions = new ArkDragPreviewOptions(); 3267 if (typeof value === 'object') { 3268 arkDragPreviewOptions.mode = value.mode; 3269 arkDragPreviewOptions.numberBadge = value.numberBadge; 3270 } 3271 if (typeof options === 'object') { 3272 arkDragPreviewOptions.isMultiSelectionEnabled = options.isMultiSelectionEnabled; 3273 arkDragPreviewOptions.defaultAnimationBeforeLifting = options.defaultAnimationBeforeLifting; 3274 } 3275 modifierWithKey(this._modifiersWithKeys, DragPreviewOptionsModifier.identity, 3276 DragPreviewOptionsModifier, arkDragPreviewOptions); 3277 return this; 3278 } 3279 responseRegion(value) { 3280 modifierWithKey(this._modifiersWithKeys, ResponseRegionModifier.identity, ResponseRegionModifier, value); 3281 return this; 3282 } 3283 mouseResponseRegion(value) { 3284 modifierWithKey(this._modifiersWithKeys, MouseResponseRegionModifier.identity, MouseResponseRegionModifier, value); 3285 return this; 3286 } 3287 size(value) { 3288 modifierWithKey(this._modifiersWithKeys, SizeModifier.identity, SizeModifier, value); 3289 return this; 3290 } 3291 constraintSize(value) { 3292 modifierWithKey(this._modifiersWithKeys, ConstraintSizeModifier.identity, ConstraintSizeModifier, value); 3293 return this; 3294 } 3295 touchable(value) { 3296 if (typeof value === 'boolean') { 3297 modifierWithKey(this._modifiersWithKeys, TouchableModifier.identity, TouchableModifier, value); 3298 } 3299 else { 3300 modifierWithKey(this._modifiersWithKeys, TouchableModifier.identity, TouchableModifier, undefined); 3301 } 3302 return this; 3303 } 3304 hitTestBehavior(value) { 3305 if (value) { 3306 modifierWithKey(this._modifiersWithKeys, HitTestBehaviorModifier.identity, HitTestBehaviorModifier, value); 3307 } 3308 else { 3309 modifierWithKey(this._modifiersWithKeys, HitTestBehaviorModifier.identity, HitTestBehaviorModifier, undefined); 3310 } 3311 return this; 3312 } 3313 layoutWeight(value) { 3314 if (isNumber(value)) { 3315 modifierWithKey(this._modifiersWithKeys, LayoutWeightModifier.identity, LayoutWeightModifier, value); 3316 } 3317 else if (isString(value) && !isNaN(Number(value))) { 3318 modifierWithKey(this._modifiersWithKeys, LayoutWeightModifier.identity, LayoutWeightModifier, parseInt(value.toString())); 3319 } 3320 else { 3321 modifierWithKey(this._modifiersWithKeys, LayoutWeightModifier.identity, LayoutWeightModifier, undefined); 3322 } 3323 return this; 3324 } 3325 padding(value) { 3326 let arkValue = new ArkPadding(); 3327 if (value !== null && value !== undefined) { 3328 if (isLengthType(value) || isResource(value)) { 3329 arkValue.top = value; 3330 arkValue.right = value; 3331 arkValue.bottom = value; 3332 arkValue.left = value; 3333 } 3334 else { 3335 arkValue.top = value.top; 3336 arkValue.bottom = value.bottom; 3337 if (Object.keys(value).indexOf('right') >= 0) { 3338 arkValue.right = value.right; 3339 } 3340 if (Object.keys(value).indexOf('end') >= 0) { 3341 arkValue.right = value.end; 3342 } 3343 if (Object.keys(value).indexOf('left') >= 0) { 3344 arkValue.left = value.left; 3345 } 3346 if (Object.keys(value).indexOf('start') >= 0) { 3347 arkValue.left = value.start; 3348 } 3349 } 3350 modifierWithKey(this._modifiersWithKeys, PaddingModifier.identity, PaddingModifier, arkValue); 3351 } 3352 else { 3353 modifierWithKey(this._modifiersWithKeys, PaddingModifier.identity, PaddingModifier, undefined); 3354 } 3355 return this; 3356 } 3357 margin(value) { 3358 let arkValue = new ArkPadding(); 3359 if (value !== null && value !== undefined) { 3360 if (isLengthType(value) || isResource(value)) { 3361 arkValue.top = value; 3362 arkValue.right = value; 3363 arkValue.bottom = value; 3364 arkValue.left = value; 3365 } 3366 else { 3367 arkValue.top = value.top; 3368 arkValue.bottom = value.bottom; 3369 if (Object.keys(value).indexOf('right') >= 0) { 3370 arkValue.right = value.right; 3371 } 3372 if (Object.keys(value).indexOf('end') >= 0) { 3373 arkValue.right = value.end; 3374 } 3375 if (Object.keys(value).indexOf('left') >= 0) { 3376 arkValue.left = value.left; 3377 } 3378 if (Object.keys(value).indexOf('start') >= 0) { 3379 arkValue.left = value.start; 3380 } 3381 } 3382 modifierWithKey(this._modifiersWithKeys, MarginModifier.identity, MarginModifier, arkValue); 3383 } 3384 else { 3385 modifierWithKey(this._modifiersWithKeys, MarginModifier.identity, MarginModifier, undefined); 3386 } 3387 return this; 3388 } 3389 background(builder, options) { 3390 throw new Error('Method not implemented.'); 3391 } 3392 backgroundColor(value) { 3393 modifierWithKey(this._modifiersWithKeys, BackgroundColorModifier.identity, BackgroundColorModifier, value); 3394 return this; 3395 } 3396 backgroundImage(src, repeat) { 3397 let arkBackgroundImage = new ArkBackgroundImage(); 3398 arkBackgroundImage.src = src; 3399 arkBackgroundImage.repeat = repeat; 3400 modifierWithKey(this._modifiersWithKeys, BackgroundImageModifier.identity, BackgroundImageModifier, arkBackgroundImage); 3401 return this; 3402 } 3403 backgroundImageSize(value) { 3404 modifierWithKey(this._modifiersWithKeys, BackgroundImageSizeModifier.identity, BackgroundImageSizeModifier, value); 3405 return this; 3406 } 3407 backgroundImagePosition(value) { 3408 modifierWithKey(this._modifiersWithKeys, BackgroundImagePositionModifier.identity, BackgroundImagePositionModifier, value); 3409 return this; 3410 } 3411 backgroundImageResizable(value) { 3412 modifierWithKey(this._modifiersWithKeys, BackgroundImageResizableModifier.identity, BackgroundImageResizableModifier, value); 3413 return this; 3414 } 3415 backgroundBlurStyle(value, options) { 3416 if (isUndefined(value)) { 3417 modifierWithKey(this._modifiersWithKeys, BackgroundBlurStyleModifier.identity, BackgroundBlurStyleModifier, undefined); 3418 return this; 3419 } 3420 let arkBackgroundBlurStyle = new ArkBackgroundBlurStyle(); 3421 arkBackgroundBlurStyle.blurStyle = value; 3422 if (typeof options === 'object') { 3423 arkBackgroundBlurStyle.colorMode = options.colorMode; 3424 arkBackgroundBlurStyle.adaptiveColor = options.adaptiveColor; 3425 arkBackgroundBlurStyle.scale = options.scale; 3426 arkBackgroundBlurStyle.blurOptions = options.blurOptions; 3427 } 3428 modifierWithKey(this._modifiersWithKeys, BackgroundBlurStyleModifier.identity, BackgroundBlurStyleModifier, arkBackgroundBlurStyle); 3429 return this; 3430 } 3431 foregroundBlurStyle(value, options) { 3432 if (isUndefined(value)) { 3433 modifierWithKey(this._modifiersWithKeys, ForegroundBlurStyleModifier.identity, ForegroundBlurStyleModifier, undefined); 3434 return this; 3435 } 3436 let arkForegroundBlurStyle = new ArkForegroundBlurStyle(); 3437 arkForegroundBlurStyle.blurStyle = value; 3438 if (typeof options === 'object') { 3439 arkForegroundBlurStyle.colorMode = options.colorMode; 3440 arkForegroundBlurStyle.adaptiveColor = options.adaptiveColor; 3441 arkForegroundBlurStyle.scale = options.scale; 3442 arkForegroundBlurStyle.blurOptions = options.blurOptions; 3443 } 3444 modifierWithKey(this._modifiersWithKeys, ForegroundBlurStyleModifier.identity, ForegroundBlurStyleModifier, arkForegroundBlurStyle); 3445 return this; 3446 } 3447 opacity(value) { 3448 modifierWithKey(this._modifiersWithKeys, OpacityModifier.identity, OpacityModifier, value); 3449 return this; 3450 } 3451 border(value) { 3452 let _a, _b, _c, _d; 3453 let arkBorder = new ArkBorder(); 3454 if (isUndefined(value)) { 3455 arkBorder = undefined; 3456 } 3457 if (!isUndefined(value === null || value === void 0 ? void 0 : value.width) && (value === null || value === void 0 ? void 0 : value.width) !== null) { 3458 if (isNumber(value.width) || isString(value.width) || isResource(value.width)) { 3459 arkBorder.arkWidth.left = value.width; 3460 arkBorder.arkWidth.right = value.width; 3461 arkBorder.arkWidth.top = value.width; 3462 arkBorder.arkWidth.bottom = value.width; 3463 } 3464 else { 3465 arkBorder.arkWidth.start = value.width.start; 3466 arkBorder.arkWidth.end = value.width.end; 3467 arkBorder.arkWidth.left = value.width.left; 3468 arkBorder.arkWidth.right = value.width.right; 3469 arkBorder.arkWidth.top = value.width.top; 3470 arkBorder.arkWidth.bottom = value.width.bottom; 3471 } 3472 } 3473 if (!isUndefined(value === null || value === void 0 ? void 0 : value.color) && (value === null || value === void 0 ? void 0 : value.color) !== null) { 3474 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 3475 arkBorder.arkColor.leftColor = value.color; 3476 arkBorder.arkColor.rightColor = value.color; 3477 arkBorder.arkColor.topColor = value.color; 3478 arkBorder.arkColor.bottomColor = value.color; 3479 } 3480 else { 3481 arkBorder.arkColor.startColor = value.color.start; 3482 arkBorder.arkColor.endColor = value.color.end; 3483 arkBorder.arkColor.leftColor = value.color.left; 3484 arkBorder.arkColor.rightColor = value.color.right; 3485 arkBorder.arkColor.topColor = value.color.top; 3486 arkBorder.arkColor.bottomColor = value.color.bottom; 3487 } 3488 } 3489 if (!isUndefined(value === null || value === void 0 ? void 0 : value.radius) && (value === null || value === void 0 ? void 0 : value.radius) !== null) { 3490 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 3491 arkBorder.arkRadius.topLeft = value.radius; 3492 arkBorder.arkRadius.topRight = value.radius; 3493 arkBorder.arkRadius.bottomLeft = value.radius; 3494 arkBorder.arkRadius.bottomRight = value.radius; 3495 } 3496 else { 3497 arkBorder.arkRadius.topStart = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topStart; 3498 arkBorder.arkRadius.topEnd = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topEnd; 3499 arkBorder.arkRadius.bottomStart = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomStart; 3500 arkBorder.arkRadius.bottomEnd = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomEnd; 3501 arkBorder.arkRadius.topLeft = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topLeft; 3502 arkBorder.arkRadius.topRight = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topRight; 3503 arkBorder.arkRadius.bottomLeft = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomLeft; 3504 arkBorder.arkRadius.bottomRight = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomRight; 3505 } 3506 } 3507 if (!isUndefined(value === null || value === void 0 ? void 0 : value.style) && (value === null || value === void 0 ? void 0 : value.style) !== null) { 3508 let arkBorderStyle = new ArkBorderStyle(); 3509 if (arkBorderStyle.parseBorderStyle(value.style)) { 3510 if (!isUndefined(arkBorderStyle.style)) { 3511 arkBorder.arkStyle.top = arkBorderStyle.style; 3512 arkBorder.arkStyle.left = arkBorderStyle.style; 3513 arkBorder.arkStyle.bottom = arkBorderStyle.style; 3514 arkBorder.arkStyle.right = arkBorderStyle.style; 3515 } 3516 else { 3517 arkBorder.arkStyle.top = arkBorderStyle.top; 3518 arkBorder.arkStyle.left = arkBorderStyle.left; 3519 arkBorder.arkStyle.bottom = arkBorderStyle.bottom; 3520 arkBorder.arkStyle.right = arkBorderStyle.right; 3521 } 3522 } 3523 } 3524 if (!isUndefined(value === null || value === void 0 ? void 0 : value.dashGap) && 3525 (value === null || value === void 0 ? void 0 : value.dashGap) !== null) { 3526 if (isNumber(value.dashGap) || isString(value.dashGap) || isResource(value.dashGap) || 3527 isObject(value.dashGap) && isNumber(value.dashGap.value)) { 3528 arkBorder.arkDashGap.left = value.dashGap; 3529 arkBorder.arkDashGap.right = value.dashGap; 3530 arkBorder.arkDashGap.top = value.dashGap; 3531 arkBorder.arkDashGap.bottom = value.dashGap; 3532 } 3533 else { 3534 arkBorder.arkDashGap.left = value.dashGap.left; 3535 arkBorder.arkDashGap.right = value.dashGap.right; 3536 arkBorder.arkDashGap.top = value.dashGap.top; 3537 arkBorder.arkDashGap.bottom = value.dashGap.bottom; 3538 } 3539 } 3540 if (!isUndefined(value === null || value === void 0 ? void 0 : value.dashWidth) && 3541 (value === null || value === void 0 ? void 0 : value.dashWidth) !== null) { 3542 if (isNumber(value.dashWidth) || isString(value.dashWidth) || isResource(value.dashWidth) || 3543 isObject(value.dashWidth) && isNumber(value.dashWidth.value)) { 3544 arkBorder.arkDashWidth.left = value.dashWidth; 3545 arkBorder.arkDashWidth.right = value.dashWidth; 3546 arkBorder.arkDashWidth.top = value.dashWidth; 3547 arkBorder.arkDashWidth.bottom = value.dashWidth; 3548 } 3549 else { 3550 arkBorder.arkDashWidth.left = value.dashWidth.left; 3551 arkBorder.arkDashWidth.right = value.dashWidth.right; 3552 arkBorder.arkDashWidth.top = value.dashWidth.top; 3553 arkBorder.arkDashWidth.bottom = value.dashWidth.bottom; 3554 } 3555 } 3556 modifierWithKey(this._modifiersWithKeys, BorderModifier.identity, BorderModifier, arkBorder); 3557 return this; 3558 } 3559 borderStyle(value) { 3560 modifierWithKey(this._modifiersWithKeys, BorderStyleModifier.identity, BorderStyleModifier, value); 3561 return this; 3562 } 3563 borderWidth(value) { 3564 modifierWithKey(this._modifiersWithKeys, BorderWidthModifier.identity, BorderWidthModifier, value); 3565 return this; 3566 } 3567 borderColor(value) { 3568 modifierWithKey(this._modifiersWithKeys, BorderColorModifier.identity, BorderColorModifier, value); 3569 return this; 3570 } 3571 borderRadius(value) { 3572 modifierWithKey(this._modifiersWithKeys, BorderRadiusModifier.identity, BorderRadiusModifier, value); 3573 return this; 3574 } 3575 borderImage(value) { 3576 modifierWithKey(this._modifiersWithKeys, BorderImageModifier.identity, BorderImageModifier, value); 3577 return this; 3578 } 3579 foregroundEffect(value) { 3580 modifierWithKey(this._modifiersWithKeys, ForegroundEffectModifier.identity, ForegroundEffectModifier, value); 3581 return this; 3582 } 3583 foregroundColor(value) { 3584 modifierWithKey(this._modifiersWithKeys, ForegroundColorModifier.identity, ForegroundColorModifier, value); 3585 return this; 3586 } 3587 onClick(event) { 3588 modifierWithKey(this._modifiersWithKeys, ClickModifier.identity, ClickModifier, event); 3589 return this; 3590 } 3591 onHover(event) { 3592 modifierWithKey(this._modifiersWithKeys, OnHoverModifier.identity, OnHoverModifier, event); 3593 return this; 3594 } 3595 hoverEffect(value) { 3596 modifierWithKey(this._modifiersWithKeys, HoverEffectModifier.identity, HoverEffectModifier, value); 3597 return this; 3598 } 3599 onMouse(event) { 3600 modifierWithKey(this._modifiersWithKeys, OnMouseModifier.identity, OnMouseModifier, event); 3601 return this; 3602 } 3603 onTouch(event) { 3604 modifierWithKey(this._modifiersWithKeys, OnTouchModifier.identity, OnTouchModifier, event); 3605 return this; 3606 } 3607 onKeyEvent(event) { 3608 modifierWithKey(this._modifiersWithKeys, OnKeyEventModifier.identity, OnKeyEventModifier, event); 3609 return this; 3610 } 3611 onKeyPreIme(event) { 3612 modifierWithKey(this._modifiersWithKeys, OnKeyPreImeModifier.identity, OnKeyPreImeModifier, event); 3613 return this; 3614 } 3615 focusable(value) { 3616 if (typeof value === 'boolean') { 3617 modifierWithKey(this._modifiersWithKeys, FocusableModifier.identity, FocusableModifier, value); 3618 } 3619 else { 3620 modifierWithKey(this._modifiersWithKeys, FocusableModifier.identity, FocusableModifier, undefined); 3621 } 3622 return this; 3623 } 3624 onFocus(event) { 3625 modifierWithKey(this._modifiersWithKeys, OnFocusModifier.identity, OnFocusModifier, event); 3626 return this; 3627 } 3628 onBlur(event) { 3629 modifierWithKey(this._modifiersWithKeys, OnBlurModifier.identity, OnBlurModifier, event); 3630 return this; 3631 } 3632 tabIndex(index) { 3633 if (typeof index !== 'number') { 3634 modifierWithKey(this._modifiersWithKeys, TabIndexModifier.identity, TabIndexModifier, undefined); 3635 } 3636 else { 3637 modifierWithKey(this._modifiersWithKeys, TabIndexModifier.identity, TabIndexModifier, index); 3638 } 3639 return this; 3640 } 3641 defaultFocus(value) { 3642 if (typeof value === 'boolean') { 3643 modifierWithKey(this._modifiersWithKeys, DefaultFocusModifier.identity, DefaultFocusModifier, value); 3644 } 3645 else { 3646 modifierWithKey(this._modifiersWithKeys, DefaultFocusModifier.identity, DefaultFocusModifier, undefined); 3647 } 3648 return this; 3649 } 3650 groupDefaultFocus(value) { 3651 if (typeof value === 'boolean') { 3652 modifierWithKey(this._modifiersWithKeys, GroupDefaultFocusModifier.identity, GroupDefaultFocusModifier, value); 3653 } 3654 else { 3655 modifierWithKey(this._modifiersWithKeys, GroupDefaultFocusModifier.identity, GroupDefaultFocusModifier, undefined); 3656 } 3657 return this; 3658 } 3659 focusOnTouch(value) { 3660 if (typeof value === 'boolean') { 3661 modifierWithKey(this._modifiersWithKeys, FocusOnTouchModifier.identity, FocusOnTouchModifier, value); 3662 } 3663 else { 3664 modifierWithKey(this._modifiersWithKeys, FocusOnTouchModifier.identity, FocusOnTouchModifier, undefined); 3665 } 3666 return this; 3667 } 3668 animation(value) { 3669 throw new Error('Method not implemented.'); 3670 } 3671 transition(value) { 3672 modifierWithKey(this._modifiersWithKeys, TransitionModifier.identity, TransitionModifier, value); 3673 return this; 3674 } 3675 gesture(gesture, mask) { 3676 throw new Error('Method not implemented.'); 3677 } 3678 priorityGesture(gesture, mask) { 3679 throw new Error('Method not implemented.'); 3680 } 3681 parallelGesture(gesture, mask) { 3682 throw new Error('Method not implemented.'); 3683 } 3684 3685 chainMode(direction, style) { 3686 let arkChainMode = new ArkChainMode(); 3687 arkChainMode.direction = direction; 3688 arkChainMode.style = style; 3689 modifierWithKey(this._modifiersWithKeys, ChainModeifier.identity, ChainModeifier, arkChainMode); 3690 return this; 3691 } 3692 3693 blur(value, options) { 3694 let blur = new ArkBlurOptions(); 3695 blur.value = value; 3696 blur.options = options; 3697 modifierWithKey(this._modifiersWithKeys, BlurModifier.identity, BlurModifier, blur); 3698 return this; 3699 } 3700 linearGradientBlur(value, options) { 3701 if (isUndefined(value) || isNull(value) || isUndefined(options) || isNull(options)) { 3702 modifierWithKey(this._modifiersWithKeys, LinearGradientBlurModifier.identity, LinearGradientBlurModifier, undefined); 3703 return this; 3704 } 3705 let arkLinearGradientBlur = new ArkLinearGradientBlur(); 3706 arkLinearGradientBlur.blurRadius = value; 3707 arkLinearGradientBlur.fractionStops = options.fractionStops; 3708 arkLinearGradientBlur.direction = options.direction; 3709 modifierWithKey(this._modifiersWithKeys, LinearGradientBlurModifier.identity, LinearGradientBlurModifier, arkLinearGradientBlur); 3710 return this; 3711 } 3712 brightness(value) { 3713 if (!isNumber(value)) { 3714 modifierWithKey(this._modifiersWithKeys, BrightnessModifier.identity, BrightnessModifier, undefined); 3715 } 3716 else { 3717 modifierWithKey(this._modifiersWithKeys, BrightnessModifier.identity, BrightnessModifier, value); 3718 } 3719 return this; 3720 } 3721 contrast(value) { 3722 if (!isNumber(value)) { 3723 modifierWithKey(this._modifiersWithKeys, ContrastModifier.identity, ContrastModifier, undefined); 3724 } 3725 else { 3726 modifierWithKey(this._modifiersWithKeys, ContrastModifier.identity, ContrastModifier, value); 3727 } 3728 return this; 3729 } 3730 grayscale(value) { 3731 if (!isNumber(value)) { 3732 modifierWithKey(this._modifiersWithKeys, GrayscaleModifier.identity, GrayscaleModifier, undefined); 3733 } 3734 else { 3735 modifierWithKey(this._modifiersWithKeys, GrayscaleModifier.identity, GrayscaleModifier, value); 3736 } 3737 return this; 3738 } 3739 colorBlend(value) { 3740 modifierWithKey(this._modifiersWithKeys, ColorBlendModifier.identity, ColorBlendModifier, value); 3741 return this; 3742 } 3743 saturate(value) { 3744 if (!isNumber(value)) { 3745 modifierWithKey(this._modifiersWithKeys, SaturateModifier.identity, SaturateModifier, undefined); 3746 } 3747 else { 3748 modifierWithKey(this._modifiersWithKeys, SaturateModifier.identity, SaturateModifier, value); 3749 } 3750 return this; 3751 } 3752 sepia(value) { 3753 if (!isNumber(value)) { 3754 modifierWithKey(this._modifiersWithKeys, SepiaModifier.identity, SepiaModifier, undefined); 3755 } 3756 else { 3757 modifierWithKey(this._modifiersWithKeys, SepiaModifier.identity, SepiaModifier, value); 3758 } 3759 return this; 3760 } 3761 invert(value) { 3762 if (!isUndefined(value)) { 3763 modifierWithKey(this._modifiersWithKeys, InvertModifier.identity, InvertModifier, value); 3764 } 3765 else { 3766 modifierWithKey(this._modifiersWithKeys, InvertModifier.identity, InvertModifier, undefined); 3767 } 3768 return this; 3769 } 3770 hueRotate(value) { 3771 if (!isNumber(value) && !isString(value)) { 3772 modifierWithKey(this._modifiersWithKeys, HueRotateModifier.identity, HueRotateModifier, undefined); 3773 } 3774 else { 3775 modifierWithKey(this._modifiersWithKeys, HueRotateModifier.identity, HueRotateModifier, value); 3776 } 3777 return this; 3778 } 3779 useEffect(value) { 3780 modifierWithKey(this._modifiersWithKeys, UseEffectModifier.identity, UseEffectModifier, value); 3781 return this; 3782 } 3783 backdropBlur(value, options) { 3784 let blur = new ArkBlurOptions(); 3785 blur.value = value; 3786 blur.options = options; 3787 modifierWithKey(this._modifiersWithKeys, BackdropBlurModifier.identity, BackdropBlurModifier, blur); 3788 return this; 3789 } 3790 renderGroup(value) { 3791 modifierWithKey(this._modifiersWithKeys, RenderGroupModifier.identity, RenderGroupModifier, value); 3792 return this; 3793 } 3794 translate(value) { 3795 modifierWithKey(this._modifiersWithKeys, TranslateModifier.identity, TranslateModifier, value); 3796 return this; 3797 } 3798 scale(value) { 3799 modifierWithKey(this._modifiersWithKeys, ScaleModifier.identity, ScaleModifier, value); 3800 return this; 3801 } 3802 gridSpan(value) { 3803 if (isNumber(value)) { 3804 modifierWithKey(this._modifiersWithKeys, GridSpanModifier.identity, GridSpanModifier, value); 3805 } 3806 else { 3807 modifierWithKey(this._modifiersWithKeys, GridSpanModifier.identity, GridSpanModifier, undefined); 3808 } 3809 return this; 3810 } 3811 gridOffset(value) { 3812 if (isNumber(value)) { 3813 modifierWithKey(this._modifiersWithKeys, GridOffsetModifier.identity, GridOffsetModifier, value); 3814 } 3815 else { 3816 modifierWithKey(this._modifiersWithKeys, GridOffsetModifier.identity, GridOffsetModifier, undefined); 3817 } 3818 return this; 3819 } 3820 rotate(value) { 3821 modifierWithKey(this._modifiersWithKeys, RotateModifier.identity, RotateModifier, value); 3822 return this; 3823 } 3824 transform(value) { 3825 modifierWithKey(this._modifiersWithKeys, TransformModifier.identity, TransformModifier, value); 3826 return this; 3827 } 3828 onAppear(event) { 3829 modifierWithKey(this._modifiersWithKeys, OnAppearModifier.identity, OnAppearModifier, event); 3830 return this; 3831 } 3832 onDisAppear(event) { 3833 modifierWithKey(this._modifiersWithKeys, OnDisappearModifier.identity, OnDisappearModifier, event); 3834 return this; 3835 } 3836 onAttach(event) { 3837 modifierWithKey(this._modifiersWithKeys, OnAttachModifier.identity, OnAttachModifier, event); 3838 return this; 3839 } 3840 onDetach(event) { 3841 modifierWithKey(this._modifiersWithKeys, OnDetachModifier.identity, OnDetachModifier, event); 3842 return this; 3843 } 3844 onAreaChange(event) { 3845 modifierWithKey(this._modifiersWithKeys, OnAreaChangeModifier.identity, OnAreaChangeModifier, event); 3846 return this; 3847 } 3848 visibility(value) { 3849 modifierWithKey(this._modifiersWithKeys, VisibilityModifier.identity, VisibilityModifier, value); 3850 return this; 3851 } 3852 flexGrow(value) { 3853 modifierWithKey(this._modifiersWithKeys, FlexGrowModifier.identity, FlexGrowModifier, value); 3854 return this; 3855 } 3856 flexShrink(value) { 3857 modifierWithKey(this._modifiersWithKeys, FlexShrinkModifier.identity, FlexShrinkModifier, value); 3858 return this; 3859 } 3860 flexBasis(value) { 3861 modifierWithKey(this._modifiersWithKeys, FlexBasisModifier.identity, FlexBasisModifier, value); 3862 return this; 3863 } 3864 alignSelf(value) { 3865 modifierWithKey(this._modifiersWithKeys, AlignSelfModifier.identity, AlignSelfModifier, value); 3866 return this; 3867 } 3868 displayPriority(value) { 3869 modifierWithKey(this._modifiersWithKeys, DisplayPriorityModifier.identity, DisplayPriorityModifier, value); 3870 return this; 3871 } 3872 zIndex(value) { 3873 if (value !== null) { 3874 let zIndex = 0; 3875 if (typeof (value) === 'number') { 3876 zIndex = value; 3877 } 3878 modifierWithKey(this._modifiersWithKeys, ZIndexModifier.identity, ZIndexModifier, zIndex); 3879 } 3880 return this; 3881 } 3882 sharedTransition(id, options) { 3883 let arkSharedTransition = new ArkSharedTransition(); 3884 if (isString(id)) { 3885 arkSharedTransition.id = id; 3886 } 3887 if (typeof options === 'object') { 3888 arkSharedTransition.options = options; 3889 } 3890 modifierWithKey(this._modifiersWithKeys, SharedTransitionModifier.identity, SharedTransitionModifier, arkSharedTransition); 3891 return this; 3892 } 3893 direction(value) { 3894 modifierWithKey(this._modifiersWithKeys, DirectionModifier.identity, DirectionModifier, value); 3895 return this; 3896 } 3897 align(value) { 3898 if (isNumber(value)) { 3899 modifierWithKey(this._modifiersWithKeys, AlignModifier.identity, AlignModifier, value); 3900 } 3901 else { 3902 modifierWithKey(this._modifiersWithKeys, AlignModifier.identity, AlignModifier, undefined); 3903 } 3904 return this; 3905 } 3906 position(value) { 3907 if (isObject(value)) { 3908 modifierWithKey(this._modifiersWithKeys, PositionModifier.identity, PositionModifier, value); 3909 } else { 3910 modifierWithKey(this._modifiersWithKeys, PositionModifier.identity, PositionModifier, undefined); 3911 } 3912 return this; 3913 } 3914 markAnchor(value) { 3915 modifierWithKey(this._modifiersWithKeys, MarkAnchorModifier.identity, MarkAnchorModifier, value); 3916 return this; 3917 } 3918 offset(value) { 3919 if (isObject(value)) { 3920 modifierWithKey(this._modifiersWithKeys, OffsetModifier.identity, OffsetModifier, value); 3921 } else { 3922 modifierWithKey(this._modifiersWithKeys, OffsetModifier.identity, OffsetModifier, undefined); 3923 } 3924 return this; 3925 } 3926 enabled(value) { 3927 if (typeof value === 'boolean') { 3928 modifierWithKey(this._modifiersWithKeys, EnabledModifier.identity, EnabledModifier, value); 3929 } 3930 else { 3931 modifierWithKey(this._modifiersWithKeys, EnabledModifier.identity, EnabledModifier, undefined); 3932 } 3933 return this; 3934 } 3935 useShadowBatching(value) { 3936 modifierWithKey(this._modifiersWithKeys, UseShadowBatchingModifier.identity, UseShadowBatchingModifier, value); 3937 return this; 3938 } 3939 monopolizeEvents(value) { 3940 modifierWithKey(this._modifiersWithKeys, MonopolizeEventsModifier.identity, MonopolizeEventsModifier, value); 3941 return this; 3942 } 3943 useSizeType(value) { 3944 throw new Error('Method not implemented.'); 3945 } 3946 alignRules(value) { 3947 if (!isObject(value) || JSON.stringify(value) === '{}') { 3948 modifierWithKey(this._modifiersWithKeys, AlignRulesModifier.identity, AlignRulesModifier, undefined); 3949 return this; 3950 } 3951 let keys = ['left', 'middle', 'right', 'top', 'center', 'bottom']; 3952 let arkValue = new ArkAlignRules(); 3953 for (let i = 0; i < keys.length; i++) { 3954 let rule = value[keys[i]]; 3955 let alignRule = ''; 3956 if (isObject(rule)) { 3957 let alignSign = false; 3958 let anchorSign = false; 3959 let align = rule.align; 3960 let anchor = rule.anchor; 3961 if (isString(anchor)) { 3962 anchorSign = true; 3963 } 3964 if (i < DIRECTION_RANGE) { 3965 if (align in HorizontalAlign) { 3966 alignSign = true; 3967 } 3968 } 3969 else { 3970 if (align in VerticalAlign) { 3971 alignSign = true; 3972 } 3973 } 3974 if (!alignSign && !anchorSign) { 3975 alignRule += ''; 3976 } 3977 else if (!anchorSign) { 3978 alignRule += align.toString(); 3979 alignRule += '|'; 3980 alignRule += '__container__'; 3981 } 3982 else if (!alignSign) { 3983 alignRule += '2'; 3984 alignRule += '|'; 3985 alignRule += anchor; 3986 } 3987 else { 3988 alignRule += align.toString(); 3989 alignRule += '|'; 3990 alignRule += anchor; 3991 } 3992 } 3993 else { 3994 alignRule += ''; 3995 } 3996 switch (keys[i]) { 3997 case 'left': 3998 arkValue.left = alignRule; 3999 break; 4000 case 'middle': 4001 arkValue.middle = alignRule; 4002 break; 4003 case 'right': 4004 arkValue.right = alignRule; 4005 break; 4006 case 'top': 4007 arkValue.top = alignRule; 4008 break; 4009 case 'center': 4010 arkValue.center = alignRule; 4011 break; 4012 case 'bottom': 4013 arkValue.bottom = alignRule; 4014 break; 4015 } 4016 } 4017 modifierWithKey(this._modifiersWithKeys, AlignRulesModifier.identity, AlignRulesModifier, arkValue); 4018 return this; 4019 } 4020 aspectRatio(value) { 4021 modifierWithKey(this._modifiersWithKeys, AspectRatioModifier.identity, AspectRatioModifier, value); 4022 return this; 4023 } 4024 clickEffect(value) { 4025 modifierWithKey(this._modifiersWithKeys, ClickEffectModifier.identity, ClickEffectModifier, value); 4026 return this; 4027 } 4028 onDragStart(event) { 4029 throw new Error('Method not implemented.'); 4030 } 4031 onDragEnter(event) { 4032 throw new Error('Method not implemented.'); 4033 } 4034 onDragMove(event) { 4035 throw new Error('Method not implemented.'); 4036 } 4037 onDragLeave(event) { 4038 throw new Error('Method not implemented.'); 4039 } 4040 onDrop(event) { 4041 throw new Error('Method not implemented.'); 4042 } 4043 onDragEnd(event) { 4044 throw new Error('Method not implemented.'); 4045 } 4046 onPreDrag(event) { 4047 throw new Error('Method not implemented.'); 4048 } 4049 allowDrop(value) { 4050 modifierWithKey(this._modifiersWithKeys, AllowDropModifier.identity, AllowDropModifier, value); 4051 return this; 4052 } 4053 draggable(value) { 4054 if (typeof value === 'boolean') { 4055 modifierWithKey(this._modifiersWithKeys, DraggableModifier.identity, DraggableModifier, value); 4056 } 4057 else { 4058 modifierWithKey(this._modifiersWithKeys, DraggableModifier.identity, DraggableModifier, undefined); 4059 } 4060 return this; 4061 } 4062 dragPreview(value) { 4063 if (typeof value === 'string') { 4064 let arkDragPreview = new ArkDragPreview(); 4065 arkDragPreview.inspetorId = value; 4066 modifierWithKey(this._modifiersWithKeys, DragPreviewModifier.identity, DragPreviewModifier, arkDragPreview); 4067 return this; 4068 } 4069 throw new Error('Method not implemented.'); 4070 } 4071 overlay(value, options) { 4072 if (typeof value === 'undefined') { 4073 modifierWithKey(this._modifiersWithKeys, OverlayModifier.identity, OverlayModifier, undefined); 4074 return this; 4075 } 4076 let arkOverlay = new ArkOverlay(); 4077 if (arkOverlay.splitOverlayValue(value, options)) { 4078 modifierWithKey(this._modifiersWithKeys, OverlayModifier.identity, OverlayModifier, arkOverlay); 4079 } 4080 else { 4081 modifierWithKey(this._modifiersWithKeys, OverlayModifier.identity, OverlayModifier, undefined); 4082 } 4083 return this; 4084 } 4085 linearGradient(value) { 4086 modifierWithKey(this._modifiersWithKeys, LinearGradientModifier.identity, LinearGradientModifier, value); 4087 return this; 4088 } 4089 sweepGradient(value) { 4090 modifierWithKey(this._modifiersWithKeys, SweepGradientModifier.identity, SweepGradientModifier, value); 4091 return this; 4092 } 4093 radialGradient(value) { 4094 modifierWithKey(this._modifiersWithKeys, RadialGradientModifier.identity, RadialGradientModifier, value); 4095 return this; 4096 } 4097 motionPath(value) { 4098 modifierWithKey(this._modifiersWithKeys, MotionPathModifier.identity, MotionPathModifier, value); 4099 return this; 4100 } 4101 motionBlur(value) { 4102 modifierWithKey(this._modifiersWithKeys, MotionBlurModifier.identity, MotionBlurModifier, value); 4103 return this; 4104 } 4105 shadow(value) { 4106 modifierWithKey(this._modifiersWithKeys, ShadowModifier.identity, ShadowModifier, value); 4107 return this; 4108 } 4109 mask(value) { 4110 modifierWithKey(this._modifiersWithKeys, MaskModifier.identity, MaskModifier, value); 4111 return this; 4112 } 4113 maskShape(value) { 4114 modifierWithKey(this._modifiersWithKeys, MaskShapeModifier.identity, MaskShapeModifier, value); 4115 return this; 4116 } 4117 key(value) { 4118 if (typeof value === 'string') { 4119 modifierWithKey(this._modifiersWithKeys, KeyModifier.identity, KeyModifier, value); 4120 } 4121 else { 4122 modifierWithKey(this._modifiersWithKeys, KeyModifier.identity, KeyModifier, undefined); 4123 } 4124 return this; 4125 } 4126 id(value) { 4127 if (typeof value === 'string') { 4128 modifierWithKey(this._modifiersWithKeys, IdModifier.identity, IdModifier, value); 4129 } 4130 else { 4131 modifierWithKey(this._modifiersWithKeys, IdModifier.identity, IdModifier, undefined); 4132 } 4133 return this; 4134 } 4135 geometryTransition(id, options) { 4136 let arkGeometryTransition = new ArkGeometryTransition(); 4137 arkGeometryTransition.id = id; 4138 arkGeometryTransition.options = options; 4139 modifierWithKey(this._modifiersWithKeys, GeometryTransitionModifier.identity, GeometryTransitionModifier, arkGeometryTransition); 4140 return this; 4141 } 4142 bindPopup(show, popup) { 4143 throw new Error('Method not implemented.'); 4144 } 4145 bindMenu(content, options) { 4146 throw new Error('Method not implemented.'); 4147 } 4148 bindContextMenu(content, responseType, options) { 4149 throw new Error('Method not implemented.'); 4150 } 4151 bindContentCover(isShow, builder, type) { 4152 throw new Error('Method not implemented.'); 4153 } 4154 blendMode(blendMode, blendApplyType) { 4155 let arkBlendMode = new ArkBlendMode(); 4156 arkBlendMode.blendMode = blendMode; 4157 arkBlendMode.blendApplyType = blendApplyType; 4158 modifierWithKey(this._modifiersWithKeys, BlendModeModifier.identity, BlendModeModifier, arkBlendMode); 4159 return this; 4160 } 4161 advancedBlendMode(blendMode, blendApplyType) { 4162 let arkBlendMode = new ArkBlendMode(); 4163 arkBlendMode.blendMode = blendMode; 4164 arkBlendMode.blendApplyType = blendApplyType; 4165 modifierWithKey(this._modifiersWithKeys, AdvancedBlendModeModifier.identity, 4166 AdvancedBlendModeModifier, arkBlendMode); 4167 return this; 4168 } 4169 clip(value) { 4170 modifierWithKey(this._modifiersWithKeys, ClipModifier.identity, ClipModifier, value); 4171 return this; 4172 } 4173 clipShape(value) { 4174 modifierWithKey(this._modifiersWithKeys, ClipShapeModifier.identity, ClipShapeModifier, value); 4175 return this; 4176 } 4177 bindSheet(isShow, builder, options) { 4178 throw new Error('Method not implemented.'); 4179 } 4180 stateStyles(value) { 4181 throw new Error('Method not implemented.'); 4182 } 4183 restoreId(value) { 4184 if (typeof value !== 'number') { 4185 modifierWithKey(this._modifiersWithKeys, RestoreIdModifier.identity, RestoreIdModifier, undefined); 4186 } 4187 else { 4188 modifierWithKey(this._modifiersWithKeys, RestoreIdModifier.identity, RestoreIdModifier, value); 4189 } 4190 return this; 4191 } 4192 onVisibleAreaChange(ratios, event) { 4193 throw new Error('Method not implemented.'); 4194 } 4195 sphericalEffect(value) { 4196 modifierWithKey(this._modifiersWithKeys, SphericalEffectModifier.identity, SphericalEffectModifier, value); 4197 return this; 4198 } 4199 lightUpEffect(value) { 4200 modifierWithKey(this._modifiersWithKeys, LightUpEffectModifier.identity, LightUpEffectModifier, value); 4201 return this; 4202 } 4203 pixelStretchEffect(options) { 4204 modifierWithKey(this._modifiersWithKeys, PixelStretchEffectModifier.identity, PixelStretchEffectModifier, options); 4205 return this; 4206 } 4207 keyboardShortcut(value, keys, action) { 4208 let keyboardShortCut = new ArkKeyBoardShortCut(); 4209 keyboardShortCut.value = value; 4210 keyboardShortCut.keys = keys; 4211 modifierWithKey(this._modifiersWithKeys, KeyBoardShortCutModifier.identity, KeyBoardShortCutModifier, keyboardShortCut); 4212 return this; 4213 } 4214 accessibilityGroup(value) { 4215 if (typeof value === 'boolean') { 4216 modifierWithKey(this._modifiersWithKeys, AccessibilityGroupModifier.identity, AccessibilityGroupModifier, value); 4217 } 4218 else { 4219 modifierWithKey(this._modifiersWithKeys, AccessibilityGroupModifier.identity, AccessibilityGroupModifier, undefined); 4220 } 4221 return this; 4222 } 4223 accessibilityText(value) { 4224 if (typeof value === 'string') { 4225 modifierWithKey(this._modifiersWithKeys, AccessibilityTextModifier.identity, AccessibilityTextModifier, value); 4226 } 4227 else { 4228 modifierWithKey(this._modifiersWithKeys, AccessibilityTextModifier.identity, AccessibilityTextModifier, undefined); 4229 } 4230 return this; 4231 } 4232 accessibilityDescription(value) { 4233 if (typeof value !== 'string') { 4234 modifierWithKey(this._modifiersWithKeys, AccessibilityDescriptionModifier.identity, AccessibilityDescriptionModifier, undefined); 4235 } 4236 else { 4237 modifierWithKey(this._modifiersWithKeys, AccessibilityDescriptionModifier.identity, AccessibilityDescriptionModifier, value); 4238 } 4239 return this; 4240 } 4241 accessibilityLevel(value) { 4242 if (typeof value !== 'string') { 4243 modifierWithKey(this._modifiersWithKeys, AccessibilityLevelModifier.identity, AccessibilityLevelModifier, undefined); 4244 } 4245 else { 4246 modifierWithKey(this._modifiersWithKeys, AccessibilityLevelModifier.identity, AccessibilityLevelModifier, value); 4247 } 4248 return this; 4249 } 4250 obscured(reasons) { 4251 modifierWithKey(this._modifiersWithKeys, ObscuredModifier.identity, ObscuredModifier, reasons); 4252 return this; 4253 } 4254 reuseId(id) { 4255 throw new Error('Method not implemented.'); 4256 } 4257 renderFit(fitMode) { 4258 modifierWithKey(this._modifiersWithKeys, RenderFitModifier.identity, RenderFitModifier, fitMode); 4259 return this; 4260 } 4261 attributeModifier(modifier) { 4262 return this; 4263 } 4264 customProperty(key, value) { 4265 let returnBool = getUINativeModule().frameNode.setCustomPropertyModiferByKey(this.nativePtr, key, value); 4266 if (!returnBool) { 4267 const property = new ArkCustomProperty(); 4268 property.key = key; 4269 property.value = value; 4270 modifierWithKey(this._modifiersWithKeys, CustomPropertyModifier.identity, CustomPropertyModifier, property); 4271 } 4272 return this; 4273 } 4274 systemBarEffect() { 4275 modifierWithKey(this._modifiersWithKeys, SystemBarEffectModifier.identity, SystemBarEffectModifier, null); 4276 return this; 4277 } 4278 focusScopeId(id, isGroup) { 4279 let arkFocusScopeId = new ArkFocusScopeId(); 4280 if (isString(id)) { 4281 arkFocusScopeId.id = id; 4282 } 4283 if (typeof isGroup === 'boolean') { 4284 arkFocusScopeId.isGroup = isGroup; 4285 } 4286 modifierWithKey(this._modifiersWithKeys, FocusScopeIdModifier.identity, FocusScopeIdModifier, arkFocusScopeId); 4287 return this; 4288 } 4289 focusScopePriority(scopeId, priority) { 4290 let arkFocusScopePriority = new ArkFocusScopePriority(); 4291 if (isString(scopeId)) { 4292 arkFocusScopePriority.scopeId = scopeId; 4293 } 4294 if (typeof priority === 'number') { 4295 arkFocusScopePriority.priority = priority; 4296 } 4297 modifierWithKey( 4298 this._modifiersWithKeys, FocusScopePriorityModifier.identity, FocusScopePriorityModifier, arkFocusScopePriority); 4299 return this; 4300 } 4301 pixelRound(value) { 4302 modifierWithKey(this._modifiersWithKeys, PixelRoundModifier.identity, PixelRoundModifier, value); 4303 return this; 4304 } 4305 focusBox(value) { 4306 modifierWithKey(this._modifiersWithKeys, FocusBoxModifier.identity, FocusBoxModifier, value); 4307 return this; 4308 } 4309} 4310const isNull = (val) => typeof val === 'object' && val === null; 4311const isArray = (val) => Array.isArray(val); 4312const isDate = (val) => val instanceof Date; 4313const isRegExp = (val) => val instanceof RegExp; 4314const isError = (val) => val instanceof Error; 4315const isFloat = (val) => Number.isFinite(val) && !Number.isInteger(val); 4316const isInteger = (val) => Number.isInteger(val); 4317const isNonEmptyMap = (val) => val instanceof Map && val.size > 0; 4318const isTruthyString = (val) => typeof val === 'string' && val.trim() !== ''; 4319 4320var CommonGestureType; 4321(function (CommonGestureType) { 4322 CommonGestureType[CommonGestureType['TAP_GESTURE'] = 0] = 'TAP_GESTURE'; 4323 CommonGestureType[CommonGestureType['LONG_PRESS_GESTURE'] = 1] = 'LONG_PRESS_GESTURE'; 4324 CommonGestureType[CommonGestureType['PAN_GESTURE'] = 2] = 'PAN_GESTURE'; 4325 CommonGestureType[CommonGestureType['SWIPE_GESTURE'] = 3] = 'SWIPE_GESTURE'; 4326 CommonGestureType[CommonGestureType['PINCH_GESTURE'] = 4] = 'PINCH_GESTURE'; 4327 CommonGestureType[CommonGestureType['ROTATION_GESTURE'] = 5] = 'ROTATION_GESTURE'; 4328 CommonGestureType[CommonGestureType['GESTURE_GROUP'] = 6] = 'GESTURE_GROUP'; 4329})(CommonGestureType || (CommonGestureType = {})); 4330 4331class GestureHandler { 4332 constructor(gestureType) { 4333 this.gestureType = gestureType; 4334 } 4335} 4336 4337class TapGestureHandler extends GestureHandler { 4338 constructor(options) { 4339 super(CommonGestureType.TAP_GESTURE); 4340 if (options !== undefined) { 4341 this.fingers = options.fingers; 4342 this.count = options.count; 4343 } 4344 } 4345 onAction(event) { 4346 this.onActionCallback = event; 4347 return this; 4348 } 4349 tag(tag) { 4350 this.gestureTag = tag; 4351 return this; 4352 } 4353} 4354 4355class LongPressGestureHandler extends GestureHandler { 4356 constructor(options) { 4357 super(CommonGestureType.LONG_PRESS_GESTURE); 4358 if (options !== undefined) { 4359 this.fingers = options.fingers; 4360 this.repeat = options.repeat; 4361 this.duration = options.duration; 4362 } 4363 } 4364 4365 onAction(event) { 4366 this.onActionCallback = event; 4367 return this; 4368 } 4369 4370 onActionEnd(event) { 4371 this.onActionEndCallback = event; 4372 return this; 4373 } 4374 4375 onActionCancel(event) { 4376 this.onActionCancelCallback = event; 4377 return this; 4378 } 4379 4380 tag(tag) { 4381 this.gestureTag = tag; 4382 return this; 4383 } 4384} 4385 4386class PanGestureHandler extends GestureHandler { 4387 constructor(options) { 4388 super(CommonGestureType.PAN_GESTURE); 4389 if (options !== undefined) { 4390 this.fingers = options.fingers; 4391 this.direction = options.direction; 4392 this.distance = options.distance; 4393 } 4394 } 4395 4396 onActionStart(event) { 4397 this.onActionStartCallback = event; 4398 return this; 4399 } 4400 4401 onActionUpdate(event) { 4402 this.onActionUpdateCallback = event; 4403 return this; 4404 } 4405 4406 onActionEnd(event) { 4407 this.onActionEndCallback = event; 4408 return this; 4409 } 4410 4411 onActionCancel(event) { 4412 this.onActionCancelCallback = event; 4413 return this; 4414 } 4415 4416 tag(tag) { 4417 this.gestureTag = tag; 4418 return this; 4419 } 4420} 4421 4422class SwipeGestureHandler extends GestureHandler { 4423 constructor(options) { 4424 super(CommonGestureType.SWIPE_GESTURE); 4425 if (options !== undefined) { 4426 this.fingers = options.fingers; 4427 this.direction = options.direction; 4428 this.speed = options.speed; 4429 } 4430 } 4431 4432 onAction(event) { 4433 this.onActionCallback = event; 4434 return this; 4435 } 4436 4437 tag(tag) { 4438 this.gestureTag = tag; 4439 return this; 4440 } 4441} 4442 4443class PinchGestureHandler extends GestureHandler { 4444 constructor(options) { 4445 super(CommonGestureType.PINCH_GESTURE); 4446 if (options !== undefined) { 4447 this.fingers = options.fingers; 4448 this.distance = options.distance; 4449 } 4450 } 4451 4452 onActionStart(event) { 4453 this.onActionStartCallback = event; 4454 return this; 4455 } 4456 4457 onActionUpdate(event) { 4458 this.onActionUpdateCallback = event; 4459 return this; 4460 } 4461 4462 onActionEnd(event) { 4463 this.onActionEndCallback = event; 4464 return this; 4465 } 4466 4467 onActionCancel(event) { 4468 this.onActionCancelCallback = event; 4469 return this; 4470 } 4471 4472 tag(tag) { 4473 this.gestureTag = tag; 4474 return this; 4475 } 4476} 4477 4478class RotationGestureHandler extends GestureHandler { 4479 constructor(options) { 4480 super(CommonGestureType.ROTATION_GESTURE); 4481 if (options !== undefined) { 4482 this.fingers = options.fingers; 4483 this.angle = options.angle; 4484 } 4485 } 4486 4487 onActionStart(event) { 4488 this.onActionStartCallback = event; 4489 return this; 4490 } 4491 4492 onActionUpdate(event) { 4493 this.onActionUpdateCallback = event; 4494 return this; 4495 } 4496 4497 onActionEnd(event) { 4498 this.onActionEndCallback = event; 4499 return this; 4500 } 4501 4502 onActionCancel(event) { 4503 this.onActionCancelCallback = event; 4504 return this; 4505 } 4506 4507 tag(tag) { 4508 this.gestureTag = tag; 4509 return this; 4510 } 4511} 4512 4513class GestureGroupHandler extends GestureHandler { 4514 constructor(options) { 4515 super(CommonGestureType.GESTURE_GROUP); 4516 if (options !== undefined) { 4517 this.mode = options.mode; 4518 this.gestures = options.gestures; 4519 } 4520 } 4521 4522 onCancel(event) { 4523 this.onCancelCallback = event; 4524 return this; 4525 } 4526 4527 tag(tag) { 4528 this.gestureTag = tag; 4529 return this; 4530 } 4531} 4532 4533class UICommonEvent { 4534 setInstanceId(instanceId) { 4535 this._instanceId = instanceId; 4536 } 4537 setNodePtr(nodePtr) { 4538 this._nodePtr = nodePtr; 4539 } 4540 // the first param is used to indicate frameNode 4541 // the second param is used to indicate the callback 4542 // the third param is used to indicate the instanceid 4543 // other options will be indicated after them 4544 setOnClick(callback) { 4545 this._clickEvent = callback; 4546 getUINativeModule().frameNode.setOnClick(this._nodePtr, callback, this._instanceId); 4547 } 4548 setOnTouch(callback) { 4549 this._touchEvent = callback; 4550 getUINativeModule().frameNode.setOnTouch(this._nodePtr, callback, this._instanceId); 4551 } 4552 setOnAppear(callback) { 4553 this._onAppearEvent = callback; 4554 getUINativeModule().frameNode.setOnAppear(this._nodePtr, callback, this._instanceId); 4555 } 4556 setOnDisappear(callback) { 4557 this._onDisappearEvent = callback; 4558 getUINativeModule().frameNode.setOnDisappear(this._nodePtr, callback, this._instanceId); 4559 } 4560 setOnAttach(callback) { 4561 this._onAttachEvent = callback; 4562 getUINativeModule().frameNode.setOnAttach(this._nodePtr, callback, this._instanceId); 4563 } 4564 setOnDetach(callback) { 4565 this._onDetachEvent = callback; 4566 getUINativeModule().frameNode.setOnDetach(this._nodePtr, callback, this._instanceId); 4567 } 4568 setOnKeyEvent(callback) { 4569 this._onKeyEvent = callback; 4570 getUINativeModule().frameNode.setOnKeyEvent(this._nodePtr, callback, this._instanceId); 4571 } 4572 setOnFocus(callback) { 4573 this._onFocusEvent = callback; 4574 getUINativeModule().frameNode.setOnFocus(this._nodePtr, callback, this._instanceId); 4575 } 4576 setOnBlur(callback) { 4577 this._onBlur = callback; 4578 getUINativeModule().frameNode.setOnBlur(this._nodePtr, callback, this._instanceId); 4579 } 4580 setOnHover(callback) { 4581 this._onHoverEvent = callback; 4582 getUINativeModule().frameNode.setOnHover(this._nodePtr, callback, this._instanceId); 4583 } 4584 setOnMouse(callback) { 4585 this._onMouseEvent = callback; 4586 getUINativeModule().frameNode.setOnMouse(this._nodePtr, callback, this._instanceId); 4587 } 4588 setOnSizeChange(callback) { 4589 this._onSizeChangeEvent = callback; 4590 getUINativeModule().frameNode.setOnSizeChange(this._nodePtr, callback, this._instanceId); 4591 } 4592 setOnVisibleAreaApproximateChange(options, callback) { 4593 this._onVisibleAreaApproximateChange = callback; 4594 getUINativeModule().frameNode.setOnVisibleAreaApproximateChange(this._nodePtr, callback, this._instanceId, options.ratios, options.expectedUpdateInterval ? options.expectedUpdateInterval : 1000); 4595 } 4596} 4597 4598function attributeModifierFunc(modifier, componentBuilder, modifierBuilder) { 4599 if (modifier === undefined || modifier === null) { 4600 ArkLogConsole.info('custom modifier is undefined'); 4601 return; 4602 } 4603 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 4604 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 4605 let component = this.createOrGetNode(elmtId, () => { 4606 return componentBuilder(nativeNode); 4607 }); 4608 if (modifier.isAttributeUpdater === true) { 4609 let modifierJS = globalThis.requireNapi('arkui.modifier'); 4610 if (modifier.modifierState === modifierJS.AttributeUpdater.StateEnum.INIT) { 4611 ArkLogConsole.info('AttributeUpdater is created for the first time in ' + (component ? 4612 component.constructor.name.toString() : 'undefined')); 4613 modifier.modifierState = modifierJS.AttributeUpdater.StateEnum.UPDATE; 4614 modifier.attribute = modifierBuilder(nativeNode, ModifierType.STATE, modifierJS); 4615 modifierJS.ModifierUtils.applySetOnChange(modifier.attribute); 4616 modifier.initializeModifier(modifier.attribute); 4617 applyUIAttributesInit(modifier, nativeNode, component); 4618 component.applyModifierPatch(); 4619 } else { 4620 modifier.attribute.applyStateUpdatePtr(component); 4621 if (modifier.attribute._nativePtrChanged) { 4622 modifier.onComponentChanged(modifier.attribute); 4623 } 4624 modifier.attribute.applyNormalAttribute(component); 4625 applyUIAttributes(modifier, nativeNode, component); 4626 component.applyModifierPatch(); 4627 } 4628 } else { 4629 applyUIAttributes(modifier, nativeNode, component); 4630 component.applyModifierPatch(); 4631 } 4632} 4633 4634function attributeModifierFuncWithoutStateStyles(modifier, componentBuilder, modifierBuilder) { 4635 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 4636 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 4637 let component = this.createOrGetNode(elmtId, () => { 4638 return componentBuilder(nativeNode); 4639 }); 4640 if (modifier.isAttributeUpdater === true) { 4641 let modifierJS = globalThis.requireNapi('arkui.modifier'); 4642 if (modifier.modifierState === modifierJS.AttributeUpdater.StateEnum.INIT) { 4643 modifier.modifierState = modifierJS.AttributeUpdater.StateEnum.UPDATE; 4644 modifier.attribute = modifierBuilder(nativeNode, ModifierType.STATE, modifierJS); 4645 modifierJS.ModifierUtils.applySetOnChange(modifier.attribute); 4646 modifier.initializeModifier(modifier.attribute); 4647 component.applyModifierPatch(); 4648 } else { 4649 modifier.attribute.applyStateUpdatePtr(component); 4650 modifier.attribute.applyNormalAttribute(component); 4651 if (modifier.applyNormalAttribute) { 4652 modifier.applyNormalAttribute(component); 4653 } 4654 component.applyModifierPatch(); 4655 } 4656 } else { 4657 if (modifier.applyNormalAttribute) { 4658 modifier.applyNormalAttribute(component); 4659 } 4660 component.applyModifierPatch(); 4661 } 4662} 4663 4664class UIGestureEvent { 4665 setNodePtr(nodePtr) { 4666 this._nodePtr = nodePtr; 4667 } 4668 setWeakNodePtr(weakNodePtr) { 4669 this._weakNodePtr = weakNodePtr; 4670 } 4671 addGesture(gesture, priority, mask) { 4672 if (this._weakNodePtr.invalid()) { 4673 return; 4674 } 4675 switch (gesture.gestureType) { 4676 case CommonGestureType.TAP_GESTURE: { 4677 let tapGesture = gesture; 4678 getUINativeModule().common.addTapGesture(this._nodePtr, priority, mask, tapGesture.gestureTag, 4679 tapGesture.fingers, tapGesture.count, tapGesture.onActionCallback); 4680 break; 4681 } 4682 case CommonGestureType.LONG_PRESS_GESTURE: { 4683 let longPressGesture = gesture; 4684 getUINativeModule().common.addLongPressGesture(this._nodePtr, priority, mask, longPressGesture.gestureTag, 4685 longPressGesture.fingers, longPressGesture.repeat, longPressGesture.duration, 4686 longPressGesture.onActionCallback, longPressGesture.onActionEndCallback, longPressGesture.onActionCancelCallback); 4687 break; 4688 } 4689 case CommonGestureType.PAN_GESTURE: { 4690 let panGesture = gesture; 4691 getUINativeModule().common.addPanGesture(this._nodePtr, priority, mask, panGesture.gestureTag, 4692 panGesture.fingers, panGesture.direction, panGesture.distance, panGesture.onActionStartCallback, 4693 panGesture.onActionUpdateCallback, panGesture.onActionEndCallback, panGesture.onActionCancelCallback); 4694 break; 4695 } 4696 case CommonGestureType.SWIPE_GESTURE: { 4697 let swipeGesture = gesture; 4698 getUINativeModule().common.addSwipeGesture(this._nodePtr, priority, mask, swipeGesture.gestureTag, 4699 swipeGesture.fingers, swipeGesture.direction, swipeGesture.speed, swipeGesture.onActionCallback); 4700 break; 4701 } 4702 case CommonGestureType.PINCH_GESTURE: { 4703 let pinchGesture = gesture; 4704 getUINativeModule().common.addPinchGesture(this._nodePtr, priority, mask, pinchGesture.gestureTag, 4705 pinchGesture.fingers, pinchGesture.distance, pinchGesture.onActionStartCallback, 4706 pinchGesture.onActionUpdateCallback, pinchGesture.onActionEndCallback, pinchGesture.onActionCancelCallback); 4707 break; 4708 } 4709 case CommonGestureType.ROTATION_GESTURE: { 4710 let rotationGesture = gesture; 4711 getUINativeModule().common.addRotationGesture(this._nodePtr, priority, mask, rotationGesture.gestureTag, 4712 rotationGesture.fingers, rotationGesture.angle, rotationGesture.onActionStartCallback, 4713 rotationGesture.onActionUpdateCallback, rotationGesture.onActionEndCallback, 4714 rotationGesture.onActionCancelCallback); 4715 break; 4716 } 4717 case CommonGestureType.GESTURE_GROUP: { 4718 let gestureGroup = gesture; 4719 let groupPtr = getUINativeModule().common.addGestureGroup( 4720 gestureGroup.gestureTag, gestureGroup.onCancelCallback, gestureGroup.mode); 4721 gestureGroup.gestures.forEach((item) => { 4722 addGestureToGroup(item, groupPtr); 4723 }); 4724 getUINativeModule().common.attachGestureGroup(this._nodePtr, priority, mask, groupPtr); 4725 break; 4726 } 4727 default: 4728 break; 4729 } 4730 } 4731 addParallelGesture(gesture, mask) { 4732 this.addGesture(gesture, GesturePriority.PARALLEL, mask); 4733 } 4734 removeGestureByTag(tag) { 4735 if (this._weakNodePtr.invalid()) { 4736 return; 4737 } 4738 getUINativeModule().common.removeGestureByTag(this._nodePtr, tag); 4739 } 4740 clearGestures() { 4741 if (this._weakNodePtr.invalid()) { 4742 return; 4743 } 4744 getUINativeModule().common.clearGestures(this._nodePtr); 4745 } 4746} 4747 4748function addGestureToGroup(gesture, gestureGroupPtr) { 4749 switch (gesture.gestureType) { 4750 case CommonGestureType.TAP_GESTURE: { 4751 let tapGesture = gesture; 4752 getUINativeModule().common.addTapGestureToGroup(tapGesture.gestureTag, 4753 tapGesture.fingers, tapGesture.count, tapGesture.onActionCallback, gestureGroupPtr); 4754 break; 4755 } 4756 case CommonGestureType.LONG_PRESS_GESTURE: { 4757 let longPressGesture = gesture; 4758 getUINativeModule().common.addLongPressGestureToGroup(longPressGesture.gestureTag, 4759 longPressGesture.fingers, longPressGesture.repeat, longPressGesture.duration, 4760 longPressGesture.onActionCallback, longPressGesture.onActionEndCallback, longPressGesture.onActionCancelCallback, gestureGroupPtr); 4761 break; 4762 } 4763 case CommonGestureType.PAN_GESTURE: { 4764 let panGesture = gesture; 4765 getUINativeModule().common.addPanGestureToGroup(panGesture.gestureTag, 4766 panGesture.fingers, panGesture.direction, panGesture.distance, panGesture.onActionStartCallback, 4767 panGesture.onActionUpdateCallback, panGesture.onActionEndCallback, panGesture.onActionCancelCallback, gestureGroupPtr); 4768 break; 4769 } 4770 case CommonGestureType.SWIPE_GESTURE: { 4771 let swipeGesture = gesture; 4772 getUINativeModule().common.addSwipeGestureToGroup(swipeGesture.gestureTag, 4773 swipeGesture.fingers, swipeGesture.direction, swipeGesture.speed, swipeGesture.onActionCallback, gestureGroupPtr); 4774 break; 4775 } 4776 case CommonGestureType.PINCH_GESTURE: { 4777 let pinchGesture = gesture; 4778 getUINativeModule().common.addPinchGestureToGroup(pinchGesture.gestureTag, 4779 pinchGesture.fingers, pinchGesture.distance, pinchGesture.onActionStartCallback, 4780 pinchGesture.onActionUpdateCallback, pinchGesture.onActionEndCallback, pinchGesture.onActionCancelCallback, gestureGroupPtr); 4781 break; 4782 } 4783 case CommonGestureType.ROTATION_GESTURE: { 4784 let rotationGesture = gesture; 4785 getUINativeModule().common.addRotationGestureToGroup(rotationGesture.gestureTag, 4786 rotationGesture.fingers, rotationGesture.angle, rotationGesture.onActionStartCallback, 4787 rotationGesture.onActionUpdateCallback, rotationGesture.onActionEndCallback, 4788 rotationGesture.onActionCancelCallback, gestureGroupPtr); 4789 break; 4790 } 4791 case CommonGestureType.GESTURE_GROUP: { 4792 let gestureGroup = gesture; 4793 let groupPtr = getUINativeModule().common.addGestureGroupToGroup( 4794 gestureGroup.gestureTag, gestureGroup.onCancelCallback, gestureGroup.mode, gestureGroupPtr); 4795 gestureGroup.gestures.forEach((item) => { 4796 addGestureToGroup(item, groupPtr); 4797 }); 4798 break; 4799 } 4800 default: 4801 break; 4802 } 4803} 4804 4805function applyGesture(modifier, component) { 4806 if (modifier.applyGesture !== undefined) { 4807 let gestureEvent = component.getOrCreateGestureEvent(); 4808 gestureEvent.clearGestures(); 4809 modifier.applyGesture(gestureEvent); 4810 } 4811} 4812 4813globalThis.__mapOfModifier__ = new Map(); 4814function __gestureModifier__(modifier) { 4815 if (globalThis.__mapOfModifier__.size === 0) { 4816 __modifierElmtDeleteCallback__(); 4817 } 4818 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 4819 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 4820 if (globalThis.__mapOfModifier__.get(elmtId)) { 4821 let component = globalThis.__mapOfModifier__.get(elmtId); 4822 applyGesture(modifier, component); 4823 } else { 4824 let component = new ArkComponent(nativeNode); 4825 globalThis.__mapOfModifier__.set(elmtId, component); 4826 applyGesture(modifier, component); 4827 } 4828} 4829 4830function __modifierElmtDeleteCallback__() { 4831 UINodeRegisterProxy.registerModifierElmtDeleteCallback((elmtId) => { 4832 globalThis.__mapOfModifier__.delete(elmtId); 4833 }); 4834} 4835 4836const __elementIdToCustomProperties__ = new Map(); 4837 4838function __setValidCustomProperty__(nodeId, key, value) { 4839 if (!__elementIdToCustomProperties__.has(nodeId)) { 4840 __elementIdToCustomProperties__.set(nodeId, new Map()); 4841 } 4842 4843 const customProperties = __elementIdToCustomProperties__.get(nodeId); 4844 4845 if (customProperties) { 4846 customProperties.set(key, value); 4847 } 4848} 4849 4850function __removeCustomProperty__(nodeId, key) { 4851 if (__elementIdToCustomProperties__.has(nodeId)) { 4852 const customProperties = __elementIdToCustomProperties__.get(nodeId); 4853 4854 if (customProperties) { 4855 customProperties.delete(key); 4856 return customProperties.size > 0; 4857 } 4858 } 4859 4860 return false; 4861} 4862 4863function __removeCustomProperties__(nodeId) { 4864 __elementIdToCustomProperties__.delete(nodeId); 4865} 4866 4867function __getCustomProperty__(nodeId, key) { 4868 if (__elementIdToCustomProperties__.has(nodeId)) { 4869 const customProperties = __elementIdToCustomProperties__.get(nodeId); 4870 4871 if (customProperties) { 4872 return customProperties.get(key); 4873 } 4874 } 4875 4876 return undefined; 4877} 4878 4879function __getCustomPropertyString__(nodeId, key) { 4880 if (__elementIdToCustomProperties__.has(nodeId)) { 4881 const customProperties = __elementIdToCustomProperties__.get(nodeId); 4882 4883 if (customProperties) { 4884 return JSON.stringify(customProperties.get(key)); 4885 } 4886 } 4887 4888 return undefined; 4889} 4890 4891function __setCustomProperty__(nodeId, key, value) { 4892 if (value !== undefined) { 4893 __setValidCustomProperty__(nodeId, key, value); 4894 return true; 4895 } else { 4896 return __removeCustomProperty__(nodeId, key); 4897 } 4898} 4899 4900function valueToArkBorder(value) { 4901 let borderValue = new ArkBorder(); 4902 if (isUndefined(value)) { 4903 borderValue = undefined; 4904 } 4905 4906 if (!isUndefined(value?.width) && value?.width !== null) { 4907 if (isNumber(value.width) || isString(value.width) || isResource(value.width)) { 4908 borderValue.arkWidth.left = value.width; 4909 borderValue.arkWidth.right = value.width; 4910 borderValue.arkWidth.top = value.width; 4911 borderValue.arkWidth.bottom = value.width; 4912 } else { 4913 borderValue.arkWidth.start = value.width.start; 4914 borderValue.arkWidth.end = value.width.end; 4915 borderValue.arkWidth.left = value.width.left; 4916 borderValue.arkWidth.right = value.width.right; 4917 borderValue.arkWidth.top = value.width.top; 4918 borderValue.arkWidth.bottom = value.width.bottom; 4919 } 4920 } 4921 if (!isUndefined(value?.color) && value?.color !== null) { 4922 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 4923 borderValue.arkColor.leftColor = value.color; 4924 borderValue.arkColor.rightColor = value.color; 4925 borderValue.arkColor.topColor = value.color; 4926 borderValue.arkColor.bottomColor = value.color; 4927 } else { 4928 borderValue.arkColor.start = (value.color).start; 4929 borderValue.arkColor.end = (value.color).end; 4930 borderValue.arkColor.leftColor = (value.color).left; 4931 borderValue.arkColor.rightColor = (value.color).right; 4932 borderValue.arkColor.topColor = (value.color).top; 4933 borderValue.arkColor.bottomColor = (value.color).bottom; 4934 } 4935 } 4936 if (!isUndefined(value?.radius) && value?.radius !== null) { 4937 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 4938 borderValue.arkRadius.topLeft = value.radius; 4939 borderValue.arkRadius.topRight = value.radius; 4940 borderValue.arkRadius.bottomLeft = value.radius; 4941 borderValue.arkRadius.bottomRight = value.radius; 4942 } else { 4943 borderValue.arkRadius.topStart = value.radius?.topStart; 4944 borderValue.arkRadius.topEnd = value.radius?.topEnd; 4945 borderValue.arkRadius.bottomStart = value.radius?.bottomStart; 4946 borderValue.arkRadius.bottomEnd = value.radius?.bottomEnd; 4947 borderValue.arkRadius.topLeft = value.radius?.topLeft; 4948 borderValue.arkRadius.topRight = value.radius?.topRight; 4949 borderValue.arkRadius.bottomLeft = value.radius?.bottomLeft; 4950 borderValue.arkRadius.bottomRight = value.radius?.bottomRight; 4951 } 4952 } 4953 if (!isUndefined(value?.style) && value?.style !== null) { 4954 let arkBorderStyle = new ArkBorderStyle(); 4955 if (arkBorderStyle.parseBorderStyle(value.style)) { 4956 if (!isUndefined(arkBorderStyle.style)) { 4957 borderValue.arkStyle.top = arkBorderStyle.style; 4958 borderValue.arkStyle.left = arkBorderStyle.style; 4959 borderValue.arkStyle.bottom = arkBorderStyle.style; 4960 borderValue.arkStyle.right = arkBorderStyle.style; 4961 } else { 4962 borderValue.arkStyle.top = arkBorderStyle.top; 4963 borderValue.arkStyle.left = arkBorderStyle.left; 4964 borderValue.arkStyle.bottom = arkBorderStyle.bottom; 4965 borderValue.arkStyle.right = arkBorderStyle.right; 4966 } 4967 } 4968 } 4969 return borderValue; 4970} 4971 4972/// <reference path='./import.ts' /> 4973class BlankColorModifier extends ModifierWithKey { 4974 constructor(value) { 4975 super(value); 4976 } 4977 applyPeer(node, reset) { 4978 if (reset) { 4979 getUINativeModule().blank.resetColor(node); 4980 } 4981 else { 4982 getUINativeModule().blank.setColor(node, this.value); 4983 } 4984 } 4985 checkObjectDiff() { 4986 return !isBaseOrResourceEqual(this.stageValue, this.value); 4987 } 4988} 4989BlankColorModifier.identity = Symbol('blankColor'); 4990class BlankHeightModifier extends ModifierWithKey { 4991 constructor(value) { 4992 super(value); 4993 } 4994 applyPeer(node, reset) { 4995 if (reset) { 4996 getUINativeModule().blank.resetBlankHeight(node); 4997 } else { 4998 getUINativeModule().blank.setBlankHeight(node, this.value); 4999 } 5000 } 5001 checkObjectDiff() { 5002 return !isBaseOrResourceEqual(this.stageValue, this.value); 5003 } 5004} 5005BlankHeightModifier.identity = Symbol('blankHeight'); 5006 5007class BlankMinModifier extends ModifierWithKey { 5008 constructor(value) { 5009 super(value); 5010 } 5011 applyPeer(node, reset) { 5012 if (reset) { 5013 getUINativeModule().blank.resetBlankMin(node); 5014 } else { 5015 getUINativeModule().blank.setBlankMin(node, this.value); 5016 } 5017 } 5018 checkObjectDiff() { 5019 return !isBaseOrResourceEqual(this.stageValue, this.value); 5020 } 5021} 5022BlankMinModifier.identity = Symbol('blankMin'); 5023 5024class ArkBlankComponent extends ArkComponent { 5025 constructor(nativePtr, classType) { 5026 super(nativePtr, classType); 5027 } 5028 color(value) { 5029 modifierWithKey(this._modifiersWithKeys, BlankColorModifier.identity, BlankColorModifier, value); 5030 return this; 5031 } 5032 height(value) { 5033 modifierWithKey(this._modifiersWithKeys, BlankHeightModifier.identity, BlankHeightModifier, value); 5034 return this; 5035 } 5036 5037 initialize(value) { 5038 if (value[0] !== undefined) { 5039 modifierWithKey(this._modifiersWithKeys, BlankMinModifier.identity, BlankMinModifier, value[0]); 5040 } 5041 return this; 5042 } 5043 allowChildCount() { 5044 return 0; 5045 } 5046} 5047// @ts-ignore 5048if (globalThis.Blank !== undefined) { 5049 globalThis.Blank.attributeModifier = function (modifier) { 5050 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5051 return new ArkBlankComponent(nativePtr); 5052 }, (nativePtr, classType, modifierJS) => { 5053 return new modifierJS.BlankModifier(nativePtr, classType); 5054 }); 5055 }; 5056} 5057 5058globalThis.applySymbolGlyphModifierToNode = function (modifier, nodePtr) { 5059 let component = new ArkSymbolGlyphComponent(nodePtr); 5060 applyUIAttributes(modifier, nodePtr, component); 5061 component.applyModifierPatch(); 5062}; 5063 5064globalThis.applyImageModifierToNode = function (modifier, nodePtr) { 5065 let component = new ArkImageComponent(nodePtr); 5066 applyUIAttributes(modifier, nodePtr, component); 5067 component.applyModifierPatch(); 5068}; 5069 5070globalThis.applyTextModifierToNode = function (modifier, nodePtr) { 5071 let component = new ArkTextComponent(nodePtr); 5072 applyUIAttributes(modifier, nodePtr, component); 5073 component.applyModifierPatch(); 5074}; 5075 5076/// <reference path='./import.ts' /> 5077class ColumnAlignItemsModifier extends ModifierWithKey { 5078 constructor(value) { 5079 super(value); 5080 } 5081 applyPeer(node, reset) { 5082 if (reset) { 5083 getUINativeModule().column.resetAlignItems(node); 5084 } 5085 else { 5086 getUINativeModule().column.setAlignItems(node, this.value); 5087 } 5088 } 5089 checkObjectDiff() { 5090 return this.stageValue !== this.value; 5091 } 5092} 5093ColumnAlignItemsModifier.identity = Symbol('columnAlignItems'); 5094class ColumnJustifyContentModifier extends ModifierWithKey { 5095 constructor(value) { 5096 super(value); 5097 } 5098 applyPeer(node, reset) { 5099 if (reset) { 5100 getUINativeModule().column.resetJustifyContent(node); 5101 } 5102 else { 5103 getUINativeModule().column.setJustifyContent(node, this.value); 5104 } 5105 } 5106 checkObjectDiff() { 5107 return this.stageValue !== this.value; 5108 } 5109} 5110ColumnJustifyContentModifier.identity = Symbol('columnJustifyContent'); 5111 5112class ColumnSpaceModifier extends ModifierWithKey { 5113 constructor(value) { 5114 super(value); 5115 } 5116 applyPeer(node, reset) { 5117 if (reset) { 5118 getUINativeModule().column.resetSpace(node); 5119 } 5120 else { 5121 getUINativeModule().column.setSpace(node, this.value); 5122 } 5123 } 5124 checkObjectDiff() { 5125 return this.stageValue !== this.value; 5126 } 5127} 5128ColumnSpaceModifier.identity = Symbol('columnSpace'); 5129 5130class ColumnPointLightModifier extends ModifierWithKey { 5131 constructor(value) { 5132 super(value); 5133 } 5134 applyPeer(node, reset) { 5135 if (reset) { 5136 getUINativeModule().common.resetPointLightStyle(node); 5137 } else { 5138 let positionX; 5139 let positionY; 5140 let positionZ; 5141 let intensity; 5142 let color; 5143 let illuminated; 5144 let bloom; 5145 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 5146 positionX = this.value.lightSource.positionX; 5147 positionY = this.value.lightSource.positionY; 5148 positionZ = this.value.lightSource.positionZ; 5149 intensity = this.value.lightSource.intensity; 5150 color = this.value.lightSource.color; 5151 } 5152 illuminated = this.value.illuminated; 5153 bloom = this.value.bloom; 5154 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 5155 illuminated, bloom); 5156 } 5157 } 5158 checkObjectDiff() { 5159 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 5160 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 5161 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 5162 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 5163 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 5164 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 5165 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 5166 } 5167} 5168ColumnPointLightModifier.identity = Symbol('columnPointLight'); 5169 5170class ColumnReverseModifier extends ModifierWithKey { 5171 constructor(value) { 5172 super(value); 5173 } 5174 applyPeer(node, reset) { 5175 if (reset) { 5176 getUINativeModule().column.resetReverse(node); 5177 } else { 5178 getUINativeModule().column.setReverse(node, this.value); 5179 } 5180 } 5181 checkObjectDiff() { 5182 return this.stageValue !== this.value; 5183 } 5184} 5185ColumnReverseModifier.identity = Symbol('columnReverse'); 5186 5187class ArkColumnComponent extends ArkComponent { 5188 constructor(nativePtr, classType) { 5189 super(nativePtr, classType); 5190 } 5191 initialize(value) { 5192 if (value[0] !== undefined) { 5193 modifierWithKey(this._modifiersWithKeys, ColumnSpaceModifier.identity, ColumnSpaceModifier, value[0].space); 5194 } 5195 return this 5196 } 5197 alignItems(value) { 5198 modifierWithKey(this._modifiersWithKeys, ColumnAlignItemsModifier.identity, ColumnAlignItemsModifier, value); 5199 return this; 5200 } 5201 justifyContent(value) { 5202 modifierWithKey(this._modifiersWithKeys, ColumnJustifyContentModifier.identity, ColumnJustifyContentModifier, value); 5203 return this; 5204 } 5205 pointLight(value) { 5206 modifierWithKey(this._modifiersWithKeys, ColumnPointLightModifier.identity, ColumnPointLightModifier, value); 5207 return this; 5208 } 5209 reverse(value) { 5210 modifierWithKey(this._modifiersWithKeys, ColumnReverseModifier.identity, ColumnReverseModifier, value); 5211 return this; 5212 } 5213} 5214// @ts-ignore 5215if (globalThis.Column !== undefined) { 5216 globalThis.Column.attributeModifier = function (modifier) { 5217 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5218 return new ArkColumnComponent(nativePtr); 5219 }, (nativePtr, classType, modifierJS) => { 5220 return new modifierJS.ColumnModifier(nativePtr, classType); 5221 }); 5222 }; 5223} 5224 5225/// <reference path='./import.ts' /> 5226class ColumnSplitDividerModifier extends ModifierWithKey { 5227 constructor(value) { 5228 super(value); 5229 } 5230 applyPeer(node, reset) { 5231 if (reset) { 5232 getUINativeModule().columnSplit.resetDivider(node); 5233 } 5234 else { 5235 getUINativeModule().columnSplit.setDivider(node, this.value.startMargin, this.value.endMargin); 5236 } 5237 } 5238 checkObjectDiff() { 5239 return !isBaseOrResourceEqual(this.stageValue.startMargin, this.value.startMargin) || 5240 !isBaseOrResourceEqual(this.stageValue.endMargin, this.value.endMargin); 5241 } 5242} 5243ColumnSplitDividerModifier.identity = Symbol('columnSplitDivider'); 5244class ColumnSplitResizeableModifier extends ModifierWithKey { 5245 constructor(value) { 5246 super(value); 5247 } 5248 applyPeer(node, reset) { 5249 if (reset) { 5250 getUINativeModule().columnSplit.resetResizeable(node); 5251 } 5252 else { 5253 getUINativeModule().columnSplit.setResizeable(node, this.value); 5254 } 5255 } 5256 checkObjectDiff() { 5257 return this.stageValue !== this.value; 5258 } 5259} 5260ColumnSplitResizeableModifier.identity = Symbol('columnSplitResizeable'); 5261class ColumnSplitClipModifier extends ModifierWithKey { 5262 constructor(value) { 5263 super(value); 5264 } 5265 applyPeer(node, reset) { 5266 if (reset) { 5267 getUINativeModule().common.resetClipWithEdge(node); 5268 } 5269 else { 5270 getUINativeModule().common.setClipWithEdge(node, this.value); 5271 } 5272 } 5273 checkObjectDiff() { 5274 return true; 5275 } 5276} 5277ColumnSplitClipModifier.identity = Symbol('columnSplitClip'); 5278class ArkColumnSplitComponent extends ArkComponent { 5279 constructor(nativePtr, classType) { 5280 super(nativePtr, classType); 5281 } 5282 resizeable(value) { 5283 modifierWithKey(this._modifiersWithKeys, ColumnSplitResizeableModifier.identity, ColumnSplitResizeableModifier, value); 5284 return this; 5285 } 5286 divider(value) { 5287 modifierWithKey(this._modifiersWithKeys, ColumnSplitDividerModifier.identity, ColumnSplitDividerModifier, value); 5288 return this; 5289 } 5290 clip(value) { 5291 modifierWithKey(this._modifiersWithKeys, ColumnSplitClipModifier.identity, ColumnSplitClipModifier, value); 5292 return this; 5293 } 5294} 5295// @ts-ignore 5296if (globalThis.ColumnSplit !== undefined) { 5297 globalThis.ColumnSplit.attributeModifier = function (modifier) { 5298 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5299 return new ArkColumnSplitComponent(nativePtr); 5300 }, (nativePtr, classType, modifierJS) => { 5301 return new modifierJS.ColumnSplitModifier(nativePtr, classType); 5302 }); 5303 }; 5304} 5305 5306/// <reference path='./import.ts' /> 5307class DividerVerticalModifier extends ModifierWithKey { 5308 constructor(value) { 5309 super(value); 5310 } 5311 applyPeer(node, reset) { 5312 if (reset) { 5313 getUINativeModule().divider.resetVertical(node); 5314 } 5315 else { 5316 getUINativeModule().divider.setVertical(node, this.value); 5317 } 5318 } 5319 checkObjectDiff() { 5320 return this.stageValue !== this.value; 5321 } 5322} 5323DividerVerticalModifier.identity = Symbol('dividerVertical'); 5324class DividerLineCapModifier extends ModifierWithKey { 5325 constructor(value) { 5326 super(value); 5327 } 5328 applyPeer(node, reset) { 5329 if (reset) { 5330 getUINativeModule().divider.resetLineCap(node); 5331 } 5332 else { 5333 getUINativeModule().divider.setLineCap(node, this.value); 5334 } 5335 } 5336 checkObjectDiff() { 5337 return this.stageValue !== this.value; 5338 } 5339} 5340DividerLineCapModifier.identity = Symbol('dividerLineCap'); 5341class DividerColorModifier extends ModifierWithKey { 5342 constructor(value) { 5343 super(value); 5344 } 5345 applyPeer(node, reset) { 5346 if (reset) { 5347 getUINativeModule().divider.resetColor(node); 5348 } 5349 else { 5350 getUINativeModule().divider.setColor(node, this.value); 5351 } 5352 } 5353 checkObjectDiff() { 5354 return !isBaseOrResourceEqual(this.stageValue, this.value); 5355 } 5356} 5357DividerColorModifier.identity = Symbol('dividerColor'); 5358class DividerStrokeWidthModifier extends ModifierWithKey { 5359 constructor(value) { 5360 super(value); 5361 } 5362 applyPeer(node, reset) { 5363 if (reset) { 5364 getUINativeModule().divider.resetStrokeWidth(node); 5365 } 5366 else { 5367 getUINativeModule().divider.setStrokeWidth(node, this.value); 5368 } 5369 } 5370 checkObjectDiff() { 5371 return this.stageValue !== this.value; 5372 } 5373} 5374DividerStrokeWidthModifier.identity = Symbol('dividerStrokeWidth'); 5375class ArkDividerComponent extends ArkComponent { 5376 constructor(nativePtr, classType) { 5377 super(nativePtr, classType); 5378 } 5379 initialize(value) { 5380 return this; 5381 } 5382 allowChildCount() { 5383 return 0; 5384 } 5385 vertical(value) { 5386 modifierWithKey(this._modifiersWithKeys, DividerVerticalModifier.identity, DividerVerticalModifier, value); 5387 return this; 5388 } 5389 color(value) { 5390 modifierWithKey(this._modifiersWithKeys, DividerColorModifier.identity, DividerColorModifier, value); 5391 return this; 5392 } 5393 strokeWidth(value) { 5394 modifierWithKey(this._modifiersWithKeys, DividerStrokeWidthModifier.identity, DividerStrokeWidthModifier, value); 5395 return this; 5396 } 5397 lineCap(value) { 5398 modifierWithKey(this._modifiersWithKeys, DividerLineCapModifier.identity, DividerLineCapModifier, value); 5399 return this; 5400 } 5401} 5402// @ts-ignore 5403if (globalThis.Divider !== undefined) { 5404 globalThis.Divider.attributeModifier = function (modifier) { 5405 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5406 return new ArkDividerComponent(nativePtr); 5407 }, (nativePtr, classType, modifierJS) => { 5408 return new modifierJS.DividerModifier(nativePtr, classType); 5409 }); 5410 }; 5411} 5412 5413/// <reference path='./import.ts' /> 5414class FlexInitializeModifier extends ModifierWithKey { 5415 constructor(value) { 5416 super(value); 5417 } 5418 applyPeer(node, reset) { 5419 if (reset) { 5420 getUINativeModule().flex.resetFlexInitialize(node); 5421 } else { 5422 getUINativeModule().flex.setFlexInitialize(node, this.value.direction, this.value.wrap, 5423 this.value.justifyContent, this.value.alignItems, this.value.alignContent, this.value?.space?.main, 5424 this.value?.space?.cross); 5425 } 5426 } 5427} 5428FlexInitializeModifier.identity = Symbol('flexInitialize'); 5429class FlexPointLightModifier extends ModifierWithKey { 5430 constructor(value) { 5431 super(value); 5432 } 5433 applyPeer(node, reset) { 5434 if (reset) { 5435 getUINativeModule().common.resetPointLightStyle(node); 5436 } else { 5437 let positionX; 5438 let positionY; 5439 let positionZ; 5440 let intensity; 5441 let color; 5442 let illuminated; 5443 let bloom; 5444 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 5445 positionX = this.value.lightSource.positionX; 5446 positionY = this.value.lightSource.positionY; 5447 positionZ = this.value.lightSource.positionZ; 5448 intensity = this.value.lightSource.intensity; 5449 color = this.value.lightSource.color; 5450 } 5451 illuminated = this.value.illuminated; 5452 bloom = this.value.bloom; 5453 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 5454 illuminated, bloom); 5455 } 5456 } 5457 checkObjectDiff() { 5458 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 5459 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 5460 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 5461 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 5462 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 5463 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 5464 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 5465 } 5466} 5467FlexPointLightModifier.identity = Symbol('flexPointLight'); 5468class ArkFlexComponent extends ArkComponent { 5469 constructor(nativePtr, classType) { 5470 super(nativePtr, classType); 5471 } 5472 pointLight(value) { 5473 modifierWithKey(this._modifiersWithKeys, FlexPointLightModifier.identity, FlexPointLightModifier, value); 5474 return this; 5475 } 5476 initialize(value) { 5477 if (value[0] !== undefined) { 5478 modifierWithKey(this._modifiersWithKeys, FlexInitializeModifier.identity, FlexInitializeModifier, value[0]); 5479 } 5480 return this; 5481 } 5482} 5483// @ts-ignore 5484if (globalThis.Flex !== undefined) { 5485 globalThis.Flex.attributeModifier = function (modifier) { 5486 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5487 return new ArkFlexComponent(nativePtr); 5488 }, (nativePtr, classType, modifierJS) => { 5489 return new modifierJS.FlexModifier(nativePtr, classType); 5490 }); 5491 }; 5492} 5493 5494/// <reference path='./import.ts' /> 5495class GridRowAlignItemsModifier extends ModifierWithKey { 5496 constructor(value) { 5497 super(value); 5498 } 5499 applyPeer(node, reset) { 5500 if (reset) { 5501 getUINativeModule().gridRow.resetAlignItems(node); 5502 } 5503 else { 5504 getUINativeModule().gridRow.setAlignItems(node, this.value); 5505 } 5506 } 5507 checkObjectDiff() { 5508 return !isBaseOrResourceEqual(this.stageValue, this.value); 5509 } 5510} 5511GridRowAlignItemsModifier.identity = Symbol('gridRowAlignItems'); 5512class GridRowOnBreakpointChangeModifier extends ModifierWithKey { 5513 constructor(value) { 5514 super(value); 5515 } 5516 applyPeer(node, reset) { 5517 if (reset) { 5518 getUINativeModule().gridRow.resetOnBreakpointChange(node); 5519 } else { 5520 getUINativeModule().gridRow.setOnBreakpointChange(node, this.value); 5521 } 5522 } 5523} 5524GridRowOnBreakpointChangeModifier.identity = Symbol('gridRowOnBreakpointChange'); 5525class SetDirectionModifier extends ModifierWithKey { 5526 constructor(value) { 5527 super(value); 5528 } 5529 applyPeer(node, reset) { 5530 if (reset) { 5531 getUINativeModule().gridRow.resetDirection(node); 5532 } 5533 else { 5534 getUINativeModule().gridRow.setDirection(node, this.value); 5535 } 5536 } 5537} 5538SetDirectionModifier.identity = Symbol('gridRowDirection'); 5539class SetBreakpointsModifier extends ModifierWithKey { 5540 constructor(value) { 5541 super(value); 5542 } 5543 applyPeer(node, reset) { 5544 if (reset) { 5545 getUINativeModule().gridRow.resetBreakpoints(node); 5546 } 5547 else { 5548 getUINativeModule().gridRow.setBreakpoints(node, this.value.value, this.value.reference); 5549 } 5550 } 5551} 5552SetBreakpointsModifier.identity = Symbol('gridRowBreakpoints'); 5553class SetColumnsModifier extends ModifierWithKey { 5554 constructor(value) { 5555 super(value); 5556 } 5557 applyPeer(node, reset) { 5558 if (reset) { 5559 getUINativeModule().gridRow.resetColumns(node); 5560 } 5561 else { 5562 if (isUndefined(this.value) || isNull(this.value)) { 5563 getUINativeModule().gridRow.resetColumns(node); 5564 } else if (isNumber(this.value)) { 5565 getUINativeModule().gridRow.setColumns(node, this.value, this.value, this.value, 5566 this.value, this.value, this.value); 5567 } else { 5568 getUINativeModule().gridRow.setColumns(node, this.value.xs, this.value.sm, this.value.md, 5569 this.value.lg, this.value.xl, this.value.xxl); 5570 } 5571 } 5572 } 5573} 5574SetColumnsModifier.identity = Symbol('gridRowColumns'); 5575class SetGutterModifier extends ModifierWithKey { 5576 constructor(value) { 5577 super(value); 5578 } 5579 applyPeer(node, reset) { 5580 if (reset) { 5581 getUINativeModule().gridRow.resetGutter(node); 5582 } 5583 else { 5584 if (isUndefined(this.value) || isNull(this.value)) { 5585 getUINativeModule().gridRow.resetGutter(node); 5586 } 5587 if (isNumber(this.value)) { 5588 getUINativeModule().gridRow.setGutter(node, this.value, 5589 this.value, this.value, this.value, this.value, this.value, 5590 this.value, this.value, this.value, this.value, this.value, this.value); 5591 } else { 5592 if (isNumber(this.value.x)) { 5593 if (isNumber(this.value.y)) { 5594 getUINativeModule().gridRow.setGutter(node, 5595 this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, 5596 this.value.y, this.value.y, this.value.y, this.value.y, this.value.y, this.value.y); 5597 } else { 5598 getUINativeModule().gridRow.setGutter(node, 5599 this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, this.value.x, 5600 this.value.y?.xs, this.value.y?.sm, this.value.y?.md, this.value.y?.lg, this.value.y?.xl, this.value.y?.xxl); 5601 } 5602 } else { 5603 if (isNumber(this.value.y)) { 5604 getUINativeModule().gridRow.setGutter(node, 5605 this.value.x?.xs, this.value.x?.sm, this.value.x?.md, this.value.x?.lg, this.value.x?.xl, this.value.x?.xxl, 5606 this.value.y, this.value.y, this.value.y, this.value.y, this.value.y, this.value.y); 5607 } else { 5608 getUINativeModule().gridRow.setGutter(node, 5609 this.value.x?.xs, this.value.x?.sm, this.value.x?.md, this.value.x?.lg, this.value.x?.xl, this.value.x?.xxl, 5610 this.value.y?.xs, this.value.y?.sm, this.value.y?.md, this.value.y?.lg, this.value.y?.xl, this.value.y?.xxl); 5611 } 5612 } 5613 } 5614 } 5615 } 5616} 5617SetGutterModifier.identity = Symbol('gridRowGutter'); 5618class ArkGridRowComponent extends ArkComponent { 5619 constructor(nativePtr, classType) { 5620 super(nativePtr, classType); 5621 } 5622 allowChildTypes() { 5623 return ["GridCol"]; 5624 } 5625 onBreakpointChange(callback) { 5626 modifierWithKey(this._modifiersWithKeys, GridRowOnBreakpointChangeModifier.identity, GridRowOnBreakpointChangeModifier, callback); 5627 return this; 5628 } 5629 alignItems(value) { 5630 modifierWithKey(this._modifiersWithKeys, GridRowAlignItemsModifier.identity, GridRowAlignItemsModifier, value); 5631 return this; 5632 } 5633 setDirection(value) { 5634 modifierWithKey(this._modifiersWithKeys, SetDirectionModifier.identity, SetDirectionModifier, value); 5635 return this; 5636 } 5637 setBreakpoints(value) { 5638 modifierWithKey(this._modifiersWithKeys, SetBreakpointsModifier.identity, SetBreakpointsModifier, value); 5639 return this; 5640 } 5641 setColumns(value) { 5642 modifierWithKey(this._modifiersWithKeys, SetColumnsModifier.identity, SetColumnsModifier, value); 5643 return this; 5644 } 5645 setGutter(value) { 5646 modifierWithKey(this._modifiersWithKeys, SetGutterModifier.identity, SetGutterModifier, value); 5647 return this; 5648 } 5649 initialize(value) { 5650 if (value[0] !== undefined) { 5651 this.setGutter(value[0].gutter); 5652 this.setColumns(value[0].columns); 5653 this.setBreakpoints(value[0].breakpoints); 5654 this.setDirection(value[0].direction); 5655 } else { 5656 this.setGutter(null); 5657 this.setColumns(null); 5658 this.setBreakpoints(null); 5659 this.setDirection(null); 5660 } 5661 return this; 5662 } 5663} 5664// @ts-ignore 5665if (globalThis.GridRow !== undefined) { 5666 globalThis.GridRow.attributeModifier = function (modifier) { 5667 attributeModifierFunc.call(this, modifier, (nativePtr) => { 5668 return new ArkGridRowComponent(nativePtr); 5669 }, (nativePtr, classType, modifierJS) => { 5670 return new modifierJS.GridRowModifier(nativePtr, classType); 5671 }); 5672 }; 5673} 5674 5675/// <reference path='./import.ts' /> 5676class ArkGridComponent extends ArkComponent { 5677 constructor(nativePtr, classType) { 5678 super(nativePtr, classType); 5679 } 5680 columnsTemplate(value) { 5681 modifierWithKey(this._modifiersWithKeys, GridColumnsTemplateModifier.identity, GridColumnsTemplateModifier, value); 5682 return this; 5683 } 5684 rowsTemplate(value) { 5685 modifierWithKey(this._modifiersWithKeys, GridRowsTemplateModifier.identity, GridRowsTemplateModifier, value); 5686 return this; 5687 } 5688 columnsGap(value) { 5689 modifierWithKey(this._modifiersWithKeys, GridColumnsGapModifier.identity, GridColumnsGapModifier, value); 5690 return this; 5691 } 5692 rowsGap(value) { 5693 modifierWithKey(this._modifiersWithKeys, GridRowsGapModifier.identity, GridRowsGapModifier, value); 5694 return this; 5695 } 5696 scrollBarWidth(value) { 5697 modifierWithKey(this._modifiersWithKeys, GridScrollBarWidthModifier.identity, GridScrollBarWidthModifier, value); 5698 return this; 5699 } 5700 scrollBarColor(value) { 5701 modifierWithKey(this._modifiersWithKeys, GridScrollBarColorModifier.identity, GridScrollBarColorModifier, value); 5702 return this; 5703 } 5704 scrollBar(value) { 5705 modifierWithKey(this._modifiersWithKeys, GridScrollBarModifier.identity, GridScrollBarModifier, value); 5706 return this; 5707 } 5708 onScrollBarUpdate(event) { 5709 throw new Error('Method not implemented.'); 5710 } 5711 onScrollIndex(event) { 5712 throw new Error('Method not implemented.'); 5713 } 5714 cachedCount(value) { 5715 modifierWithKey(this._modifiersWithKeys, GridCachedCountModifier.identity, GridCachedCountModifier, value); 5716 return this; 5717 } 5718 editMode(value) { 5719 modifierWithKey(this._modifiersWithKeys, GridEditModeModifier.identity, GridEditModeModifier, value); 5720 return this; 5721 } 5722 multiSelectable(value) { 5723 modifierWithKey(this._modifiersWithKeys, GridMultiSelectableModifier.identity, GridMultiSelectableModifier, value); 5724 return this; 5725 } 5726 maxCount(value) { 5727 modifierWithKey(this._modifiersWithKeys, GridMaxCountModifier.identity, GridMaxCountModifier, value); 5728 return this; 5729 } 5730 minCount(value) { 5731 modifierWithKey(this._modifiersWithKeys, GridMinCountModifier.identity, GridMinCountModifier, value); 5732 return this; 5733 } 5734 cellLength(value) { 5735 modifierWithKey(this._modifiersWithKeys, GridCellLengthModifier.identity, GridCellLengthModifier, value); 5736 return this; 5737 } 5738 layoutDirection(value) { 5739 modifierWithKey(this._modifiersWithKeys, GridLayoutDirectionModifier.identity, GridLayoutDirectionModifier, value); 5740 return this; 5741 } 5742 supportAnimation(value) { 5743 modifierWithKey(this._modifiersWithKeys, GridSupportAnimationModifier.identity, GridSupportAnimationModifier, value); 5744 return this; 5745 } 5746 onItemDragStart(event) { 5747 throw new Error('Method not implemented.'); 5748 } 5749 onItemDragEnter(event) { 5750 throw new Error('Method not implemented.'); 5751 } 5752 onItemDragMove(event) { 5753 throw new Error('Method not implemented.'); 5754 } 5755 onItemDragLeave(event) { 5756 throw new Error('Method not implemented.'); 5757 } 5758 onItemDrop(event) { 5759 throw new Error('Method not implemented.'); 5760 } 5761 edgeEffect(value, options) { 5762 let effect = new ArkGridEdgeEffect(); 5763 effect.value = value; 5764 effect.options = options; 5765 modifierWithKey(this._modifiersWithKeys, GridEdgeEffectModifier.identity, GridEdgeEffectModifier, effect); 5766 return this; 5767 } 5768 nestedScroll(value) { 5769 modifierWithKey(this._modifiersWithKeys, GridNestedScrollModifier.identity, GridNestedScrollModifier, value); 5770 return this; 5771 } 5772 enableScrollInteraction(value) { 5773 modifierWithKey(this._modifiersWithKeys, GridEnableScrollModifier.identity, GridEnableScrollModifier, value); 5774 return this; 5775 } 5776 friction(value) { 5777 modifierWithKey(this._modifiersWithKeys, GridFrictionModifier.identity, GridFrictionModifier, value); 5778 return this; 5779 } 5780 onScroll(event) { 5781 throw new Error('Method not implemented.'); 5782 } 5783 onReachStart(event) { 5784 throw new Error('Method not implemented.'); 5785 } 5786 onReachEnd(event) { 5787 throw new Error('Method not implemented.'); 5788 } 5789 onScrollStart(event) { 5790 throw new Error('Method not implemented.'); 5791 } 5792 onScrollStop(event) { 5793 throw new Error('Method not implemented.'); 5794 } 5795 onScrollFrameBegin(event) { 5796 throw new Error('Method not implemented.'); 5797 } 5798 clip(value) { 5799 modifierWithKey(this._modifiersWithKeys, GridClipModifier.identity, GridClipModifier, value); 5800 return this; 5801 } 5802 flingSpeedLimit(value) { 5803 modifierWithKey(this._modifiersWithKeys, GridFlingSpeedLimitModifier.identity, GridFlingSpeedLimitModifier, value); 5804 return this; 5805 } 5806 alignItems(value) { 5807 modifierWithKey(this._modifiersWithKeys, GridAlignItemsModifier.identity, GridAlignItemsModifier, value); 5808 return this; 5809 } 5810} 5811class GridColumnsTemplateModifier extends ModifierWithKey { 5812 constructor(value) { 5813 super(value); 5814 } 5815 applyPeer(node, reset) { 5816 if (reset) { 5817 getUINativeModule().grid.resetColumnsTemplate(node); 5818 } 5819 else { 5820 getUINativeModule().grid.setColumnsTemplate(node, this.value); 5821 } 5822 } 5823} 5824GridColumnsTemplateModifier.identity = Symbol('gridColumnsTemplate'); 5825class GridRowsTemplateModifier extends ModifierWithKey { 5826 constructor(value) { 5827 super(value); 5828 } 5829 applyPeer(node, reset) { 5830 if (reset) { 5831 getUINativeModule().grid.resetRowsTemplate(node); 5832 } 5833 else { 5834 getUINativeModule().grid.setRowsTemplate(node, this.value); 5835 } 5836 } 5837} 5838GridRowsTemplateModifier.identity = Symbol('gridRowsTemplate'); 5839class GridColumnsGapModifier extends ModifierWithKey { 5840 constructor(value) { 5841 super(value); 5842 } 5843 applyPeer(node, reset) { 5844 if (reset) { 5845 getUINativeModule().grid.resetColumnsGap(node); 5846 } 5847 else { 5848 getUINativeModule().grid.setColumnsGap(node, this.value); 5849 } 5850 } 5851 checkObjectDiff() { 5852 return !isBaseOrResourceEqual(this.stageValue, this.value); 5853 } 5854} 5855GridColumnsGapModifier.identity = Symbol('gridColumnsGap'); 5856class GridRowsGapModifier extends ModifierWithKey { 5857 constructor(value) { 5858 super(value); 5859 } 5860 applyPeer(node, reset) { 5861 if (reset) { 5862 getUINativeModule().grid.resetRowsGap(node); 5863 } 5864 else { 5865 getUINativeModule().grid.setRowsGap(node, this.value); 5866 } 5867 } 5868 checkObjectDiff() { 5869 return !isBaseOrResourceEqual(this.stageValue, this.value); 5870 } 5871} 5872GridRowsGapModifier.identity = Symbol('gridRowsGap'); 5873class GridScrollBarWidthModifier extends ModifierWithKey { 5874 constructor(value) { 5875 super(value); 5876 } 5877 applyPeer(node, reset) { 5878 if (reset) { 5879 getUINativeModule().grid.resetScrollBarWidth(node); 5880 } 5881 else { 5882 getUINativeModule().grid.setScrollBarWidth(node, this.value); 5883 } 5884 } 5885} 5886GridScrollBarWidthModifier.identity = Symbol('gridScrollBarWidth'); 5887class GridScrollBarModifier extends ModifierWithKey { 5888 constructor(value) { 5889 super(value); 5890 } 5891 applyPeer(node, reset) { 5892 if (reset) { 5893 getUINativeModule().grid.resetScrollBar(node); 5894 } 5895 else { 5896 getUINativeModule().grid.setScrollBar(node, this.value); 5897 } 5898 } 5899} 5900GridScrollBarModifier.identity = Symbol('gridScrollBar'); 5901class GridScrollBarColorModifier extends ModifierWithKey { 5902 constructor(value) { 5903 super(value); 5904 } 5905 applyPeer(node, reset) { 5906 if (reset) { 5907 getUINativeModule().grid.resetScrollBarColor(node); 5908 } 5909 else { 5910 getUINativeModule().grid.setScrollBarColor(node, this.value); 5911 } 5912 } 5913} 5914GridScrollBarColorModifier.identity = Symbol('gridScrollBarColor'); 5915class GridEditModeModifier extends ModifierWithKey { 5916 constructor(value) { 5917 super(value); 5918 } 5919 applyPeer(node, reset) { 5920 if (reset) { 5921 getUINativeModule().grid.resetEditMode(node); 5922 } 5923 else { 5924 getUINativeModule().grid.setEditMode(node, this.value); 5925 } 5926 } 5927} 5928GridEditModeModifier.identity = Symbol('gridEditMode'); 5929class GridCachedCountModifier extends ModifierWithKey { 5930 constructor(value) { 5931 super(value); 5932 } 5933 applyPeer(node, reset) { 5934 if (reset) { 5935 getUINativeModule().grid.resetCachedCount(node); 5936 } 5937 else { 5938 getUINativeModule().grid.setCachedCount(node, this.value); 5939 } 5940 } 5941} 5942GridCachedCountModifier.identity = Symbol('gridCachedCount'); 5943class GridMultiSelectableModifier extends ModifierWithKey { 5944 constructor(value) { 5945 super(value); 5946 } 5947 applyPeer(node, reset) { 5948 if (reset) { 5949 getUINativeModule().grid.resetMultiSelectable(node); 5950 } 5951 else { 5952 getUINativeModule().grid.setMultiSelectable(node, this.value); 5953 } 5954 } 5955} 5956GridMultiSelectableModifier.identity = Symbol('gridMultiSelectable'); 5957class GridEdgeEffectModifier extends ModifierWithKey { 5958 constructor(value) { 5959 super(value); 5960 } 5961 applyPeer(node, reset) { 5962 let _a, _b; 5963 if (reset) { 5964 getUINativeModule().grid.resetEdgeEffect(node); 5965 } 5966 else { 5967 getUINativeModule().grid.setEdgeEffect(node, (_a = this.value) === null || 5968 _a === void 0 ? void 0 : _a.value, (_b = this.value.options) === null || 5969 _b === void 0 ? void 0 : _b.alwaysEnabled); 5970 } 5971 } 5972 checkObjectDiff() { 5973 return !((this.stageValue.value === this.value.value) && 5974 (this.stageValue.options === this.value.options)); 5975 } 5976} 5977GridEdgeEffectModifier.identity = Symbol('gridEdgeEffect'); 5978class GridNestedScrollModifier extends ModifierWithKey { 5979 constructor(value) { 5980 super(value); 5981 } 5982 applyPeer(node, reset) { 5983 let _a, _b; 5984 if (reset) { 5985 getUINativeModule().grid.resetNestedScroll(node); 5986 } 5987 else { 5988 getUINativeModule().grid.setNestedScroll(node, (_a = this.value) === null || 5989 _a === void 0 ? void 0 : _a.scrollForward, (_b = this.value) === null || 5990 _b === void 0 ? void 0 : _b.scrollBackward); 5991 } 5992 } 5993 checkObjectDiff() { 5994 return !((this.stageValue.scrollForward === this.value.scrollForward) && 5995 (this.stageValue.scrollBackward === this.value.scrollBackward)); 5996 } 5997} 5998GridNestedScrollModifier.identity = Symbol('gridNestedScroll'); 5999class GridEnableScrollModifier extends ModifierWithKey { 6000 constructor(value) { 6001 super(value); 6002 } 6003 applyPeer(node, reset) { 6004 if (reset) { 6005 getUINativeModule().grid.resetEnableScroll(node); 6006 } 6007 else { 6008 getUINativeModule().grid.setEnableScroll(node, this.value); 6009 } 6010 } 6011} 6012GridEnableScrollModifier.identity = Symbol('gridEnableScroll'); 6013class GridFrictionModifier extends ModifierWithKey { 6014 constructor(value) { 6015 super(value); 6016 } 6017 applyPeer(node, reset) { 6018 if (reset) { 6019 getUINativeModule().grid.resetFriction(node); 6020 } 6021 else { 6022 getUINativeModule().grid.setFriction(node, this.value); 6023 } 6024 } 6025 checkObjectDiff() { 6026 return !isBaseOrResourceEqual(this.stageValue, this.value); 6027 } 6028} 6029GridFrictionModifier.identity = Symbol('gridFriction'); 6030class GridMaxCountModifier extends ModifierWithKey { 6031 constructor(value) { 6032 super(value); 6033 } 6034 applyPeer(node, reset) { 6035 if (reset) { 6036 getUINativeModule().grid.resetMaxCount(node); 6037 } 6038 else { 6039 getUINativeModule().grid.setMaxCount(node, this.value); 6040 } 6041 } 6042} 6043GridMaxCountModifier.identity = Symbol('gridMaxCount'); 6044class GridMinCountModifier extends ModifierWithKey { 6045 constructor(value) { 6046 super(value); 6047 } 6048 applyPeer(node, reset) { 6049 if (reset) { 6050 getUINativeModule().grid.resetMinCount(node); 6051 } 6052 else { 6053 getUINativeModule().grid.setMinCount(node, this.value); 6054 } 6055 } 6056} 6057GridMinCountModifier.identity = Symbol('gridMinCount'); 6058class GridCellLengthModifier extends ModifierWithKey { 6059 constructor(value) { 6060 super(value); 6061 } 6062 applyPeer(node, reset) { 6063 if (reset) { 6064 getUINativeModule().grid.resetCellLength(node); 6065 } 6066 else { 6067 getUINativeModule().grid.setCellLength(node, this.value); 6068 } 6069 } 6070} 6071GridCellLengthModifier.identity = Symbol('gridCellLength'); 6072class GridLayoutDirectionModifier extends ModifierWithKey { 6073 constructor(value) { 6074 super(value); 6075 } 6076 applyPeer(node, reset) { 6077 if (reset) { 6078 getUINativeModule().grid.resetLayoutDirection(node); 6079 } 6080 else { 6081 getUINativeModule().grid.setLayoutDirection(node, this.value); 6082 } 6083 } 6084} 6085GridLayoutDirectionModifier.identity = Symbol('gridLayoutDirection'); 6086class GridSupportAnimationModifier extends ModifierWithKey { 6087 constructor(value) { 6088 super(value); 6089 } 6090 applyPeer(node, reset) { 6091 if (reset) { 6092 getUINativeModule().grid.resetSupportAnimation(node); 6093 } 6094 else { 6095 getUINativeModule().grid.setSupportAnimation(node, this.value); 6096 } 6097 } 6098} 6099GridSupportAnimationModifier.identity = Symbol('gridSupportAnimation'); 6100class GridClipModifier extends ModifierWithKey { 6101 constructor(value) { 6102 super(value); 6103 } 6104 applyPeer(node, reset) { 6105 if (reset) { 6106 getUINativeModule().common.resetClipWithEdge(node); 6107 } 6108 else { 6109 getUINativeModule().common.setClipWithEdge(node, this.value); 6110 } 6111 } 6112 checkObjectDiff() { 6113 return true; 6114 } 6115} 6116GridClipModifier.identity = Symbol('gridClip'); 6117class GridFlingSpeedLimitModifier extends ModifierWithKey { 6118 constructor(value) { 6119 super(value); 6120 } 6121 applyPeer(node, reset) { 6122 if (reset) { 6123 getUINativeModule().grid.resetFlingSpeedLimit(node); 6124 } 6125 else { 6126 getUINativeModule().grid.setFlingSpeedLimit(node, this.value); 6127 } 6128 } 6129} 6130GridFlingSpeedLimitModifier.identity = Symbol('gridFlingSpeedLimit'); 6131class GridAlignItemsModifier extends ModifierWithKey { 6132 constructor(value) { 6133 super(value); 6134 } 6135 applyPeer(node, reset) { 6136 if (reset) { 6137 getUINativeModule().grid.resetAlignItems(node); 6138 } 6139 else { 6140 getUINativeModule().grid.setAlignItems(node, this.value); 6141 } 6142 } 6143} 6144GridAlignItemsModifier.identity = Symbol('gridAlignItems'); 6145// @ts-ignore 6146if (globalThis.Grid !== undefined) { 6147 globalThis.Grid.attributeModifier = function (modifier) { 6148 attributeModifierFunc.call(this, modifier, (nativePtr) => { 6149 return new ArkGridComponent(nativePtr); 6150 }, (nativePtr, classType, modifierJS) => { 6151 return new modifierJS.GridModifier(nativePtr, classType); 6152 }); 6153 }; 6154} 6155 6156/// <reference path='./import.ts' /> 6157class GridColSpanModifier extends ModifierWithKey { 6158 constructor(value) { 6159 super(value); 6160 } 6161 applyPeer(node, reset) { 6162 if (reset) { 6163 getUINativeModule().gridCol.resetSpan(node); 6164 } 6165 else { 6166 if (isNumber(this.value)) { 6167 getUINativeModule().gridCol.setSpan(node, this.value, this.value, this.value, this.value, this.value, this.value); 6168 } 6169 else { 6170 getUINativeModule().gridCol.setSpan(node, this.value.xs, this.value.sm, this.value.md, this.value.lg, this.value.xl, this.value.xxl); 6171 } 6172 } 6173 } 6174 checkObjectDiff() { 6175 if (isNumber(this.stageValue) && isNumber(this.value)) { 6176 return this.stageValue !== this.value; 6177 } 6178 else if (isObject(this.stageValue) && isObject(this.value)) { 6179 return this.stageValue?.xs !== this.value?.xs || 6180 this.stageValue?.sm !== this.value?.sm || 6181 this.stageValue?.md !== this.value?.md || 6182 this.stageValue?.lg !== this.value?.lg || 6183 this.stageValue?.xl !== this.value?.xl || 6184 this.stageValue?.xxl !== this.value?.xxl; 6185 } 6186 else { 6187 return true; 6188 } 6189 } 6190} 6191GridColSpanModifier.identity = Symbol('gridColSpan'); 6192class GridColOffsetModifier extends ModifierWithKey { 6193 constructor(value) { 6194 super(value); 6195 } 6196 applyPeer(node, reset) { 6197 if (reset) { 6198 getUINativeModule().gridCol.resetGridColOffset(node); 6199 } 6200 else { 6201 if (isNumber(this.value)) { 6202 getUINativeModule().gridCol.setGridColOffset(node, this.value, this.value, this.value, this.value, this.value, this.value); 6203 } 6204 else { 6205 getUINativeModule().gridCol.setGridColOffset(node, this.value.xs, this.value.sm, this.value.md, this.value.lg, this.value.xl, this.value.xxl); 6206 } 6207 } 6208 } 6209 checkObjectDiff() { 6210 if (isNumber(this.stageValue) && isNumber(this.value)) { 6211 return this.stageValue !== this.value; 6212 } 6213 else if (isObject(this.stageValue) && isObject(this.value)) { 6214 return this.stageValue?.xs !== this.value?.xs || 6215 this.stageValue?.sm !== this.value?.sm || 6216 this.stageValue?.md !== this.value?.md || 6217 this.stageValue?.lg !== this.value?.lg || 6218 this.stageValue?.xl !== this.value?.xl || 6219 this.stageValue?.xxl !== this.value?.xxl; 6220 } 6221 else { 6222 return true; 6223 } 6224 } 6225} 6226GridColOffsetModifier.identity = Symbol('gridColOffset'); 6227class GridColOrderModifier extends ModifierWithKey { 6228 constructor(value) { 6229 super(value); 6230 } 6231 applyPeer(node, reset) { 6232 if (reset) { 6233 getUINativeModule().gridCol.resetOrder(node); 6234 } 6235 else { 6236 if (isNumber(this.value)) { 6237 getUINativeModule().gridCol.setOrder(node, this.value, this.value, this.value, this.value, this.value, this.value); 6238 } 6239 else { 6240 getUINativeModule().gridCol.setOrder(node, this.value.xs, this.value.sm, this.value.md, this.value.lg, this.value.xl, this.value.xxl); 6241 } 6242 } 6243 } 6244 checkObjectDiff() { 6245 if (isNumber(this.stageValue) && isNumber(this.value)) { 6246 return this.stageValue !== this.value; 6247 } 6248 else if (isObject(this.stageValue) && isObject(this.value)) { 6249 return this.stageValue?.xs !== this.value?.xs || 6250 this.stageValue?.sm !== this.value?.sm || 6251 this.stageValue?.md !== this.value?.md || 6252 this.stageValue?.lg !== this.value?.lg || 6253 this.stageValue?.xl !== this.value?.xl || 6254 this.stageValue?.xxl !== this.value?.xxl; 6255 } 6256 else { 6257 return true; 6258 } 6259 } 6260} 6261GridColOrderModifier.identity = Symbol('gridColOrder'); 6262class ArkGridColComponent extends ArkComponent { 6263 constructor(nativePtr, classType) { 6264 super(nativePtr, classType); 6265 } 6266 allowChildCount() { 6267 return 1; 6268 } 6269 span(value) { 6270 modifierWithKey(this._modifiersWithKeys, GridColSpanModifier.identity, GridColSpanModifier, value); 6271 return this; 6272 } 6273 gridColOffset(value) { 6274 modifierWithKey(this._modifiersWithKeys, GridColOffsetModifier.identity, GridColOffsetModifier, value); 6275 return this; 6276 } 6277 order(value) { 6278 modifierWithKey(this._modifiersWithKeys, GridColOrderModifier.identity, GridColOrderModifier, value); 6279 return this; 6280 } 6281 initialize(value) { 6282 if (value[0] !== undefined) { 6283 modifierWithKey(this._modifiersWithKeys, GridColSpanModifier.identity, GridColSpanModifier, value[0].span); 6284 modifierWithKey(this._modifiersWithKeys, GridColOffsetModifier.identity, GridColOffsetModifier, value[0].offset); 6285 modifierWithKey(this._modifiersWithKeys, GridColOrderModifier.identity, GridColOrderModifier, value[0].order); 6286 } else { 6287 modifierWithKey(this._modifiersWithKeys, GridColSpanModifier.identity, GridColSpanModifier, null); 6288 modifierWithKey(this._modifiersWithKeys, GridColOffsetModifier.identity, GridColOffsetModifier, null); 6289 modifierWithKey(this._modifiersWithKeys, GridColOrderModifier.identity, GridColOrderModifier, null); 6290 } 6291 return this; 6292 } 6293} 6294// @ts-ignore 6295if (globalThis.GridCol !== undefined) { 6296 globalThis.GridCol.attributeModifier = function (modifier) { 6297 attributeModifierFunc.call(this, modifier, (nativePtr) => { 6298 return new ArkGridColComponent(nativePtr); 6299 }, (nativePtr, classType, modifierJS) => { 6300 return new modifierJS.GridColModifier(nativePtr, classType); 6301 }); 6302 }; 6303} 6304 6305/// <reference path='./import.ts' /> 6306class ImageColorFilterModifier extends ModifierWithKey { 6307 constructor(value) { 6308 super(value); 6309 } 6310 applyPeer(node, reset) { 6311 if (reset) { 6312 getUINativeModule().image.resetColorFilter(node); 6313 } 6314 else { 6315 getUINativeModule().image.setColorFilter(node, this.value); 6316 } 6317 } 6318 checkObjectDiff() { 6319 return true; 6320 } 6321} 6322ImageColorFilterModifier.identity = Symbol('imageColorFilter'); 6323class ImageFillColorModifier extends ModifierWithKey { 6324 constructor(value) { 6325 super(value); 6326 } 6327 applyPeer(node, reset) { 6328 if (reset) { 6329 getUINativeModule().image.resetFillColor(node); 6330 } 6331 else { 6332 if (this.value && ((typeof this.value) === 'string')) { 6333 ArkLogConsole.info('ImageFillColorModifier set color ' + this.value); 6334 } 6335 getUINativeModule().image.setFillColor(node, this.value); 6336 } 6337 } 6338 checkObjectDiff() { 6339 return !isBaseOrResourceEqual(this.stageValue, this.value); 6340 } 6341} 6342ImageFillColorModifier.identity = Symbol('imageFillColor'); 6343class ImageAltModifier extends ModifierWithKey { 6344 constructor(value) { 6345 super(value); 6346 } 6347 applyPeer(node, reset) { 6348 if (reset) { 6349 getUINativeModule().image.resetAlt(node); 6350 } 6351 else { 6352 getUINativeModule().image.setAlt(node, this.value); 6353 } 6354 } 6355 checkObjectDiff() { 6356 return !isBaseOrResourceEqual(this.stageValue, this.value); 6357 } 6358} 6359ImageAltModifier.identity = Symbol('imageAlt'); 6360class ImageCopyOptionModifier extends ModifierWithKey { 6361 constructor(value) { 6362 super(value); 6363 } 6364 applyPeer(node, reset) { 6365 if (reset) { 6366 getUINativeModule().image.resetCopyOption(node); 6367 } 6368 else { 6369 getUINativeModule().image.setCopyOption(node, this.value); 6370 } 6371 } 6372 checkObjectDiff() { 6373 return this.stageValue !== this.value; 6374 } 6375} 6376ImageCopyOptionModifier.identity = Symbol('imageCopyOption'); 6377class ImageAutoResizeModifier extends ModifierWithKey { 6378 constructor(value) { 6379 super(value); 6380 } 6381 applyPeer(node, reset) { 6382 if (reset) { 6383 getUINativeModule().image.resetAutoResize(node); 6384 } 6385 else { 6386 getUINativeModule().image.setAutoResize(node, this.value); 6387 } 6388 } 6389 checkObjectDiff() { 6390 return this.stageValue !== this.value; 6391 } 6392} 6393ImageAutoResizeModifier.identity = Symbol('imageAutoResize'); 6394class ImageFitOriginalSizeModifier extends ModifierWithKey { 6395 constructor(value) { 6396 super(value); 6397 } 6398 applyPeer(node, reset) { 6399 if (reset) { 6400 getUINativeModule().image.resetFitOriginalSize(node); 6401 } 6402 else { 6403 getUINativeModule().image.setFitOriginalSize(node, this.value); 6404 } 6405 } 6406 checkObjectDiff() { 6407 return this.stageValue !== this.value; 6408 } 6409} 6410ImageFitOriginalSizeModifier.identity = Symbol('imageFitOriginalSize'); 6411class ImageDraggableModifier extends ModifierWithKey { 6412 constructor(value) { 6413 super(value); 6414 } 6415 applyPeer(node, reset) { 6416 if (reset) { 6417 getUINativeModule().image.resetDraggable(node); 6418 } 6419 else { 6420 getUINativeModule().image.setDraggable(node, this.value); 6421 } 6422 } 6423 checkObjectDiff() { 6424 return this.stageValue !== this.value; 6425 } 6426} 6427ImageDraggableModifier.identity = Symbol('imageDraggable'); 6428class ImageInterpolationModifier extends ModifierWithKey { 6429 constructor(value) { 6430 super(value); 6431 } 6432 applyPeer(node, reset) { 6433 if (reset) { 6434 getUINativeModule().image.resetImageInterpolation(node); 6435 } 6436 else { 6437 getUINativeModule().image.setImageInterpolation(node, this.value); 6438 } 6439 } 6440 checkObjectDiff() { 6441 return this.stageValue !== this.value; 6442 } 6443} 6444ImageInterpolationModifier.identity = Symbol('imageInterpolation'); 6445class ImageSourceSizeModifier extends ModifierWithKey { 6446 constructor(value) { 6447 super(value); 6448 } 6449 applyPeer(node, reset) { 6450 if (reset) { 6451 getUINativeModule().image.resetSourceSize(node); 6452 } 6453 else { 6454 getUINativeModule().image.setSourceSize(node, this.value.width, this.value.height); 6455 } 6456 } 6457 checkObjectDiff() { 6458 return this.stageValue.width !== this.value.width || 6459 this.stageValue.height !== this.value.height; 6460 } 6461} 6462ImageSourceSizeModifier.identity = Symbol('imageSourceSize'); 6463class ImageMatchTextDirectionModifier extends ModifierWithKey { 6464 constructor(value) { 6465 super(value); 6466 } 6467 applyPeer(node, reset) { 6468 if (reset) { 6469 getUINativeModule().image.resetMatchTextDirection(node); 6470 } 6471 else { 6472 getUINativeModule().image.setMatchTextDirection(node, this.value); 6473 } 6474 } 6475 checkObjectDiff() { 6476 return this.stageValue !== this.value; 6477 } 6478} 6479ImageMatchTextDirectionModifier.identity = Symbol('imageMatchTextDirection'); 6480class ImageObjectRepeatModifier extends ModifierWithKey { 6481 constructor(value) { 6482 super(value); 6483 } 6484 applyPeer(node, reset) { 6485 if (reset) { 6486 getUINativeModule().image.resetObjectRepeat(node); 6487 } 6488 else { 6489 getUINativeModule().image.setObjectRepeat(node, this.value); 6490 } 6491 } 6492 checkObjectDiff() { 6493 return this.stageValue !== this.value; 6494 } 6495} 6496ImageObjectRepeatModifier.identity = Symbol('imageObjectRepeat'); 6497class ImageRenderModeModifier extends ModifierWithKey { 6498 constructor(value) { 6499 super(value); 6500 } 6501 applyPeer(node, reset) { 6502 if (reset) { 6503 getUINativeModule().image.resetRenderMode(node); 6504 } 6505 else { 6506 getUINativeModule().image.setRenderMode(node, this.value); 6507 } 6508 } 6509 checkObjectDiff() { 6510 return this.stageValue !== this.value; 6511 } 6512} 6513ImageRenderModeModifier.identity = Symbol('imageRenderMode'); 6514class ImageSyncLoadModifier extends ModifierWithKey { 6515 constructor(value) { 6516 super(value); 6517 } 6518 applyPeer(node, reset) { 6519 if (reset) { 6520 getUINativeModule().image.resetSyncLoad(node); 6521 } 6522 else { 6523 getUINativeModule().image.setSyncLoad(node, this.value); 6524 } 6525 } 6526 checkObjectDiff() { 6527 return this.stageValue !== this.value; 6528 } 6529} 6530ImageSyncLoadModifier.identity = Symbol('imageSyncLoad'); 6531class ImageeEdgeAntialiasingModifier extends ModifierWithKey { 6532 constructor(value) { 6533 super(value); 6534 } 6535 applyPeer(node, reset) { 6536 if (reset) { 6537 getUINativeModule().image.resetEdgeAntialiasing(node); 6538 } else { 6539 getUINativeModule().image.setEdgeAntialiasing(node, this.value); 6540 } 6541 } 6542} 6543ImageeEdgeAntialiasingModifier.identity = Symbol('edgeAntialiasing'); 6544class ImageObjectFitModifier extends ModifierWithKey { 6545 constructor(value) { 6546 super(value); 6547 } 6548 applyPeer(node, reset) { 6549 if (reset) { 6550 getUINativeModule().image.resetObjectFit(node); 6551 } 6552 else { 6553 getUINativeModule().image.setObjectFit(node, this.value); 6554 } 6555 } 6556 checkObjectDiff() { 6557 return this.stageValue !== this.value; 6558 } 6559} 6560ImageObjectFitModifier.identity = Symbol('imageObjectFit'); 6561class ImageBorderRadiusModifier extends ModifierWithKey { 6562 constructor(value) { 6563 super(value); 6564 } 6565 applyPeer(node, reset) { 6566 if (reset) { 6567 getUINativeModule().image.resetBorderRadius(node); 6568 } 6569 else { 6570 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 6571 getUINativeModule().image.setBorderRadius(node, this.value, this.value, this.value, this.value); 6572 } 6573 else { 6574 getUINativeModule().image.setBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 6575 } 6576 } 6577 } 6578 checkObjectDiff() { 6579 if (isResource(this.stageValue) && isResource(this.value)) { 6580 return !isResourceEqual(this.stageValue, this.value); 6581 } 6582 else if (!isResource(this.stageValue) && !isResource(this.value)) { 6583 return !(this.stageValue.topLeft === this.value.topLeft && 6584 this.stageValue.topRight === this.value.topRight && 6585 this.stageValue.bottomLeft === this.value.bottomLeft && 6586 this.stageValue.bottomRight === this.value.bottomRight); 6587 } 6588 else { 6589 return true; 6590 } 6591 } 6592} 6593ImageBorderRadiusModifier.identity = Symbol('imageBorderRadius'); 6594class ImageBorderModifier extends ModifierWithKey { 6595 constructor(value) { 6596 super(value); 6597 } 6598 applyPeer(node, reset) { 6599 if (reset) { 6600 getUINativeModule().image.resetImageBorder(node); 6601 } else { 6602 let widthLeft; 6603 let widthRight; 6604 let widthTop; 6605 let widthBottom; 6606 if (!isUndefined(this.value.width) && this.value.width != null) { 6607 if (isNumber(this.value.width) || isString(this.value.width) || isResource(this.value.width)) { 6608 widthLeft = this.value.width; 6609 widthRight = this.value.width; 6610 widthTop = this.value.width; 6611 widthBottom = this.value.width; 6612 } else { 6613 widthLeft = this.value.width.left; 6614 widthRight = this.value.width.right; 6615 widthTop = this.value.width.top; 6616 widthBottom = this.value.width.bottom; 6617 } 6618 } 6619 let leftColor; 6620 let rightColor; 6621 let topColor; 6622 let bottomColor; 6623 if (!isUndefined(this.value.color) && this.value.color !== null) { 6624 if (isNumber(this.value.color) || isString(this.value.color) || isResource(this.value.color)) { 6625 leftColor = this.value.color; 6626 rightColor = this.value.color; 6627 topColor = this.value.color; 6628 bottomColor = this.value.color; 6629 } else { 6630 leftColor = this.value.color.left; 6631 rightColor = this.value.color.right; 6632 topColor = this.value.color.top; 6633 bottomColor = this.value.color.bottom; 6634 } 6635 } 6636 let topLeft; 6637 let topRight; 6638 let bottomLeft; 6639 let bottomRight; 6640 if (!isUndefined(this.value.radius) && this.value.radius !== null) { 6641 if (isNumber(this.value.radius) || isString(this.value.radius) || isResource(this.value.radius)) { 6642 topLeft = this.value.radius; 6643 topRight = this.value.radius; 6644 bottomLeft = this.value.radius; 6645 bottomRight = this.value.radius; 6646 } else { 6647 topLeft = this.value.radius.topLeft; 6648 topRight = this.value.radius.topRight; 6649 bottomLeft = this.value.radius.bottomLeft; 6650 bottomRight = this.value.radius.bottomRight; 6651 } 6652 } 6653 let styleTop; 6654 let styleRight; 6655 let styleBottom; 6656 let styleLeft; 6657 if (!isUndefined(this.value.style) && this.value.style !== null) { 6658 if (isNumber(this.value.style) || isString(this.value.style) || isResource(this.value.style)) { 6659 styleTop = this.value.style; 6660 styleRight = this.value.style; 6661 styleBottom = this.value.style; 6662 styleLeft = this.value.style; 6663 } else { 6664 styleTop = this.value.style.top; 6665 styleRight = this.value.style.right; 6666 styleBottom = this.value.style.bottom; 6667 styleLeft = this.value.style.left; 6668 } 6669 } 6670 getUINativeModule().image.setImageBorder( 6671 node, 6672 widthLeft, 6673 widthRight, 6674 widthTop, 6675 widthBottom, 6676 leftColor, 6677 rightColor, 6678 topColor, 6679 bottomColor, 6680 topLeft, 6681 topRight, 6682 bottomLeft, 6683 bottomRight, 6684 styleTop, 6685 styleRight, 6686 styleBottom, 6687 styleLeft 6688 ); 6689 } 6690 } 6691 checkObjectDiff() { 6692 return ( 6693 !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 6694 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 6695 !isBaseOrResourceEqual(this.stageValue.radius, this.value.radius) || 6696 !isBaseOrResourceEqual(this.stageValue.style, this.value.style) 6697 ); 6698 } 6699} 6700ImageBorderModifier.identity = Symbol('imageBorder'); 6701class ImageOpacityModifier extends ModifierWithKey { 6702 constructor(value) { 6703 super(value); 6704 } 6705 applyPeer(node, reset) { 6706 if (reset) { 6707 getUINativeModule().image.resetImageOpacity(node); 6708 } else { 6709 getUINativeModule().image.setImageOpacity(node, this.value); 6710 } 6711 } 6712 checkObjectDiff() { 6713 return !isBaseOrResourceEqual(this.stageValue, this.value); 6714 } 6715} 6716ImageOpacityModifier.identity = Symbol('imageOpacity'); 6717class ImageTransitionModifier extends ModifierWithKey { 6718 constructor(value) { 6719 super(value); 6720 } 6721 applyPeer(node, reset) { 6722 if (reset) { 6723 getUINativeModule().image.resetImageTransition(node); 6724 } else { 6725 getUINativeModule().image.setImageTransition(node, this.value); 6726 } 6727 } 6728} 6729ImageTransitionModifier.identity = Symbol('imageTransition'); 6730class ImagePointLightModifier extends ModifierWithKey { 6731 constructor(value) { 6732 super(value); 6733 } 6734 applyPeer(node, reset) { 6735 if (reset) { 6736 getUINativeModule().common.resetPointLightStyle(node); 6737 } else { 6738 let positionX; 6739 let positionY; 6740 let positionZ; 6741 let intensity; 6742 let color; 6743 let illuminated; 6744 let bloom; 6745 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 6746 positionX = this.value.lightSource.positionX; 6747 positionY = this.value.lightSource.positionY; 6748 positionZ = this.value.lightSource.positionZ; 6749 intensity = this.value.lightSource.intensity; 6750 color = this.value.lightSource.color; 6751 } 6752 illuminated = this.value.illuminated; 6753 bloom = this.value.bloom; 6754 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 6755 illuminated, bloom); 6756 } 6757 } 6758 checkObjectDiff() { 6759 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 6760 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 6761 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 6762 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 6763 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 6764 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 6765 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 6766 } 6767} 6768ImagePointLightModifier.identity = Symbol('imagePointLight'); 6769class ImageeResizableModifier extends ModifierWithKey { 6770 constructor(value) { 6771 super(value); 6772 } 6773 applyPeer(node, reset) { 6774 if (reset) { 6775 getUINativeModule().image.resetResizable(node); 6776 } else { 6777 if (!isUndefined(this.value.lattice)) { 6778 getUINativeModule().image.setResizableLattice(node, this.value.lattice); 6779 } 6780 let sliceTop; 6781 let sliceRight; 6782 let sliceBottom; 6783 let sliceLeft; 6784 if (!isUndefined(this.value.slice)) { 6785 let tmpSlice = this.value.slice; 6786 sliceTop = tmpSlice.top; 6787 sliceRight = tmpSlice.right; 6788 sliceBottom = tmpSlice.bottom; 6789 sliceLeft = tmpSlice.left; 6790 } 6791 getUINativeModule().image.setResizable(node, sliceTop, sliceRight, sliceBottom, sliceLeft); 6792 } 6793 } 6794} 6795ImageeResizableModifier.identity = Symbol('resizable'); 6796class ImageSrcModifier extends ModifierWithKey { 6797 constructor(value) { 6798 super(value); 6799 } 6800 applyPeer(node, reset) { 6801 if (reset) { 6802 getUINativeModule().image.setImageShowSrc(node, ''); 6803 } 6804 else { 6805 getUINativeModule().image.setImageShowSrc(node, this.value); 6806 } 6807 } 6808} 6809ImageSrcModifier.identity = Symbol('imageShowSrc'); 6810class ImageDynamicRangeModeModifier extends ModifierWithKey { 6811 constructor(value) { 6812 super(value); 6813 } 6814 applyPeer(node, reset) { 6815 if (reset) { 6816 getUINativeModule().image.resetDynamicRangeMode(node); 6817 } 6818 else { 6819 getUINativeModule().image.setDynamicRangeMode(node, this.value); 6820 } 6821 } 6822 checkObjectDiff() { 6823 return this.stageValue !== this.value; 6824 } 6825} 6826ImageDynamicRangeModeModifier.identity = Symbol('dynamicRangeMode'); 6827class ImageEnhancedImageQualityModifier extends ModifierWithKey { 6828 constructor(value) { 6829 super(value); 6830 } 6831 applyPeer(node, reset) { 6832 if (reset) { 6833 getUINativeModule().image.resetEnhancedImageQuality(node); 6834 } 6835 else { 6836 getUINativeModule().image.setEnhancedImageQuality(node, this.value); 6837 } 6838 } 6839 checkObjectDiff() { 6840 return this.stageValue !== this.value; 6841 } 6842} 6843ImageObjectFitModifier.identity = Symbol('enhancedImageQuality'); 6844 6845class ImageEnableAnalyzerModifier extends ModifierWithKey { 6846 constructor(value) { 6847 super(value); 6848 } 6849 applyPeer(node, reset) { 6850 if (reset) { 6851 getUINativeModule().image.enableAnalyzer(node, ''); 6852 } else { 6853 getUINativeModule().image.enableAnalyzer(node, this.value); 6854 } 6855 } 6856} 6857ImageEnableAnalyzerModifier.identity = Symbol('enableAnalyzer'); 6858 6859class ImageAnalyzerConfigModifier extends ModifierWithKey { 6860 constructor(value) { 6861 super(value); 6862 } 6863 applyPeer(node, reset) { 6864 if (reset) { 6865 getUINativeModule().image.analyzerConfig(node, ''); 6866 } 6867 else { 6868 getUINativeModule().image.analyzerConfig(node, this.value); 6869 } 6870 } 6871} 6872ImageAnalyzerConfigModifier.identity = Symbol('analyzerConfig'); 6873 6874class ImagePrivacySensitiveModifier extends ModifierWithKey { 6875 constructor(value) { 6876 super(value); 6877 } 6878 applyPeer(node, reset) { 6879 if (reset) { 6880 getUINativeModule().image.resetPrivacySensitive(node); 6881 } 6882 else { 6883 getUINativeModule().image.setPrivacySensitive(node, this.value); 6884 } 6885 } 6886 checkObjectDiff() { 6887 return !isBaseOrResourceEqual(this.stageValue, this.value); 6888 } 6889} 6890ImagePrivacySensitiveModifier.identity = Symbol('imagePrivacySensitive'); 6891 6892class ImageOnCompleteModifier extends ModifierWithKey { 6893 constructor(value) { 6894 super(value); 6895 } 6896 applyPeer(node, reset) { 6897 if (reset) { 6898 getUINativeModule().image.resetOnComplete(node); 6899 } else { 6900 getUINativeModule().image.setOnComplete(node, this.value); 6901 } 6902 } 6903} 6904ImageOnCompleteModifier.identity = Symbol('imageOnComplete'); 6905 6906class ImageOnErrorModifier extends ModifierWithKey { 6907 constructor(value) { 6908 super(value); 6909 } 6910 applyPeer(node, reset) { 6911 if (reset) { 6912 getUINativeModule().image.resetOnError(node); 6913 } 6914 else { 6915 getUINativeModule().image.setOnError(node, this.value); 6916 } 6917 } 6918} 6919ImageOnErrorModifier.identity = Symbol('imageOnError'); 6920 6921class ImageOnFinishModifier extends ModifierWithKey { 6922 constructor(value) { 6923 super(value); 6924 } 6925 applyPeer(node, reset) { 6926 if (reset) { 6927 getUINativeModule().image.resetOnFinish(node); 6928 } else { 6929 getUINativeModule().image.setOnFinish(node, this.value); 6930 } 6931 } 6932} 6933ImageOnFinishModifier.identity = Symbol('imageOnFinish'); 6934 6935class ArkImageComponent extends ArkComponent { 6936 constructor(nativePtr, classType) { 6937 super(nativePtr, classType); 6938 } 6939 initialize(value) { 6940 modifierWithKey(this._modifiersWithKeys, ImageSrcModifier.identity, ImageSrcModifier, value[0]); 6941 return this; 6942 } 6943 allowChildCount() { 6944 return 0; 6945 } 6946 draggable(value) { 6947 modifierWithKey(this._modifiersWithKeys, ImageDraggableModifier.identity, ImageDraggableModifier, value); 6948 return this; 6949 } 6950 edgeAntialiasing(value) { 6951 modifierWithKey(this._modifiersWithKeys, ImageeEdgeAntialiasingModifier.identity, ImageeEdgeAntialiasingModifier, value); 6952 return this; 6953 } 6954 resizable(value) { 6955 modifierWithKey(this._modifiersWithKeys, ImageeResizableModifier.identity, ImageeResizableModifier, value); 6956 return this; 6957 } 6958 alt(value) { 6959 modifierWithKey(this._modifiersWithKeys, ImageAltModifier.identity, ImageAltModifier, value); 6960 return this; 6961 } 6962 matchTextDirection(value) { 6963 modifierWithKey(this._modifiersWithKeys, ImageMatchTextDirectionModifier.identity, ImageMatchTextDirectionModifier, value); 6964 return this; 6965 } 6966 fitOriginalSize(value) { 6967 modifierWithKey(this._modifiersWithKeys, ImageFitOriginalSizeModifier.identity, ImageFitOriginalSizeModifier, value); 6968 return this; 6969 } 6970 fillColor(value) { 6971 modifierWithKey(this._modifiersWithKeys, ImageFillColorModifier.identity, ImageFillColorModifier, value); 6972 return this; 6973 } 6974 objectFit(value) { 6975 modifierWithKey(this._modifiersWithKeys, ImageObjectFitModifier.identity, ImageObjectFitModifier, value); 6976 return this; 6977 } 6978 objectRepeat(value) { 6979 modifierWithKey(this._modifiersWithKeys, ImageObjectRepeatModifier.identity, ImageObjectRepeatModifier, value); 6980 return this; 6981 } 6982 autoResize(value) { 6983 modifierWithKey(this._modifiersWithKeys, ImageAutoResizeModifier.identity, ImageAutoResizeModifier, value); 6984 return this; 6985 } 6986 renderMode(value) { 6987 modifierWithKey(this._modifiersWithKeys, ImageRenderModeModifier.identity, ImageRenderModeModifier, value); 6988 return this; 6989 } 6990 interpolation(value) { 6991 modifierWithKey(this._modifiersWithKeys, ImageInterpolationModifier.identity, ImageInterpolationModifier, value); 6992 return this; 6993 } 6994 pointLight(value) { 6995 modifierWithKey(this._modifiersWithKeys, ImagePointLightModifier.identity, ImagePointLightModifier, value); 6996 return this; 6997 } 6998 sourceSize(value) { 6999 modifierWithKey(this._modifiersWithKeys, ImageSourceSizeModifier.identity, ImageSourceSizeModifier, value); 7000 return this; 7001 } 7002 syncLoad(value) { 7003 modifierWithKey(this._modifiersWithKeys, ImageSyncLoadModifier.identity, ImageSyncLoadModifier, value); 7004 return this; 7005 } 7006 colorFilter(value) { 7007 modifierWithKey(this._modifiersWithKeys, ImageColorFilterModifier.identity, ImageColorFilterModifier, value); 7008 return this; 7009 } 7010 copyOption(value) { 7011 modifierWithKey(this._modifiersWithKeys, ImageCopyOptionModifier.identity, ImageCopyOptionModifier, value); 7012 return this; 7013 } 7014 borderRadius(value) { 7015 modifierWithKey(this._modifiersWithKeys, ImageBorderRadiusModifier.identity, ImageBorderRadiusModifier, value); 7016 return this; 7017 } 7018 onComplete(callback) { 7019 modifierWithKey(this._modifiersWithKeys, ImageOnCompleteModifier.identity, ImageOnCompleteModifier, callback); 7020 return this; 7021 } 7022 onError(callback) { 7023 modifierWithKey(this._modifiersWithKeys, ImageOnErrorModifier.identity, ImageOnErrorModifier, callback); 7024 return this; 7025 } 7026 onFinish(event) { 7027 modifierWithKey(this._modifiersWithKeys, ImageOnFinishModifier.identity, ImageOnFinishModifier, event); 7028 return this; 7029 } 7030 border(value) { 7031 modifierWithKey(this._modifiersWithKeys, ImageBorderModifier.identity, ImageBorderModifier, value); 7032 return this; 7033 } 7034 opacity(value) { 7035 modifierWithKey(this._modifiersWithKeys, ImageOpacityModifier.identity, ImageOpacityModifier, value); 7036 return this; 7037 } 7038 transition(value) { 7039 modifierWithKey(this._modifiersWithKeys, ImageTransitionModifier.identity, ImageTransitionModifier, value); 7040 return this; 7041 } 7042 dynamicRangeMode(value) { 7043 modifierWithKey( 7044 this._modifiersWithKeys, ImageDynamicRangeModeModifier.identity, ImageDynamicRangeModeModifier, value); 7045 return this; 7046 } 7047 enhancedImageQuality(value) { 7048 modifierWithKey( 7049 this._modifiersWithKeys, ImageEnhancedImageQualityModifier.identity, ImageEnhancedImageQualityModifier, value); 7050 return this; 7051 } 7052 enableAnalyzer(value) { 7053 modifierWithKey( 7054 this._modifiersWithKeys, ImageEnableAnalyzerModifier.identity, ImageEnableAnalyzerModifier, value); 7055 return this; 7056 } 7057 privacySensitive(value) { 7058 modifierWithKey( 7059 this._modifiersWithKeys, ImagePrivacySensitiveModifier.identity, ImagePrivacySensitiveModifier, value); 7060 return this; 7061 } 7062 analyzerConfig(value) { 7063 modifierWithKey( 7064 this._modifiersWithKeys, ImageAnalyzerConfigModifier.identity, ImageAnalyzerConfigModifier, value); 7065 return this; 7066 } 7067} 7068// @ts-ignore 7069if (globalThis.Image !== undefined) { 7070 globalThis.Image.attributeModifier = function (modifier) { 7071 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7072 return new ArkImageComponent(nativePtr); 7073 }, (nativePtr, classType, modifierJS) => { 7074 return new modifierJS.ImageModifier(nativePtr, classType); 7075 }); 7076 }; 7077} 7078 7079/// <reference path='./import.ts' /> 7080class ImageAnimatorImagesModifier extends ModifierWithKey { 7081 constructor(value) { 7082 super(value); 7083 } 7084 applyPeer(node, reset) { 7085 if (reset) { 7086 getUINativeModule().imageAnimator.resetImages(node); 7087 } 7088 else { 7089 let arkImageFrame = this.convertImageFrames(this.value); 7090 if (!arkImageFrame) { 7091 getUINativeModule().imageAnimator.resetImages(node); 7092 } 7093 else { 7094 getUINativeModule().imageAnimator.setImages(node, arkImageFrame.arrSrc, 7095 arkImageFrame.arrWidth, arkImageFrame.arrHeight, arkImageFrame.arrTop, 7096 arkImageFrame.arrLeft, arkImageFrame.arrDuration, arkImageFrame.arrSrc.length); 7097 } 7098 } 7099 } 7100 checkObjectDiff() { 7101 let checkDiff = true; 7102 if (this.value && this.value.length > 0 && 7103 this.stageValue && this.stageValue.length > 0 && 7104 this.value.length === this.stageValue.length) { 7105 let checkItemEqual = false; 7106 for (let i = 0; i < this.value.length; i++) { 7107 checkItemEqual = this.isEqual(this.stageValue[i], this.value[i]); 7108 if (!checkItemEqual) { 7109 checkDiff = !checkItemEqual; 7110 break; 7111 } 7112 } 7113 } 7114 return checkDiff; 7115 } 7116 isEqual(one, another) { 7117 if (!(one.width === another.width && 7118 one.height === another.height && 7119 one.top === another.top && 7120 one.left === another.left && 7121 one.duration === another.duration)) { 7122 return true; 7123 } 7124 else { 7125 return !isBaseOrResourceEqual(one.src, another.src); 7126 } 7127 } 7128 convertImageFrames(value) { 7129 if (value && value.length > 0) { 7130 let isFlag = true; 7131 for (let item of value) { 7132 if (item.src === undefined || item.src === null) { 7133 isFlag = false; 7134 break; 7135 } 7136 } 7137 if (isFlag) { 7138 let array = new ArkImageFrameInfoToArray(); 7139 for (let item of value) { 7140 array.arrSrc.push(item.src); 7141 array.arrWidth.push((item.width === undefined || item.width === null) ? 0 : item.width); 7142 array.arrHeight.push((item.height === undefined || item.height === null) ? 0 : item.height); 7143 array.arrTop.push((item.top === undefined || item.top === null) ? 0 : item.top); 7144 array.arrLeft.push((item.left === undefined || item.left === null) ? 0 : item.left); 7145 array.arrDuration.push((item.duration === undefined || item.duration === null) ? 0 : item.duration); 7146 } 7147 return array; 7148 } 7149 else { 7150 return undefined; 7151 } 7152 } 7153 else { 7154 return undefined; 7155 } 7156 } 7157} 7158ImageAnimatorImagesModifier.identity = Symbol('imageAnimatorImages'); 7159class ImageAnimatorDurationModifier extends ModifierWithKey { 7160 constructor(value) { 7161 super(value); 7162 } 7163 applyPeer(node, reset) { 7164 if (reset) { 7165 getUINativeModule().imageAnimator.resetDuration(node); 7166 } 7167 else { 7168 getUINativeModule().imageAnimator.setDuration(node, this.value); 7169 } 7170 } 7171 checkObjectDiff() { 7172 return this.stageValue !== this.value; 7173 } 7174} 7175ImageAnimatorDurationModifier.identity = Symbol('imageAnimatorDuration'); 7176class ImageAnimatorReverseModifier extends ModifierWithKey { 7177 constructor(value) { 7178 super(value); 7179 } 7180 applyPeer(node, reset) { 7181 if (reset) { 7182 getUINativeModule().imageAnimator.resetReverse(node); 7183 } 7184 else { 7185 getUINativeModule().imageAnimator.setReverse(node, this.value); 7186 } 7187 } 7188 checkObjectDiff() { 7189 return this.stageValue !== this.value; 7190 } 7191} 7192ImageAnimatorReverseModifier.identity = Symbol('imageAnimatorReverse'); 7193class ImageAnimatorStateModifier extends ModifierWithKey { 7194 constructor(value) { 7195 super(value); 7196 } 7197 applyPeer(node, reset) { 7198 if (reset) { 7199 getUINativeModule().imageAnimator.resetState(node); 7200 } 7201 else { 7202 getUINativeModule().imageAnimator.setState(node, this.value); 7203 } 7204 } 7205 checkObjectDiff() { 7206 return this.stageValue !== this.value; 7207 } 7208} 7209ImageAnimatorStateModifier.identity = Symbol('imageAnimatorState'); 7210class ImageAnimatorFixedSizeModifier extends ModifierWithKey { 7211 constructor(value) { 7212 super(value); 7213 } 7214 applyPeer(node, reset) { 7215 if (reset) { 7216 getUINativeModule().imageAnimator.resetFixedSize(node); 7217 } 7218 else { 7219 getUINativeModule().imageAnimator.setFixedSize(node, this.value); 7220 } 7221 } 7222 checkObjectDiff() { 7223 return this.stageValue !== this.value; 7224 } 7225} 7226ImageAnimatorFixedSizeModifier.identity = Symbol('imageAnimatorFixedSize'); 7227class ImageAnimatorFillModeModifier extends ModifierWithKey { 7228 constructor(value) { 7229 super(value); 7230 } 7231 applyPeer(node, reset) { 7232 if (reset) { 7233 getUINativeModule().imageAnimator.resetFillMode(node); 7234 } 7235 else { 7236 getUINativeModule().imageAnimator.setFillMode(node, this.value); 7237 } 7238 } 7239 checkObjectDiff() { 7240 return this.stageValue !== this.value; 7241 } 7242} 7243ImageAnimatorFillModeModifier.identity = Symbol('imageAnimatorFillMode'); 7244class ImageAnimatorIterationsModeModifier extends ModifierWithKey { 7245 constructor(value) { 7246 super(value); 7247 } 7248 applyPeer(node, reset) { 7249 if (reset) { 7250 getUINativeModule().imageAnimator.resetIterations(node); 7251 } 7252 else { 7253 getUINativeModule().imageAnimator.setIterations(node, this.value); 7254 } 7255 } 7256 checkObjectDiff() { 7257 return this.stageValue !== this.value; 7258 } 7259} 7260ImageAnimatorIterationsModeModifier.identity = Symbol('imageAnimatorIterationsMode'); 7261class ArkImageAnimatorComponent extends ArkComponent { 7262 constructor(nativePtr, classType) { 7263 super(nativePtr, classType); 7264 } 7265 images(value) { 7266 modifierWithKey(this._modifiersWithKeys, ImageAnimatorImagesModifier.identity, ImageAnimatorImagesModifier, value); 7267 return this; 7268 } 7269 state(value) { 7270 modifierWithKey(this._modifiersWithKeys, ImageAnimatorStateModifier.identity, ImageAnimatorStateModifier, value); 7271 return this; 7272 } 7273 duration(value) { 7274 modifierWithKey(this._modifiersWithKeys, ImageAnimatorDurationModifier.identity, ImageAnimatorDurationModifier, value); 7275 return this; 7276 } 7277 reverse(value) { 7278 modifierWithKey(this._modifiersWithKeys, ImageAnimatorReverseModifier.identity, ImageAnimatorReverseModifier, value); 7279 return this; 7280 } 7281 fixedSize(value) { 7282 modifierWithKey(this._modifiersWithKeys, ImageAnimatorFixedSizeModifier.identity, ImageAnimatorFixedSizeModifier, value); 7283 return this; 7284 } 7285 preDecode(value) { 7286 throw new Error('Method not implemented.'); 7287 } 7288 fillMode(value) { 7289 modifierWithKey(this._modifiersWithKeys, ImageAnimatorFillModeModifier.identity, ImageAnimatorFillModeModifier, value); 7290 return this; 7291 } 7292 iterations(value) { 7293 modifierWithKey(this._modifiersWithKeys, ImageAnimatorIterationsModeModifier.identity, ImageAnimatorIterationsModeModifier, value); 7294 return this; 7295 } 7296 onStart(event) { 7297 throw new Error('Method not implemented.'); 7298 } 7299 onPause(event) { 7300 throw new Error('Method not implemented.'); 7301 } 7302 onRepeat(event) { 7303 throw new Error('Method not implemented.'); 7304 } 7305 onCancel(event) { 7306 throw new Error('Method not implemented.'); 7307 } 7308 onFinish(event) { 7309 throw new Error('Method not implemented.'); 7310 } 7311} 7312// @ts-ignore 7313if (globalThis.ImageAnimator !== undefined) { 7314 globalThis.ImageAnimator.attributeModifier = function (modifier) { 7315 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7316 return new ArkImageAnimatorComponent(nativePtr); 7317 }, (nativePtr, classType, modifierJS) => { 7318 return new modifierJS.ImageAnimatorModifier(nativePtr, classType); 7319 }); 7320 }; 7321} 7322 7323/// <reference path='./import.ts' /> 7324class ImageSpanObjectFitModifier extends ModifierWithKey { 7325 constructor(value) { 7326 super(value); 7327 } 7328 applyPeer(node, reset) { 7329 if (reset) { 7330 getUINativeModule().imageSpan.resetObjectFit(node); 7331 } 7332 else { 7333 getUINativeModule().imageSpan.setObjectFit(node, this.value); 7334 } 7335 } 7336 checkObjectDiff() { 7337 return this.stageValue !== this.value; 7338 } 7339} 7340ImageSpanObjectFitModifier.identity = Symbol('imageSpanObjectFit'); 7341class ImageSpanVerticalAlignModifier extends ModifierWithKey { 7342 constructor(value) { 7343 super(value); 7344 } 7345 applyPeer(node, reset) { 7346 if (reset) { 7347 getUINativeModule().imageSpan.resetVerticalAlign(node); 7348 } 7349 else { 7350 getUINativeModule().imageSpan.setVerticalAlign(node, this.value); 7351 } 7352 } 7353 checkObjectDiff() { 7354 return this.stageValue !== this.value; 7355 } 7356} 7357ImageSpanVerticalAlignModifier.identity = Symbol('imageSpanVerticalAlign'); 7358class ImageSpanTextBackgroundStyleModifier extends ModifierWithKey { 7359 constructor(value) { 7360 super(value); 7361 } 7362 applyPeer(node, reset) { 7363 if (reset) { 7364 getUINativeModule().imageSpan.resetTextBackgroundStyle(node); 7365 } 7366 else { 7367 let textBackgroundStyle = new ArkTextBackGroundStyle(); 7368 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value)) { 7369 getUINativeModule().imageSpan.resetTextBackgroundStyle(node); 7370 } 7371 else { 7372 getUINativeModule().imageSpan.setTextBackgroundStyle(node, textBackgroundStyle.color, textBackgroundStyle.radius.topLeft, textBackgroundStyle.radius.topRight, textBackgroundStyle.radius.bottomLeft, textBackgroundStyle.radius.bottomRight); 7373 } 7374 } 7375 } 7376 checkObjectDiff() { 7377 let textBackgroundStyle = new ArkTextBackGroundStyle(); 7378 let stageTextBackGroundStyle = new ArkTextBackGroundStyle(); 7379 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value) || !stageTextBackGroundStyle.convertTextBackGroundStyleOptions(this.stageValue)) { 7380 return false; 7381 } 7382 else { 7383 return textBackgroundStyle.checkObjectDiff(stageTextBackGroundStyle); 7384 } 7385 } 7386} 7387ImageSpanTextBackgroundStyleModifier.identity = Symbol('imageSpanTextBackgroundStyle'); 7388class ImageSpanBaselineOffsetModifier extends ModifierWithKey { 7389 constructor(value) { 7390 super(value); 7391 } 7392 applyPeer(node, reset) { 7393 if (reset) { 7394 getUINativeModule().imageSpan.resetBaselineOffset(node); 7395 } 7396 else { 7397 getUINativeModule().imageSpan.setBaselineOffset(node, this.value); 7398 } 7399 } 7400} 7401ImageSpanBaselineOffsetModifier.identity = Symbol('imagespanBaselineOffset'); 7402class ImageSpanAltModifier extends ModifierWithKey { 7403 constructor(value) { 7404 super(value); 7405 } 7406 applyPeer(node, reset) { 7407 if (reset) { 7408 getUINativeModule().imageSpan.resetAlt(node); 7409 } 7410 else { 7411 getUINativeModule().imageSpan.setAlt(node, this.value); 7412 } 7413 } 7414} 7415ImageSpanAltModifier.identity = Symbol('imagespanAlt'); 7416class ImageSpanOnCompleteModifier extends ModifierWithKey { 7417 constructor(value) { 7418 super(value); 7419 } 7420 applyPeer(node, reset) { 7421 if (reset) { 7422 getUINativeModule().imageSpan.resetOnComplete(node); 7423 } 7424 else { 7425 getUINativeModule().imageSpan.setOnComplete(node, this.value); 7426 } 7427 } 7428} 7429ImageSpanOnCompleteModifier.identity = Symbol('imageSpanOnComplete'); 7430class ImageSpanOnErrorModifier extends ModifierWithKey { 7431 constructor(value) { 7432 super(value); 7433 } 7434 applyPeer(node, reset) { 7435 if (reset) { 7436 getUINativeModule().imageSpan.resetOnError(node); 7437 } 7438 else { 7439 getUINativeModule().imageSpan.setOnError(node, this.value); 7440 } 7441 } 7442} 7443ImageSpanOnErrorModifier.identity = Symbol('imageSpanOnError'); 7444 7445class ImageSpanBorderRadiusModifier extends ModifierWithKey { 7446 constructor(value) { 7447 super(value); 7448 } 7449 applyPeer(node, reset) { 7450 if (reset) { 7451 getUINativeModule().imageSpan.resetBorderRadius(node); 7452 } else { 7453 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 7454 getUINativeModule().imageSpan.setBorderRadius(node, this.value, this.value, this.value, this.value); 7455 } else { 7456 getUINativeModule().imageSpan.setBorderRadius(node, this.value.topLeft, this.value.topRight, 7457 this.value.bottomLeft, this.value.bottomRight); 7458 } 7459 } 7460 } 7461 checkObjectDiff() { 7462 if (isResource(this.stageValue) && isResource(this.value)) { 7463 return !isResourceEqual(this.stageValue, this.value); 7464 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 7465 return !(this.stageValue.topLeft === this.value.topLeft && 7466 this.stageValue.topRight === this.value.topRight && 7467 this.stageValue.bottomLeft === this.value.bottomLeft && 7468 this.stageValue.bottomRight === this.value.bottomRight); 7469 } else { 7470 return true; 7471 } 7472 } 7473} 7474ImageSpanBorderRadiusModifier.identity = Symbol('imageSpanBorderRadius'); 7475 7476class ArkImageSpanComponent extends ArkComponent { 7477 constructor(nativePtr, classType) { 7478 super(nativePtr, classType); 7479 } 7480 objectFit(value) { 7481 modifierWithKey(this._modifiersWithKeys, ImageSpanObjectFitModifier.identity, ImageSpanObjectFitModifier, value); 7482 return this; 7483 } 7484 verticalAlign(value) { 7485 modifierWithKey(this._modifiersWithKeys, ImageSpanVerticalAlignModifier.identity, ImageSpanVerticalAlignModifier, value); 7486 return this; 7487 } 7488 textBackgroundStyle(value) { 7489 modifierWithKey(this._modifiersWithKeys, ImageSpanTextBackgroundStyleModifier.identity, ImageSpanTextBackgroundStyleModifier, value); 7490 return this; 7491 } 7492 baselineOffset(value) { 7493 modifierWithKey(this._modifiersWithKeys, ImageSpanBaselineOffsetModifier.identity, ImageSpanBaselineOffsetModifier, value); 7494 return this; 7495 } 7496 alt(value) { 7497 modifierWithKey(this._modifiersWithKeys, ImageSpanAltModifier.identity, ImageSpanAltModifier, value); 7498 return this; 7499 } 7500 onComplete(callback) { 7501 modifierWithKey(this._modifiersWithKeys, ImageSpanOnCompleteModifier.identity, ImageSpanOnCompleteModifier, callback); 7502 return this; 7503 } 7504 onError(callback) { 7505 modifierWithKey(this._modifiersWithKeys, ImageSpanOnErrorModifier.identity, ImageSpanOnErrorModifier, callback); 7506 return this; 7507 } 7508 borderRadius(value) { 7509 modifierWithKey( 7510 this._modifiersWithKeys, ImageSpanBorderRadiusModifier.identity, ImageSpanBorderRadiusModifier, value); 7511 return this; 7512 } 7513} 7514// @ts-ignore 7515if (globalThis.ImageSpan !== undefined) { 7516 globalThis.ImageSpan.attributeModifier = function (modifier) { 7517 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7518 return new ArkImageSpanComponent(nativePtr); 7519 }, (nativePtr, classType, modifierJS) => { 7520 return new modifierJS.ImageSpanModifier(nativePtr, classType); 7521 }); 7522 }; 7523} 7524 7525/// <reference path='./import.ts' /> 7526class PatternLockActiveColorModifier extends ModifierWithKey { 7527 constructor(value) { 7528 super(value); 7529 } 7530 applyPeer(node, reset) { 7531 if (reset) { 7532 getUINativeModule().patternLock.resetActiveColor(node); 7533 } 7534 else { 7535 getUINativeModule().patternLock.setActiveColor(node, this.value); 7536 } 7537 } 7538 checkObjectDiff() { 7539 return !isBaseOrResourceEqual(this.stageValue, this.value); 7540 } 7541} 7542PatternLockActiveColorModifier.identity = Symbol('patternLockActiveColor'); 7543class PatternLockSelectedColorModifier extends ModifierWithKey { 7544 constructor(value) { 7545 super(value); 7546 } 7547 applyPeer(node, reset) { 7548 if (reset) { 7549 getUINativeModule().patternLock.resetSelectedColor(node); 7550 } 7551 else { 7552 getUINativeModule().patternLock.setSelectedColor(node, this.value); 7553 } 7554 } 7555 checkObjectDiff() { 7556 return !isBaseOrResourceEqual(this.stageValue, this.value); 7557 } 7558} 7559PatternLockSelectedColorModifier.identity = Symbol('patternLockSelectedColor'); 7560class PatternLockPathColorModifier extends ModifierWithKey { 7561 constructor(value) { 7562 super(value); 7563 } 7564 applyPeer(node, reset) { 7565 if (reset) { 7566 getUINativeModule().patternLock.resetPathColor(node); 7567 } 7568 else { 7569 getUINativeModule().patternLock.setPathColor(node, this.value); 7570 } 7571 } 7572 checkObjectDiff() { 7573 return !isBaseOrResourceEqual(this.stageValue, this.value); 7574 } 7575} 7576PatternLockPathColorModifier.identity = Symbol('patternLockPathColor'); 7577class PatternLockRegularColorModifier extends ModifierWithKey { 7578 constructor(value) { 7579 super(value); 7580 } 7581 applyPeer(node, reset) { 7582 if (reset) { 7583 getUINativeModule().patternLock.resetRegularColor(node); 7584 } 7585 else { 7586 getUINativeModule().patternLock.setRegularColor(node, this.value); 7587 } 7588 } 7589 checkObjectDiff() { 7590 return !isBaseOrResourceEqual(this.stageValue, this.value); 7591 } 7592} 7593PatternLockRegularColorModifier.identity = Symbol('patternLockRegularColor'); 7594class PatternLockSideLengthModifier extends ModifierWithKey { 7595 constructor(value) { 7596 super(value); 7597 } 7598 applyPeer(node, reset) { 7599 if (reset) { 7600 getUINativeModule().patternLock.resetSideLength(node); 7601 } 7602 else { 7603 getUINativeModule().patternLock.setSideLength(node, this.value); 7604 } 7605 } 7606 checkObjectDiff() { 7607 return !isBaseOrResourceEqual(this.stageValue, this.value); 7608 } 7609} 7610PatternLockSideLengthModifier.identity = Symbol('patternLockSideLength'); 7611class PatternLockPathStrokeModifier extends ModifierWithKey { 7612 constructor(value) { 7613 super(value); 7614 } 7615 applyPeer(node, reset) { 7616 if (reset) { 7617 getUINativeModule().patternLock.resetPathStrokeWidth(node); 7618 } 7619 else { 7620 getUINativeModule().patternLock.setPathStrokeWidth(node, this.value); 7621 } 7622 } 7623 checkObjectDiff() { 7624 return this.stageValue !== this.value; 7625 } 7626} 7627PatternLockPathStrokeModifier.identity = Symbol('patternLockPathStroke'); 7628class PatternLockCircleRadiusModifier extends ModifierWithKey { 7629 constructor(value) { 7630 super(value); 7631 } 7632 applyPeer(node, reset) { 7633 if (reset) { 7634 getUINativeModule().patternLock.resetCircleRadius(node); 7635 } 7636 else { 7637 getUINativeModule().patternLock.setCircleRadius(node, this.value); 7638 } 7639 } 7640 checkObjectDiff() { 7641 return !isBaseOrResourceEqual(this.stageValue, this.value); 7642 } 7643} 7644PatternLockCircleRadiusModifier.identity = Symbol('patternLockCircleRadius'); 7645class PatternLockAutoResetModifier extends ModifierWithKey { 7646 constructor(value) { 7647 super(value); 7648 } 7649 applyPeer(node, reset) { 7650 if (reset) { 7651 getUINativeModule().patternLock.resetAutoReset(node); 7652 } 7653 else { 7654 getUINativeModule().patternLock.setAutoReset(node, this.value); 7655 } 7656 } 7657 checkObjectDiff() { 7658 return this.stageValue !== this.value; 7659 } 7660} 7661PatternLockAutoResetModifier.identity = Symbol('patternlockautoreset'); 7662class PatternLockActivateCircleStyleModifier extends ModifierWithKey { 7663 constructor(value) { 7664 super(value); 7665 } 7666 applyPeer(node, reset) { 7667 if (reset) { 7668 getUINativeModule().patternLock.resetActivateCircleStyle(node); 7669 } 7670 else { 7671 getUINativeModule().patternLock.setActivateCircleStyle(node, this.value); 7672 } 7673 } 7674 checkObjectDiff() { 7675 return !isBaseOrResourceEqual(this.stageValue, this.value); 7676 } 7677} 7678PatternLockActivateCircleStyleModifier.identity = Symbol('patternLockActivateCircleStyle'); 7679class ArkPatternLockComponent extends ArkComponent { 7680 constructor(nativePtr, classType) { 7681 super(nativePtr, classType); 7682 } 7683 sideLength(value) { 7684 modifierWithKey(this._modifiersWithKeys, PatternLockSideLengthModifier.identity, PatternLockSideLengthModifier, value); 7685 return this; 7686 } 7687 circleRadius(value) { 7688 modifierWithKey(this._modifiersWithKeys, PatternLockCircleRadiusModifier.identity, PatternLockCircleRadiusModifier, value); 7689 return this; 7690 } 7691 regularColor(value) { 7692 modifierWithKey(this._modifiersWithKeys, PatternLockRegularColorModifier.identity, PatternLockRegularColorModifier, value); 7693 return this; 7694 } 7695 selectedColor(value) { 7696 modifierWithKey(this._modifiersWithKeys, PatternLockSelectedColorModifier.identity, PatternLockSelectedColorModifier, value); 7697 return this; 7698 } 7699 activeColor(value) { 7700 modifierWithKey(this._modifiersWithKeys, PatternLockActiveColorModifier.identity, PatternLockActiveColorModifier, value); 7701 return this; 7702 } 7703 pathColor(value) { 7704 modifierWithKey(this._modifiersWithKeys, PatternLockPathColorModifier.identity, PatternLockPathColorModifier, value); 7705 return this; 7706 } 7707 pathStrokeWidth(value) { 7708 modifierWithKey(this._modifiersWithKeys, PatternLockPathStrokeModifier.identity, PatternLockPathStrokeModifier, value); 7709 return this; 7710 } 7711 autoReset(value) { 7712 modifierWithKey(this._modifiersWithKeys, PatternLockAutoResetModifier.identity, PatternLockAutoResetModifier, value); 7713 return this; 7714 } 7715 activateCircleStyle(value) { 7716 modifierWithKey(this._modifiersWithKeys, PatternLockActivateCircleStyleModifier.identity, PatternLockActivateCircleStyleModifier, value); 7717 return this; 7718 } 7719 onPatternComplete(callback) { 7720 throw new Error('Method not implemented.'); 7721 } 7722 onDotConnect(callback) { 7723 throw new Error('Method not implemented.'); 7724 } 7725} 7726// @ts-ignore 7727if (globalThis.PatternLock !== undefined) { 7728 globalThis.PatternLock.attributeModifier = function (modifier) { 7729 attributeModifierFunc.call(this, modifier, (nativePtr) => { 7730 return new ArkPatternLockComponent(nativePtr); 7731 }, (nativePtr, classType, modifierJS) => { 7732 return new modifierJS.PatternLockModifier(nativePtr, classType); 7733 }); 7734 }; 7735} 7736 7737/// <reference path='./import.ts' /> 7738class RichEditorEnableDataDetectorModifier extends ModifierWithKey { 7739 constructor(value) { 7740 super(value); 7741 } 7742 applyPeer(node, reset) { 7743 if (reset) { 7744 getUINativeModule().richEditor.resetEnableDataDetector(node); 7745 } 7746 else { 7747 getUINativeModule().richEditor.setEnableDataDetector(node, this.value); 7748 } 7749 } 7750 checkObjectDiff() { 7751 return !isBaseOrResourceEqual(this.stageValue, this.value); 7752 } 7753} 7754RichEditorEnableDataDetectorModifier.identity = Symbol('richEditorEnableDataDetector'); 7755 7756class RichEditorDataDetectorConfigModifier extends ModifierWithKey { 7757 constructor(value) { 7758 super(value); 7759 } 7760 applyPeer(node, reset) { 7761 if (reset) { 7762 getUINativeModule().richEditor.resetDataDetectorConfig(node); 7763 } else { 7764 getUINativeModule().richEditor.setDataDetectorConfig(node, this.value.types, this.value.onDetectResultUpdate, 7765 this.value.color, this.value.decorationType, this.value.decorationColor, this.value.decorationStyle); 7766 } 7767 } 7768 checkObjectDiff() { 7769 return !isBaseOrResourceEqual(this.stageValue.types, this.value.types) || 7770 !isBaseOrResourceEqual(this.stageValue.onDetectResultUpdate, this.value.onDetectResultUpdate) || 7771 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 7772 !isBaseOrResourceEqual(this.stageValue.decorationType, this.value.decorationType) || 7773 !isBaseOrResourceEqual(this.stageValue.decorationColor, this.value.decorationColor) || 7774 !isBaseOrResourceEqual(this.stageValue.decorationStyle, this.value.decorationStyle); 7775 } 7776} 7777RichEditorDataDetectorConfigModifier.identity = Symbol('richEditorDataDetectorConfig'); 7778 7779class RichEditorOnIMEInputCompleteModifier extends ModifierWithKey { 7780 constructor(value) { 7781 super(value); 7782 } 7783 applyPeer(node, reset) { 7784 if (reset) { 7785 getUINativeModule().richEditor.resetOnIMEInputComplete(node); 7786 } else { 7787 getUINativeModule().richEditor.setOnIMEInputComplete(node, this.value); 7788 } 7789 } 7790} 7791RichEditorOnIMEInputCompleteModifier.identity = Symbol('richEditorOnIMEInputComplete'); 7792 7793class RichEditorCopyOptionsModifier extends ModifierWithKey { 7794 constructor(value) { 7795 super(value); 7796 } 7797 applyPeer(node, reset) { 7798 if (reset) { 7799 getUINativeModule().richEditor.resetCopyOptions(node); 7800 } 7801 else { 7802 getUINativeModule().richEditor.setCopyOptions(node, this.value); 7803 } 7804 } 7805 checkObjectDiff() { 7806 return this.stageValue !== this.value; 7807 } 7808} 7809RichEditorCopyOptionsModifier.identity = Symbol('richEditorCopyOptions'); 7810 7811class RichEditorCaretColorModifier extends ModifierWithKey { 7812 constructor(value) { 7813 super(value); 7814 } 7815 applyPeer(node, reset) { 7816 if (reset) { 7817 getUINativeModule().richEditor.resetCaretColor(node); 7818 } 7819 else { 7820 getUINativeModule().richEditor.setCaretColor(node, this.value); 7821 } 7822 } 7823 checkObjectDiff() { 7824 return this.stageValue !== this.value; 7825 } 7826} 7827RichEditorCaretColorModifier.identity = Symbol('richEditorCaretColor'); 7828 7829class RichEditorOnSelectionChangeModifier extends ModifierWithKey { 7830 constructor(value) { 7831 super(value); 7832 } 7833 applyPeer(node, reset) { 7834 if (reset) { 7835 getUINativeModule().richEditor.resetOnSelectionChange(node); 7836 } else { 7837 getUINativeModule().richEditor.setOnSelectionChange(node, this.value); 7838 } 7839 } 7840} 7841RichEditorOnSelectionChangeModifier.identity = Symbol('richEditorOnSelectionChange'); 7842 7843class RichEditorOnSubmitModifier extends ModifierWithKey { 7844 constructor(value) { 7845 super(value); 7846 } 7847 applyPeer(node, reset) { 7848 if (reset) { 7849 getUINativeModule().richEditor.resetOnSubmit(node); 7850 } else { 7851 getUINativeModule().richEditor.setOnSubmit(node, this.value); 7852 } 7853 } 7854} 7855RichEditorOnSubmitModifier.identity = Symbol('richEditorOnSubmit'); 7856 7857class RichEditorAboutToIMEInputModifier extends ModifierWithKey { 7858 constructor(value) { 7859 super(value); 7860 } 7861 applyPeer(node, reset) { 7862 if (reset) { 7863 getUINativeModule().richEditor.resetAboutToIMEInput(node); 7864 } else { 7865 getUINativeModule().richEditor.setAboutToIMEInput(node, this.value); 7866 } 7867 } 7868} 7869RichEditorAboutToIMEInputModifier.identity = Symbol('richEditorAboutToIMEInput'); 7870 7871class RichEditorSelectedBackgroundColorModifier extends ModifierWithKey { 7872 constructor(value) { 7873 super(value); 7874 } 7875 applyPeer(node, reset) { 7876 if (reset) { 7877 getUINativeModule().richEditor.resetSelectedBackgroundColor(node); 7878 } 7879 else { 7880 getUINativeModule().richEditor.setSelectedBackgroundColor(node, this.value); 7881 } 7882 } 7883 checkObjectDiff() { 7884 return this.stageValue !== this.value; 7885 } 7886} 7887RichEditorSelectedBackgroundColorModifier.identity = Symbol('richEditorSelectedBackgroundColor'); 7888 7889class RichEditorOnSelectModifier extends ModifierWithKey { 7890 constructor(value) { 7891 super(value); 7892 } 7893 applyPeer(node, reset) { 7894 if (reset) { 7895 getUINativeModule().richEditor.resetOnSelect(node); 7896 } else { 7897 getUINativeModule().richEditor.setOnSelect(node, this.value); 7898 } 7899 } 7900} 7901RichEditorOnSelectModifier.identity = Symbol('richEditorOnSelect'); 7902 7903class RichEditorOnReadyModifier extends ModifierWithKey { 7904 constructor(value) { 7905 super(value); 7906 } 7907 applyPeer(node, reset) { 7908 if (reset) { 7909 getUINativeModule().richEditor.resetOnReady(node); 7910 } else { 7911 getUINativeModule().richEditor.setOnReady(node, this.value); 7912 } 7913 } 7914} 7915RichEditorOnReadyModifier.identity = Symbol('richEditorOnReady'); 7916 7917class RichEditorOnDeleteCompleteModifier extends ModifierWithKey { 7918 constructor(value) { 7919 super(value); 7920 } 7921 applyPeer(node, reset) { 7922 if (reset) { 7923 getUINativeModule().richEditor.resetOnDeleteComplete(node); 7924 } else { 7925 getUINativeModule().richEditor.setOnDeleteComplete(node, this.value); 7926 } 7927 } 7928} 7929RichEditorOnDeleteCompleteModifier.identity = Symbol('richEditorOnDeleteComplete'); 7930 7931class RichEditorOnEditingChangeModifier extends ModifierWithKey { 7932 constructor(value) { 7933 super(value); 7934 } 7935 applyPeer(node, reset) { 7936 if (reset) { 7937 getUINativeModule().richEditor.resetOnEditingChange(node); 7938 } else { 7939 getUINativeModule().richEditor.setOnEditingChange(node, this.value); 7940 } 7941 } 7942} 7943RichEditorOnEditingChangeModifier.identity = Symbol('richEditorOnEditingChange'); 7944 7945class RichEditorOnPasteModifier extends ModifierWithKey { 7946 constructor(value) { 7947 super(value); 7948 } 7949 applyPeer(node, reset) { 7950 if (reset) { 7951 getUINativeModule().richEditor.resetOnPaste(node); 7952 } else { 7953 getUINativeModule().richEditor.setOnPaste(node, this.value); 7954 } 7955 } 7956} 7957RichEditorOnPasteModifier.identity = Symbol('richEditorOnPaste'); 7958 7959class RichEditorOnCutModifier extends ModifierWithKey { 7960 constructor(value) { 7961 super(value); 7962 } 7963 applyPeer(node, reset) { 7964 if (reset) { 7965 getUINativeModule().richEditor.resetOnCut(node); 7966 } else { 7967 getUINativeModule().richEditor.setOnCut(node, this.value); 7968 } 7969 } 7970} 7971RichEditorOnCutModifier.identity = Symbol('richEditorOnCut'); 7972 7973class RichEditorOnCopyModifier extends ModifierWithKey { 7974 constructor(value) { 7975 super(value); 7976 } 7977 applyPeer(node, reset) { 7978 if (reset) { 7979 getUINativeModule().richEditor.resetOnCopy(node); 7980 } else { 7981 getUINativeModule().richEditor.setOnCopy(node, this.value); 7982 } 7983 } 7984} 7985RichEditorOnCopyModifier.identity = Symbol('richEditorOnCopy'); 7986 7987class RichEditorEnterKeyTypeModifier extends ModifierWithKey { 7988 constructor(value) { 7989 super(value); 7990 } 7991 applyPeer(node, reset) { 7992 if (reset) { 7993 getUINativeModule().richEditor.resetEnterKeyType(node); 7994 } 7995 else { 7996 getUINativeModule().richEditor.setEnterKeyType(node, this.value); 7997 } 7998 } 7999 checkObjectDiff() { 8000 return this.stageValue !== this.value; 8001 } 8002} 8003RichEditorEnterKeyTypeModifier.identity = Symbol('richEditorEnterKeyType'); 8004 8005class ArkRichEditorComponent extends ArkComponent { 8006 constructor(nativePtr, classType) { 8007 super(nativePtr, classType); 8008 } 8009 enableDataDetector(value) { 8010 modifierWithKey(this._modifiersWithKeys, RichEditorEnableDataDetectorModifier.identity, RichEditorEnableDataDetectorModifier, value); 8011 return this; 8012 } 8013 dataDetectorConfig(config) { 8014 if (config === undefined || config === null) { 8015 return this; 8016 } 8017 let detectorConfig = new TextDataDetectorConfig(); 8018 detectorConfig.types = config.types; 8019 detectorConfig.onDetectResultUpdate = config.onDetectResultUpdate; 8020 detectorConfig.color = config.color; 8021 if (config.decoration) { 8022 detectorConfig.decorationType = config.decoration.type; 8023 detectorConfig.decorationColor = config.decoration.color; 8024 detectorConfig.decorationStyle = config.decoration.style; 8025 } 8026 modifierWithKey(this._modifiersWithKeys, RichEditorDataDetectorConfigModifier.identity, RichEditorDataDetectorConfigModifier, detectorConfig); 8027 return this; 8028 } 8029 copyOptions(value) { 8030 modifierWithKey(this._modifiersWithKeys, RichEditorCopyOptionsModifier.identity, RichEditorCopyOptionsModifier, value); 8031 return this; 8032 } 8033 8034 caretColor(value) { 8035 modifierWithKey(this._modifiersWithKeys, RichEditorCaretColorModifier.identity, RichEditorCaretColorModifier, value); 8036 return this; 8037 } 8038 8039 onSelectionChange(callback) { 8040 modifierWithKey(this._modifiersWithKeys, RichEditorOnSelectionChangeModifier.identity, RichEditorOnSelectionChangeModifier, callback); 8041 return this; 8042 } 8043 8044 selectedBackgroundColor(value) { 8045 modifierWithKey(this._modifiersWithKeys, RichEditorSelectedBackgroundColorModifier.identity, RichEditorSelectedBackgroundColorModifier, value); 8046 return this; 8047 } 8048 8049 enterKeyType(value) { 8050 modifierWithKey(this._modifiersWithKeys, RichEditorEnterKeyTypeModifier.identity, RichEditorEnterKeyTypeModifier, value); 8051 return this; 8052 } 8053 8054 onPaste(callback) { 8055 modifierWithKey(this._modifiersWithKeys, RichEditorOnPasteModifier.identity, RichEditorOnPasteModifier, callback); 8056 return this; 8057 } 8058 onReady(callback) { 8059 modifierWithKey(this._modifiersWithKeys, RichEditorOnReadyModifier.identity, RichEditorOnReadyModifier, callback); 8060 return this; 8061 } 8062 onSelect(callback) { 8063 modifierWithKey(this._modifiersWithKeys, RichEditorOnSelectModifier.identity, RichEditorOnSelectModifier, callback); 8064 return this; 8065 } 8066 onSubmit(callback) { 8067 modifierWithKey(this._modifiersWithKeys, RichEditorOnSubmitModifier.identity, RichEditorOnSubmitModifier, callback); 8068 return this; 8069 } 8070 aboutToIMEInput(callback) { 8071 modifierWithKey(this._modifiersWithKeys, RichEditorAboutToIMEInputModifier.identity, RichEditorAboutToIMEInputModifier, callback); 8072 return this; 8073 } 8074 onIMEInputComplete(callback) { 8075 modifierWithKey(this._modifiersWithKeys, RichEditorOnIMEInputCompleteModifier.identity, RichEditorOnIMEInputCompleteModifier, callback); 8076 return this; 8077 } 8078 aboutToDelete(callback) { 8079 throw new Error('Method not implemented.'); 8080 } 8081 onDeleteComplete(callback) { 8082 modifierWithKey(this._modifiersWithKeys, RichEditorOnDeleteCompleteModifier.identity, RichEditorOnDeleteCompleteModifier, callback); 8083 return this; 8084 } 8085 bindSelectionMenu(spanType, content, responseType, options) { 8086 throw new Error('Method not implemented.'); 8087 } 8088 customKeyboard(value) { 8089 throw new Error('Method not implemented.'); 8090 } 8091 onEditingChange(callback) { 8092 modifierWithKey(this._modifiersWithKeys, RichEditorOnEditingChangeModifier.identity, RichEditorOnEditingChangeModifier, callback); 8093 return this; 8094 } 8095 onCut(callback) { 8096 modifierWithKey(this._modifiersWithKeys, RichEditorOnCutModifier.identity, RichEditorOnCutModifier, callback); 8097 return this; 8098 } 8099 onCopy(callback) { 8100 modifierWithKey(this._modifiersWithKeys, RichEditorOnCopyModifier.identity, RichEditorOnCopyModifier, callback); 8101 return this; 8102 } 8103} 8104// @ts-ignore 8105if (globalThis.RichEditor !== undefined) { 8106 globalThis.RichEditor.attributeModifier = function (modifier) { 8107 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8108 return new ArkRichEditorComponent(nativePtr); 8109 }, (nativePtr, classType, modifierJS) => { 8110 return new modifierJS.RichEditorModifier(nativePtr, classType); 8111 }); 8112 }; 8113} 8114 8115/// <reference path='./import.ts' /> 8116class RowAlignItemsModifier extends ModifierWithKey { 8117 constructor(value) { 8118 super(value); 8119 } 8120 applyPeer(node, reset) { 8121 if (reset) { 8122 getUINativeModule().row.resetAlignItems(node); 8123 } 8124 else { 8125 getUINativeModule().row.setAlignItems(node, this.value); 8126 } 8127 } 8128 checkObjectDiff() { 8129 return this.stageValue !== this.value; 8130 } 8131} 8132RowAlignItemsModifier.identity = Symbol('rowAlignItems'); 8133class RowJustifyContentlModifier extends ModifierWithKey { 8134 constructor(value) { 8135 super(value); 8136 } 8137 applyPeer(node, reset) { 8138 if (reset) { 8139 getUINativeModule().row.resetJustifyContent(node); 8140 } 8141 else { 8142 getUINativeModule().row.setJustifyContent(node, this.value); 8143 } 8144 } 8145 checkObjectDiff() { 8146 return this.stageValue !== this.value; 8147 } 8148} 8149RowJustifyContentlModifier.identity = Symbol('rowJustifyContent'); 8150 8151class RowSpaceModifier extends ModifierWithKey { 8152 constructor(value) { 8153 super(value); 8154 } 8155 applyPeer(node, reset) { 8156 if (reset) { 8157 getUINativeModule().row.resetSpace(node); 8158 } 8159 else { 8160 getUINativeModule().row.setSpace(node, this.value); 8161 } 8162 } 8163 checkObjectDiff() { 8164 return this.stageValue !== this.value; 8165 } 8166} 8167RowSpaceModifier.identity = Symbol('rowSpace'); 8168 8169class RowPointLightModifier extends ModifierWithKey { 8170 constructor(value) { 8171 super(value); 8172 } 8173 applyPeer(node, reset) { 8174 if (reset) { 8175 getUINativeModule().common.resetPointLightStyle(node); 8176 } else { 8177 let positionX; 8178 let positionY; 8179 let positionZ; 8180 let intensity; 8181 let color; 8182 let illuminated; 8183 let bloom; 8184 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 8185 positionX = this.value.lightSource.positionX; 8186 positionY = this.value.lightSource.positionY; 8187 positionZ = this.value.lightSource.positionZ; 8188 intensity = this.value.lightSource.intensity; 8189 color = this.value.lightSource.color; 8190 } 8191 illuminated = this.value.illuminated; 8192 bloom = this.value.bloom; 8193 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 8194 illuminated, bloom); 8195 } 8196 } 8197 checkObjectDiff() { 8198 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 8199 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 8200 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 8201 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 8202 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 8203 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 8204 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 8205 } 8206} 8207RowPointLightModifier.identity = Symbol('rowPointLight'); 8208 8209class RowReverseModifier extends ModifierWithKey { 8210 constructor(value) { 8211 super(value); 8212 } 8213 applyPeer(node, reset) { 8214 if (reset) { 8215 getUINativeModule().row.resetReverse(node); 8216 } else { 8217 getUINativeModule().row.setReverse(node, this.value); 8218 } 8219 } 8220 checkObjectDiff() { 8221 return this.stageValue !== this.value; 8222 } 8223} 8224RowReverseModifier.identity = Symbol('rowReverse'); 8225 8226class ArkRowComponent extends ArkComponent { 8227 constructor(nativePtr, classType) { 8228 super(nativePtr, classType); 8229 } 8230 initialize(value) { 8231 if (value[0] !== undefined) { 8232 modifierWithKey(this._modifiersWithKeys, RowSpaceModifier.identity, RowSpaceModifier, value[0].space); 8233 } 8234 return this 8235 } 8236 alignItems(value) { 8237 modifierWithKey(this._modifiersWithKeys, RowAlignItemsModifier.identity, RowAlignItemsModifier, value); 8238 return this; 8239 } 8240 justifyContent(value) { 8241 modifierWithKey(this._modifiersWithKeys, RowJustifyContentlModifier.identity, RowJustifyContentlModifier, value); 8242 return this; 8243 } 8244 pointLight(value) { 8245 modifierWithKey(this._modifiersWithKeys, RowPointLightModifier.identity, RowPointLightModifier, value); 8246 return this; 8247 } 8248 reverse(value) { 8249 modifierWithKey(this._modifiersWithKeys, RowReverseModifier.identity, RowReverseModifier, value); 8250 return this; 8251 } 8252} 8253// @ts-ignore 8254if (globalThis.Row !== undefined) { 8255 globalThis.Row.attributeModifier = function (modifier) { 8256 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8257 return new ArkRowComponent(nativePtr); 8258 }, (nativePtr, classType, modifierJS) => { 8259 return new modifierJS.RowModifier(nativePtr, classType); 8260 }); 8261 }; 8262} 8263 8264/// <reference path='./import.ts' /> 8265class RowSplitResizeableModifier extends ModifierWithKey { 8266 constructor(value) { 8267 super(value); 8268 } 8269 applyPeer(node, reset) { 8270 if (reset) { 8271 getUINativeModule().rowSplit.resetResizeable(node); 8272 } 8273 else { 8274 getUINativeModule().rowSplit.setResizeable(node, this.value); 8275 } 8276 } 8277} 8278RowSplitResizeableModifier.identity = Symbol('rowSplitResizeable'); 8279class RowSplitClipModifier extends ModifierWithKey { 8280 constructor(value) { 8281 super(value); 8282 } 8283 applyPeer(node, reset) { 8284 if (reset) { 8285 getUINativeModule().common.resetClipWithEdge(node); 8286 } 8287 else { 8288 getUINativeModule().common.setClipWithEdge(node, this.value); 8289 } 8290 } 8291 checkObjectDiff() { 8292 return true; 8293 } 8294} 8295RowSplitClipModifier.identity = Symbol('rowSplitClip'); 8296class ArkRowSplitComponent extends ArkComponent { 8297 constructor(nativePtr, classType) { 8298 super(nativePtr, classType); 8299 } 8300 resizeable(value) { 8301 modifierWithKey(this._modifiersWithKeys, RowSplitResizeableModifier.identity, RowSplitResizeableModifier, value); 8302 return this; 8303 } 8304 clip(value) { 8305 modifierWithKey(this._modifiersWithKeys, RowSplitClipModifier.identity, RowSplitClipModifier, value); 8306 return this; 8307 } 8308} 8309// @ts-ignore 8310if (globalThis.RowSplit !== undefined) { 8311 globalThis.RowSplit.attributeModifier = function (modifier) { 8312 attributeModifierFunc.call(this, modifier, (nativePtr) => { 8313 return new ArkRowSplitComponent(nativePtr); 8314 }, (nativePtr, classType, modifierJS) => { 8315 return new modifierJS.RowSplitModifier(nativePtr, classType); 8316 }); 8317 }; 8318} 8319 8320/// <reference path='./import.ts' /> 8321class SearchSelectionMenuHiddenModifier extends ModifierWithKey { 8322 constructor(value) { 8323 super(value); 8324 } 8325 applyPeer(node, reset) { 8326 if (reset) { 8327 getUINativeModule().search.resetSelectionMenuHidden(node); 8328 } 8329 else { 8330 getUINativeModule().search.setSelectionMenuHidden(node, this.value); 8331 } 8332 } 8333 checkObjectDiff() { 8334 return this.stageValue !== this.value; 8335 } 8336} 8337SearchSelectionMenuHiddenModifier.identity = Symbol('searchSelectionMenuHidden'); 8338class SearchCaretStyleModifier extends ModifierWithKey { 8339 constructor(value) { 8340 super(value); 8341 } 8342 applyPeer(node, reset) { 8343 if (reset) { 8344 getUINativeModule().search.resetCaretStyle(node); 8345 } 8346 else { 8347 getUINativeModule().search.setCaretStyle(node, this.value.width, this.value.color); 8348 } 8349 } 8350 checkObjectDiff() { 8351 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 8352 !isBaseOrResourceEqual(this.stageValue.color, this.value.color); 8353 } 8354} 8355SearchCaretStyleModifier.identity = Symbol('searchCaretStyle'); 8356class SearchEnableKeyboardOnFocusModifier extends ModifierWithKey { 8357 constructor(value) { 8358 super(value); 8359 } 8360 applyPeer(node, reset) { 8361 if (reset) { 8362 getUINativeModule().search.resetEnableKeyboardOnFocus(node); 8363 } 8364 else { 8365 getUINativeModule().search.setEnableKeyboardOnFocus(node, this.value); 8366 } 8367 } 8368 checkObjectDiff() { 8369 return this.stageValue !== this.value; 8370 } 8371} 8372SearchEnableKeyboardOnFocusModifier.identity = Symbol('searchEnableKeyboardOnFocus'); 8373class SearchSearchIconModifier extends ModifierWithKey { 8374 constructor(value) { 8375 super(value); 8376 } 8377 applyPeer(node, reset) { 8378 if (reset) { 8379 getUINativeModule().search.resetSearchIcon(node); 8380 } 8381 else { 8382 getUINativeModule().search.setSearchIcon(node, this.value.size, this.value.color, this.value.src); 8383 } 8384 } 8385 checkObjectDiff() { 8386 return !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 8387 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 8388 !isBaseOrResourceEqual(this.stageValue.src, this.value.src); 8389 } 8390} 8391SearchSearchIconModifier.identity = Symbol('searchSearchIcon'); 8392class SearchPlaceholderFontModifier extends ModifierWithKey { 8393 constructor(value) { 8394 super(value); 8395 } 8396 applyPeer(node, reset) { 8397 if (reset) { 8398 getUINativeModule().search.resetPlaceholderFont(node); 8399 } 8400 else { 8401 getUINativeModule().search.setPlaceholderFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 8402 } 8403 } 8404 checkObjectDiff() { 8405 return this.stageValue.weight !== this.value.weight || 8406 this.stageValue.style !== this.value.style || 8407 !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 8408 !isBaseOrResourceEqual(this.stageValue.family, this.value.family); 8409 } 8410} 8411SearchPlaceholderFontModifier.identity = Symbol('searchPlaceholderFont'); 8412class SearchSearchButtonModifier extends ModifierWithKey { 8413 constructor(value) { 8414 super(value); 8415 } 8416 applyPeer(node, reset) { 8417 if (reset) { 8418 getUINativeModule().search.resetSearchButton(node); 8419 } 8420 else { 8421 getUINativeModule().search.setSearchButton(node, this.value.value, this.value.fontSize, this.value.fontColor); 8422 } 8423 } 8424 checkObjectDiff() { 8425 return this.stageValue.value !== this.value.value || 8426 !isBaseOrResourceEqual(this.stageValue.fontSize, this.value.fontSize) || 8427 !isBaseOrResourceEqual(this.stageValue.fontColor, this.value.fontColor); 8428 } 8429} 8430SearchSearchButtonModifier.identity = Symbol('searchSearchButton'); 8431class SearchFontColorModifier extends ModifierWithKey { 8432 constructor(value) { 8433 super(value); 8434 } 8435 applyPeer(node, reset) { 8436 if (reset) { 8437 getUINativeModule().search.resetFontColor(node); 8438 } 8439 else { 8440 getUINativeModule().search.setFontColor(node, this.value); 8441 } 8442 } 8443 checkObjectDiff() { 8444 return !isBaseOrResourceEqual(this.stageValue, this.value); 8445 } 8446} 8447SearchFontColorModifier.identity = Symbol('searchFontColor'); 8448class SearchFontFeatureModifier extends ModifierWithKey { 8449 constructor(value) { 8450 super(value); 8451 } 8452 applyPeer(node, reset) { 8453 if (reset) { 8454 getUINativeModule().search.resetFontFeature(node); 8455 } else { 8456 getUINativeModule().search.setFontFeature(node, this.value); 8457 } 8458 } 8459 checkObjectDiff() { 8460 return !isBaseOrResourceEqual(this.stageValue, this.value); 8461 } 8462} 8463SearchFontFeatureModifier.identity = Symbol('searchFontFeature'); 8464class SearchCopyOptionModifier extends ModifierWithKey { 8465 constructor(value) { 8466 super(value); 8467 } 8468 applyPeer(node, reset) { 8469 if (reset) { 8470 getUINativeModule().search.resetCopyOption(node); 8471 } 8472 else { 8473 getUINativeModule().search.setCopyOption(node, this.value); 8474 } 8475 } 8476 checkObjectDiff() { 8477 return this.stageValue !== this.value; 8478 } 8479} 8480SearchCopyOptionModifier.identity = Symbol('searchCopyOption'); 8481class SearchTextFontModifier extends ModifierWithKey { 8482 constructor(value) { 8483 super(value); 8484 } 8485 applyPeer(node, reset) { 8486 if (reset) { 8487 getUINativeModule().search.resetTextFont(node); 8488 } 8489 else { 8490 getUINativeModule().search.setTextFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 8491 } 8492 } 8493 checkObjectDiff() { 8494 return this.stageValue.weight !== this.value.weight || 8495 this.stageValue.style !== this.value.style || 8496 !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 8497 !isBaseOrResourceEqual(this.stageValue.family, this.value.family); 8498 } 8499} 8500SearchTextFontModifier.identity = Symbol('searchTextFont'); 8501class SearchPlaceholderColorModifier extends ModifierWithKey { 8502 constructor(value) { 8503 super(value); 8504 } 8505 applyPeer(node, reset) { 8506 if (reset) { 8507 getUINativeModule().search.resetPlaceholderColor(node); 8508 } 8509 else { 8510 getUINativeModule().search.setPlaceholderColor(node, this.value); 8511 } 8512 } 8513 checkObjectDiff() { 8514 return !isBaseOrResourceEqual(this.stageValue, this.value); 8515 } 8516} 8517SearchPlaceholderColorModifier.identity = Symbol('searchPlaceholderColor'); 8518class SearchCancelButtonModifier extends ModifierWithKey { 8519 constructor(value) { 8520 super(value); 8521 } 8522 applyPeer(node, reset) { 8523 let _a, _b, _c; 8524 if (reset) { 8525 getUINativeModule().search.resetCancelButton(node); 8526 } 8527 else { 8528 getUINativeModule().search.setCancelButton(node, this.value.style, 8529 (_a = this.value.icon) === null || _a === void 0 ? void 0 : _a.size, 8530 (_b = this.value.icon) === null || _b === void 0 ? void 0 : _b.color, 8531 (_c = this.value.icon) === null || _c === void 0 ? void 0 : _c.src); 8532 } 8533 } 8534 checkObjectDiff() { 8535 let _a, _b, _c, _d, _e, _f; 8536 return this.stageValue.style !== this.value.style || 8537 !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) || 8538 !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) || 8539 !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); 8540 } 8541} 8542SearchCancelButtonModifier.identity = Symbol('searchCancelButton'); 8543class SearchTextAlignModifier extends ModifierWithKey { 8544 constructor(value) { 8545 super(value); 8546 } 8547 applyPeer(node, reset) { 8548 if (reset) { 8549 getUINativeModule().search.resetTextAlign(node); 8550 } 8551 else { 8552 getUINativeModule().search.setTextAlign(node, this.value); 8553 } 8554 } 8555 checkObjectDiff() { 8556 return this.stageValue !== this.value; 8557 } 8558} 8559SearchTextAlignModifier.identity = Symbol('searchTextAlign'); 8560class SearchEnterKeyTypeModifier extends ModifierWithKey { 8561 constructor(value) { 8562 super(value); 8563 } 8564 applyPeer(node, reset) { 8565 if (reset) { 8566 getUINativeModule().search.resetSearchEnterKeyType(node); 8567 } else { 8568 getUINativeModule().search.setSearchEnterKeyType(node, this.value); 8569 } 8570 } 8571 checkObjectDiff() { 8572 return !isBaseOrResourceEqual(this.stageValue, this.value); 8573 } 8574} 8575SearchEnterKeyTypeModifier.identity = Symbol('searchEnterKeyType'); 8576class SearchHeightModifier extends ModifierWithKey { 8577 constructor(value) { 8578 super(value); 8579 } 8580 applyPeer(node, reset) { 8581 if (reset) { 8582 getUINativeModule().search.resetSearchHeight(node); 8583 } else { 8584 getUINativeModule().search.setSearchHeight(node, this.value); 8585 } 8586 } 8587 checkObjectDiff() { 8588 return !isBaseOrResourceEqual(this.stageValue, this.value); 8589 } 8590} 8591SearchHeightModifier.identity = Symbol('searchHeight'); 8592class SearchDecorationModifier extends ModifierWithKey { 8593 constructor(value) { 8594 super(value); 8595 } 8596 applyPeer(node, reset) { 8597 if (reset) { 8598 getUINativeModule().search.resetDecoration(node); 8599 } 8600 else { 8601 getUINativeModule().search.setDecoration(node, this.value.type, this.value.color, this.value.style); 8602 } 8603 } 8604 checkObjectDiff() { 8605 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 8606 return true; 8607 } 8608 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 8609 return !isResourceEqual(this.stageValue.color, this.value.color); 8610 } 8611 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 8612 return !(this.stageValue.color === this.value.color); 8613 } 8614 else { 8615 return true; 8616 } 8617 } 8618} 8619SearchDecorationModifier.identity = Symbol('searchDecoration'); 8620class SearchLetterSpacingModifier extends ModifierWithKey { 8621 constructor(value) { 8622 super(value); 8623 } 8624 applyPeer(node, reset) { 8625 if (reset) { 8626 getUINativeModule().search.resetLetterSpacing(node); 8627 } 8628 else { 8629 getUINativeModule().search.setLetterSpacing(node, this.value); 8630 } 8631 } 8632 checkObjectDiff() { 8633 return !isBaseOrResourceEqual(this.stageValue, this.value); 8634 } 8635} 8636SearchLetterSpacingModifier.identity = Symbol('searchLetterSpacing'); 8637class SearchLineHeightModifier extends ModifierWithKey { 8638 constructor(value) { 8639 super(value); 8640 } 8641 applyPeer(node, reset) { 8642 if (reset) { 8643 getUINativeModule().search.resetLineHeight(node); 8644 } 8645 else { 8646 getUINativeModule().search.setLineHeight(node, this.value); 8647 } 8648 } 8649 checkObjectDiff() { 8650 return !isBaseOrResourceEqual(this.stageValue, this.value); 8651 } 8652} 8653SearchLineHeightModifier.identity = Symbol('searchLineHeight'); 8654class SearchMinFontSizeModifier extends ModifierWithKey { 8655 constructor(value) { 8656 super(value); 8657 } 8658 applyPeer(node, reset) { 8659 if (reset) { 8660 getUINativeModule().search.resetSearchMinFontSize(node); 8661 } 8662 else { 8663 getUINativeModule().search.setSearchMinFontSize(node, this.value); 8664 } 8665 } 8666 checkObjectDiff() { 8667 return !isBaseOrResourceEqual(this.stageValue, this.value); 8668 } 8669} 8670SearchMinFontSizeModifier.identity = Symbol('searchMinFontSize'); 8671class SearchMaxFontSizeModifier extends ModifierWithKey { 8672 constructor(value) { 8673 super(value); 8674 } 8675 applyPeer(node, reset) { 8676 if (reset) { 8677 getUINativeModule().search.resetSearchMaxFontSize(node); 8678 } 8679 else { 8680 getUINativeModule().search.setSearchMaxFontSize(node, this.value); 8681 } 8682 } 8683 checkObjectDiff() { 8684 return !isBaseOrResourceEqual(this.stageValue, this.value); 8685 } 8686} 8687SearchMaxFontSizeModifier.identity = Symbol('searchMaxFontSize'); 8688class SearchInputFilterModifier extends ModifierWithKey { 8689 constructor(value) { 8690 super(value); 8691 } 8692 applyPeer(node, reset) { 8693 if (reset) { 8694 getUINativeModule().search.resetInputFilter(node); 8695 } else { 8696 getUINativeModule().search.setInputFilter(node, this.value.value, this.value.error); 8697 } 8698 } 8699} 8700SearchInputFilterModifier.identity = Symbol('searchInputFilter'); 8701class SearchSelectedBackgroundColorModifier extends ModifierWithKey { 8702 constructor(value) { 8703 super(value); 8704 } 8705 applyPeer(node, reset) { 8706 if (reset) { 8707 getUINativeModule().search.resetSelectedBackgroundColor(node); 8708 } else { 8709 getUINativeModule().search.setSelectedBackgroundColor(node, this.value); 8710 } 8711 } 8712 checkObjectDiff() { 8713 return !isBaseOrResourceEqual(this.stageValue, this.value); 8714 } 8715} 8716SearchSelectedBackgroundColorModifier.identity = Symbol('searchSelectedBackgroundColor'); 8717class SearchTextIndentModifier extends ModifierWithKey { 8718 constructor(value) { 8719 super(value); 8720 } 8721 applyPeer(node, reset) { 8722 if (reset) { 8723 getUINativeModule().search.resetTextIndent(node); 8724 } else { 8725 getUINativeModule().search.setTextIndent(node, this.value); 8726 } 8727 } 8728 checkObjectDiff() { 8729 return !isBaseOrResourceEqual(this.stageValue, this.value); 8730 } 8731} 8732SearchTextIndentModifier.identity = Symbol('searchTextIndent'); 8733class SearchMaxLengthModifier extends ModifierWithKey { 8734 constructor(value) { 8735 super(value); 8736 } 8737 applyPeer(node, reset) { 8738 if (reset) { 8739 getUINativeModule().search.resetMaxLength(node); 8740 } else { 8741 getUINativeModule().search.setMaxLength(node, this.value); 8742 } 8743 } 8744 checkObjectDiff() { 8745 return !isBaseOrResourceEqual(this.stageValue, this.value); 8746 } 8747} 8748SearchMaxLengthModifier.identity = Symbol('searchMaxLength'); 8749class SearchTypeModifier extends ModifierWithKey { 8750 constructor(value) { 8751 super(value); 8752 } 8753 applyPeer(node, reset) { 8754 if (reset) { 8755 getUINativeModule().search.resetType(node); 8756 } else { 8757 getUINativeModule().search.setType(node, this.value); 8758 } 8759 } 8760 checkObjectDiff() { 8761 return !isBaseOrResourceEqual(this.stageValue, this.value); 8762 } 8763} 8764SearchTypeModifier.identity = Symbol('searchType'); 8765class SearchOnEditChangeModifier extends ModifierWithKey { 8766 constructor(value) { 8767 super(value); 8768 } 8769 applyPeer(node, reset) { 8770 if (reset) { 8771 getUINativeModule().search.resetOnEditChange(node); 8772 } else { 8773 getUINativeModule().search.setOnEditChange(node, this.value); 8774 } 8775 } 8776} 8777SearchOnEditChangeModifier.identity = Symbol('searchOnEditChange'); 8778class SearchOnSubmitModifier extends ModifierWithKey { 8779 constructor(value) { 8780 super(value); 8781 } 8782 applyPeer(node, reset) { 8783 if (reset) { 8784 getUINativeModule().search.resetOnSubmit(node); 8785 } else { 8786 getUINativeModule().search.setOnSubmit(node, this.value); 8787 } 8788 } 8789} 8790SearchOnSubmitModifier.identity = Symbol('searchOnSubmit'); 8791class SearchOnCopyModifier extends ModifierWithKey { 8792 constructor(value) { 8793 super(value); 8794 } 8795 applyPeer(node, reset) { 8796 if (reset) { 8797 getUINativeModule().search.resetOnCopy(node); 8798 } else { 8799 getUINativeModule().search.setOnCopy(node, this.value); 8800 } 8801 } 8802} 8803SearchOnCopyModifier.identity = Symbol('searchOnCopy'); 8804class SearchOnCutModifier extends ModifierWithKey { 8805 constructor(value) { 8806 super(value); 8807 } 8808 applyPeer(node, reset) { 8809 if (reset) { 8810 getUINativeModule().search.resetOnCut(node); 8811 } else { 8812 getUINativeModule().search.setOnCut(node, this.value); 8813 } 8814 } 8815} 8816SearchOnCutModifier.identity = Symbol('searchOnCut'); 8817class SearchOnPasteModifier extends ModifierWithKey { 8818 constructor(value) { 8819 super(value); 8820 } 8821 static identity = Symbol('searchOnPaste'); 8822 applyPeer(node, reset) { 8823 if (reset) { 8824 getUINativeModule().search.resetOnPaste(node); 8825 } else { 8826 getUINativeModule().search.setOnPaste(node, this.value); 8827 } 8828 } 8829} 8830SearchOnPasteModifier.identity = Symbol('searchOnPaste'); 8831class SearchOnChangeModifier extends ModifierWithKey { 8832 constructor(value) { 8833 super(value); 8834 } 8835 applyPeer(node, reset) { 8836 if (reset) { 8837 getUINativeModule().search.resetOnChange(node); 8838 } else { 8839 getUINativeModule().search.setOnChange(node, this.value); 8840 } 8841 } 8842} 8843SearchOnChangeModifier.identity = Symbol('searchOnChange'); 8844class SearchOnTextSelectionChangeModifier extends ModifierWithKey { 8845 constructor(value) { 8846 super(value); 8847 } 8848 applyPeer(node, reset) { 8849 if (reset) { 8850 getUINativeModule().search.resetOnTextSelectionChange(node); 8851 } else { 8852 getUINativeModule().search.setOnTextSelectionChange(node, this.value); 8853 } 8854 } 8855} 8856SearchOnTextSelectionChangeModifier.identity = Symbol('searchOnTextSelectionChange'); 8857class SearchOnContentScrollModifier extends ModifierWithKey { 8858 constructor(value) { 8859 super(value); 8860 } 8861 applyPeer(node, reset) { 8862 if (reset) { 8863 getUINativeModule().search.resetOnContentScroll(node); 8864 } else { 8865 getUINativeModule().search.setOnContentScroll(node, this.value); 8866 } 8867 } 8868} 8869SearchOnContentScrollModifier.identity = Symbol('searchOnContentScroll'); 8870class SearchShowCounterModifier extends ModifierWithKey { 8871 constructor(value) { 8872 super(value); 8873 } 8874 applyPeer(node, reset) { 8875 if (reset) { 8876 getUINativeModule().search.resetShowCounter(node); 8877 } 8878 else { 8879 getUINativeModule().search.setShowCounter(node, this.value.value, this.value.highlightBorder, this.value.thresholdPercentage); 8880 } 8881 } 8882 checkObjectDiff() { 8883 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 8884 !isBaseOrResourceEqual(this.stageValue.highlightBorder, this.value.highlightBorder) || 8885 !isBaseOrResourceEqual(this.stageValue.thresholdPercentage, this.value.thresholdPercentage); 8886 } 8887} 8888SearchShowCounterModifier.identity = Symbol('searchShowCounter'); 8889class SearchInitializeModifier extends ModifierWithKey { 8890 constructor(value) { 8891 super(value); 8892 } 8893 applyPeer(node, reset) { 8894 if (reset) { 8895 getUINativeModule().search.resetSearchInitialize(node); 8896 } else { 8897 getUINativeModule().search.setSearchInitialize(node, this.value.value, 8898 this.value.placeholder, this.value.icon, this.value.controller); 8899 } 8900 } 8901} 8902SearchInitializeModifier.identity = Symbol('searchInitialize'); 8903class SearchOnWillInsertModifier extends ModifierWithKey { 8904 constructor(value) { 8905 super(value); 8906 } 8907 applyPeer(node, reset) { 8908 if (reset) { 8909 getUINativeModule().search.resetOnWillInsert(node); 8910 } else { 8911 getUINativeModule().search.setOnWillInsert(node, this.value); 8912 } 8913 } 8914} 8915SearchOnWillInsertModifier.identity = Symbol('searchOnWillInsert'); 8916class SearchOnDidInsertModifier extends ModifierWithKey { 8917 constructor(value) { 8918 super(value); 8919 } 8920 applyPeer(node, reset) { 8921 if (reset) { 8922 getUINativeModule().search.resetOnDidInsert(node); 8923 } else { 8924 getUINativeModule().search.setOnDidInsert(node, this.value); 8925 } 8926 } 8927} 8928SearchOnDidInsertModifier.identity = Symbol('searchOnDidInsert'); 8929class SearchOnWillDeleteModifier extends ModifierWithKey { 8930 constructor(value) { 8931 super(value); 8932 } 8933 applyPeer(node, reset) { 8934 if (reset) { 8935 getUINativeModule().search.resetOnWillDelete(node); 8936 } else { 8937 getUINativeModule().search.setOnWillDelete(node, this.value); 8938 } 8939 } 8940} 8941SearchOnWillDeleteModifier.identity = Symbol('searchOnWillDelete'); 8942class SearchOnDidDeleteModifier extends ModifierWithKey { 8943 constructor(value) { 8944 super(value); 8945 } 8946 applyPeer(node, reset) { 8947 if (reset) { 8948 getUINativeModule().search.resetOnDidDelete(node); 8949 } else { 8950 getUINativeModule().search.setOnDidDelete(node, this.value); 8951 } 8952 } 8953} 8954SearchOnDidDeleteModifier.identity = Symbol('searchOnDidDelete'); 8955class SearchEnablePreviewTextModifier extends ModifierWithKey { 8956 constructor(value) { 8957 super(value); 8958 } 8959 applyPeer(node, reset) { 8960 if (reset) { 8961 getUINativeModule().search.resetEnablePreviewText(node); 8962 } 8963 else { 8964 getUINativeModule().search.setEnablePreviewText(node, this.value); 8965 } 8966 } 8967 checkObjectDiff() { 8968 return !isBaseOrResourceEqual(this.stageValue, this.value); 8969 } 8970} 8971SearchEnablePreviewTextModifier.identity = Symbol('searchEnablePreviewText'); 8972class SearchIdModifier extends ModifierWithKey { 8973 constructor(value) { 8974 super(value); 8975 } 8976 applyPeer(node, reset) { 8977 if (reset) { 8978 getUINativeModule().search.resetSearchInspectorId(node); 8979 } else { 8980 getUINativeModule().search.setSearchInspectorId(node, this.value); 8981 } 8982 } 8983 8984 checkObjectDiff() { 8985 return !isBaseOrResourceEqual(this.stageValue, this.value); 8986 } 8987} 8988SearchIdModifier.identity = Symbol('searchId'); 8989class SearchEditMenuOptionsModifier extends ModifierWithKey { 8990 constructor(value) { 8991 super(value); 8992 } 8993 applyPeer(node, reset) { 8994 if (reset) { 8995 getUINativeModule().search.resetSelectionMenuOptions(node); 8996 } else { 8997 getUINativeModule().search.setSelectionMenuOptions(node, this.value); 8998 } 8999 } 9000} 9001SearchEditMenuOptionsModifier.identity = Symbol('searchEditMenuOptions'); 9002class SearchEnableHapticFeedbackModifier extends ModifierWithKey { 9003 constructor(value) { 9004 super(value); 9005 } 9006 applyPeer(node, reset) { 9007 if (reset) { 9008 getUINativeModule().search.resetEnableHapticFeedback(node); 9009 } 9010 else { 9011 getUINativeModule().search.setEnableHapticFeedback(node, this.value); 9012 } 9013 } 9014 checkObjectDiff() { 9015 return !isBaseOrResourceEqual(this.stageValue, this.value); 9016 } 9017} 9018SearchEnableHapticFeedbackModifier.identity = Symbol('searchEnableHapticFeedback'); 9019class ArkSearchComponent extends ArkComponent { 9020 constructor(nativePtr, classType) { 9021 super(nativePtr, classType); 9022 } 9023 initialize(value) { 9024 if (value[0] !== undefined) { 9025 modifierWithKey(this._modifiersWithKeys, SearchInitializeModifier.identity, SearchInitializeModifier, value[0]); 9026 } else { 9027 modifierWithKey(this._modifiersWithKeys, SearchInitializeModifier.identity, SearchInitializeModifier, null); 9028 } 9029 return this; 9030 } 9031 onEditChange(callback) { 9032 modifierWithKey(this._modifiersWithKeys, SearchOnEditChangeModifier.identity, SearchOnEditChangeModifier, callback); 9033 return this; 9034 } 9035 type(value) { 9036 modifierWithKey(this._modifiersWithKeys, SearchTypeModifier.identity, SearchTypeModifier, value); 9037 return this; 9038 } 9039 maxLength(value) { 9040 modifierWithKey(this._modifiersWithKeys, SearchMaxLengthModifier.identity, SearchMaxLengthModifier, value); 9041 return this; 9042 } 9043 onEditChanged(callback) { 9044 modifierWithKey(this._modifiersWithKeys, SearchOnEditChangeModifier.identity, SearchOnEditChangeModifier, callback); 9045 return this; 9046 } 9047 customKeyboard(event) { 9048 throw new Error('Method not implemented.'); 9049 } 9050 showUnit(event) { 9051 throw new Error('Method not implemented.'); 9052 } 9053 onContentScroll(callback) { 9054 modifierWithKey(this._modifiersWithKeys, SearchOnContentScrollModifier.identity, 9055 SearchOnContentScrollModifier, callback); 9056 return this; 9057 } 9058 onChange(callback) { 9059 modifierWithKey(this._modifiersWithKeys, SearchOnChangeModifier.identity, SearchOnChangeModifier, callback); 9060 return this; 9061 } 9062 onTextSelectionChange(callback) { 9063 modifierWithKey(this._modifiersWithKeys, SearchOnTextSelectionChangeModifier.identity, 9064 SearchOnTextSelectionChangeModifier, callback); 9065 return this; 9066 } 9067 onCopy(callback) { 9068 modifierWithKey(this._modifiersWithKeys, SearchOnCopyModifier.identity, SearchOnCopyModifier, callback); 9069 return this; 9070 } 9071 onCut(callback) { 9072 modifierWithKey(this._modifiersWithKeys, SearchOnCutModifier.identity, SearchOnCutModifier, callback); 9073 return this; 9074 } 9075 onSubmit(callback) { 9076 modifierWithKey(this._modifiersWithKeys, SearchOnSubmitModifier.identity, SearchOnSubmitModifier, callback); 9077 return this; 9078 } 9079 onPaste(callback) { 9080 modifierWithKey(this._modifiersWithKeys, SearchOnPasteModifier.identity, SearchOnPasteModifier, callback); 9081 return this; 9082 } 9083 showCounter(value) { 9084 let arkValue = new ArkTextFieldShowCounter(); 9085 arkValue.value = value; 9086 arkValue.highlightBorder = options?.highlightBorder; 9087 arkValue.thresholdPercentage = options?.thresholdPercentage; 9088 modifierWithKey(this._modifiersWithKeys, SearchShowCounterModifier.identity, 9089 SearchShowCounterModifier, arkValue); 9090 return this; 9091 } 9092 searchButton(value, option) { 9093 let searchButton = new ArkSearchButton(); 9094 searchButton.value = value; 9095 searchButton.fontColor = option === null || option === void 0 ? void 0 : option.fontColor; 9096 searchButton.fontSize = option === null || option === void 0 ? void 0 : option.fontSize; 9097 modifierWithKey(this._modifiersWithKeys, SearchSearchButtonModifier.identity, SearchSearchButtonModifier, searchButton); 9098 return this; 9099 } 9100 selectionMenuHidden(value) { 9101 modifierWithKey(this._modifiersWithKeys, SearchSelectionMenuHiddenModifier.identity, SearchSelectionMenuHiddenModifier, value); 9102 return this; 9103 } 9104 enableKeyboardOnFocus(value) { 9105 modifierWithKey(this._modifiersWithKeys, SearchEnableKeyboardOnFocusModifier.identity, SearchEnableKeyboardOnFocusModifier, value); 9106 return this; 9107 } 9108 caretStyle(value) { 9109 modifierWithKey(this._modifiersWithKeys, SearchCaretStyleModifier.identity, SearchCaretStyleModifier, value); 9110 return this; 9111 } 9112 cancelButton(value) { 9113 modifierWithKey(this._modifiersWithKeys, SearchCancelButtonModifier.identity, SearchCancelButtonModifier, value); 9114 return this; 9115 } 9116 searchIcon(value) { 9117 modifierWithKey(this._modifiersWithKeys, SearchSearchIconModifier.identity, SearchSearchIconModifier, value); 9118 return this; 9119 } 9120 fontColor(value) { 9121 modifierWithKey(this._modifiersWithKeys, SearchFontColorModifier.identity, SearchFontColorModifier, value); 9122 return this; 9123 } 9124 fontFeature(value) { 9125 modifierWithKey(this._modifiersWithKeys, SearchFontFeatureModifier.identity, SearchFontFeatureModifier, value); 9126 return this; 9127 } 9128 placeholderColor(value) { 9129 modifierWithKey(this._modifiersWithKeys, SearchPlaceholderColorModifier.identity, SearchPlaceholderColorModifier, value); 9130 return this; 9131 } 9132 placeholderFont(value) { 9133 modifierWithKey(this._modifiersWithKeys, SearchPlaceholderFontModifier.identity, SearchPlaceholderFontModifier, value); 9134 return this; 9135 } 9136 textFont(value) { 9137 modifierWithKey(this._modifiersWithKeys, SearchTextFontModifier.identity, SearchTextFontModifier, value); 9138 return this; 9139 } 9140 copyOption(value) { 9141 modifierWithKey(this._modifiersWithKeys, SearchCopyOptionModifier.identity, SearchCopyOptionModifier, value); 9142 return this; 9143 } 9144 textAlign(value) { 9145 modifierWithKey(this._modifiersWithKeys, SearchTextAlignModifier.identity, SearchTextAlignModifier, value); 9146 return this; 9147 } 9148 enterKeyType(value) { 9149 modifierWithKey(this._modifiersWithKeys, SearchEnterKeyTypeModifier.identity, SearchEnterKeyTypeModifier, value); 9150 return this; 9151 } 9152 height(value) { 9153 modifierWithKey(this._modifiersWithKeys, SearchHeightModifier.identity, SearchHeightModifier, value); 9154 return this; 9155 } 9156 decoration(value) { 9157 modifierWithKey(this._modifiersWithKeys, SearchDecorationModifier.identity, SearchDecorationModifier, value); 9158 return this; 9159 } 9160 letterSpacing(value) { 9161 modifierWithKey(this._modifiersWithKeys, SearchLetterSpacingModifier.identity, SearchLetterSpacingModifier, value); 9162 return this; 9163 } 9164 lineHeight(value) { 9165 modifierWithKey(this._modifiersWithKeys, SearchLineHeightModifier.identity, SearchLineHeightModifier, value); 9166 return this; 9167 } 9168 id(value) { 9169 modifierWithKey(this._modifiersWithKeys, SearchIdModifier.identity, SearchIdModifier, value); 9170 return this; 9171 } 9172 key(value) { 9173 modifierWithKey(this._modifiersWithKeys, SearchIdModifier.identity, SearchIdModifier, value); 9174 return this; 9175 } 9176 minFontSize(value) { 9177 modifierWithKey(this._modifiersWithKeys, SearchMinFontSizeModifier.identity, SearchMinFontSizeModifier, value); 9178 return this; 9179 } 9180 maxFontSize(value) { 9181 modifierWithKey(this._modifiersWithKeys, SearchMaxFontSizeModifier.identity, SearchMaxFontSizeModifier, value); 9182 return this; 9183 } 9184 inputFilter(value, error) { 9185 let searchInputFilter = new ArkSearchInputFilter(); 9186 searchInputFilter.value = value; 9187 searchInputFilter.error = error; 9188 9189 modifierWithKey(this._modifiersWithKeys, SearchInputFilterModifier.identity, SearchInputFilterModifier, searchInputFilter); 9190 return this; 9191 } 9192 selectedBackgroundColor(value) { 9193 modifierWithKey(this._modifiersWithKeys, SearchSelectedBackgroundColorModifier.identity, SearchSelectedBackgroundColorModifier, value); 9194 return this; 9195 } 9196 textIndent(value) { 9197 modifierWithKey(this._modifiersWithKeys, SearchTextIndentModifier.identity, SearchTextIndentModifier, value); 9198 return this; 9199 } 9200 onWillInsert(callback) { 9201 modifierWithKey(this._modifiersWithKeys, SearchOnWillInsertModifier.identity, SearchOnWillInsertModifier, callback); 9202 return this; 9203 } 9204 onDidInsert(callback) { 9205 modifierWithKey(this._modifiersWithKeys, SearchOnDidInsertModifier.identity, SearchOnDidInsertModifier, callback); 9206 return this; 9207 } 9208 onWillDelete(callback) { 9209 modifierWithKey(this._modifiersWithKeys, SearchOnWillDeleteModifier.identity, SearchOnWillDeleteModifier, callback); 9210 return this; 9211 } 9212 onDidDelete(callback) { 9213 modifierWithKey(this._modifiersWithKeys, SearchOnDidDeleteModifier.identity, SearchOnDidDeleteModifier, callback); 9214 return this; 9215 } 9216 enablePreviewText(value) { 9217 modifierWithKey(this._modifiersWithKeys, SearchEnablePreviewTextModifier.identity, SearchEnablePreviewTextModifier, value); 9218 return this; 9219 } 9220 editMenuOptions(value) { 9221 modifierWithKey(this._modifiersWithKeys, SearchEditMenuOptionsModifier.identity, 9222 SearchEditMenuOptionsModifier, value); 9223 return this; 9224 } 9225 enableHapticFeedback(value) { 9226 modifierWithKey(this._modifiersWithKeys, SearchEnableHapticFeedbackModifier.identity, SearchEnableHapticFeedbackModifier, value); 9227 return this; 9228 } 9229} 9230// @ts-ignore 9231if (globalThis.Search !== undefined) { 9232 globalThis.Search.attributeModifier = function (modifier) { 9233 attributeModifierFunc.call(this, modifier, (nativePtr) => { 9234 return new ArkSearchComponent(nativePtr); 9235 }, (nativePtr, classType, modifierJS) => { 9236 return new modifierJS.SearchModifier(nativePtr, classType); 9237 }); 9238 }; 9239} 9240 9241/// <reference path='./import.ts' /> 9242class SpanFontSizeModifier extends ModifierWithKey { 9243 constructor(value) { 9244 super(value); 9245 } 9246 applyPeer(node, reset) { 9247 if (reset) { 9248 getUINativeModule().span.resetFontSize(node); 9249 } 9250 else { 9251 getUINativeModule().span.setFontSize(node, this.value); 9252 } 9253 } 9254 checkObjectDiff() { 9255 return !isBaseOrResourceEqual(this.stageValue, this.value); 9256 } 9257} 9258SpanFontSizeModifier.identity = Symbol('spanFontSize'); 9259class SpanFontFamilyModifier extends ModifierWithKey { 9260 constructor(value) { 9261 super(value); 9262 } 9263 applyPeer(node, reset) { 9264 if (reset) { 9265 getUINativeModule().span.resetFontFamily(node); 9266 } 9267 else { 9268 getUINativeModule().span.setFontFamily(node, this.value); 9269 } 9270 } 9271 checkObjectDiff() { 9272 return !isBaseOrResourceEqual(this.stageValue, this.value); 9273 } 9274} 9275SpanFontFamilyModifier.identity = Symbol('spanFontFamily'); 9276class SpanLineHeightModifier extends ModifierWithKey { 9277 constructor(value) { 9278 super(value); 9279 } 9280 applyPeer(node, reset) { 9281 if (reset) { 9282 getUINativeModule().span.resetLineHeight(node); 9283 } 9284 else { 9285 getUINativeModule().span.setLineHeight(node, this.value); 9286 } 9287 } 9288 checkObjectDiff() { 9289 return !isBaseOrResourceEqual(this.stageValue, this.value); 9290 } 9291} 9292SpanLineHeightModifier.identity = Symbol('spanLineHeight'); 9293class SpanFontStyleModifier extends ModifierWithKey { 9294 constructor(value) { 9295 super(value); 9296 } 9297 applyPeer(node, reset) { 9298 if (reset) { 9299 getUINativeModule().span.resetFontStyle(node); 9300 } 9301 else { 9302 getUINativeModule().span.setFontStyle(node, this.value); 9303 } 9304 } 9305 checkObjectDiff() { 9306 return !isBaseOrResourceEqual(this.stageValue, this.value); 9307 } 9308} 9309SpanFontStyleModifier.identity = Symbol('spanFontStyle'); 9310class SpanTextCaseModifier extends ModifierWithKey { 9311 constructor(value) { 9312 super(value); 9313 } 9314 applyPeer(node, reset) { 9315 if (reset) { 9316 getUINativeModule().span.resetTextCase(node); 9317 } 9318 else { 9319 getUINativeModule().span.setTextCase(node, this.value); 9320 } 9321 } 9322 checkObjectDiff() { 9323 return !isBaseOrResourceEqual(this.stageValue, this.value); 9324 } 9325} 9326SpanTextCaseModifier.identity = Symbol('spanTextCase'); 9327class SpanTextBackgroundStyleModifier extends ModifierWithKey { 9328 constructor(value) { 9329 super(value); 9330 } 9331 applyPeer(node, reset) { 9332 if (reset) { 9333 getUINativeModule().span.resetTextBackgroundStyle(node); 9334 } 9335 else { 9336 let textBackgroundStyle = new ArkTextBackGroundStyle(); 9337 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value)) { 9338 getUINativeModule().span.resetTextBackgroundStyle(node); 9339 } 9340 else { 9341 getUINativeModule().span.setTextBackgroundStyle(node, textBackgroundStyle.color, textBackgroundStyle.radius.topLeft, textBackgroundStyle.radius.topRight, textBackgroundStyle.radius.bottomLeft, textBackgroundStyle.radius.bottomRight); 9342 } 9343 } 9344 } 9345 checkObjectDiff() { 9346 let textBackgroundStyle = new ArkTextBackGroundStyle(); 9347 let stageTextBackGroundStyle = new ArkTextBackGroundStyle(); 9348 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value) || !stageTextBackGroundStyle.convertTextBackGroundStyleOptions(this.stageValue)) { 9349 return false; 9350 } 9351 else { 9352 return textBackgroundStyle.checkObjectDiff(stageTextBackGroundStyle); 9353 } 9354 } 9355} 9356SpanTextBackgroundStyleModifier.identity = Symbol('spanTextBackgroundStyle'); 9357class SpanTextShadowModifier extends ModifierWithKey { 9358 constructor(value) { 9359 super(value); 9360 } 9361 applyPeer(node, reset) { 9362 if (reset) { 9363 getUINativeModule().span.resetTextShadow(node); 9364 } 9365 else { 9366 let shadow = new ArkShadowInfoToArray(); 9367 if (!shadow.convertShadowOptions(this.value)) { 9368 getUINativeModule().span.resetTextShadow(node); 9369 } 9370 else { 9371 getUINativeModule().span.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 9372 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 9373 } 9374 } 9375 } 9376 checkObjectDiff() { 9377 let checkDiff = true; 9378 let arkShadow = new ArkShadowInfoToArray(); 9379 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 9380 Object.getPrototypeOf(this.value).constructor === Object) { 9381 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 9382 } 9383 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 9384 Object.getPrototypeOf(this.value).constructor === Array && 9385 this.stageValue.length === this.value.length) { 9386 let isDiffItem = false; 9387 for (let i = 0; i < this.value.length; i++) { 9388 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 9389 isDiffItem = true; 9390 break; 9391 } 9392 } 9393 if (!isDiffItem) { 9394 checkDiff = false; 9395 } 9396 } 9397 return checkDiff; 9398 } 9399} 9400SpanTextShadowModifier.identity = Symbol('spanTextShadow'); 9401class SpanFontColorModifier extends ModifierWithKey { 9402 constructor(value) { 9403 super(value); 9404 } 9405 applyPeer(node, reset) { 9406 if (reset) { 9407 getUINativeModule().span.resetFontColor(node); 9408 } 9409 else { 9410 getUINativeModule().span.setFontColor(node, this.value); 9411 } 9412 } 9413 checkObjectDiff() { 9414 return !isBaseOrResourceEqual(this.stageValue, this.value); 9415 } 9416} 9417SpanFontColorModifier.identity = Symbol('spanFontColor'); 9418class SpanLetterSpacingModifier extends ModifierWithKey { 9419 constructor(value) { 9420 super(value); 9421 } 9422 applyPeer(node, reset) { 9423 if (reset) { 9424 getUINativeModule().span.resetLetterSpacing(node); 9425 } 9426 else { 9427 getUINativeModule().span.setLetterSpacing(node, this.value); 9428 } 9429 } 9430} 9431SpanLetterSpacingModifier.identity = Symbol('spanLetterSpacing'); 9432class SpanBaselineOffsetModifier extends ModifierWithKey { 9433 constructor(value) { 9434 super(value); 9435 } 9436 applyPeer(node, reset) { 9437 if (reset) { 9438 getUINativeModule().span.resetBaselineOffset(node); 9439 } 9440 else { 9441 getUINativeModule().span.setBaselineOffset(node, this.value); 9442 } 9443 } 9444} 9445SpanBaselineOffsetModifier.identity = Symbol('spanBaselineOffset'); 9446class SpanFontModifier extends ModifierWithKey { 9447 constructor(value) { 9448 super(value); 9449 } 9450 applyPeer(node, reset) { 9451 if (reset) { 9452 getUINativeModule().span.resetFont(node); 9453 } 9454 else { 9455 getUINativeModule().span.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 9456 } 9457 } 9458 checkObjectDiff() { 9459 if (this.stageValue.weight !== this.value.weight || this.stageValue.style !== this.value.style || 9460 this.stageValue.enableVariableFontWeight !== this.value.enableVariableFontWeight) { 9461 return true; 9462 } 9463 if (((isResource(this.stageValue.size) && isResource(this.value.size) && 9464 isResourceEqual(this.stageValue.size, this.value.size)) || 9465 (!isResource(this.stageValue.size) && !isResource(this.value.size) && 9466 this.stageValue.size === this.value.size)) && 9467 ((isResource(this.stageValue.family) && isResource(this.value.family) && 9468 isResourceEqual(this.stageValue.family, this.value.family)) || 9469 (!isResource(this.stageValue.family) && !isResource(this.value.family) && 9470 this.stageValue.family === this.value.family))) { 9471 return false; 9472 } 9473 else { 9474 return true; 9475 } 9476 } 9477} 9478SpanFontModifier.identity = Symbol('spanFont'); 9479class SpanDecorationModifier extends ModifierWithKey { 9480 constructor(value) { 9481 super(value); 9482 } 9483 applyPeer(node, reset) { 9484 if (reset) { 9485 getUINativeModule().span.resetDecoration(node); 9486 } 9487 else { 9488 getUINativeModule().span.setDecoration(node, this.value.type, this.value.color, this.value.style); 9489 } 9490 } 9491 checkObjectDiff() { 9492 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 9493 return true; 9494 } 9495 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 9496 return !isResourceEqual(this.stageValue.color, this.value.color); 9497 } 9498 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 9499 return !(this.stageValue.color === this.value.color); 9500 } 9501 else { 9502 return true; 9503 } 9504 } 9505} 9506SpanDecorationModifier.identity = Symbol('spanDecoration'); 9507class SpanFontWeightModifier extends ModifierWithKey { 9508 constructor(value) { 9509 super(value); 9510 } 9511 applyPeer(node, reset) { 9512 if (reset) { 9513 getUINativeModule().span.resetFontWeight(node); 9514 } 9515 else { 9516 getUINativeModule().span.setFontWeight(node, this.value); 9517 } 9518 } 9519} 9520SpanFontWeightModifier.identity = Symbol('spanfontweight'); 9521class SpanInputModifier extends ModifierWithKey { 9522 constructor(value) { 9523 super(value); 9524 } 9525 applyPeer(node, reset) { 9526 if (reset) { 9527 getUINativeModule().span.setSpanSrc(node, ''); 9528 } 9529 else { 9530 getUINativeModule().span.setSpanSrc(node, this.value); 9531 } 9532 } 9533} 9534SpanInputModifier.identity = Symbol('spanInput'); 9535class SpanAccessibilityTextModifier extends ModifierWithKey { 9536 constructor(value) { 9537 super(value); 9538 } 9539 applyPeer(node, reset) { 9540 if (reset) { 9541 getUINativeModule().span.resetAccessibilityText(node); 9542 } else { 9543 getUINativeModule().span.setAccessibilityText(node, this.value); 9544 } 9545 } 9546} 9547SpanAccessibilityTextModifier.identity = Symbol('spanAccessibilityText'); 9548class SpanAccessibilityDescriptionModifier extends ModifierWithKey { 9549 constructor(value) { 9550 super(value); 9551 } 9552 applyPeer(node, reset) { 9553 if (reset) { 9554 getUINativeModule().span.resetAccessibilityDescription(node); 9555 } else { 9556 getUINativeModule().span.setAccessibilityDescription(node, this.value); 9557 } 9558 } 9559} 9560SpanAccessibilityDescriptionModifier.identity = Symbol('spanAccessibilityDescription'); 9561class SpanAccessibilityLevelModifier extends ModifierWithKey { 9562 constructor(value) { 9563 super(value); 9564 } 9565 applyPeer(node, reset) { 9566 if (reset) { 9567 getUINativeModule().span.resetAccessibilityLevel(node); 9568 } else { 9569 getUINativeModule().span.setAccessibilityLevel(node, this.value); 9570 } 9571 } 9572} 9573SpanAccessibilityLevelModifier.identity = Symbol('spanAccessibilityLevel'); 9574class ArkSpanComponent { 9575 constructor(nativePtr, classType) { 9576 this._modifiersWithKeys = new Map(); 9577 this.nativePtr = nativePtr; 9578 this._changed = false; 9579 this._classType = classType; 9580 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(nativePtr); 9581 this._nativePtrChanged = false; 9582 } 9583 initialize(value) { 9584 modifierWithKey(this._modifiersWithKeys, SpanInputModifier.identity, SpanInputModifier, value[0]); 9585 return this; 9586 } 9587 applyModifierPatch() { 9588 let expiringItemsWithKeys = []; 9589 this._modifiersWithKeys.forEach((value, key) => { 9590 if (value.applyStage(this.nativePtr)) { 9591 expiringItemsWithKeys.push(key); 9592 } 9593 }); 9594 expiringItemsWithKeys.forEach(key => { 9595 this._modifiersWithKeys.delete(key); 9596 }); 9597 } 9598 cleanStageValue() { 9599 if (!this._modifiersWithKeys) { 9600 return; 9601 } 9602 this._modifiersWithKeys.forEach((value, key) => { 9603 value.stageValue = undefined; 9604 }); 9605 } 9606 applyStateUpdatePtr(instance) { 9607 if (this.nativePtr !== instance.nativePtr) { 9608 this.nativePtr = instance.nativePtr; 9609 this._nativePtrChanged = true; 9610 if (instance._weakPtr) { 9611 this._weakPtr = instance._weakPtr; 9612 } else { 9613 this._weakPtr = getUINativeModule().nativeUtils.createNativeWeakRef(this.nativePtr); 9614 } 9615 } 9616 } 9617 onGestureJudgeBegin(callback) { 9618 throw new Error('Method not implemented.'); 9619 } 9620 outline(value) { 9621 throw new Error('Method not implemented.'); 9622 } 9623 outlineColor(value) { 9624 throw new Error('Method not implemented.'); 9625 } 9626 outlineRadius(value) { 9627 throw new Error('Method not implemented.'); 9628 } 9629 outlineStyle(value) { 9630 throw new Error('Method not implemented.'); 9631 } 9632 outlineWidth(value) { 9633 throw new Error('Method not implemented.'); 9634 } 9635 width(value) { 9636 throw new Error('Method not implemented.'); 9637 } 9638 height(value) { 9639 throw new Error('Method not implemented.'); 9640 } 9641 expandSafeArea(types, edges) { 9642 throw new Error('Method not implemented.'); 9643 } 9644 responseRegion(value) { 9645 throw new Error('Method not implemented.'); 9646 } 9647 mouseResponseRegion(value) { 9648 throw new Error('Method not implemented.'); 9649 } 9650 size(value) { 9651 throw new Error('Method not implemented.'); 9652 } 9653 constraintSize(value) { 9654 throw new Error('Method not implemented.'); 9655 } 9656 touchable(value) { 9657 throw new Error('Method not implemented.'); 9658 } 9659 hitTestBehavior(value) { 9660 throw new Error('Method not implemented.'); 9661 } 9662 layoutWeight(value) { 9663 throw new Error('Method not implemented.'); 9664 } 9665 padding(value) { 9666 throw new Error('Method not implemented.'); 9667 } 9668 margin(value) { 9669 throw new Error('Method not implemented.'); 9670 } 9671 background(builder, options) { 9672 throw new Error('Method not implemented.'); 9673 } 9674 backgroundColor(value) { 9675 throw new Error('Method not implemented.'); 9676 } 9677 backgroundImage(src, repeat) { 9678 throw new Error('Method not implemented.'); 9679 } 9680 backgroundImageSize(value) { 9681 throw new Error('Method not implemented.'); 9682 } 9683 backgroundImagePosition(value) { 9684 throw new Error('Method not implemented.'); 9685 } 9686 backgroundBlurStyle(value, options) { 9687 throw new Error('Method not implemented.'); 9688 } 9689 foregroundBlurStyle(value, options) { 9690 throw new Error('Method not implemented.'); 9691 } 9692 opacity(value) { 9693 throw new Error('Method not implemented.'); 9694 } 9695 border(value) { 9696 throw new Error('Method not implemented.'); 9697 } 9698 borderStyle(value) { 9699 throw new Error('Method not implemented.'); 9700 } 9701 borderWidth(value) { 9702 throw new Error('Method not implemented.'); 9703 } 9704 borderColor(value) { 9705 throw new Error('Method not implemented.'); 9706 } 9707 borderRadius(value) { 9708 throw new Error('Method not implemented.'); 9709 } 9710 borderImage(value) { 9711 throw new Error('Method not implemented.'); 9712 } 9713 foregroundColor(value) { 9714 throw new Error('Method not implemented.'); 9715 } 9716 onClick(event) { 9717 modifierWithKey(this._modifiersWithKeys, ClickModifier.identity, ClickModifier, event); 9718 return this; 9719 } 9720 onHover(event) { 9721 throw new Error('Method not implemented.'); 9722 } 9723 hoverEffect(value) { 9724 throw new Error('Method not implemented.'); 9725 } 9726 onMouse(event) { 9727 throw new Error('Method not implemented.'); 9728 } 9729 onTouch(event) { 9730 throw new Error('Method not implemented.'); 9731 } 9732 onKeyEvent(event) { 9733 throw new Error('Method not implemented.'); 9734 } 9735 focusable(value) { 9736 throw new Error('Method not implemented.'); 9737 } 9738 onFocus(event) { 9739 throw new Error('Method not implemented.'); 9740 } 9741 onBlur(event) { 9742 throw new Error('Method not implemented.'); 9743 } 9744 tabIndex(index) { 9745 throw new Error('Method not implemented.'); 9746 } 9747 defaultFocus(value) { 9748 throw new Error('Method not implemented.'); 9749 } 9750 groupDefaultFocus(value) { 9751 throw new Error('Method not implemented.'); 9752 } 9753 focusOnTouch(value) { 9754 throw new Error('Method not implemented.'); 9755 } 9756 animation(value) { 9757 throw new Error('Method not implemented.'); 9758 } 9759 transition(value) { 9760 throw new Error('Method not implemented.'); 9761 } 9762 gesture(gesture, mask) { 9763 throw new Error('Method not implemented.'); 9764 } 9765 priorityGesture(gesture, mask) { 9766 throw new Error('Method not implemented.'); 9767 } 9768 parallelGesture(gesture, mask) { 9769 throw new Error('Method not implemented.'); 9770 } 9771 blur(value) { 9772 throw new Error('Method not implemented.'); 9773 } 9774 linearGradientBlur(value, options) { 9775 throw new Error('Method not implemented.'); 9776 } 9777 brightness(value) { 9778 throw new Error('Method not implemented.'); 9779 } 9780 contrast(value) { 9781 throw new Error('Method not implemented.'); 9782 } 9783 grayscale(value) { 9784 throw new Error('Method not implemented.'); 9785 } 9786 colorBlend(value) { 9787 throw new Error('Method not implemented.'); 9788 } 9789 saturate(value) { 9790 throw new Error('Method not implemented.'); 9791 } 9792 sepia(value) { 9793 throw new Error('Method not implemented.'); 9794 } 9795 invert(value) { 9796 throw new Error('Method not implemented.'); 9797 } 9798 hueRotate(value) { 9799 throw new Error('Method not implemented.'); 9800 } 9801 useEffect(value) { 9802 throw new Error('Method not implemented.'); 9803 } 9804 backdropBlur(value) { 9805 throw new Error('Method not implemented.'); 9806 } 9807 renderGroup(value) { 9808 throw new Error('Method not implemented.'); 9809 } 9810 translate(value) { 9811 throw new Error('Method not implemented.'); 9812 } 9813 scale(value) { 9814 throw new Error('Method not implemented.'); 9815 } 9816 gridSpan(value) { 9817 throw new Error('Method not implemented.'); 9818 } 9819 gridOffset(value) { 9820 throw new Error('Method not implemented.'); 9821 } 9822 rotate(value) { 9823 throw new Error('Method not implemented.'); 9824 } 9825 transform(value) { 9826 throw new Error('Method not implemented.'); 9827 } 9828 onAppear(event) { 9829 throw new Error('Method not implemented.'); 9830 } 9831 onDisAppear(event) { 9832 throw new Error('Method not implemented.'); 9833 } 9834 onAttach(event) { 9835 throw new Error('Method not implemented.'); 9836 } 9837 onDetach(event) { 9838 throw new Error('Method not implemented.'); 9839 } 9840 onAreaChange(event) { 9841 throw new Error('Method not implemented.'); 9842 } 9843 visibility(value) { 9844 throw new Error('Method not implemented.'); 9845 } 9846 flexGrow(value) { 9847 throw new Error('Method not implemented.'); 9848 } 9849 flexShrink(value) { 9850 throw new Error('Method not implemented.'); 9851 } 9852 flexBasis(value) { 9853 throw new Error('Method not implemented.'); 9854 } 9855 alignSelf(value) { 9856 throw new Error('Method not implemented.'); 9857 } 9858 displayPriority(value) { 9859 throw new Error('Method not implemented.'); 9860 } 9861 zIndex(value) { 9862 throw new Error('Method not implemented.'); 9863 } 9864 sharedTransition(id, options) { 9865 throw new Error('Method not implemented.'); 9866 } 9867 direction(value) { 9868 throw new Error('Method not implemented.'); 9869 } 9870 align(value) { 9871 throw new Error('Method not implemented.'); 9872 } 9873 position(value) { 9874 throw new Error('Method not implemented.'); 9875 } 9876 markAnchor(value) { 9877 throw new Error('Method not implemented.'); 9878 } 9879 offset(value) { 9880 throw new Error('Method not implemented.'); 9881 } 9882 enabled(value) { 9883 throw new Error('Method not implemented.'); 9884 } 9885 useSizeType(value) { 9886 throw new Error('Method not implemented.'); 9887 } 9888 alignRules(value) { 9889 throw new Error('Method not implemented.'); 9890 } 9891 aspectRatio(value) { 9892 throw new Error('Method not implemented.'); 9893 } 9894 clickEffect(value) { 9895 throw new Error('Method not implemented.'); 9896 } 9897 onDragStart(event) { 9898 throw new Error('Method not implemented.'); 9899 } 9900 onDragEnter(event) { 9901 throw new Error('Method not implemented.'); 9902 } 9903 onDragMove(event) { 9904 throw new Error('Method not implemented.'); 9905 } 9906 onDragLeave(event) { 9907 throw new Error('Method not implemented.'); 9908 } 9909 onDrop(event) { 9910 throw new Error('Method not implemented.'); 9911 } 9912 onDragEnd(event) { 9913 throw new Error('Method not implemented.'); 9914 } 9915 allowDrop(value) { 9916 throw new Error('Method not implemented.'); 9917 } 9918 draggable(value) { 9919 throw new Error('Method not implemented.'); 9920 } 9921 overlay(value, options) { 9922 throw new Error('Method not implemented.'); 9923 } 9924 linearGradient(value) { 9925 throw new Error('Method not implemented.'); 9926 } 9927 sweepGradient(value) { 9928 throw new Error('Method not implemented.'); 9929 } 9930 radialGradient(value) { 9931 throw new Error('Method not implemented.'); 9932 } 9933 motionPath(value) { 9934 throw new Error('Method not implemented.'); 9935 } 9936 motionBlur(value) { 9937 throw new Error('Method not implemented.'); 9938 } 9939 shadow(value) { 9940 throw new Error('Method not implemented.'); 9941 } 9942 mask(value) { 9943 throw new Error('Method not implemented.'); 9944 } 9945 key(value) { 9946 throw new Error('Method not implemented.'); 9947 } 9948 id(value) { 9949 throw new Error('Method not implemented.'); 9950 } 9951 geometryTransition(id) { 9952 throw new Error('Method not implemented.'); 9953 } 9954 bindPopup(show, popup) { 9955 throw new Error('Method not implemented.'); 9956 } 9957 bindMenu(content, options) { 9958 throw new Error('Method not implemented.'); 9959 } 9960 bindContextMenu(content, responseType, options) { 9961 throw new Error('Method not implemented.'); 9962 } 9963 bindContentCover(isShow, builder, type) { 9964 throw new Error('Method not implemented.'); 9965 } 9966 blendMode(value) { 9967 throw new Error('Method not implemented.'); 9968 } 9969 clip(value) { 9970 throw new Error('Method not implemented.'); 9971 } 9972 bindSheet(isShow, builder, options) { 9973 throw new Error('Method not implemented.'); 9974 } 9975 stateStyles(value) { 9976 throw new Error('Method not implemented.'); 9977 } 9978 restoreId(value) { 9979 throw new Error('Method not implemented.'); 9980 } 9981 onVisibleAreaChange(ratios, event) { 9982 throw new Error('Method not implemented.'); 9983 } 9984 sphericalEffect(value) { 9985 throw new Error('Method not implemented.'); 9986 } 9987 lightUpEffect(value) { 9988 throw new Error('Method not implemented.'); 9989 } 9990 pixelStretchEffect(options) { 9991 throw new Error('Method not implemented.'); 9992 } 9993 keyboardShortcut(value, keys, action) { 9994 throw new Error('Method not implemented.'); 9995 } 9996 accessibilityGroup(value) { 9997 throw new Error('Method not implemented.'); 9998 } 9999 accessibilityText(value) { 10000 if (typeof value === 'string') { 10001 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityTextModifier.identity, SpanAccessibilityTextModifier, value); 10002 } 10003 else { 10004 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityTextModifier.identity, SpanAccessibilityTextModifier, undefined); 10005 } 10006 return this; 10007 } 10008 accessibilityDescription(value) { 10009 if (typeof value === 'string') { 10010 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityDescriptionModifier.identity, SpanAccessibilityDescriptionModifier, value); 10011 } 10012 else { 10013 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityDescriptionModifier.identity, SpanAccessibilityDescriptionModifier, undefined); 10014 } 10015 return this; 10016 } 10017 accessibilityLevel(value) { 10018 if (typeof value === 'string') { 10019 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityLevelModifier.identity, SpanAccessibilityLevelModifier, value); 10020 } 10021 else { 10022 modifierWithKey(this._modifiersWithKeys, SpanAccessibilityLevelModifier.identity, SpanAccessibilityLevelModifier, undefined); 10023 } 10024 return this; 10025 } 10026 obscured(reasons) { 10027 throw new Error('Method not implemented.'); 10028 } 10029 reuseId(id) { 10030 throw new Error('Method not implemented.'); 10031 } 10032 renderFit(fitMode) { 10033 throw new Error('Method not implemented.'); 10034 } 10035 attributeModifier(modifier) { 10036 return this; 10037 } 10038 decoration(value) { 10039 modifierWithKey(this._modifiersWithKeys, SpanDecorationModifier.identity, SpanDecorationModifier, value); 10040 return this; 10041 } 10042 font(value) { 10043 modifierWithKey(this._modifiersWithKeys, SpanFontSizeModifier.identity, SpanFontSizeModifier, 10044 value === null || value === void 0 ? void 0 : value.size); 10045 modifierWithKey(this._modifiersWithKeys, SpanFontWeightModifier.identity, SpanFontWeightModifier, 10046 value === null || value === void 0 ? void 0 : value.weight); 10047 modifierWithKey(this._modifiersWithKeys, SpanFontFamilyModifier.identity, SpanFontFamilyModifier, 10048 value === null || value === void 0 ? void 0 : value.family); 10049 modifierWithKey(this._modifiersWithKeys, SpanFontStyleModifier.identity, SpanFontStyleModifier, 10050 value === null || value === void 0 ? void 0 : value.style); 10051 return this; 10052 } 10053 lineHeight(value) { 10054 modifierWithKey(this._modifiersWithKeys, SpanLineHeightModifier.identity, SpanLineHeightModifier, value); 10055 return this; 10056 } 10057 fontSize(value) { 10058 modifierWithKey(this._modifiersWithKeys, SpanFontSizeModifier.identity, SpanFontSizeModifier, value); 10059 return this; 10060 } 10061 fontColor(value) { 10062 modifierWithKey(this._modifiersWithKeys, SpanFontColorModifier.identity, SpanFontColorModifier, value); 10063 return this; 10064 } 10065 fontStyle(value) { 10066 modifierWithKey(this._modifiersWithKeys, SpanFontStyleModifier.identity, SpanFontStyleModifier, value); 10067 return this; 10068 } 10069 fontWeight(value) { 10070 modifierWithKey(this._modifiersWithKeys, SpanFontWeightModifier.identity, SpanFontWeightModifier, value); 10071 return this; 10072 } 10073 fontFamily(value) { 10074 modifierWithKey(this._modifiersWithKeys, SpanFontFamilyModifier.identity, SpanFontFamilyModifier, value); 10075 return this; 10076 } 10077 letterSpacing(value) { 10078 modifierWithKey(this._modifiersWithKeys, SpanLetterSpacingModifier.identity, SpanLetterSpacingModifier, value); 10079 return this; 10080 } 10081 baselineOffset(value) { 10082 modifierWithKey(this._modifiersWithKeys, SpanBaselineOffsetModifier.identity, SpanBaselineOffsetModifier, value); 10083 return this; 10084 } 10085 textCase(value) { 10086 modifierWithKey(this._modifiersWithKeys, SpanTextCaseModifier.identity, SpanTextCaseModifier, value); 10087 return this; 10088 } 10089 textBackgroundStyle(value) { 10090 modifierWithKey(this._modifiersWithKeys, SpanTextBackgroundStyleModifier.identity, SpanTextBackgroundStyleModifier, value); 10091 return this; 10092 } 10093 textShadow(value) { 10094 modifierWithKey(this._modifiersWithKeys, SpanTextShadowModifier.identity, SpanTextShadowModifier, value); 10095 return this; 10096 } 10097} 10098// @ts-ignore 10099if (globalThis.Span !== undefined) { 10100 globalThis.Span.attributeModifier = function (modifier) { 10101 attributeModifierFuncWithoutStateStyles.call(this, modifier, (nativePtr) => { 10102 return new ArkSpanComponent(nativePtr); 10103 }, (nativePtr, classType, modifierJS) => { 10104 return new modifierJS.SpanModifier(nativePtr, classType); 10105 }); 10106 }; 10107} 10108 10109/// <reference path='./import.ts' /> 10110class SideBarContainerPositionModifier extends ModifierWithKey { 10111 constructor(value) { 10112 super(value); 10113 } 10114 applyPeer(node, reset) { 10115 if (reset) { 10116 getUINativeModule().sideBarContainer.resetSideBarPosition(node); 10117 } 10118 else { 10119 getUINativeModule().sideBarContainer.setSideBarPosition(node, this.value); 10120 } 10121 } 10122 checkObjectDiff() { 10123 return !isBaseOrResourceEqual(this.stageValue, this.value); 10124 } 10125} 10126SideBarContainerPositionModifier.identity = Symbol('sideBarContainerPosition'); 10127class SideBarContainerAutoHideModifier extends ModifierWithKey { 10128 constructor(value) { 10129 super(value); 10130 } 10131 applyPeer(node, reset) { 10132 if (reset) { 10133 getUINativeModule().sideBarContainer.resetAutoHide(node); 10134 } 10135 else { 10136 getUINativeModule().sideBarContainer.setAutoHide(node, this.value); 10137 } 10138 } 10139 checkObjectDiff() { 10140 return !isBaseOrResourceEqual(this.stageValue, this.value); 10141 } 10142} 10143SideBarContainerAutoHideModifier.identity = Symbol('sideBarContainerautoHide'); 10144class SideBarContainerShowSideBarModifier extends ModifierWithKey { 10145 constructor(value) { 10146 super(value); 10147 } 10148 applyPeer(node, reset) { 10149 if (reset) { 10150 getUINativeModule().sideBarContainer.resetShowSideBar(node); 10151 } 10152 else { 10153 getUINativeModule().sideBarContainer.setShowSideBar(node, this.value); 10154 } 10155 } 10156 checkObjectDiff() { 10157 return !isBaseOrResourceEqual(this.stageValue, this.value); 10158 } 10159} 10160SideBarContainerShowSideBarModifier.identity = Symbol('sideBarContainerShowSideBar'); 10161class SideBarContainerMaxSideBarWidthModifier extends ModifierWithKey { 10162 constructor(value) { 10163 super(value); 10164 } 10165 applyPeer(node, reset) { 10166 if (reset) { 10167 getUINativeModule().sideBarContainer.resetMaxSideBarWidth(node); 10168 } 10169 else { 10170 getUINativeModule().sideBarContainer.setMaxSideBarWidth(node, this.value); 10171 } 10172 } 10173 checkObjectDiff() { 10174 return !isBaseOrResourceEqual(this.stageValue, this.value); 10175 } 10176} 10177SideBarContainerMaxSideBarWidthModifier.identity = Symbol('sideBarContainerMaxSideBarWidth'); 10178class SideBarContainerWidthModifier extends ModifierWithKey { 10179 constructor(value) { 10180 super(value); 10181 } 10182 applyPeer(node, reset) { 10183 if (reset) { 10184 getUINativeModule().sideBarContainer.resetSideBarWidth(node); 10185 } 10186 else { 10187 getUINativeModule().sideBarContainer.setSideBarWidth(node, this.value); 10188 } 10189 } 10190 checkObjectDiff() { 10191 return !isBaseOrResourceEqual(this.stageValue, this.value); 10192 } 10193} 10194SideBarContainerWidthModifier.identity = Symbol('sideBarContainerWidth'); 10195class SideBarContainerMinContentWidthModifier extends ModifierWithKey { 10196 constructor(value) { 10197 super(value); 10198 } 10199 applyPeer(node, reset) { 10200 if (reset) { 10201 getUINativeModule().sideBarContainer.resetMinContentWidth(node); 10202 } 10203 else { 10204 getUINativeModule().sideBarContainer.setMinContentWidth(node, this.value); 10205 } 10206 } 10207 checkObjectDiff() { 10208 return !isBaseOrResourceEqual(this.stageValue, this.value); 10209 } 10210} 10211SideBarContainerMinContentWidthModifier.identity = Symbol('sideBarContainerMinContentWidth'); 10212class SideBarContainerShowControlButtonModifier extends ModifierWithKey { 10213 constructor(value) { 10214 super(value); 10215 } 10216 applyPeer(node, reset) { 10217 if (reset) { 10218 getUINativeModule().sideBarContainer.resetShowControlButton(node); 10219 } 10220 else { 10221 getUINativeModule().sideBarContainer.setShowControlButton(node, this.value); 10222 } 10223 } 10224 checkObjectDiff() { 10225 return !isBaseOrResourceEqual(this.stageValue, this.value); 10226 } 10227} 10228SideBarContainerShowControlButtonModifier.identity = Symbol('sideBarContainerShowControlButton'); 10229class SideBarContainerMinSideBarWidthModifier extends ModifierWithKey { 10230 constructor(value) { 10231 super(value); 10232 } 10233 applyPeer(node, reset) { 10234 if (reset) { 10235 getUINativeModule().sideBarContainer.resetMinSideBarWidth(node); 10236 } 10237 else { 10238 getUINativeModule().sideBarContainer.setMinSideBarWidth(node, this.value); 10239 } 10240 } 10241 checkObjectDiff() { 10242 return !isBaseOrResourceEqual(this.stageValue, this.value); 10243 } 10244} 10245SideBarContainerMinSideBarWidthModifier.identity = Symbol('sideBarContainerMinSideBarWidth'); 10246class SideBarContainerControlButtonModifier extends ModifierWithKey { 10247 constructor(value) { 10248 super(value); 10249 } 10250 applyPeer(node, reset) { 10251 let _a, _b, _c; 10252 if (reset) { 10253 getUINativeModule().sideBarContainer.resetControlButton(node); 10254 } 10255 else { 10256 getUINativeModule().sideBarContainer.setControlButton(node, this.value.left, 10257 this.value.top, this.value.width, this.value.height, (_a = this.value.icons) === null || 10258 _a === void 0 ? void 0 : _a.shown, (_b = this.value.icons) === null || 10259 _b === void 0 ? void 0 : _b.hidden, (_c = this.value.icons) === null || 10260 _c === void 0 ? void 0 : _c.switching); 10261 } 10262 } 10263 checkObjectDiff() { 10264 let _a, _b, _c, _d, _e, _f; 10265 if (!(this.stageValue.left === this.value.left && 10266 this.stageValue.top === this.value.top && 10267 this.stageValue.width === this.value.width && 10268 this.stageValue.height === this.value.height)) { 10269 return true; 10270 } 10271 else { 10272 return !isBaseOrResourceEqual((_a = this.stageValue.icons) === null || _a === void 0 ? void 0 : _a.shown, (_b = this.value.icons) === null || 10273 _b === void 0 ? void 0 : _b.shown) || 10274 !isBaseOrResourceEqual((_c = this.stageValue.icons) === null || _c === void 0 ? void 0 : _c.hidden, (_d = this.value.icons) === null || 10275 _d === void 0 ? void 0 : _d.hidden) || 10276 !isBaseOrResourceEqual((_e = this.stageValue.icons) === null || _e === void 0 ? void 0 : _e.switching, (_f = this.value.icons) === null || 10277 _f === void 0 ? void 0 : _f.switching); 10278 } 10279 } 10280} 10281SideBarContainerControlButtonModifier.identity = Symbol('sideBarContainercontrolButton'); 10282class SideBarContainerDividerModifier extends ModifierWithKey { 10283 constructor(value) { 10284 super(value); 10285 } 10286 applyPeer(node, reset) { 10287 if (reset) { 10288 getUINativeModule().sideBarContainer.resetDivider(node); 10289 } 10290 else { 10291 if (!this.value || !isObject(this.value) || !this.value.strokeWidth) { 10292 getUINativeModule().sideBarContainer.resetDivider(node); 10293 } 10294 else { 10295 getUINativeModule().sideBarContainer.setDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 10296 } 10297 } 10298 } 10299 checkObjectDiff() { 10300 return !isBaseOrResourceEqual(this.stageValue.strokeWidth, this.value.strokeWidth) || 10301 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 10302 !isBaseOrResourceEqual(this.stageValue.startMargin, this.value.startMargin) || 10303 !isBaseOrResourceEqual(this.stageValue.endMargin, this.value.endMargin); 10304 } 10305} 10306SideBarContainerDividerModifier.identity = Symbol('sideBarContainerdivider'); 10307class ArkSideBarContainerComponent extends ArkComponent { 10308 constructor(nativePtr, classType) { 10309 super(nativePtr, classType); 10310 } 10311 onChange(callback) { 10312 throw new Error('Method not implemented.'); 10313 } 10314 autoHide(value) { 10315 modifierWithKey(this._modifiersWithKeys, SideBarContainerAutoHideModifier.identity, SideBarContainerAutoHideModifier, value); 10316 return this; 10317 } 10318 showSideBar(value) { 10319 modifierWithKey(this._modifiersWithKeys, SideBarContainerShowSideBarModifier.identity, SideBarContainerShowSideBarModifier, value); 10320 return this; 10321 } 10322 maxSideBarWidth(value) { 10323 modifierWithKey(this._modifiersWithKeys, SideBarContainerMaxSideBarWidthModifier.identity, SideBarContainerMaxSideBarWidthModifier, value); 10324 return this; 10325 } 10326 minSideBarWidth(value) { 10327 modifierWithKey(this._modifiersWithKeys, SideBarContainerMinSideBarWidthModifier.identity, SideBarContainerMinSideBarWidthModifier, value); 10328 return this; 10329 } 10330 minContentWidth(value) { 10331 modifierWithKey(this._modifiersWithKeys, SideBarContainerMinContentWidthModifier.identity, SideBarContainerMinContentWidthModifier, value); 10332 return this; 10333 } 10334 controlButton(value) { 10335 modifierWithKey(this._modifiersWithKeys, SideBarContainerControlButtonModifier.identity, SideBarContainerControlButtonModifier, value); 10336 return this; 10337 } 10338 divider(value) { 10339 modifierWithKey(this._modifiersWithKeys, SideBarContainerDividerModifier.identity, SideBarContainerDividerModifier, value); 10340 return this; 10341 } 10342 sideBarPosition(value) { 10343 modifierWithKey(this._modifiersWithKeys, SideBarContainerPositionModifier.identity, SideBarContainerPositionModifier, value); 10344 return this; 10345 } 10346 sideBarWidth(value) { 10347 modifierWithKey(this._modifiersWithKeys, SideBarContainerWidthModifier.identity, SideBarContainerWidthModifier, value); 10348 return this; 10349 } 10350 showControlButton(value) { 10351 modifierWithKey(this._modifiersWithKeys, SideBarContainerShowControlButtonModifier.identity, SideBarContainerShowControlButtonModifier, value); 10352 return this; 10353 } 10354} 10355// @ts-ignore 10356if (globalThis.SideBarContainer !== undefined) { 10357 globalThis.SideBarContainer.attributeModifier = function (modifier) { 10358 attributeModifierFunc.call(this, modifier, (nativePtr) => { 10359 return new ArkSideBarContainerComponent(nativePtr); 10360 }, (nativePtr, classType, modifierJS) => { 10361 return new modifierJS.SideBarContainerModifier(nativePtr, classType); 10362 }); 10363 }; 10364} 10365 10366/// <reference path='./import.ts' /> 10367class ArkStackComponent extends ArkComponent { 10368 constructor(nativePtr, classType) { 10369 super(nativePtr, classType); 10370 } 10371 initialize(value) { 10372 if (value[0] !== undefined) { 10373 this.alignContent(value[0].alignContent); 10374 } 10375 return this 10376 } 10377 alignContent(value) { 10378 modifierWithKey(this._modifiersWithKeys, StackAlignContentModifier.identity, StackAlignContentModifier, value); 10379 return this; 10380 } 10381 align(value) { 10382 modifierWithKey(this._modifiersWithKeys, StackAlignContentModifier.identity, StackAlignContentModifier, value); 10383 return this; 10384 } 10385 pointLight(value) { 10386 modifierWithKey(this._modifiersWithKeys, StackPointLightModifier.identity, StackPointLightModifier, value); 10387 return this; 10388 } 10389} 10390class StackPointLightModifier extends ModifierWithKey { 10391 constructor(value) { 10392 super(value); 10393 } 10394 applyPeer(node, reset) { 10395 if (reset) { 10396 getUINativeModule().common.resetPointLightStyle(node); 10397 } else { 10398 let positionX; 10399 let positionY; 10400 let positionZ; 10401 let intensity; 10402 let color; 10403 let illuminated; 10404 let bloom; 10405 if (!isUndefined(this.value.lightSource) && this.value.lightSource != null) { 10406 positionX = this.value.lightSource.positionX; 10407 positionY = this.value.lightSource.positionY; 10408 positionZ = this.value.lightSource.positionZ; 10409 intensity = this.value.lightSource.intensity; 10410 color = this.value.lightSource.color; 10411 } 10412 illuminated = this.value.illuminated; 10413 bloom = this.value.bloom; 10414 getUINativeModule().common.setPointLightStyle(node, positionX, positionY, positionZ, intensity, color, 10415 illuminated, bloom); 10416 } 10417 } 10418 checkObjectDiff() { 10419 return !isBaseOrResourceEqual(this.stageValue.lightSource?.positionX, this.value.lightSource?.positionX) || 10420 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionY, this.value.lightSource?.positionY) || 10421 !isBaseOrResourceEqual(this.stageValue.lightSource?.positionZ, this.value.lightSource?.positionZ) || 10422 !isBaseOrResourceEqual(this.stageValue.lightSource?.intensity, this.value.lightSource?.intensity) || 10423 !isBaseOrResourceEqual(this.stageValue.lightSource?.color, this.value.lightSource?.color) || 10424 !isBaseOrResourceEqual(this.stageValue.illuminated, this.value.illuminated) || 10425 !isBaseOrResourceEqual(this.stageValue.bloom, this.value.bloom); 10426 } 10427} 10428StackPointLightModifier.identity = Symbol('stackPointLight'); 10429class StackAlignContentModifier extends ModifierWithKey { 10430 constructor(value) { 10431 super(value); 10432 } 10433 applyPeer(node, reset) { 10434 if (reset) { 10435 getUINativeModule().stack.resetAlignContent(node); 10436 } 10437 else { 10438 getUINativeModule().stack.setAlignContent(node, this.value); 10439 } 10440 } 10441 checkObjectDiff() { 10442 return this.stageValue !== this.value; 10443 } 10444} 10445StackAlignContentModifier.identity = Symbol('stackAlignContent'); 10446// @ts-ignore 10447if (globalThis.Stack !== undefined) { 10448 globalThis.Stack.attributeModifier = function (modifier) { 10449 attributeModifierFunc.call(this, modifier, (nativePtr) => { 10450 return new ArkStackComponent(nativePtr); 10451 }, (nativePtr, classType, modifierJS) => { 10452 return new modifierJS.StackModifier(nativePtr, classType); 10453 }); 10454 }; 10455} 10456 10457/// <reference path='./import.ts' /> 10458class ArkFolderStackComponent extends ArkComponent { 10459 constructor(nativePtr, classType) { 10460 super(nativePtr, classType); 10461 } 10462 alignContent(value) { 10463 modifierWithKey(this._modifiersWithKeys, FolderStackAlignContentModifier.identity, FolderStackAlignContentModifier, value); 10464 return this; 10465 } 10466 enableAnimation(value) { 10467 modifierWithKey(this._modifiersWithKeys, FolderStackEnableAnimationModifier.identity, FolderStackEnableAnimationModifier, value); 10468 return this; 10469 } 10470 autoHalfFold(value) { 10471 modifierWithKey(this._modifiersWithKeys, FolderStackAutoHalfFoldModifier.identity, FolderStackAutoHalfFoldModifier, value); 10472 return this; 10473 } 10474} 10475 10476class FolderStackAlignContentModifier extends ModifierWithKey { 10477 constructor(value) { 10478 super(value); 10479 } 10480 applyPeer(node, reset) { 10481 if (reset) { 10482 getUINativeModule().stack.resetAlignContent(node); 10483 } else { 10484 getUINativeModule().stack.setAlignContent(node, this.value); 10485 } 10486 } 10487} 10488FolderStackAlignContentModifier.identity = Symbol('folderStackAlignContent'); 10489 10490class FolderStackEnableAnimationModifier extends ModifierWithKey { 10491 constructor(value) { 10492 super(value); 10493 } 10494 applyPeer(node, reset) { 10495 if (reset) { 10496 getUINativeModule().folderStack.resetEnableAnimation(node); 10497 } else { 10498 getUINativeModule().folderStack.setEnableAnimation(node, this.value); 10499 } 10500 } 10501} 10502FolderStackEnableAnimationModifier.identity = Symbol('folderStackEnableAnimation'); 10503 10504class FolderStackAutoHalfFoldModifier extends ModifierWithKey { 10505 constructor(value) { 10506 super(value); 10507 } 10508 applyPeer(node, reset) { 10509 if (reset) { 10510 getUINativeModule().folderStack.resetAutoHalfFold(node); 10511 } else { 10512 getUINativeModule().folderStack.setAutoHalfFold(node, this.value); 10513 } 10514 } 10515} 10516FolderStackAutoHalfFoldModifier.identity = Symbol('folderStackAutoHalfFold'); 10517 10518// @ts-ignore 10519if (globalThis.FolderStack !== undefined) { 10520 globalThis.FolderStack.attributeModifier = function (modifier) { 10521 attributeModifierFunc.call(this, modifier, (nativePtr) => { 10522 return new ArkFolderStackComponent(nativePtr); 10523 }, (nativePtr, classType, modifierJS) => { 10524 return new modifierJS.FolderStackModifier(nativePtr, classType); 10525 }); 10526 }; 10527} 10528 10529/// <reference path='./import.ts' /> 10530class TextEnableDataDetectorModifier extends ModifierWithKey { 10531 constructor(value) { 10532 super(value); 10533 } 10534 applyPeer(node, reset) { 10535 if (reset) { 10536 getUINativeModule().text.resetEnableDataDetector(node); 10537 } 10538 else { 10539 getUINativeModule().text.setEnableDataDetector(node, this.value); 10540 } 10541 } 10542 checkObjectDiff() { 10543 return !isBaseOrResourceEqual(this.stageValue, this.value); 10544 } 10545} 10546TextEnableDataDetectorModifier.identity = Symbol('textEnableDataDetector'); 10547class FontColorModifier extends ModifierWithKey { 10548 constructor(value) { 10549 super(value); 10550 } 10551 applyPeer(node, reset) { 10552 if (reset) { 10553 getUINativeModule().text.resetFontColor(node); 10554 } 10555 else { 10556 getUINativeModule().text.setFontColor(node, this.value); 10557 } 10558 } 10559 checkObjectDiff() { 10560 return !isBaseOrResourceEqual(this.stageValue, this.value); 10561 } 10562} 10563FontColorModifier.identity = Symbol('textFontColor'); 10564class TextForegroundColorModifier extends ModifierWithKey { 10565 constructor(value) { 10566 super(value); 10567 } 10568 applyPeer(node, reset) { 10569 if (reset) { 10570 getUINativeModule().text.resetTextForegroundColor(node); 10571 } 10572 else { 10573 getUINativeModule().text.setTextForegroundColor(node, this.value); 10574 } 10575 } 10576 checkObjectDiff() { 10577 return !isBaseOrResourceEqual(this.stageValue, this.value); 10578 } 10579} 10580TextForegroundColorModifier.identity = Symbol('textForegroundColor'); 10581class FontSizeModifier extends ModifierWithKey { 10582 constructor(value) { 10583 super(value); 10584 } 10585 applyPeer(node, reset) { 10586 if (reset) { 10587 getUINativeModule().text.resetFontSize(node); 10588 } 10589 else { 10590 getUINativeModule().text.setFontSize(node, this.value); 10591 } 10592 } 10593 checkObjectDiff() { 10594 return !isBaseOrResourceEqual(this.stageValue, this.value); 10595 } 10596} 10597FontSizeModifier.identity = Symbol('textFontSize'); 10598class FontWeightModifier extends ModifierWithKey { 10599 constructor(value) { 10600 super(value); 10601 } 10602 applyPeer(node, reset) { 10603 if (reset) { 10604 getUINativeModule().text.resetFontWeight(node); 10605 } 10606 else { 10607 getUINativeModule().text.setFontWeight(node, this.value.value, this.value.enableVariableFontWeight); 10608 } 10609 } 10610} 10611FontWeightModifier.identity = Symbol('textFontWeight'); 10612class FontStyleModifier extends ModifierWithKey { 10613 constructor(value) { 10614 super(value); 10615 } 10616 applyPeer(node, reset) { 10617 if (reset) { 10618 getUINativeModule().text.resetFontStyle(node); 10619 } 10620 else { 10621 getUINativeModule().text.setFontStyle(node, this.value); 10622 } 10623 } 10624} 10625FontStyleModifier.identity = Symbol('textFontStyle'); 10626class TextAlignModifier extends ModifierWithKey { 10627 constructor(value) { 10628 super(value); 10629 } 10630 applyPeer(node, reset) { 10631 if (reset) { 10632 getUINativeModule().text.resetTextAlign(node); 10633 } 10634 else { 10635 getUINativeModule().text.setTextAlign(node, this.value); 10636 } 10637 } 10638} 10639TextAlignModifier.identity = Symbol('textAlign'); 10640class TextHeightAdaptivePolicyModifier extends ModifierWithKey { 10641 constructor(value) { 10642 super(value); 10643 } 10644 applyPeer(node, reset) { 10645 if (reset) { 10646 getUINativeModule().text.resetHeightAdaptivePolicy(node); 10647 } 10648 else { 10649 getUINativeModule().text.setHeightAdaptivePolicy(node, this.value); 10650 } 10651 } 10652 checkObjectDiff() { 10653 return !isBaseOrResourceEqual(this.stageValue, this.value); 10654 } 10655} 10656TextHeightAdaptivePolicyModifier.identity = Symbol('textHeightAdaptivePolicy'); 10657class TextDraggableModifier extends ModifierWithKey { 10658 constructor(value) { 10659 super(value); 10660 } 10661 applyPeer(node, reset) { 10662 if (reset) { 10663 getUINativeModule().text.resetDraggable(node); 10664 } 10665 else { 10666 getUINativeModule().text.setDraggable(node, this.value); 10667 } 10668 } 10669 checkObjectDiff() { 10670 return !isBaseOrResourceEqual(this.stageValue, this.value); 10671 } 10672} 10673TextDraggableModifier.identity = Symbol('textDraggable'); 10674class TextPrivacySensitiveModifier extends ModifierWithKey { 10675 constructor(value) { 10676 super(value); 10677 } 10678 applyPeer(node, reset) { 10679 if (reset) { 10680 getUINativeModule().text.resetPrivacySensitive(node); 10681 } 10682 else { 10683 getUINativeModule().text.setPrivacySensitive(node, this.value); 10684 } 10685 } 10686 checkObjectDiff() { 10687 return !isBaseOrResourceEqual(this.stageValue, this.value); 10688 } 10689} 10690TextPrivacySensitiveModifier.identity = Symbol('textPrivacySensitive'); 10691class TextWordBreakModifier extends ModifierWithKey { 10692 constructor(value) { 10693 super(value); 10694 } 10695 applyPeer(node, reset) { 10696 if (reset) { 10697 getUINativeModule().text.resetWordBreak(node); 10698 } 10699 else { 10700 getUINativeModule().text.setWordBreak(node, this.value); 10701 } 10702 } 10703 checkObjectDiff() { 10704 return !isBaseOrResourceEqual(this.stageValue, this.value); 10705 } 10706} 10707TextWordBreakModifier.identity = Symbol('textWordBreak'); 10708 10709class TextLineBreakStrategyModifier extends ModifierWithKey { 10710 constructor(value) { 10711 super(value); 10712 } 10713 applyPeer(node, reset) { 10714 if (reset) { 10715 getUINativeModule().text.resetLineBreakStrategy(node); 10716 } 10717 else { 10718 getUINativeModule().text.setLineBreakStrategy(node, this.value); 10719 } 10720 } 10721 checkObjectDiff() { 10722 return !isBaseOrResourceEqual(this.stageValue, this.value); 10723 } 10724} 10725TextLineBreakStrategyModifier.identity = Symbol('textLineBreakStrategy'); 10726 10727class TextFontFeatureModifier extends ModifierWithKey { 10728 constructor(value) { 10729 super(value); 10730 } 10731 applyPeer(node, reset) { 10732 if (reset) { 10733 getUINativeModule().text.resetFontFeature(node); 10734 } else { 10735 getUINativeModule().text.setFontFeature(node, this.value); 10736 } 10737 } 10738 checkObjectDiff() { 10739 return !isBaseOrResourceEqual(this.stageValue, this.value); 10740 } 10741} 10742TextFontFeatureModifier.identity = Symbol('textFontFeature'); 10743 10744class TextEllipsisModeModifier extends ModifierWithKey { 10745 constructor(value) { 10746 super(value); 10747 } 10748 applyPeer(node, reset) { 10749 if (reset) { 10750 getUINativeModule().text.resetEllipsisMode(node); 10751 } 10752 else { 10753 getUINativeModule().text.setEllipsisMode(node, this.value); 10754 } 10755 } 10756 checkObjectDiff() { 10757 return !isBaseOrResourceEqual(this.stageValue, this.value); 10758 } 10759} 10760TextEllipsisModeModifier.identity = Symbol('textEllipsisMode'); 10761class TextMinFontSizeModifier extends ModifierWithKey { 10762 constructor(value) { 10763 super(value); 10764 } 10765 applyPeer(node, reset) { 10766 if (reset) { 10767 getUINativeModule().text.resetMinFontSize(node); 10768 } 10769 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 10770 getUINativeModule().text.resetMinFontSize(node); 10771 } 10772 else { 10773 getUINativeModule().text.setMinFontSize(node, this.value); 10774 } 10775 } 10776 checkObjectDiff() { 10777 return !isBaseOrResourceEqual(this.stageValue, this.value); 10778 } 10779} 10780TextMinFontSizeModifier.identity = Symbol('textMinFontSize'); 10781class TextMaxFontSizeModifier extends ModifierWithKey { 10782 constructor(value) { 10783 super(value); 10784 } 10785 applyPeer(node, reset) { 10786 if (reset) { 10787 getUINativeModule().text.resetMaxFontSize(node); 10788 } 10789 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 10790 getUINativeModule().text.resetMaxFontSize(node); 10791 } 10792 else { 10793 getUINativeModule().text.setMaxFontSize(node, this.value); 10794 } 10795 } 10796 checkObjectDiff() { 10797 return !isBaseOrResourceEqual(this.stageValue, this.value); 10798 } 10799} 10800TextMaxFontSizeModifier.identity = Symbol('textMaxFontSize'); 10801class TextMinFontScaleModifier extends ModifierWithKey { 10802 constructor(value) { 10803 super(value); 10804 } 10805 applyPeer(node, reset) { 10806 if (reset) { 10807 getUINativeModule().text.resetMinFontScale(node); 10808 } 10809 else if (!isNumber(this.value) && !isResource(this.value)) { 10810 getUINativeModule().text.resetMinFontScale(node); 10811 } 10812 else { 10813 getUINativeModule().text.setMinFontScale(node, this.value); 10814 } 10815 } 10816 checkObjectDiff() { 10817 return !isBaseOrResourceEqual(this.stageValue, this.value); 10818 } 10819} 10820TextMinFontScaleModifier.identity = Symbol('textMinFontScale'); 10821class TextMaxFontScaleModifier extends ModifierWithKey { 10822 constructor(value) { 10823 super(value); 10824 } 10825 applyPeer(node, reset) { 10826 if (reset) { 10827 getUINativeModule().text.resetMaxFontScale(node); 10828 } 10829 else if (!isNumber(this.value) && !isResource(this.value)) { 10830 getUINativeModule().text.resetMaxFontScale(node); 10831 } 10832 else { 10833 getUINativeModule().text.setMaxFontScale(node, this.value); 10834 } 10835 } 10836 checkObjectDiff() { 10837 return !isBaseOrResourceEqual(this.stageValue, this.value); 10838 } 10839} 10840TextMaxFontScaleModifier.identity = Symbol('textMaxFontScale'); 10841class TextLineHeightModifier extends ModifierWithKey { 10842 constructor(value) { 10843 super(value); 10844 } 10845 applyPeer(node, reset) { 10846 if (reset) { 10847 getUINativeModule().text.resetLineHeight(node); 10848 } 10849 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 10850 getUINativeModule().text.resetLineHeight(node); 10851 } 10852 else { 10853 getUINativeModule().text.setLineHeight(node, this.value); 10854 } 10855 } 10856 checkObjectDiff() { 10857 return !isBaseOrResourceEqual(this.stageValue, this.value); 10858 } 10859} 10860TextLineHeightModifier.identity = Symbol('textLineHeight'); 10861class TextCopyOptionModifier extends ModifierWithKey { 10862 constructor(value) { 10863 super(value); 10864 } 10865 applyPeer(node, reset) { 10866 if (reset) { 10867 getUINativeModule().text.resetCopyOption(node); 10868 } 10869 else { 10870 getUINativeModule().text.setCopyOption(node, this.value); 10871 } 10872 } 10873 checkObjectDiff() { 10874 return !isBaseOrResourceEqual(this.stageValue, this.value); 10875 } 10876} 10877TextCopyOptionModifier.identity = Symbol('textCopyOption'); 10878class TextFontFamilyModifier extends ModifierWithKey { 10879 constructor(value) { 10880 super(value); 10881 } 10882 applyPeer(node, reset) { 10883 if (reset) { 10884 getUINativeModule().text.resetFontFamily(node); 10885 } 10886 else if (!isString(this.value) && !isResource(this.value)) { 10887 getUINativeModule().text.resetFontFamily(node); 10888 } 10889 else { 10890 getUINativeModule().text.setFontFamily(node, this.value); 10891 } 10892 } 10893 checkObjectDiff() { 10894 return !isBaseOrResourceEqual(this.stageValue, this.value); 10895 } 10896} 10897TextFontFamilyModifier.identity = Symbol('textFontFamily'); 10898class TextMaxLinesModifier extends ModifierWithKey { 10899 constructor(value) { 10900 super(value); 10901 } 10902 applyPeer(node, reset) { 10903 if (reset) { 10904 getUINativeModule().text.resetMaxLines(node); 10905 } 10906 else if (!isNumber(this.value)) { 10907 getUINativeModule().text.resetMaxLines(node); 10908 } 10909 else { 10910 getUINativeModule().text.setMaxLines(node, this.value); 10911 } 10912 } 10913 checkObjectDiff() { 10914 return !isBaseOrResourceEqual(this.stageValue, this.value); 10915 } 10916} 10917TextMaxLinesModifier.identity = Symbol('textMaxLines'); 10918class TextLetterSpacingModifier extends ModifierWithKey { 10919 constructor(value) { 10920 super(value); 10921 } 10922 applyPeer(node, reset) { 10923 if (reset) { 10924 getUINativeModule().text.resetLetterSpacing(node); 10925 } 10926 else if (!isNumber(this.value) && !isString(this.value)) { 10927 getUINativeModule().text.resetLetterSpacing(node); 10928 } 10929 else { 10930 getUINativeModule().text.setLetterSpacing(node, this.value); 10931 } 10932 } 10933 checkObjectDiff() { 10934 return !isBaseOrResourceEqual(this.stageValue, this.value); 10935 } 10936} 10937TextLetterSpacingModifier.identity = Symbol('textLetterSpacing'); 10938class TextLineSpacingModifier extends ModifierWithKey { 10939 constructor(value) { 10940 super(value); 10941 } 10942 applyPeer(node, reset) { 10943 if (reset) { 10944 getUINativeModule().text.resetLineSpacing(node); 10945 } 10946 else if (!isObject(this.value)) { 10947 getUINativeModule().text.resetLineSpacing(node); 10948 } 10949 else { 10950 getUINativeModule().text.setLineSpacing(node, this.value); 10951 } 10952 } 10953 checkObjectDiff() { 10954 return !isBaseOrResourceEqual(this.stageValue, this.value); 10955 } 10956} 10957TextLineSpacingModifier.identity = Symbol('textLineSpacing'); 10958class TextTextOverflowModifier extends ModifierWithKey { 10959 constructor(value) { 10960 super(value); 10961 } 10962 applyPeer(node, reset) { 10963 if (reset) { 10964 getUINativeModule().text.resetTextOverflow(node); 10965 } 10966 else { 10967 getUINativeModule().text.setTextOverflow(node, this.value.overflow); 10968 } 10969 } 10970 checkObjectDiff() { 10971 return !isBaseOrResourceEqual(this.stageValue.overflow, this.value.overflow); 10972 } 10973} 10974TextTextOverflowModifier.identity = Symbol('textTextOverflow'); 10975class TextBaselineOffsetModifier extends ModifierWithKey { 10976 constructor(value) { 10977 super(value); 10978 } 10979 applyPeer(node, reset) { 10980 if (reset) { 10981 getUINativeModule().text.resetBaselineOffset(node); 10982 } 10983 else if (!isNumber(this.value) && !isString(this.value)) { 10984 getUINativeModule().text.resetBaselineOffset(node); 10985 } 10986 else { 10987 getUINativeModule().text.setBaselineOffset(node, this.value); 10988 } 10989 } 10990 checkObjectDiff() { 10991 return !isBaseOrResourceEqual(this.stageValue, this.value); 10992 } 10993} 10994TextBaselineOffsetModifier.identity = Symbol('textBaselineOffset'); 10995class TextTextCaseModifier extends ModifierWithKey { 10996 constructor(value) { 10997 super(value); 10998 } 10999 applyPeer(node, reset) { 11000 if (reset) { 11001 getUINativeModule().text.resetTextCase(node); 11002 } 11003 else { 11004 getUINativeModule().text.setTextCase(node, this.value); 11005 } 11006 } 11007 checkObjectDiff() { 11008 return !isBaseOrResourceEqual(this.stageValue, this.value); 11009 } 11010} 11011TextTextCaseModifier.identity = Symbol('textTextCase'); 11012class TextTextIndentModifier extends ModifierWithKey { 11013 constructor(value) { 11014 super(value); 11015 } 11016 applyPeer(node, reset) { 11017 if (reset) { 11018 getUINativeModule().text.resetTextIndent(node); 11019 } 11020 else if (!isNumber(this.value) && !isString(this.value) && !isResource(this.value)) { 11021 getUINativeModule().text.resetTextIndent(node); 11022 } 11023 else { 11024 getUINativeModule().text.setTextIndent(node, this.value); 11025 } 11026 } 11027 checkObjectDiff() { 11028 return !isBaseOrResourceEqual(this.stageValue, this.value); 11029 } 11030} 11031TextTextIndentModifier.identity = Symbol('textTextIndent'); 11032class TextTextShadowModifier extends ModifierWithKey { 11033 constructor(value) { 11034 super(value); 11035 } 11036 applyPeer(node, reset) { 11037 if (reset) { 11038 getUINativeModule().text.resetTextShadow(node); 11039 } 11040 else { 11041 let shadow = new ArkShadowInfoToArray(); 11042 if (!shadow.convertShadowOptions(this.value)) { 11043 getUINativeModule().text.resetTextShadow(node); 11044 } 11045 else { 11046 getUINativeModule().text.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 11047 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 11048 } 11049 } 11050 } 11051 checkObjectDiff() { 11052 let checkDiff = true; 11053 let arkShadow = new ArkShadowInfoToArray(); 11054 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 11055 Object.getPrototypeOf(this.value).constructor === Object) { 11056 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 11057 } 11058 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 11059 Object.getPrototypeOf(this.value).constructor === Array && 11060 this.stageValue.length === this.value.length) { 11061 let isDiffItem = false; 11062 for (let i = 0; i < this.value.length; i++) { 11063 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 11064 isDiffItem = true; 11065 break; 11066 } 11067 } 11068 if (!isDiffItem) { 11069 checkDiff = false; 11070 } 11071 } 11072 return checkDiff; 11073 } 11074} 11075TextTextShadowModifier.identity = Symbol('textTextShadow'); 11076class TextDecorationModifier extends ModifierWithKey { 11077 constructor(value) { 11078 super(value); 11079 } 11080 applyPeer(node, reset) { 11081 if (reset) { 11082 getUINativeModule().text.resetDecoration(node); 11083 } 11084 else { 11085 getUINativeModule().text.setDecoration(node, this.value.type, this.value.color, this.value.style); 11086 } 11087 } 11088 checkObjectDiff() { 11089 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 11090 return true; 11091 } 11092 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 11093 return !isResourceEqual(this.stageValue.color, this.value.color); 11094 } 11095 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 11096 return !(this.stageValue.color === this.value.color); 11097 } 11098 else { 11099 return true; 11100 } 11101 } 11102} 11103TextDecorationModifier.identity = Symbol('textDecoration'); 11104class TextFontModifier extends ModifierWithKey { 11105 constructor(value) { 11106 super(value); 11107 } 11108 applyPeer(node, reset) { 11109 if (reset) { 11110 getUINativeModule().text.resetFont(node); 11111 } 11112 else { 11113 getUINativeModule().text.setFont(node, this.value.value.size, this.value.value.weight, this.value.value.family, 11114 this.value.value.style, this.value.enableVariableFontWeight); 11115 } 11116 } 11117 checkObjectDiff() { 11118 if (this.stageValue.weight !== this.value.weight || this.stageValue.style !== this.value.style || 11119 this.stageValue.enableVariableFontWeight !== this.value.enableVariableFontWeight) { 11120 return true; 11121 } 11122 if (((isResource(this.stageValue.size) && isResource(this.value.size) && 11123 isResourceEqual(this.stageValue.size, this.value.size)) || 11124 (!isResource(this.stageValue.size) && !isResource(this.value.size) && 11125 this.stageValue.size === this.value.size)) && 11126 ((isResource(this.stageValue.family) && isResource(this.value.family) && 11127 isResourceEqual(this.stageValue.family, this.value.family)) || 11128 (!isResource(this.stageValue.family) && !isResource(this.value.family) && 11129 this.stageValue.family === this.value.family))) { 11130 return false; 11131 } 11132 else { 11133 return true; 11134 } 11135 } 11136} 11137TextFontModifier.identity = Symbol('textFont'); 11138class TextClipModifier extends ModifierWithKey { 11139 constructor(value) { 11140 super(value); 11141 } 11142 applyPeer(node, reset) { 11143 if (reset) { 11144 getUINativeModule().common.resetClipWithEdge(node); 11145 } 11146 else { 11147 getUINativeModule().common.setClipWithEdge(node, this.value); 11148 } 11149 } 11150 checkObjectDiff() { 11151 return true; 11152 } 11153} 11154TextClipModifier.identity = Symbol('textClip'); 11155class TextContentModifier extends ModifierWithKey { 11156 constructor(value) { 11157 super(value); 11158 } 11159 applyPeer(node, reset) { 11160 if (reset) { 11161 getUINativeModule().text.setContent(node, ''); 11162 } 11163 else { 11164 getUINativeModule().text.setContent(node, this.value); 11165 } 11166 } 11167} 11168TextContentModifier.identity = Symbol('textContent'); 11169class TextSelectionModifier extends ModifierWithKey { 11170 constructor(value) { 11171 super(value); 11172 } 11173 applyPeer(node, reset) { 11174 if (reset) { 11175 getUINativeModule().text.resetSelection(node); 11176 } else { 11177 getUINativeModule().text.setSelection(node, this.value.selectionStart, this.value.selectionEnd); 11178 } 11179 } 11180 checkObjectDiff() { 11181 return !isBaseOrResourceEqual(this.stageValue.selectionStart, this.value.selectionStart) || 11182 !isBaseOrResourceEqual(this.stageValue.selectionEnd, this.value.selectionEnd); 11183 } 11184} 11185TextSelectionModifier.identity = Symbol('textSelection'); 11186class TextSelectableModifier extends ModifierWithKey { 11187 constructor(value) { 11188 super(value); 11189 } 11190 applyPeer(node, reset) { 11191 if (reset) { 11192 getUINativeModule().text.resetTextSelectableMode(node); 11193 } else { 11194 getUINativeModule().text.setTextSelectableMode(node, this.value); 11195 } 11196 } 11197 checkObjectDiff() { 11198 return !isBaseOrResourceEqual(this.stageValue, this.value); 11199 } 11200} 11201TextSelectableModifier.identity = Symbol('textTextSelectable'); 11202class TextDataDetectorConfigModifier extends ModifierWithKey { 11203 constructor(value) { 11204 super(value); 11205 } 11206 applyPeer(node, reset) { 11207 if (reset) { 11208 getUINativeModule().text.resetDataDetectorConfig(node); 11209 } else { 11210 getUINativeModule().text.setDataDetectorConfig(node, this.value.types, this.value.onDetectResultUpdate, 11211 this.value.color, this.value.decorationType, this.value.decorationColor, this.value.decorationStyle); 11212 } 11213 } 11214 checkObjectDiff() { 11215 return !isBaseOrResourceEqual(this.stageValue.types, this.value.types) || 11216 !isBaseOrResourceEqual(this.stageValue.onDetectResultUpdate, this.value.onDetectResultUpdate) || 11217 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 11218 !isBaseOrResourceEqual(this.stageValue.decorationType, this.value.decorationType) || 11219 !isBaseOrResourceEqual(this.stageValue.decorationColor, this.value.decorationColor) || 11220 !isBaseOrResourceEqual(this.stageValue.decorationStyle, this.value.decorationStyle); 11221 } 11222} 11223TextDataDetectorConfigModifier.identity = Symbol('textDataDetectorConfig'); 11224class TextOnCopyModifier extends ModifierWithKey { 11225 constructor(value) { 11226 super(value); 11227 } 11228 applyPeer(node, reset) { 11229 if (reset) { 11230 getUINativeModule().text.resetOnCopy(node); 11231 } else { 11232 getUINativeModule().text.setOnCopy(node, this.value); 11233 } 11234 } 11235} 11236TextOnCopyModifier.identity = Symbol('textOnCopy'); 11237class TextOnTextSelectionChangeModifier extends ModifierWithKey { 11238 constructor(value) { 11239 super(value); 11240 } 11241 applyPeer(node, reset) { 11242 if (reset) { 11243 getUINativeModule().text.resetOnTextSelectionChange(node); 11244 } else { 11245 getUINativeModule().text.setOnTextSelectionChange(node, this.value); 11246 } 11247 } 11248} 11249TextOnTextSelectionChangeModifier.identity = Symbol('textOnTextSelectionChange'); 11250 11251class TextControllerModifier extends ModifierWithKey { 11252 constructor(value) { 11253 super(value); 11254 } 11255 applyPeer(node, reset) { 11256 if (reset) { 11257 getUINativeModule().text.setTextController(node, ''); 11258 } 11259 else { 11260 getUINativeModule().text.setTextController(node, this.value); 11261 } 11262 } 11263} 11264TextControllerModifier.identity = Symbol('textController'); 11265 11266class TextEditMenuOptionsModifier extends ModifierWithKey { 11267 constructor(value) { 11268 super(value); 11269 } 11270 applyPeer(node, reset) { 11271 if (reset) { 11272 getUINativeModule().text.resetSelectionMenuOptions(node); 11273 } else { 11274 getUINativeModule().text.setSelectionMenuOptions(node, this.value); 11275 } 11276 } 11277} 11278TextEditMenuOptionsModifier.identity = Symbol('textEditMenuOptions'); 11279 11280class TextHalfLeadingModifier extends ModifierWithKey { 11281 constructor(value) { 11282 super(value); 11283 } 11284 applyPeer(node, reset) { 11285 if (reset) { 11286 getUINativeModule().text.resetHalfLeading(node); 11287 } 11288 else { 11289 getUINativeModule().text.setHalfLeading(node, this.value); 11290 } 11291 } 11292 checkObjectDiff() { 11293 return !isBaseOrResourceEqual(this.stageValue, this.value); 11294 } 11295} 11296TextHalfLeadingModifier.identity = Symbol('textHalfLeading'); 11297 11298class TextOnClickModifier extends ModifierWithKey { 11299 constructor(value) { 11300 super(value); 11301 } 11302 applyPeer(node, reset) { 11303 if (reset) { 11304 getUINativeModule().text.resetOnClick(node); 11305 } 11306 else { 11307 getUINativeModule().text.setOnClick(node, this.value); 11308 } 11309 } 11310 checkObjectDiff() { 11311 return !isBaseOrResourceEqual(this.stageValue, this.value); 11312 } 11313} 11314TextOnClickModifier.identity = Symbol('textOnClick'); 11315 11316class TextResponseRegionModifier extends ModifierWithKey { 11317 constructor(value) { 11318 super(value); 11319 } 11320 applyPeer(node, reset) { 11321 let _a, _b, _c, _d, _e, _f, _g, _h; 11322 if (reset) { 11323 getUINativeModule().text.resetResponseRegion(node); 11324 } 11325 else { 11326 let responseRegion = []; 11327 if (Array.isArray(this.value)) { 11328 for (let i = 0; i < this.value.length; i++) { 11329 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 11330 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 11331 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 11332 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 11333 } 11334 } 11335 else { 11336 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 11337 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 11338 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 11339 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 11340 } 11341 getUINativeModule().text.setResponseRegion(node, responseRegion, responseRegion.length); 11342 } 11343 } 11344 checkObjectDiff() { 11345 return !isBaseOrResourceEqual(this.stageValue, this.value); 11346 } 11347} 11348TextResponseRegionModifier.identity = Symbol('textResponseRegion'); 11349 11350class ArkTextComponent extends ArkComponent { 11351 constructor(nativePtr, classType) { 11352 super(nativePtr, classType); 11353 } 11354 initialize(content) { 11355 modifierWithKey(this._modifiersWithKeys, TextContentModifier.identity, TextContentModifier, content[0]); 11356 modifierWithKey(this._modifiersWithKeys, TextControllerModifier.identity, TextControllerModifier, content[1]); 11357 return this; 11358 } 11359 allowChildTypes() { 11360 return ["Span", "ImageSpan", "SymbolSpan", "ContainerSpan"]; 11361 } 11362 enableDataDetector(value) { 11363 modifierWithKey(this._modifiersWithKeys, TextEnableDataDetectorModifier.identity, TextEnableDataDetectorModifier, value); 11364 return this; 11365 } 11366 dataDetectorConfig(config) { 11367 if (config === undefined || config === null) { 11368 return this; 11369 } 11370 let detectorConfig = new TextDataDetectorConfig(); 11371 detectorConfig.types = config.types; 11372 detectorConfig.onDetectResultUpdate = config.onDetectResultUpdate; 11373 detectorConfig.color = config.color; 11374 if (config.decoration) { 11375 detectorConfig.decorationType = config.decoration.type; 11376 detectorConfig.decorationColor = config.decoration.color; 11377 detectorConfig.decorationStyle = config.decoration.style; 11378 } 11379 modifierWithKey(this._modifiersWithKeys, TextDataDetectorConfigModifier.identity, TextDataDetectorConfigModifier, detectorConfig); 11380 return this; 11381 } 11382 font(value, options) { 11383 if (value === undefined || value === null) { 11384 return this; 11385 } 11386 let arkTextFont = new ArkTextFont(); 11387 arkTextFont.value = value; 11388 arkTextFont.enableVariableFontWeight = options?.enableVariableFontWeight; 11389 modifierWithKey(this._modifiersWithKeys, TextFontModifier.identity, TextFontModifier, arkTextFont); 11390 return this; 11391 } 11392 fontColor(value) { 11393 modifierWithKey(this._modifiersWithKeys, FontColorModifier.identity, FontColorModifier, value); 11394 return this; 11395 } 11396 fontSize(value) { 11397 modifierWithKey(this._modifiersWithKeys, FontSizeModifier.identity, FontSizeModifier, value); 11398 return this; 11399 } 11400 minFontSize(value) { 11401 modifierWithKey(this._modifiersWithKeys, TextMinFontSizeModifier.identity, TextMinFontSizeModifier, value); 11402 return this; 11403 } 11404 maxFontSize(value) { 11405 modifierWithKey(this._modifiersWithKeys, TextMaxFontSizeModifier.identity, TextMaxFontSizeModifier, value); 11406 return this; 11407 } 11408 minFontScale(value) { 11409 modifierWithKey(this._modifiersWithKeys, TextMinFontScaleModifier.identity, TextMinFontScaleModifier, value); 11410 return this; 11411 } 11412 maxFontScale(value) { 11413 modifierWithKey(this._modifiersWithKeys, TextMaxFontScaleModifier.identity, TextMaxFontScaleModifier, value); 11414 return this; 11415 } 11416 fontStyle(value) { 11417 modifierWithKey(this._modifiersWithKeys, FontStyleModifier.identity, FontStyleModifier, value); 11418 return this; 11419 } 11420 fontWeight(value, options) { 11421 let arkFontWeight = new ArkFontWeight(); 11422 arkFontWeight.value = value; 11423 arkFontWeight.enableVariableFontWeight = options?.enableVariableFontWeight; 11424 modifierWithKey(this._modifiersWithKeys, FontWeightModifier.identity, FontWeightModifier, arkFontWeight); 11425 return this; 11426 } 11427 textAlign(value) { 11428 modifierWithKey(this._modifiersWithKeys, TextAlignModifier.identity, TextAlignModifier, value); 11429 return this; 11430 } 11431 lineHeight(value) { 11432 modifierWithKey(this._modifiersWithKeys, TextLineHeightModifier.identity, TextLineHeightModifier, value); 11433 return this; 11434 } 11435 textOverflow(value) { 11436 modifierWithKey(this._modifiersWithKeys, TextTextOverflowModifier.identity, TextTextOverflowModifier, value); 11437 return this; 11438 } 11439 fontFamily(value) { 11440 modifierWithKey(this._modifiersWithKeys, TextFontFamilyModifier.identity, TextFontFamilyModifier, value); 11441 return this; 11442 } 11443 maxLines(value) { 11444 modifierWithKey(this._modifiersWithKeys, TextMaxLinesModifier.identity, TextMaxLinesModifier, value); 11445 return this; 11446 } 11447 decoration(value) { 11448 modifierWithKey(this._modifiersWithKeys, TextDecorationModifier.identity, TextDecorationModifier, value); 11449 return this; 11450 } 11451 letterSpacing(value) { 11452 modifierWithKey(this._modifiersWithKeys, TextLetterSpacingModifier.identity, TextLetterSpacingModifier, value); 11453 return this; 11454 } 11455 lineSpacing(value) { 11456 modifierWithKey(this._modifiersWithKeys, TextLineSpacingModifier.identity, TextLineSpacingModifier, value); 11457 return this; 11458 } 11459 textCase(value) { 11460 modifierWithKey(this._modifiersWithKeys, TextTextCaseModifier.identity, TextTextCaseModifier, value); 11461 return this; 11462 } 11463 baselineOffset(value) { 11464 modifierWithKey(this._modifiersWithKeys, TextBaselineOffsetModifier.identity, TextBaselineOffsetModifier, value); 11465 return this; 11466 } 11467 copyOption(value) { 11468 modifierWithKey(this._modifiersWithKeys, TextCopyOptionModifier.identity, TextCopyOptionModifier, value); 11469 return this; 11470 } 11471 draggable(value) { 11472 modifierWithKey(this._modifiersWithKeys, TextDraggableModifier.identity, TextDraggableModifier, value); 11473 return this; 11474 } 11475 privacySensitive(value) { 11476 modifierWithKey(this._modifiersWithKeys, TextPrivacySensitiveModifier.identity, TextPrivacySensitiveModifier, value); 11477 return this; 11478 } 11479 textShadow(value) { 11480 modifierWithKey(this._modifiersWithKeys, TextTextShadowModifier.identity, TextTextShadowModifier, value); 11481 return this; 11482 } 11483 heightAdaptivePolicy(value) { 11484 modifierWithKey(this._modifiersWithKeys, TextHeightAdaptivePolicyModifier.identity, TextHeightAdaptivePolicyModifier, value); 11485 return this; 11486 } 11487 textIndent(value) { 11488 modifierWithKey(this._modifiersWithKeys, TextTextIndentModifier.identity, TextTextIndentModifier, value); 11489 return this; 11490 } 11491 wordBreak(value) { 11492 modifierWithKey(this._modifiersWithKeys, TextWordBreakModifier.identity, TextWordBreakModifier, value); 11493 return this; 11494 } 11495 lineBreakStrategy(value) { 11496 modifierWithKey(this._modifiersWithKeys, TextLineBreakStrategyModifier.identity, 11497 TextLineBreakStrategyModifier, value); 11498 return this; 11499 } 11500 fontFeature(value) { 11501 modifierWithKey(this._modifiersWithKeys, TextFontFeatureModifier.identity, TextFontFeatureModifier, value); 11502 return this; 11503 } 11504 onCopy(callback) { 11505 modifierWithKey(this._modifiersWithKeys, TextOnCopyModifier.identity, 11506 TextOnCopyModifier, callback); 11507 return this; 11508 } 11509 selection(selectionStart, selectionEnd) { 11510 let arkSelection = new ArkSelection(); 11511 arkSelection.selectionStart = selectionStart; 11512 arkSelection.selectionEnd = selectionEnd; 11513 modifierWithKey(this._modifiersWithKeys, TextSelectionModifier.identity, TextSelectionModifier, arkSelection); 11514 return this; 11515 } 11516 textSelectable(value) { 11517 modifierWithKey(this._modifiersWithKeys, TextSelectableModifier.identity, TextSelectableModifier, value); 11518 return this; 11519 } 11520 ellipsisMode(value) { 11521 modifierWithKey(this._modifiersWithKeys, TextEllipsisModeModifier.identity, TextEllipsisModeModifier, value); 11522 return this; 11523 } 11524 clip(value) { 11525 modifierWithKey(this._modifiersWithKeys, TextClipModifier.identity, TextClipModifier, value); 11526 return this; 11527 } 11528 foregroundColor(value) { 11529 modifierWithKey( 11530 this._modifiersWithKeys, TextForegroundColorModifier.identity, TextForegroundColorModifier, value); 11531 return this; 11532 } 11533 onTextSelectionChange(callback) { 11534 modifierWithKey(this._modifiersWithKeys, TextOnTextSelectionChangeModifier.identity, 11535 TextOnTextSelectionChangeModifier, callback); 11536 return this; 11537 } 11538 editMenuOptions(value) { 11539 modifierWithKey(this._modifiersWithKeys, TextEditMenuOptionsModifier.identity, 11540 TextEditMenuOptionsModifier, value); 11541 return this; 11542 } 11543 halfLeading(value) { 11544 modifierWithKey(this._modifiersWithKeys, TextHalfLeadingModifier.identity, TextHalfLeadingModifier, value); 11545 return this; 11546 } 11547 onClick(value) { 11548 modifierWithKey(this._modifiersWithKeys, TextOnClickModifier.identity, TextOnClickModifier, value); 11549 return this; 11550 } 11551 responseRegion(value) { 11552 modifierWithKey(this._modifiersWithKeys, TextResponseRegionModifier.identity, TextResponseRegionModifier, value); 11553 return this; 11554 } 11555} 11556// @ts-ignore 11557if (globalThis.Text !== undefined) { 11558 globalThis.Text.attributeModifier = function (modifier) { 11559 attributeModifierFunc.call(this, modifier, (nativePtr) => { 11560 return new ArkTextComponent(nativePtr); 11561 }, (nativePtr, classType, modifierJS) => { 11562 return new modifierJS.TextModifier(nativePtr, classType); 11563 }); 11564 }; 11565} 11566 11567/// <reference path='./import.ts' /> 11568class TextAreaFontStyleModifier extends ModifierWithKey { 11569 constructor(value) { 11570 super(value); 11571 } 11572 applyPeer(node, reset) { 11573 if (reset) { 11574 getUINativeModule().textArea.resetFontStyle(node); 11575 } 11576 else { 11577 getUINativeModule().textArea.setFontStyle(node, this.value); 11578 } 11579 } 11580 checkObjectDiff() { 11581 return !isBaseOrResourceEqual(this.stageValue, this.value); 11582 } 11583} 11584TextAreaFontStyleModifier.identity = Symbol('textAreaFontStyle'); 11585class TextAreaDecorationModifier extends ModifierWithKey { 11586 constructor(value) { 11587 super(value); 11588 } 11589 applyPeer(node, reset) { 11590 if (reset) { 11591 getUINativeModule().textArea.resetDecoration(node); 11592 } 11593 else { 11594 getUINativeModule().textArea.setDecoration(node, this.value.type, this.value.color, this.value.style); 11595 } 11596 } 11597 checkObjectDiff() { 11598 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 11599 return true; 11600 } 11601 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 11602 return !isResourceEqual(this.stageValue.color, this.value.color); 11603 } 11604 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 11605 return !(this.stageValue.color === this.value.color); 11606 } 11607 else { 11608 return true; 11609 } 11610 } 11611} 11612TextAreaDecorationModifier.identity = Symbol('textAreaDecoration'); 11613class TextAreaLetterSpacingModifier extends ModifierWithKey { 11614 constructor(value) { 11615 super(value); 11616 } 11617 applyPeer(node, reset) { 11618 if (reset) { 11619 getUINativeModule().textArea.resetLetterSpacing(node); 11620 } 11621 else { 11622 getUINativeModule().textArea.setLetterSpacing(node, this.value); 11623 } 11624 } 11625 checkObjectDiff() { 11626 return !isBaseOrResourceEqual(this.stageValue, this.value); 11627 } 11628} 11629TextAreaLetterSpacingModifier.identity = Symbol('textAreaLetterSpacing'); 11630class TextAreaLineSpacingModifier extends ModifierWithKey { 11631 constructor(value) { 11632 super(value); 11633 } 11634 applyPeer(node, reset) { 11635 if (reset) { 11636 getUINativeModule().textArea.resetLineSpacing(node); 11637 } 11638 else if (!isObject(this.value)) { 11639 getUINativeModule().textArea.resetLineSpacing(node); 11640 } 11641 else { 11642 getUINativeModule().textArea.setLineSpacing(node, this.value); 11643 } 11644 } 11645 checkObjectDiff() { 11646 return !isBaseOrResourceEqual(this.stageValue, this.value); 11647 } 11648} 11649TextAreaLineSpacingModifier.identity = Symbol('textAreaLineSpacing'); 11650class TextAreaLineHeightModifier extends ModifierWithKey { 11651 constructor(value) { 11652 super(value); 11653 } 11654 applyPeer(node, reset) { 11655 if (reset) { 11656 getUINativeModule().textArea.resetLineHeight(node); 11657 } 11658 else { 11659 getUINativeModule().textArea.setLineHeight(node, this.value); 11660 } 11661 } 11662 checkObjectDiff() { 11663 return !isBaseOrResourceEqual(this.stageValue, this.value); 11664 } 11665} 11666TextAreaLineHeightModifier.identity = Symbol('textAreaLineHeight'); 11667class TextAreaWordBreakModifier extends ModifierWithKey { 11668 constructor(value) { 11669 super(value); 11670 } 11671 applyPeer(node, reset) { 11672 if (reset) { 11673 getUINativeModule().textArea.resetWordBreak(node); 11674 } 11675 else { 11676 getUINativeModule().textArea.setWordBreak(node, this.value); 11677 } 11678 } 11679 checkObjectDiff() { 11680 return !isBaseOrResourceEqual(this.stageValue, this.value); 11681 } 11682} 11683TextAreaWordBreakModifier.identity = Symbol('textAreaWordBreak'); 11684 11685class TextAreaLineBreakStrategyModifier extends ModifierWithKey { 11686 constructor(value) { 11687 super(value); 11688 } 11689 applyPeer(node, reset) { 11690 if (reset) { 11691 getUINativeModule().textArea.resetLineBreakStrategy(node); 11692 } 11693 else { 11694 getUINativeModule().textArea.setLineBreakStrategy(node, this.value); 11695 } 11696 } 11697 checkObjectDiff() { 11698 return !isBaseOrResourceEqual(this.stageValue, this.value); 11699 } 11700} 11701TextAreaLineBreakStrategyModifier.identity = Symbol('textAreaLineBreakStrategy'); 11702class TextAreaSelectedBackgroundColorModifier extends ModifierWithKey { 11703 constructor(value) { 11704 super(value); 11705 } 11706 applyPeer(node, reset) { 11707 if (reset) { 11708 getUINativeModule().textArea.resetSelectedBackgroundColor(node); 11709 } else { 11710 getUINativeModule().textArea.setSelectedBackgroundColor(node, this.value); 11711 } 11712 } 11713 checkObjectDiff() { 11714 return !isBaseOrResourceEqual(this.stageValue, this.value); 11715 } 11716} 11717TextAreaSelectedBackgroundColorModifier.identity = Symbol('textAreaSelectedBackgroundColor'); 11718class TextAreaCaretStyleModifier extends ModifierWithKey { 11719 constructor(value) { 11720 super(value); 11721 } 11722 applyPeer(node, reset) { 11723 if (reset) { 11724 getUINativeModule().textArea.resetCaretStyle(node); 11725 } else { 11726 getUINativeModule().textArea.setCaretStyle(node, this.value.width, this.value.color); 11727 } 11728 } 11729 checkObjectDiff() { 11730 return this.stageValue !== this.value; 11731 } 11732} 11733TextAreaCaretStyleModifier.identity = Symbol('textAreaCaretStyle'); 11734class TextAreaTextOverflowModifier extends ModifierWithKey { 11735 constructor(value) { 11736 super(value); 11737 } 11738 applyPeer(node, reset) { 11739 if (reset) { 11740 getUINativeModule().textArea.resetTextOverflow(node); 11741 } else { 11742 getUINativeModule().textArea.setTextOverflow(node, this.value); 11743 } 11744 } 11745 checkObjectDiff() { 11746 return this.stageValue !== this.value; 11747 } 11748} 11749TextAreaTextOverflowModifier.identity = Symbol('textAreaTextOverflow'); 11750class TextAreaTextIndentModifier extends ModifierWithKey { 11751 constructor(value) { 11752 super(value); 11753 } 11754 applyPeer(node, reset) { 11755 if (reset) { 11756 getUINativeModule().textArea.resetTextIndent(node); 11757 } else { 11758 getUINativeModule().textArea.setTextIndent(node, this.value); 11759 } 11760 } 11761 checkObjectDiff() { 11762 return !isBaseOrResourceEqual(this.stageValue, this.value); 11763 } 11764} 11765TextAreaTextIndentModifier.identity = Symbol('textAreaTextIndent'); 11766class TextAreaCopyOptionModifier extends ModifierWithKey { 11767 constructor(value) { 11768 super(value); 11769 } 11770 applyPeer(node, reset) { 11771 if (reset) { 11772 getUINativeModule().textArea.resetCopyOption(node); 11773 } 11774 else { 11775 getUINativeModule().textArea.setCopyOption(node, this.value); 11776 } 11777 } 11778 checkObjectDiff() { 11779 return !isBaseOrResourceEqual(this.stageValue, this.value); 11780 } 11781} 11782TextAreaCopyOptionModifier.identity = Symbol('textAreaCopyOption'); 11783class TextAreaMaxLinesModifier extends ModifierWithKey { 11784 constructor(value) { 11785 super(value); 11786 } 11787 applyPeer(node, reset) { 11788 if (reset) { 11789 getUINativeModule().textArea.resetMaxLines(node); 11790 } 11791 else { 11792 getUINativeModule().textArea.setMaxLines(node, this.value); 11793 } 11794 } 11795 checkObjectDiff() { 11796 return !isBaseOrResourceEqual(this.stageValue, this.value); 11797 } 11798} 11799TextAreaMaxLinesModifier.identity = Symbol('textAreaMaxLines'); 11800class TextAreaMinFontSizeModifier extends ModifierWithKey { 11801 constructor(value) { 11802 super(value); 11803 } 11804 applyPeer(node, reset) { 11805 if (reset) { 11806 getUINativeModule().textArea.resetMinFontSize(node); 11807 } 11808 else { 11809 getUINativeModule().textArea.setMinFontSize(node, this.value); 11810 } 11811 } 11812 checkObjectDiff() { 11813 return !isBaseOrResourceEqual(this.stageValue, this.value); 11814 } 11815} 11816TextAreaMinFontSizeModifier.identity = Symbol('textAreaMinFontSize'); 11817class TextAreaMaxFontSizeModifier extends ModifierWithKey { 11818 constructor(value) { 11819 super(value); 11820 } 11821 applyPeer(node, reset) { 11822 if (reset) { 11823 getUINativeModule().textArea.resetMaxFontSize(node); 11824 } 11825 else { 11826 getUINativeModule().textArea.setMaxFontSize(node, this.value); 11827 } 11828 } 11829 checkObjectDiff() { 11830 return !isBaseOrResourceEqual(this.stageValue, this.value); 11831 } 11832} 11833TextAreaMaxFontSizeModifier.identity = Symbol('textAreaMaxFontSize'); 11834class TextAreaHeightAdaptivePolicyModifier extends ModifierWithKey { 11835 constructor(value) { 11836 super(value); 11837 } 11838 applyPeer(node, reset) { 11839 if (reset) { 11840 getUINativeModule().textArea.resetHeightAdaptivePolicy(node); 11841 } 11842 else { 11843 getUINativeModule().textArea.setHeightAdaptivePolicy(node, this.value); 11844 } 11845 } 11846 checkObjectDiff() { 11847 return !isBaseOrResourceEqual(this.stageValue, this.value); 11848 } 11849} 11850TextAreaHeightAdaptivePolicyModifier.identity = Symbol('textAreaHeightAdaptivePolicy'); 11851class TextAreaFontSizeModifier extends ModifierWithKey { 11852 constructor(value) { 11853 super(value); 11854 } 11855 applyPeer(node, reset) { 11856 if (reset) { 11857 getUINativeModule().textArea.resetFontSize(node); 11858 } 11859 else { 11860 getUINativeModule().textArea.setFontSize(node, this.value); 11861 } 11862 } 11863 checkObjectDiff() { 11864 return !isBaseOrResourceEqual(this.stageValue, this.value); 11865 } 11866} 11867TextAreaFontSizeModifier.identity = Symbol('textAreaFontSize'); 11868class TextAreaPlaceholderColorModifier extends ModifierWithKey { 11869 constructor(value) { 11870 super(value); 11871 } 11872 applyPeer(node, reset) { 11873 if (reset) { 11874 getUINativeModule().textArea.resetPlaceholderColor(node); 11875 } 11876 else { 11877 getUINativeModule().textArea.setPlaceholderColor(node, this.value); 11878 } 11879 } 11880 checkObjectDiff() { 11881 return !isBaseOrResourceEqual(this.stageValue, this.value); 11882 } 11883} 11884TextAreaPlaceholderColorModifier.identity = Symbol('textAreaPlaceholderColor'); 11885class TextAreaFontColorModifier extends ModifierWithKey { 11886 constructor(value) { 11887 super(value); 11888 } 11889 applyPeer(node, reset) { 11890 if (reset) { 11891 getUINativeModule().textArea.resetFontColor(node); 11892 } 11893 else { 11894 getUINativeModule().textArea.setFontColor(node, this.value); 11895 } 11896 } 11897 checkObjectDiff() { 11898 return !isBaseOrResourceEqual(this.stageValue, this.value); 11899 } 11900} 11901TextAreaFontColorModifier.identity = Symbol('textAreaFontColor'); 11902class TextAreaFontWeightModifier extends ModifierWithKey { 11903 constructor(value) { 11904 super(value); 11905 } 11906 applyPeer(node, reset) { 11907 if (reset) { 11908 getUINativeModule().textArea.resetFontWeight(node); 11909 } 11910 else { 11911 getUINativeModule().textArea.setFontWeight(node, this.value); 11912 } 11913 } 11914 checkObjectDiff() { 11915 return !isBaseOrResourceEqual(this.stageValue, this.value); 11916 } 11917} 11918TextAreaFontWeightModifier.identity = Symbol('textAreaFontWeight'); 11919class TextAreaBarStateModifier extends ModifierWithKey { 11920 constructor(value) { 11921 super(value); 11922 } 11923 applyPeer(node, reset) { 11924 if (reset) { 11925 getUINativeModule().textArea.resetBarState(node); 11926 } 11927 else { 11928 getUINativeModule().textArea.setBarState(node, this.value); 11929 } 11930 } 11931 checkObjectDiff() { 11932 return !isBaseOrResourceEqual(this.stageValue, this.value); 11933 } 11934} 11935TextAreaBarStateModifier.identity = Symbol('textAreaBarState'); 11936class TextAreaEnableKeyboardOnFocusModifier extends ModifierWithKey { 11937 constructor(value) { 11938 super(value); 11939 } 11940 applyPeer(node, reset) { 11941 if (reset) { 11942 getUINativeModule().textArea.resetEnableKeyboardOnFocus(node); 11943 } 11944 else { 11945 getUINativeModule().textArea.setEnableKeyboardOnFocus(node, this.value); 11946 } 11947 } 11948 checkObjectDiff() { 11949 return !isBaseOrResourceEqual(this.stageValue, this.value); 11950 } 11951} 11952TextAreaEnableKeyboardOnFocusModifier.identity = Symbol('textAreaEnableKeyboardOnFocus'); 11953class TextAreaFontFamilyModifier extends ModifierWithKey { 11954 constructor(value) { 11955 super(value); 11956 } 11957 applyPeer(node, reset) { 11958 if (reset) { 11959 getUINativeModule().textArea.resetFontFamily(node); 11960 } 11961 else { 11962 getUINativeModule().textArea.setFontFamily(node, this.value); 11963 } 11964 } 11965 checkObjectDiff() { 11966 return !isBaseOrResourceEqual(this.stageValue, this.value); 11967 } 11968} 11969TextAreaFontFamilyModifier.identity = Symbol('textAreaFontFamily'); 11970class TextAreaFontFeatureModifier extends ModifierWithKey { 11971 constructor(value) { 11972 super(value); 11973 } 11974 applyPeer(node, reset) { 11975 if (reset) { 11976 getUINativeModule().textArea.resetFontFeature(node); 11977 } else { 11978 getUINativeModule().textArea.setFontFeature(node, this.value); 11979 } 11980 } 11981 checkObjectDiff() { 11982 return !isBaseOrResourceEqual(this.stageValue, this.value); 11983 } 11984} 11985TextAreaFontFeatureModifier.identity = Symbol('textAreaFontFeature'); 11986class TextAreaCaretColorModifier extends ModifierWithKey { 11987 constructor(value) { 11988 super(value); 11989 } 11990 applyPeer(node, reset) { 11991 if (reset) { 11992 getUINativeModule().textArea.resetCaretColor(node); 11993 } 11994 else { 11995 getUINativeModule().textArea.setCaretColor(node, this.value); 11996 } 11997 } 11998 checkObjectDiff() { 11999 return !isBaseOrResourceEqual(this.stageValue, this.value); 12000 } 12001} 12002TextAreaCaretColorModifier.identity = Symbol('textAreaCaretColor'); 12003class TextAreaMaxLengthModifier extends ModifierWithKey { 12004 constructor(value) { 12005 super(value); 12006 } 12007 applyPeer(node, reset) { 12008 if (reset) { 12009 getUINativeModule().textArea.resetMaxLength(node); 12010 } 12011 else { 12012 getUINativeModule().textArea.setMaxLength(node, this.value); 12013 } 12014 } 12015 checkObjectDiff() { 12016 return !isBaseOrResourceEqual(this.stageValue, this.value); 12017 } 12018} 12019TextAreaMaxLengthModifier.identity = Symbol('textAreaMaxLength'); 12020class TextAreaStyleModifier extends ModifierWithKey { 12021 constructor(value) { 12022 super(value); 12023 } 12024 applyPeer(node, reset) { 12025 if (reset) { 12026 getUINativeModule().textArea.resetStyle(node); 12027 } 12028 else { 12029 getUINativeModule().textArea.setStyle(node, this.value); 12030 } 12031 } 12032 checkObjectDiff() { 12033 return !isBaseOrResourceEqual(this.stageValue, this.value); 12034 } 12035} 12036TextAreaStyleModifier.identity = Symbol('textAreaStyle'); 12037class TextAreaSelectionMenuHiddenModifier extends ModifierWithKey { 12038 constructor(value) { 12039 super(value); 12040 } 12041 applyPeer(node, reset) { 12042 if (reset) { 12043 getUINativeModule().textArea.resetSelectionMenuHidden(node); 12044 } 12045 else { 12046 getUINativeModule().textArea.setSelectionMenuHidden(node, this.value); 12047 } 12048 } 12049 checkObjectDiff() { 12050 return !isBaseOrResourceEqual(this.stageValue, this.value); 12051 } 12052} 12053TextAreaSelectionMenuHiddenModifier.identity = Symbol('textAreaSelectionMenuHidden'); 12054class TextAreaPlaceholderFontModifier extends ModifierWithKey { 12055 constructor(value) { 12056 super(value); 12057 } 12058 applyPeer(node, reset) { 12059 if (reset) { 12060 getUINativeModule().textArea.resetPlaceholderFont(node); 12061 } 12062 else { 12063 getUINativeModule().textArea.setPlaceholderFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 12064 } 12065 } 12066 checkObjectDiff() { 12067 if (!(this.stageValue.weight === this.value.weight && 12068 this.stageValue.style === this.value.style)) { 12069 return true; 12070 } 12071 else { 12072 return !isBaseOrResourceEqual(this.stageValue.size, this.value.size) || 12073 !isBaseOrResourceEqual(this.stageValue.family, this.value.family); 12074 } 12075 } 12076} 12077TextAreaPlaceholderFontModifier.identity = Symbol('textAreaPlaceholderFont'); 12078class TextAreaTextAlignModifier extends ModifierWithKey { 12079 constructor(value) { 12080 super(value); 12081 } 12082 applyPeer(node, reset) { 12083 if (reset) { 12084 getUINativeModule().textArea.resetTextAlign(node); 12085 } 12086 else { 12087 getUINativeModule().textArea.setTextAlign(node, this.value); 12088 } 12089 } 12090 checkObjectDiff() { 12091 return !isBaseOrResourceEqual(this.stageValue, this.value); 12092 } 12093} 12094TextAreaTextAlignModifier.identity = Symbol('textAreaTextAlign'); 12095class TextAreaShowCounterModifier extends ModifierWithKey { 12096 constructor(value) { 12097 super(value); 12098 } 12099 applyPeer(node, reset) { 12100 if (reset) { 12101 getUINativeModule().textArea.resetShowCounter(node); 12102 } 12103 else { 12104 getUINativeModule().textArea.setShowCounter(node, this.value.value, this.value.highlightBorder, this.value.thresholdPercentage); 12105 } 12106 } 12107 checkObjectDiff() { 12108 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 12109 !isBaseOrResourceEqual(this.stageValue.highlightBorder, this.value.highlightBorder) || 12110 !isBaseOrResourceEqual(this.stageValue.thresholdPercentage, this.value.thresholdPercentage); 12111 } 12112} 12113TextAreaShowCounterModifier.identity = Symbol('textAreaShowCounter'); 12114class TextAreaOnChangeModifier extends ModifierWithKey { 12115 constructor(value) { 12116 super(value); 12117 } 12118 applyPeer(node, reset) { 12119 if (reset) { 12120 getUINativeModule().textArea.resetOnChange(node); 12121 } else { 12122 getUINativeModule().textArea.setOnChange(node, this.value); 12123 } 12124 } 12125} 12126TextAreaOnChangeModifier.identity = Symbol('textAreaOnChange'); 12127class TextAreaEnterKeyTypeModifier extends ModifierWithKey { 12128 constructor(value) { 12129 super(value); 12130 } 12131 applyPeer(node, reset) { 12132 if (reset) { 12133 getUINativeModule().textArea.resetEnterKeyType(node); 12134 } else { 12135 getUINativeModule().textArea.setEnterKeyType(node, this.value); 12136 } 12137 } 12138 12139 checkObjectDiff() { 12140 return !isBaseOrResourceEqual(this.stageValue, this.value); 12141 } 12142} 12143TextAreaEnterKeyTypeModifier.identity = Symbol('textAreaEnterKeyType'); 12144class TextAreaInputFilterModifier extends ModifierWithKey { 12145 constructor(value) { 12146 super(value); 12147 } 12148 applyPeer(node, reset) { 12149 if (reset) { 12150 getUINativeModule().textArea.resetInputFilter(node); 12151 } 12152 else { 12153 getUINativeModule().textArea.setInputFilter(node, this.value.value, this.value.error); 12154 } 12155 } 12156 checkObjectDiff() { 12157 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 12158 !isBaseOrResourceEqual(this.stageValue.error, this.value.error); 12159 } 12160} 12161TextAreaInputFilterModifier.identity = Symbol('textAreaInputFilter'); 12162class TextAreaOnTextSelectionChangeModifier extends ModifierWithKey { 12163 constructor(value) { 12164 super(value); 12165 } 12166 applyPeer(node, reset) { 12167 if (reset) { 12168 getUINativeModule().textArea.resetOnTextSelectionChange(node); 12169 } else { 12170 getUINativeModule().textArea.setOnTextSelectionChange(node, this.value); 12171 } 12172 } 12173} 12174TextAreaOnTextSelectionChangeModifier.identity = Symbol('textAreaOnTextSelectionChange'); 12175 12176class TextAreaOnContentScrollModifier extends ModifierWithKey { 12177 constructor(value) { 12178 super(value); 12179 } 12180 applyPeer(node, reset) { 12181 if (reset) { 12182 getUINativeModule().textArea.resetOnContentScroll(node); 12183 } else { 12184 getUINativeModule().textArea.setOnContentScroll(node, this.value); 12185 } 12186 } 12187} 12188TextAreaOnContentScrollModifier.identity = Symbol('textAreaOnContentScroll'); 12189class TextAreaOnEditChangeModifier extends ModifierWithKey { 12190 constructor(value) { 12191 super(value); 12192 } 12193 applyPeer(node, reset) { 12194 if (reset) { 12195 getUINativeModule().textArea.resetOnEditChange(node); 12196 } else { 12197 getUINativeModule().textArea.setOnEditChange(node, this.value); 12198 } 12199 } 12200} 12201TextAreaOnEditChangeModifier.identity = Symbol('textAreaOnEditChange'); 12202class TextAreaOnCopyModifier extends ModifierWithKey { 12203 constructor(value) { 12204 super(value); 12205 } 12206 applyPeer(node, reset) { 12207 if (reset) { 12208 getUINativeModule().textArea.resetOnCopy(node); 12209 } else { 12210 getUINativeModule().textArea.setOnCopy(node, this.value); 12211 } 12212 } 12213} 12214TextAreaOnCopyModifier.identity = Symbol('textAreaOnCopy'); 12215class TextAreaOnCutModifier extends ModifierWithKey { 12216 constructor(value) { 12217 super(value); 12218 } 12219 applyPeer(node, reset) { 12220 if (reset) { 12221 getUINativeModule().textArea.resetOnCut(node); 12222 } else { 12223 getUINativeModule().textArea.setOnCut(node, this.value); 12224 } 12225 } 12226} 12227TextAreaOnCutModifier.identity = Symbol('textAreaOnCut'); 12228class TextAreaOnPasteModifier extends ModifierWithKey { 12229 constructor(value) { 12230 super(value); 12231 } 12232 applyPeer(node, reset) { 12233 if (reset) { 12234 getUINativeModule().textArea.resetOnPaste(node); 12235 } else { 12236 getUINativeModule().textArea.setOnPaste(node, this.value); 12237 } 12238 } 12239} 12240TextAreaOnPasteModifier.identity = Symbol('textAreaOnPaste'); 12241class TextAreaTypeModifier extends ModifierWithKey { 12242 constructor(value) { 12243 super(value); 12244 } 12245 applyPeer(node, reset) { 12246 if (reset) { 12247 getUINativeModule().textArea.resetType(node); 12248 } 12249 else { 12250 getUINativeModule().textArea.setType(node, this.value); 12251 } 12252 } 12253 checkObjectDiff() { 12254 return !isBaseOrResourceEqual(this.stageValue, this.value); 12255 } 12256} 12257TextAreaTypeModifier.identity = Symbol('textAreaType'); 12258class TextAreaPaddingModifier extends ModifierWithKey { 12259 constructor(value) { 12260 super(value); 12261 } 12262 applyPeer(node, reset) { 12263 if (reset) { 12264 getUINativeModule().textArea.resetPadding(node); 12265 } 12266 else { 12267 getUINativeModule().textArea.setPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 12268 } 12269 } 12270 checkObjectDiff() { 12271 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 12272 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 12273 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 12274 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 12275 } 12276} 12277TextAreaPaddingModifier.identity = Symbol('textAreaPadding'); 12278class TextAreaOnSubmitModifier extends ModifierWithKey { 12279 constructor(value) { 12280 super(value); 12281 } 12282 applyPeer(node, reset) { 12283 if (reset) { 12284 getUINativeModule().textArea.resetOnSubmit(node); 12285 } else { 12286 getUINativeModule().textArea.setOnSubmit(node, this.value); 12287 } 12288 } 12289} 12290TextAreaOnSubmitModifier.identity = Symbol('textAreaOnSubmit'); 12291class TextAreaContentTypeModifier extends ModifierWithKey { 12292 constructor(value) { 12293 super(value); 12294 } 12295 applyPeer(node, reset) { 12296 if (reset) { 12297 getUINativeModule().textArea.resetContentType(node); 12298 } 12299 else { 12300 getUINativeModule().textArea.setContentType(node, this.value); 12301 } 12302 } 12303 checkObjectDiff() { 12304 return !isBaseOrResourceEqual(this.stageValue, this.value); 12305 } 12306} 12307TextAreaContentTypeModifier.identity = Symbol('textAreaContentType'); 12308class TextAreaEnableAutoFillModifier extends ModifierWithKey { 12309 constructor(value) { 12310 super(value); 12311 } 12312 applyPeer(node, reset) { 12313 if (reset) { 12314 getUINativeModule().textArea.resetEnableAutoFill(node); 12315 } else { 12316 getUINativeModule().textArea.setEnableAutoFill(node, this.value); 12317 } 12318 } 12319 checkObjectDiff() { 12320 return !isBaseOrResourceEqual(this.stageValue, this.value); 12321 } 12322} 12323TextAreaEnableAutoFillModifier.identity = Symbol('textAreaEnableAutoFill'); 12324class TextAreaBorderModifier extends ModifierWithKey { 12325 constructor(value) { 12326 super(value); 12327 } 12328 applyPeer(node, reset) { 12329 if (reset) { 12330 getUINativeModule().textArea.resetBorder(node); 12331 } else { 12332 getUINativeModule().textArea.setBorder(node, 12333 this.value.arkWidth.left, this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 12334 this.value.arkColor.leftColor, this.value.arkColor.rightColor, this.value.arkColor.topColor, this.value.arkColor.bottomColor, 12335 this.value.arkRadius.topLeft, this.value.arkRadius.topRight, this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, 12336 this.value.arkStyle.top, this.value.arkStyle.right, this.value.arkStyle.bottom, this.value.arkStyle.left); 12337 } 12338 } 12339 checkObjectDiff() { 12340 return this.value.checkObjectDiff(this.stageValue); 12341 } 12342} 12343TextAreaBorderModifier.identity = Symbol('textAreaBorder'); 12344class TextAreaBorderWidthModifier extends ModifierWithKey { 12345 constructor(value) { 12346 super(value); 12347 } 12348 applyPeer(node, reset) { 12349 if (reset) { 12350 getUINativeModule().textArea.resetBorderWidth(node); 12351 } else { 12352 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 12353 getUINativeModule().textArea.setBorderWidth(node, this.value, this.value, this.value, this.value); 12354 } else { 12355 getUINativeModule().textArea.setBorderWidth(node, this.value.top, this.value.right, 12356 this.value.bottom, this.value.left); 12357 } 12358 } 12359 } 12360 checkObjectDiff() { 12361 if (isResource(this.stageValue) && isResource(this.value)) { 12362 return !isResourceEqual(this.stageValue, this.value); 12363 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 12364 return !(this.stageValue.left === this.value.left && 12365 this.stageValue.right === this.value.right && 12366 this.stageValue.top === this.value.top && 12367 this.stageValue.bottom === this.value.bottom); 12368 } else { 12369 return true; 12370 } 12371 } 12372} 12373TextAreaBorderWidthModifier.identity = Symbol('textAreaBorderWidth'); 12374class TextAreaBorderColorModifier extends ModifierWithKey { 12375 constructor(value) { 12376 super(value); 12377 } 12378 applyPeer(node, reset) { 12379 if (reset) { 12380 getUINativeModule().textArea.resetBorderColor(node); 12381 } else { 12382 const valueType = typeof this.value; 12383 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 12384 getUINativeModule().textArea.setBorderColor(node, this.value, this.value, this.value, this.value); 12385 } else { 12386 getUINativeModule().textArea.setBorderColor(node, this.value.top, 12387 this.value.right, this.value.bottom, 12388 this.value.left); 12389 } 12390 } 12391 } 12392 checkObjectDiff() { 12393 if (isResource(this.stageValue) && isResource(this.value)) { 12394 return !isResourceEqual(this.stageValue, this.value); 12395 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 12396 return !(this.stageValue.left === this.value.left && 12397 this.stageValue.right === this.value.right && 12398 this.stageValue.top === this.value.top && 12399 this.stageValue.bottom === his.value.bottom); 12400 } else { 12401 return true; 12402 } 12403 } 12404} 12405TextAreaBorderColorModifier.identity = Symbol('textAreaBorderColor'); 12406class TextAreaBorderStyleModifier extends ModifierWithKey { 12407 constructor(value) { 12408 super(value); 12409 } 12410 applyPeer(node, reset) { 12411 if (reset) { 12412 getUINativeModule().textArea.resetBorderStyle(node); 12413 } else { 12414 let type; 12415 let style; 12416 let top; 12417 let right; 12418 let bottom; 12419 let left; 12420 if (isNumber(this.value)) { 12421 style = this.value; 12422 type = true; 12423 } else if (isObject(this.value)) { 12424 top = this.value?.top; 12425 right = this.value?.right; 12426 bottom = this.value?.bottom; 12427 left = this.value?.left; 12428 type = true; 12429 } 12430 if (type === true) { 12431 getUINativeModule().textArea.setBorderStyle(node, type, style, top, right, bottom, left); 12432 } else { 12433 getUINativeModule().textArea.resetBorderStyle(node); 12434 } 12435 } 12436 } 12437 checkObjectDiff() { 12438 return !(this.value?.top === this.stageValue?.top && 12439 this.value?.right === this.stageValue?.right && 12440 this.value?.bottom === this.stageValue?.bottom && 12441 this.value?.left === this.stageValue?.left); 12442 } 12443} 12444TextAreaBorderStyleModifier.identity = Symbol('textAreaBorderStyle'); 12445class TextAreaBorderRadiusModifier extends ModifierWithKey { 12446 constructor(value) { 12447 super(value); 12448 } 12449 applyPeer(node, reset) { 12450 if (reset) { 12451 getUINativeModule().textArea.resetBorderRadius(node); 12452 } else { 12453 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 12454 getUINativeModule().textArea.setBorderRadius(node, this.value, this.value, this.value, this.value); 12455 } else { 12456 getUINativeModule().textArea.setBorderRadius(node, this.value.topLeft, this.value.topRight, 12457 this.value.bottomLeft, this.value.bottomRight); 12458 } 12459 } 12460 } 12461 checkObjectDiff() { 12462 if (isResource(this.stageValue) && isResource(this.value)) { 12463 return !isResourceEqual(this.stageValue, this.value); 12464 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 12465 return !(this.stageValue.topLeft === this.value.topLeft && 12466 this.stageValue.topRight === this.value.topRight && 12467 this.stageValue.bottomLeft === this.value.bottomLeft && 12468 this.stageValue.bottomRight === this.value.bottomRight); 12469 } else { 12470 return true; 12471 } 12472 } 12473} 12474TextAreaBorderRadiusModifier.identity = Symbol('textAreaBorderRadius'); 12475class TextAreaBackgroundColorModifier extends ModifierWithKey { 12476 constructor(value) { 12477 super(value); 12478 } 12479 applyPeer(node, reset) { 12480 if (reset) { 12481 getUINativeModule().textArea.resetBackgroundColor(node); 12482 } else { 12483 getUINativeModule().textArea.setBackgroundColor(node, this.value); 12484 } 12485 } 12486 12487 checkObjectDiff() { 12488 return !isBaseOrResourceEqual(this.stageValue, this.value); 12489 } 12490} 12491TextAreaBackgroundColorModifier.identity = Symbol('textAreaBackgroundColor'); 12492class TextAreaMarginModifier extends ModifierWithKey { 12493 constructor(value) { 12494 super(value); 12495 } 12496 applyPeer(node, reset) { 12497 if (reset) { 12498 getUINativeModule().textArea.resetMargin(node); 12499 } 12500 else { 12501 getUINativeModule().textArea.setMargin(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 12502 } 12503 } 12504 checkObjectDiff() { 12505 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 12506 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 12507 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 12508 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 12509 } 12510} 12511TextAreaMarginModifier.identity = Symbol('textAreaMargin'); 12512class TextAreaOnWillInsertModifier extends ModifierWithKey { 12513 constructor(value) { 12514 super(value); 12515 } 12516 applyPeer(node, reset) { 12517 if (reset) { 12518 getUINativeModule().textArea.resetOnWillInsert(node); 12519 } else { 12520 getUINativeModule().textArea.setOnWillInsert(node, this.value); 12521 } 12522 } 12523} 12524TextAreaOnWillInsertModifier.identity = Symbol('textAreaOnWillInsert'); 12525class TextAreaOnDidInsertModifier extends ModifierWithKey { 12526 constructor(value) { 12527 super(value); 12528 } 12529 applyPeer(node, reset) { 12530 if (reset) { 12531 getUINativeModule().textArea.resetOnDidInsert(node); 12532 } else { 12533 getUINativeModule().textArea.setOnDidInsert(node, this.value); 12534 } 12535 } 12536} 12537TextAreaOnDidInsertModifier.identity = Symbol('textAreaOnDidInsert'); 12538class TextAreaOnWillDeleteModifier extends ModifierWithKey { 12539 constructor(value) { 12540 super(value); 12541 } 12542 applyPeer(node, reset) { 12543 if (reset) { 12544 getUINativeModule().textArea.resetOnWillDelete(node); 12545 } else { 12546 getUINativeModule().textArea.setOnWillDelete(node, this.value); 12547 } 12548 } 12549} 12550TextAreaOnWillDeleteModifier.identity = Symbol('textAreaOnWillDelete'); 12551class TextAreaOnDidDeleteModifier extends ModifierWithKey { 12552 constructor(value) { 12553 super(value); 12554 } 12555 applyPeer(node, reset) { 12556 if (reset) { 12557 getUINativeModule().textArea.resetOnDidDelete(node); 12558 } else { 12559 getUINativeModule().textArea.setOnDidDelete(node, this.value); 12560 } 12561 } 12562} 12563TextAreaOnDidDeleteModifier.identity = Symbol('textAreaOnDidDelete'); 12564class TextAreaEnablePreviewTextModifier extends ModifierWithKey { 12565 constructor(value) { 12566 super(value); 12567 } 12568 applyPeer(node, reset) { 12569 if (reset) { 12570 getUINativeModule().textArea.resetEnablePreviewText(node); 12571 } 12572 else { 12573 getUINativeModule().textArea.setEnablePreviewText(node, this.value); 12574 } 12575 } 12576 checkObjectDiff() { 12577 return !isBaseOrResourceEqual(this.stageValue, this.value); 12578 } 12579} 12580TextAreaEnablePreviewTextModifier.identity = Symbol('textAreaEnablePreviewText'); 12581class TextAreaEditMenuOptionsModifier extends ModifierWithKey { 12582 constructor(value) { 12583 super(value); 12584 } 12585 applyPeer(node, reset) { 12586 if (reset) { 12587 getUINativeModule().textArea.resetSelectionMenuOptions(node); 12588 } else { 12589 getUINativeModule().textArea.setSelectionMenuOptions(node, this.value); 12590 } 12591 } 12592} 12593TextAreaEditMenuOptionsModifier.identity = Symbol('textAreaEditMenuOptions'); 12594 12595class TextAreaWidthModifier extends ModifierWithKey { 12596 constructor(value) { 12597 super(value); 12598 } 12599 applyPeer(node, reset) { 12600 if (reset) { 12601 getUINativeModule().textArea.resetWidth(node); 12602 } else { 12603 getUINativeModule().textArea.setWidth(node, this.value); 12604 } 12605 } 12606} 12607TextAreaWidthModifier.identity = Symbol('textAreaWidth'); 12608class TextAreaEnableHapticFeedbackModifier extends ModifierWithKey { 12609 constructor(value) { 12610 super(value); 12611 } 12612 applyPeer(node, reset) { 12613 if (reset) { 12614 getUINativeModule().textArea.resetEnableHapticFeedback(node); 12615 } 12616 else { 12617 getUINativeModule().textArea.setEnableHapticFeedback(node, this.value); 12618 } 12619 } 12620 checkObjectDiff() { 12621 return !isBaseOrResourceEqual(this.stageValue, this.value); 12622 } 12623} 12624TextAreaEnableHapticFeedbackModifier.identity = Symbol('textAreaEnableHapticFeedback'); 12625 12626class ArkTextAreaComponent extends ArkComponent { 12627 constructor(nativePtr, classType) { 12628 super(nativePtr, classType); 12629 } 12630 type(value) { 12631 modifierWithKey(this._modifiersWithKeys, TextAreaTypeModifier.identity, TextAreaTypeModifier, value); 12632 return this; 12633 } 12634 placeholderColor(value) { 12635 modifierWithKey(this._modifiersWithKeys, TextAreaPlaceholderColorModifier.identity, TextAreaPlaceholderColorModifier, value); 12636 return this; 12637 } 12638 placeholderFont(value) { 12639 modifierWithKey(this._modifiersWithKeys, TextAreaPlaceholderFontModifier.identity, TextAreaPlaceholderFontModifier, value); 12640 return this; 12641 } 12642 textAlign(value) { 12643 modifierWithKey(this._modifiersWithKeys, TextAreaTextAlignModifier.identity, TextAreaTextAlignModifier, value); 12644 return this; 12645 } 12646 caretColor(value) { 12647 modifierWithKey(this._modifiersWithKeys, TextAreaCaretColorModifier.identity, TextAreaCaretColorModifier, value); 12648 return this; 12649 } 12650 fontColor(value) { 12651 modifierWithKey(this._modifiersWithKeys, TextAreaFontColorModifier.identity, TextAreaFontColorModifier, value); 12652 return this; 12653 } 12654 fontSize(value) { 12655 modifierWithKey(this._modifiersWithKeys, TextAreaFontSizeModifier.identity, TextAreaFontSizeModifier, value); 12656 return this; 12657 } 12658 fontStyle(value) { 12659 modifierWithKey(this._modifiersWithKeys, TextAreaFontStyleModifier.identity, TextAreaFontStyleModifier, value); 12660 return this; 12661 } 12662 fontWeight(value) { 12663 modifierWithKey(this._modifiersWithKeys, TextAreaFontWeightModifier.identity, TextAreaFontWeightModifier, value); 12664 return this; 12665 } 12666 fontFamily(value) { 12667 modifierWithKey(this._modifiersWithKeys, TextAreaFontFamilyModifier.identity, TextAreaFontFamilyModifier, value); 12668 return this; 12669 } 12670 fontFeature(value) { 12671 modifierWithKey(this._modifiersWithKeys, TextAreaFontFeatureModifier.identity, TextAreaFontFeatureModifier, value); 12672 return this; 12673 } 12674 inputFilter(value, error) { 12675 let arkValue = new ArkTextInputFilter(); 12676 arkValue.value = value; 12677 arkValue.error = error; 12678 modifierWithKey(this._modifiersWithKeys, TextAreaInputFilterModifier.identity, TextAreaInputFilterModifier, arkValue); 12679 return this; 12680 } 12681 onChange(callback) { 12682 modifierWithKey(this._modifiersWithKeys, TextAreaOnChangeModifier.identity, TextAreaOnChangeModifier, callback); 12683 return this; 12684 } 12685 onTextSelectionChange(callback) { 12686 modifierWithKey(this._modifiersWithKeys, TextAreaOnTextSelectionChangeModifier.identity, TextAreaOnTextSelectionChangeModifier, callback); 12687 return this; 12688 } 12689 onContentScroll(callback) { 12690 modifierWithKey(this._modifiersWithKeys, TextAreaOnContentScrollModifier.identity, TextAreaOnContentScrollModifier, callback); 12691 return this; 12692 } 12693 onEditChange(callback) { 12694 modifierWithKey(this._modifiersWithKeys, TextAreaOnEditChangeModifier.identity, TextAreaOnEditChangeModifier, callback); 12695 return this; 12696 } 12697 onCopy(callback) { 12698 modifierWithKey(this._modifiersWithKeys, TextAreaOnCopyModifier.identity, TextAreaOnCopyModifier, callback); 12699 return this; 12700 } 12701 onCut(callback) { 12702 modifierWithKey(this._modifiersWithKeys, TextAreaOnCutModifier.identity, TextAreaOnCutModifier, callback); 12703 return this; 12704 } 12705 onPaste(callback) { 12706 modifierWithKey(this._modifiersWithKeys, TextAreaOnPasteModifier.identity, TextAreaOnPasteModifier, callback); 12707 return this; 12708 } 12709 copyOption(value) { 12710 modifierWithKey(this._modifiersWithKeys, TextAreaCopyOptionModifier.identity, TextAreaCopyOptionModifier, value); 12711 return this; 12712 } 12713 enableKeyboardOnFocus(value) { 12714 modifierWithKey(this._modifiersWithKeys, TextAreaEnableKeyboardOnFocusModifier.identity, TextAreaEnableKeyboardOnFocusModifier, value); 12715 return this; 12716 } 12717 maxLength(value) { 12718 modifierWithKey(this._modifiersWithKeys, TextAreaMaxLengthModifier.identity, TextAreaMaxLengthModifier, value); 12719 return this; 12720 } 12721 showCounter(value, options) { 12722 let arkValue = new ArkTextFieldShowCounter(); 12723 arkValue.value = value; 12724 arkValue.highlightBorder = options?.highlightBorder; 12725 arkValue.thresholdPercentage = options?.thresholdPercentage; 12726 modifierWithKey(this._modifiersWithKeys, TextAreaShowCounterModifier.identity, TextAreaShowCounterModifier, arkValue); 12727 return this; 12728 } 12729 style(value) { 12730 modifierWithKey(this._modifiersWithKeys, TextAreaStyleModifier.identity, TextAreaStyleModifier, value); 12731 return this; 12732 } 12733 barState(value) { 12734 modifierWithKey(this._modifiersWithKeys, TextAreaBarStateModifier.identity, TextAreaBarStateModifier, value); 12735 return this; 12736 } 12737 selectionMenuHidden(value) { 12738 modifierWithKey(this._modifiersWithKeys, TextAreaSelectionMenuHiddenModifier.identity, TextAreaSelectionMenuHiddenModifier, value); 12739 return this; 12740 } 12741 maxLines(value) { 12742 modifierWithKey(this._modifiersWithKeys, TextAreaMaxLinesModifier.identity, TextAreaMaxLinesModifier, value); 12743 return this; 12744 } 12745 customKeyboard(value) { 12746 throw new Error('Method not implemented.'); 12747 } 12748 decoration(value) { 12749 modifierWithKey(this._modifiersWithKeys, TextAreaDecorationModifier.identity, TextAreaDecorationModifier, value); 12750 return this; 12751 } 12752 letterSpacing(value) { 12753 modifierWithKey(this._modifiersWithKeys, TextAreaLetterSpacingModifier.identity, TextAreaLetterSpacingModifier, value); 12754 return this; 12755 } 12756 lineSpacing(value) { 12757 modifierWithKey(this._modifiersWithKeys, TextAreaLineSpacingModifier.identity, TextAreaLineSpacingModifier, value); 12758 return this; 12759 } 12760 lineHeight(value) { 12761 modifierWithKey(this._modifiersWithKeys, TextAreaLineHeightModifier.identity, TextAreaLineHeightModifier, value); 12762 return this; 12763 } 12764 wordBreak(value) { 12765 modifierWithKey(this._modifiersWithKeys, TextAreaWordBreakModifier.identity, TextAreaWordBreakModifier, value); 12766 return this; 12767 } 12768 lineBreakStrategy(value) { 12769 modifierWithKey(this._modifiersWithKeys, TextAreaLineBreakStrategyModifier.identity, 12770 TextAreaLineBreakStrategyModifier, value); 12771 return this; 12772 } 12773 minFontSize(value) { 12774 modifierWithKey(this._modifiersWithKeys, TextAreaMinFontSizeModifier.identity, TextAreaMinFontSizeModifier, value); 12775 return this; 12776 } 12777 maxFontSize(value) { 12778 modifierWithKey(this._modifiersWithKeys, TextAreaMaxFontSizeModifier.identity, TextAreaMaxFontSizeModifier, value); 12779 return this; 12780 } 12781 heightAdaptivePolicy(value) { 12782 modifierWithKey(this._modifiersWithKeys, TextAreaHeightAdaptivePolicyModifier.identity, TextAreaHeightAdaptivePolicyModifier, value); 12783 return this; 12784 } 12785 selectedBackgroundColor(value) { 12786 modifierWithKey(this._modifiersWithKeys, TextAreaSelectedBackgroundColorModifier.identity, TextAreaSelectedBackgroundColorModifier, value); 12787 return this; 12788 } 12789 caretStyle(value) { 12790 modifierWithKey(this._modifiersWithKeys, TextAreaCaretStyleModifier.identity, TextAreaCaretStyleModifier, value); 12791 return this; 12792 } 12793 textOverflow(value) { 12794 modifierWithKey(this._modifiersWithKeys, TextAreaTextOverflowModifier.identity, TextAreaTextOverflowModifier, value); 12795 return this; 12796 } 12797 textIndent(value) { 12798 modifierWithKey(this._modifiersWithKeys, TextAreaTextIndentModifier.identity, TextAreaTextIndentModifier, value); 12799 return this; 12800 } 12801 enterKeyType(value) { 12802 modifierWithKey(this._modifiersWithKeys, TextAreaEnterKeyTypeModifier.identity, TextAreaEnterKeyTypeModifier, value); 12803 return this; 12804 } 12805 padding(value) { 12806 let arkValue = new ArkPadding(); 12807 if (value !== null && value !== undefined) { 12808 if (isLengthType(value) || isResource(value)) { 12809 arkValue.top = value; 12810 arkValue.right = value; 12811 arkValue.bottom = value; 12812 arkValue.left = value; 12813 } 12814 else { 12815 arkValue.top = value.top; 12816 arkValue.right = value.right; 12817 arkValue.bottom = value.bottom; 12818 arkValue.left = value.left; 12819 } 12820 modifierWithKey(this._modifiersWithKeys, TextAreaPaddingModifier.identity, TextAreaPaddingModifier, arkValue); 12821 } 12822 else { 12823 modifierWithKey(this._modifiersWithKeys, TextAreaPaddingModifier.identity, TextAreaPaddingModifier, undefined); 12824 } 12825 return this; 12826 } 12827 onSubmit(callback) { 12828 modifierWithKey(this._modifiersWithKeys, TextAreaOnSubmitModifier.identity, TextAreaOnSubmitModifier, callback); 12829 return this; 12830 } 12831 contentType(value) { 12832 modifierWithKey(this._modifiersWithKeys, TextAreaContentTypeModifier.identity, 12833 TextAreaContentTypeModifier, value); 12834 return this; 12835 } 12836 enableAutoFill(value) { 12837 modifierWithKey(this._modifiersWithKeys, TextAreaEnableAutoFillModifier.identity, 12838 TextAreaEnableAutoFillModifier, value); 12839 return this; 12840 } 12841 border(value) { 12842 let arkBorder = valueToArkBorder(value); 12843 modifierWithKey(this._modifiersWithKeys, TextAreaBorderModifier.identity, TextAreaBorderModifier, arkBorder); 12844 return this; 12845 } 12846 borderWidth(value) { 12847 modifierWithKey(this._modifiersWithKeys, TextAreaBorderWidthModifier.identity, TextAreaBorderWidthModifier, value); 12848 return this; 12849 } 12850 borderColor(value) { 12851 modifierWithKey(this._modifiersWithKeys, TextAreaBorderColorModifier.identity, TextAreaBorderColorModifier, value); 12852 return this; 12853 } 12854 borderStyle(value) { 12855 modifierWithKey(this._modifiersWithKeys, TextAreaBorderStyleModifier.identity, TextAreaBorderStyleModifier, value); 12856 return this; 12857 } 12858 borderRadius(value) { 12859 modifierWithKey(this._modifiersWithKeys, TextAreaBorderRadiusModifier.identity, TextAreaBorderRadiusModifier, value); 12860 return this; 12861 } 12862 backgroundColor(value) { 12863 modifierWithKey(this._modifiersWithKeys, TextAreaBackgroundColorModifier.identity, TextAreaBackgroundColorModifier, value); 12864 return this; 12865 } 12866 margin(value) { 12867 let arkValue = new ArkPadding(); 12868 if (value !== null && value !== undefined) { 12869 if (isLengthType(value) || isResource(value)) { 12870 arkValue.top = value; 12871 arkValue.right = value; 12872 arkValue.bottom = value; 12873 arkValue.left = value; 12874 } 12875 else { 12876 arkValue.top = value.top; 12877 arkValue.right = value.right; 12878 arkValue.bottom = value.bottom; 12879 arkValue.left = value.left; 12880 } 12881 modifierWithKey(this._modifiersWithKeys, TextAreaMarginModifier.identity, TextAreaMarginModifier, arkValue); 12882 } 12883 else { 12884 modifierWithKey(this._modifiersWithKeys, TextAreaMarginModifier.identity, TextAreaMarginModifier, undefined); 12885 } 12886 return this; 12887 } 12888 onWillInsert(callback) { 12889 modifierWithKey(this._modifiersWithKeys, TextAreaOnWillInsertModifier.identity, TextAreaOnWillInsertModifier, callback); 12890 return this; 12891 } 12892 onDidInsert(callback) { 12893 modifierWithKey(this._modifiersWithKeys, TextAreaOnDidInsertModifier.identity, TextAreaOnDidInsertModifier, callback); 12894 return this; 12895 } 12896 onWillDelete(callback) { 12897 modifierWithKey(this._modifiersWithKeys, TextAreaOnWillDeleteModifier.identity, TextAreaOnWillDeleteModifier, callback); 12898 return this; 12899 } 12900 onDidDelete(callback) { 12901 modifierWithKey(this._modifiersWithKeys, TextAreaOnDidDeleteModifier.identity, TextAreaOnDidDeleteModifier, callback); 12902 return this; 12903 } 12904 enablePreviewText(value) { 12905 modifierWithKey(this._modifiersWithKeys, TextAreaEnablePreviewTextModifier.identity, TextAreaEnablePreviewTextModifier, value); 12906 return this; 12907 } 12908 editMenuOptions(value) { 12909 modifierWithKey(this._modifiersWithKeys, TextAreaEditMenuOptionsModifier.identity, 12910 TextAreaEditMenuOptionsModifier, value); 12911 return this; 12912 } 12913 width(value) { 12914 modifierWithKey(this._modifiersWithKeys, TextAreaWidthModifier.identity, TextAreaWidthModifier, value); 12915 return this; 12916 } 12917 enableHapticFeedback(value) { 12918 modifierWithKey(this._modifiersWithKeys, TextAreaEnableHapticFeedbackModifier.identity, TextAreaEnableHapticFeedbackModifier, value); 12919 return this; 12920 } 12921} 12922// @ts-ignore 12923if (globalThis.TextArea !== undefined) { 12924 globalThis.TextArea.attributeModifier = function (modifier) { 12925 attributeModifierFunc.call(this, modifier, (nativePtr) => { 12926 return new ArkTextAreaComponent(nativePtr); 12927 }, (nativePtr, classType, modifierJS) => { 12928 return new modifierJS.TextAreaModifier(nativePtr, classType); 12929 }); 12930 }; 12931} 12932 12933/// <reference path='./import.ts' /> 12934class TextInputStyleModifier extends ModifierWithKey { 12935 constructor(value) { 12936 super(value); 12937 } 12938 applyPeer(node, reset) { 12939 if (reset) { 12940 getUINativeModule().textInput.resetStyle(node); 12941 } 12942 else { 12943 getUINativeModule().textInput.setStyle(node, this.value); 12944 } 12945 } 12946 checkObjectDiff() { 12947 return !isBaseOrResourceEqual(this.stageValue, this.value); 12948 } 12949} 12950TextInputStyleModifier.identity = Symbol('textInputStyle'); 12951class TextInputMaxLengthModifier extends ModifierWithKey { 12952 constructor(value) { 12953 super(value); 12954 } 12955 applyPeer(node, reset) { 12956 if (reset) { 12957 getUINativeModule().textInput.resetMaxLength(node); 12958 } 12959 else { 12960 getUINativeModule().textInput.setMaxLength(node, this.value); 12961 } 12962 } 12963 checkObjectDiff() { 12964 return !isBaseOrResourceEqual(this.stageValue, this.value); 12965 } 12966} 12967TextInputMaxLengthModifier.identity = Symbol('textInputMaxLength'); 12968class TextInputMaxLinesModifier extends ModifierWithKey { 12969 constructor(value) { 12970 super(value); 12971 } 12972 applyPeer(node, reset) { 12973 if (reset) { 12974 getUINativeModule().textInput.resetMaxLines(node); 12975 } 12976 else { 12977 getUINativeModule().textInput.setMaxLines(node, this.value); 12978 } 12979 } 12980 checkObjectDiff() { 12981 return !isBaseOrResourceEqual(this.stageValue, this.value); 12982 } 12983} 12984TextInputMaxLinesModifier.identity = Symbol('textInputMaxLines'); 12985class TextInputDecorationModifier extends ModifierWithKey { 12986 constructor(value) { 12987 super(value); 12988 } 12989 applyPeer(node, reset) { 12990 if (reset) { 12991 getUINativeModule().textInput.resetDecoration(node); 12992 } 12993 else { 12994 getUINativeModule().textInput.setDecoration(node, this.value.type, this.value.color, this.value.style); 12995 } 12996 } 12997 checkObjectDiff() { 12998 if (this.stageValue.type !== this.value.type || this.stageValue.style !== this.value.style) { 12999 return true; 13000 } 13001 if (isResource(this.stageValue.color) && isResource(this.value.color)) { 13002 return !isResourceEqual(this.stageValue.color, this.value.color); 13003 } 13004 else if (!isResource(this.stageValue.color) && !isResource(this.value.color)) { 13005 return !(this.stageValue.color === this.value.color); 13006 } 13007 else { 13008 return true; 13009 } 13010 } 13011} 13012TextInputDecorationModifier.identity = Symbol('textInputDecoration'); 13013class TextInputLetterSpacingModifier extends ModifierWithKey { 13014 constructor(value) { 13015 super(value); 13016 } 13017 applyPeer(node, reset) { 13018 if (reset) { 13019 getUINativeModule().textInput.resetLetterSpacing(node); 13020 } 13021 else { 13022 getUINativeModule().textInput.setLetterSpacing(node, this.value); 13023 } 13024 } 13025 checkObjectDiff() { 13026 return !isBaseOrResourceEqual(this.stageValue, this.value); 13027 } 13028} 13029TextInputLetterSpacingModifier.identity = Symbol('textInputLetterSpacing'); 13030class TextInputLineHeightModifier extends ModifierWithKey { 13031 constructor(value) { 13032 super(value); 13033 } 13034 applyPeer(node, reset) { 13035 if (reset) { 13036 getUINativeModule().textInput.resetLineHeight(node); 13037 } 13038 else { 13039 getUINativeModule().textInput.setLineHeight(node, this.value); 13040 } 13041 } 13042 checkObjectDiff() { 13043 return !isBaseOrResourceEqual(this.stageValue, this.value); 13044 } 13045} 13046TextInputLineHeightModifier.identity = Symbol('textInputLineHeight'); 13047class TextInputUnderlineColorModifier extends ModifierWithKey { 13048 constructor(value) { 13049 super(value); 13050 } 13051 applyPeer(node, reset) { 13052 if (reset) { 13053 getUINativeModule().textInput.resetUnderlineColor(node); 13054 } 13055 else { 13056 const valueType = typeof this.value; 13057 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 13058 getUINativeModule().textInput.setUnderlineColor(node, this.value, undefined, undefined, undefined, undefined); 13059 } 13060 else { 13061 getUINativeModule().textInput.setUnderlineColor(node, undefined, this.value.normal, this.value.typing, this.value.error, this.value.disable); 13062 } 13063 } 13064 } 13065 checkObjectDiff() { 13066 if (isResource(this.stageValue) && isResource(this.value)) { 13067 return !isBaseOrResourceEqual(this.stageValue, this.value); 13068 } 13069 else if (!isResource(this.stageValue) && !isResource(this.value)) { 13070 return !(this.stageValue.normal === this.value.normal && 13071 this.stageValue.typing === this.value.typing && 13072 this.stageValue.error === this.value.error && 13073 this.stageValue.disable === this.value.disable); 13074 } 13075 else { 13076 return true; 13077 } 13078 } 13079} 13080TextInputUnderlineColorModifier.identity = Symbol('textInputUnderlineColor'); 13081class TextInputWordBreakModifier extends ModifierWithKey { 13082 constructor(value) { 13083 super(value); 13084 } 13085 applyPeer(node, reset) { 13086 if (reset) { 13087 getUINativeModule().textInput.resetWordBreak(node); 13088 } 13089 else { 13090 getUINativeModule().textInput.setWordBreak(node, this.value); 13091 } 13092 } 13093 checkObjectDiff() { 13094 return !isBaseOrResourceEqual(this.stageValue, this.value); 13095 } 13096} 13097TextInputWordBreakModifier.identity = Symbol('textInputWordBreak'); 13098 13099class TextInputLineBreakStrategyModifier extends ModifierWithKey { 13100 constructor(value) { 13101 super(value); 13102 } 13103 applyPeer(node, reset) { 13104 if (reset) { 13105 getUINativeModule().textInput.resetLineBreakStrategy(node); 13106 } 13107 else { 13108 getUINativeModule().textInput.setLineBreakStrategy(node, this.value); 13109 } 13110 } 13111 checkObjectDiff() { 13112 return !isBaseOrResourceEqual(this.stageValue, this.value); 13113 } 13114} 13115TextInputLineBreakStrategyModifier.identity = Symbol('textInputLineBreakStrategy'); 13116 13117class TextInputMinFontSizeModifier extends ModifierWithKey { 13118 constructor(value) { 13119 super(value); 13120 } 13121 applyPeer(node, reset) { 13122 if (reset) { 13123 getUINativeModule().textInput.resetMinFontSize(node); 13124 } 13125 else { 13126 getUINativeModule().textInput.setMinFontSize(node, this.value); 13127 } 13128 } 13129 checkObjectDiff() { 13130 return !isBaseOrResourceEqual(this.stageValue, this.value); 13131 } 13132} 13133TextInputMinFontSizeModifier.identity = Symbol('textInputMinFontSize'); 13134class TextInputMaxFontSizeModifier extends ModifierWithKey { 13135 constructor(value) { 13136 super(value); 13137 } 13138 applyPeer(node, reset) { 13139 if (reset) { 13140 getUINativeModule().textInput.resetMaxFontSize(node); 13141 } 13142 else { 13143 getUINativeModule().textInput.setMaxFontSize(node, this.value); 13144 } 13145 } 13146 checkObjectDiff() { 13147 return !isBaseOrResourceEqual(this.stageValue, this.value); 13148 } 13149} 13150TextInputMaxFontSizeModifier.identity = Symbol('textInputMaxFontSize'); 13151class TextInputHeightAdaptivePolicyModifier extends ModifierWithKey { 13152 constructor(value) { 13153 super(value); 13154 } 13155 applyPeer(node, reset) { 13156 if (reset) { 13157 getUINativeModule().textInput.resetHeightAdaptivePolicy(node); 13158 } 13159 else { 13160 getUINativeModule().textInput.setHeightAdaptivePolicy(node, this.value); 13161 } 13162 } 13163 checkObjectDiff() { 13164 return !isBaseOrResourceEqual(this.stageValue, this.value); 13165 } 13166} 13167TextInputHeightAdaptivePolicyModifier.identity = Symbol('textInputHeightAdaptivePolicy'); 13168class TextInputTextOverflowModifier extends ModifierWithKey { 13169 constructor(value) { 13170 super(value); 13171 } 13172 applyPeer(node, reset) { 13173 if (reset) { 13174 getUINativeModule().textInput.resetTextOverflow(node); 13175 } else { 13176 getUINativeModule().textInput.setTextOverflow(node, this.value); 13177 } 13178 } 13179 checkObjectDiff() { 13180 return this.stageValue !== this.value; 13181 } 13182} 13183TextInputTextOverflowModifier.identity = Symbol('textInputTextOverflow'); 13184class TextInputTextIndentModifier extends ModifierWithKey { 13185 constructor(value) { 13186 super(value); 13187 } 13188 applyPeer(node, reset) { 13189 if (reset) { 13190 getUINativeModule().textInput.resetTextIndent(node); 13191 } else { 13192 getUINativeModule().textInput.setTextIndent(node, this.value); 13193 } 13194 } 13195 13196 checkObjectDiff() { 13197 return !isBaseOrResourceEqual(this.stageValue, this.value); 13198 } 13199} 13200TextInputTextIndentModifier.identity = Symbol('textInputTextIndent'); 13201class TextInputShowPasswordIconModifier extends ModifierWithKey { 13202 constructor(value) { 13203 super(value); 13204 } 13205 applyPeer(node, reset) { 13206 if (reset) { 13207 getUINativeModule().textInput.resetShowPasswordIcon(node); 13208 } 13209 else { 13210 getUINativeModule().textInput.setShowPasswordIcon(node, this.value); 13211 } 13212 } 13213 checkObjectDiff() { 13214 return !isBaseOrResourceEqual(this.stageValue, this.value); 13215 } 13216} 13217TextInputShowPasswordIconModifier.identity = Symbol('textInputShowPasswordIcon'); 13218class TextInputShowPasswordModifier extends ModifierWithKey { 13219 constructor(value) { 13220 super(value); 13221 } 13222 applyPeer(node, reset) { 13223 if (reset) { 13224 getUINativeModule().textInput.resetShowPassword(node); 13225 } 13226 else { 13227 getUINativeModule().textInput.setShowPassword(node, this.value); 13228 } 13229 } 13230 checkObjectDiff() { 13231 return !isBaseOrResourceEqual(this.stageValue, this.value); 13232 } 13233} 13234TextInputShowPasswordModifier.identity = Symbol('textInputShowPassword'); 13235class TextInputTextAlignModifier extends ModifierWithKey { 13236 constructor(value) { 13237 super(value); 13238 } 13239 applyPeer(node, reset) { 13240 if (reset) { 13241 getUINativeModule().textInput.resetTextAlign(node); 13242 } 13243 else { 13244 getUINativeModule().textInput.setTextAlign(node, this.value); 13245 } 13246 } 13247 checkObjectDiff() { 13248 return !isBaseOrResourceEqual(this.stageValue, this.value); 13249 } 13250} 13251TextInputTextAlignModifier.identity = Symbol('textInputTextAlign'); 13252class TextInputPlaceholderFontModifier extends ModifierWithKey { 13253 constructor(value) { 13254 super(value); 13255 } 13256 applyPeer(node, reset) { 13257 if (reset) { 13258 getUINativeModule().textInput.resetPlaceholderFont(node); 13259 } 13260 else { 13261 getUINativeModule().textInput.setPlaceholderFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 13262 } 13263 } 13264 checkObjectDiff() { 13265 if (!(this.stageValue.weight === this.value.weight && 13266 this.stageValue.style === this.value.style)) { 13267 return true; 13268 } 13269 else { 13270 if (((isResource(this.stageValue.size) && isResource(this.value.size) && 13271 isResourceEqual(this.stageValue.size, this.value.size)) || 13272 (!isResource(this.stageValue.size) && !isResource(this.value.size) && 13273 this.stageValue.size === this.value.size)) && 13274 ((isResource(this.stageValue.family) && isResource(this.value.family) && 13275 isResourceEqual(this.stageValue.family, this.value.family)) || 13276 (!isResource(this.stageValue.family) && !isResource(this.value.family) && 13277 this.stageValue.family === this.value.family))) { 13278 return false; 13279 } 13280 else { 13281 return true; 13282 } 13283 } 13284 } 13285} 13286TextInputPlaceholderFontModifier.identity = Symbol('textInputPlaceholderFont'); 13287class TextInputPlaceholderColorModifier extends ModifierWithKey { 13288 constructor(value) { 13289 super(value); 13290 } 13291 applyPeer(node, reset) { 13292 if (reset) { 13293 getUINativeModule().textInput.resetPlaceholderColor(node); 13294 } 13295 else { 13296 getUINativeModule().textInput.setPlaceholderColor(node, this.value); 13297 } 13298 } 13299 checkObjectDiff() { 13300 return !isBaseOrResourceEqual(this.stageValue, this.value); 13301 } 13302} 13303TextInputPlaceholderColorModifier.identity = Symbol('textInputPlaceholderColor'); 13304class TextInputPasswordIconModifier extends ModifierWithKey { 13305 constructor(value) { 13306 super(value); 13307 } 13308 applyPeer(node, reset) { 13309 if (reset) { 13310 getUINativeModule().textInput.resetPasswordIcon(node); 13311 } 13312 else { 13313 getUINativeModule().textInput.setPasswordIcon(node, this.value.onIconSrc, this.value.offIconSrc); 13314 } 13315 } 13316 checkObjectDiff() { 13317 return !isBaseOrResourceEqual(this.stageValue.onIconSrc, this.value.onIconSrc) || 13318 !isBaseOrResourceEqual(this.stageValue.offIconSrc, this.value.offIconSrc); 13319 } 13320} 13321TextInputPasswordIconModifier.identity = Symbol('textInputPasswordIcon'); 13322class TextInputSelectedBackgroundColorModifier extends ModifierWithKey { 13323 constructor(value) { 13324 super(value); 13325 } 13326 applyPeer(node, reset) { 13327 if (reset) { 13328 getUINativeModule().textInput.resetSelectedBackgroundColor(node); 13329 } 13330 else { 13331 getUINativeModule().textInput.setSelectedBackgroundColor(node, this.value); 13332 } 13333 } 13334 checkObjectDiff() { 13335 return !isBaseOrResourceEqual(this.stageValue, this.value); 13336 } 13337} 13338TextInputSelectedBackgroundColorModifier.identity = Symbol('textInputSelectedBackgroundColor'); 13339class TextInputSelectionMenuHiddenModifier extends ModifierWithKey { 13340 constructor(value) { 13341 super(value); 13342 } 13343 applyPeer(node, reset) { 13344 if (reset) { 13345 getUINativeModule().textInput.resetSelectionMenuHidden(node); 13346 } 13347 else { 13348 getUINativeModule().textInput.setSelectionMenuHidden(node, this.value); 13349 } 13350 } 13351 checkObjectDiff() { 13352 return !isBaseOrResourceEqual(this.stageValue, this.value); 13353 } 13354} 13355TextInputSelectionMenuHiddenModifier.identity = Symbol('textInputSelectionMenuHidden'); 13356class TextInputShowUnderlineModifier extends ModifierWithKey { 13357 constructor(value) { 13358 super(value); 13359 } 13360 applyPeer(node, reset) { 13361 if (reset) { 13362 getUINativeModule().textInput.resetShowUnderline(node); 13363 } 13364 else { 13365 getUINativeModule().textInput.setShowUnderline(node, this.value); 13366 } 13367 } 13368 checkObjectDiff() { 13369 return !isBaseOrResourceEqual(this.stageValue, this.value); 13370 } 13371} 13372TextInputShowUnderlineModifier.identity = Symbol('textInputShowUnderLine'); 13373 13374class TextInputPasswordRulesModifier extends ModifierWithKey { 13375 constructor(value) { 13376 super(value); 13377 } 13378 applyPeer(node, reset) { 13379 if (reset) { 13380 getUINativeModule().textInput.resetPasswordRules(node); 13381 } else { 13382 getUINativeModule().textInput.setPasswordRules(node, this.value); 13383 } 13384 } 13385 checkObjectDiff() { 13386 return !isBaseOrResourceEqual(this.stageValue, this.value); 13387 } 13388} 13389 13390TextInputPasswordRulesModifier.identity = Symbol('textInputPasswordRules'); 13391class TextInputEnableAutoFillModifier extends ModifierWithKey { 13392 constructor(value) { 13393 super(value); 13394 } 13395 applyPeer(node, reset) { 13396 if (reset) { 13397 getUINativeModule().textInput.resetEnableAutoFill(node); 13398 } else { 13399 getUINativeModule().textInput.setEnableAutoFill(node, this.value); 13400 } 13401 } 13402 checkObjectDiff() { 13403 return !isBaseOrResourceEqual(this.stageValue, this.value); 13404 } 13405} 13406TextInputEnableAutoFillModifier.identity = Symbol('textInputEnableAutoFill'); 13407 13408class TextInputFontFeatureModifier extends ModifierWithKey { 13409 constructor(value) { 13410 super(value); 13411 } 13412 applyPeer(node, reset) { 13413 if (reset) { 13414 getUINativeModule().textInput.resetFontFeature(node); 13415 } else { 13416 getUINativeModule().textInput.setFontFeature(node, this.value); 13417 } 13418 } 13419 checkObjectDiff() { 13420 return !isBaseOrResourceEqual(this.stageValue, this.value); 13421 } 13422} 13423TextInputFontFeatureModifier.identity = Symbol('textInputFontFeature'); 13424 13425class TextInputShowErrorModifier extends ModifierWithKey { 13426 constructor(value) { 13427 super(value); 13428 } 13429 applyPeer(node, reset) { 13430 if (reset) { 13431 getUINativeModule().textInput.resetShowError(node); 13432 } 13433 else { 13434 getUINativeModule().textInput.setShowError(node, this.value); 13435 } 13436 } 13437 checkObjectDiff() { 13438 return !isBaseOrResourceEqual(this.stageValue, this.value); 13439 } 13440} 13441TextInputShowErrorModifier.identity = Symbol('textInputShowError'); 13442class TextInputTypeModifier extends ModifierWithKey { 13443 constructor(value) { 13444 super(value); 13445 } 13446 applyPeer(node, reset) { 13447 if (reset) { 13448 getUINativeModule().textInput.resetType(node); 13449 } 13450 else { 13451 getUINativeModule().textInput.setType(node, this.value); 13452 } 13453 } 13454 checkObjectDiff() { 13455 return !isBaseOrResourceEqual(this.stageValue, this.value); 13456 } 13457} 13458TextInputTypeModifier.identity = Symbol('textInputType'); 13459class TextInputCaretPositionModifier extends ModifierWithKey { 13460 constructor(value) { 13461 super(value); 13462 } 13463 applyPeer(node, reset) { 13464 if (reset) { 13465 getUINativeModule().textInput.resetCaretPosition(node); 13466 } 13467 else { 13468 getUINativeModule().textInput.setCaretPosition(node, this.value); 13469 } 13470 } 13471 checkObjectDiff() { 13472 return !isBaseOrResourceEqual(this.stageValue, this.value); 13473 } 13474} 13475TextInputCaretPositionModifier.identity = Symbol('textInputCaretPosition'); 13476class TextInputCopyOptionModifier extends ModifierWithKey { 13477 constructor(value) { 13478 super(value); 13479 } 13480 applyPeer(node, reset) { 13481 if (reset) { 13482 getUINativeModule().textInput.resetCopyOption(node); 13483 } 13484 else { 13485 getUINativeModule().textInput.setCopyOption(node, this.value); 13486 } 13487 } 13488 checkObjectDiff() { 13489 return !isBaseOrResourceEqual(this.stageValue, this.value); 13490 } 13491} 13492TextInputCopyOptionModifier.identity = Symbol('textInputCopyOption'); 13493class TextInputEnableKeyboardOnFocusModifier extends ModifierWithKey { 13494 constructor(value) { 13495 super(value); 13496 } 13497 applyPeer(node, reset) { 13498 if (reset) { 13499 getUINativeModule().textInput.resetEnableKeyboardOnFocus(node); 13500 } 13501 else { 13502 getUINativeModule().textInput.setEnableKeyboardOnFocus(node, this.value); 13503 } 13504 } 13505 checkObjectDiff() { 13506 return !isBaseOrResourceEqual(this.stageValue, this.value); 13507 } 13508} 13509TextInputEnableKeyboardOnFocusModifier.identity = Symbol('textInputEnableKeyboardOnFocus'); 13510class TextInputCaretStyleModifier extends ModifierWithKey { 13511 constructor(value) { 13512 super(value); 13513 } 13514 applyPeer(node, reset) { 13515 if (reset) { 13516 getUINativeModule().textInput.resetCaretStyle(node); 13517 } 13518 else { 13519 getUINativeModule().textInput.setCaretStyle(node, this.value.width, this.value.color); 13520 } 13521 } 13522 checkObjectDiff() { 13523 if (isObject(this.stageValue) && isObject(this.value)) { 13524 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width); 13525 } 13526 else { 13527 return true; 13528 } 13529 } 13530} 13531TextInputCaretStyleModifier.identity = Symbol('textInputCaretStyle'); 13532class TextInputEnterKeyTypeModifier extends ModifierWithKey { 13533 constructor(value) { 13534 super(value); 13535 } 13536 applyPeer(node, reset) { 13537 if (reset) { 13538 getUINativeModule().textInput.resetEnterKeyType(node); 13539 } 13540 else { 13541 getUINativeModule().textInput.setEnterKeyType(node, this.value); 13542 } 13543 } 13544 checkObjectDiff() { 13545 return !isBaseOrResourceEqual(this.stageValue, this.value); 13546 } 13547} 13548TextInputEnterKeyTypeModifier.identity = Symbol('textInputEnterKeyType'); 13549class TextInputBarStateModifier extends ModifierWithKey { 13550 constructor(value) { 13551 super(value); 13552 } 13553 applyPeer(node, reset) { 13554 if (reset) { 13555 getUINativeModule().textInput.resetBarState(node); 13556 } 13557 else { 13558 getUINativeModule().textInput.setBarState(node, this.value); 13559 } 13560 } 13561 checkObjectDiff() { 13562 return !isBaseOrResourceEqual(this.stageValue, this.value); 13563 } 13564} 13565TextInputBarStateModifier.identity = Symbol('textInputBarState'); 13566class TextInputCaretColorModifier extends ModifierWithKey { 13567 constructor(value) { 13568 super(value); 13569 } 13570 applyPeer(node, reset) { 13571 if (reset) { 13572 getUINativeModule().textInput.resetCaretColor(node); 13573 } 13574 else { 13575 getUINativeModule().textInput.setCaretColor(node, this.value); 13576 } 13577 } 13578 checkObjectDiff() { 13579 return !isBaseOrResourceEqual(this.stageValue, this.value); 13580 } 13581} 13582TextInputCaretColorModifier.identity = Symbol('textinputCaretColor'); 13583class TextInputFontColorModifier extends ModifierWithKey { 13584 constructor(value) { 13585 super(value); 13586 } 13587 applyPeer(node, reset) { 13588 if (reset) { 13589 getUINativeModule().textInput.resetFontColor(node); 13590 } 13591 else { 13592 getUINativeModule().textInput.setFontColor(node, this.value); 13593 } 13594 } 13595 checkObjectDiff() { 13596 return !isBaseOrResourceEqual(this.stageValue, this.value); 13597 } 13598} 13599TextInputFontColorModifier.identity = Symbol('textInputFontColor'); 13600class TextInputFontSizeModifier extends ModifierWithKey { 13601 constructor(value) { 13602 super(value); 13603 } 13604 applyPeer(node, reset) { 13605 if (reset) { 13606 getUINativeModule().textInput.resetFontSize(node); 13607 } 13608 else { 13609 getUINativeModule().textInput.setFontSize(node, this.value); 13610 } 13611 } 13612 checkObjectDiff() { 13613 return !isBaseOrResourceEqual(this.stageValue, this.value); 13614 } 13615} 13616TextInputFontSizeModifier.identity = Symbol('textInputFontSize'); 13617class TextInputFontStyleModifier extends ModifierWithKey { 13618 constructor(value) { 13619 super(value); 13620 } 13621 applyPeer(node, reset) { 13622 if (reset) { 13623 getUINativeModule().textInput.resetFontStyle(node); 13624 } 13625 else { 13626 getUINativeModule().textInput.setFontStyle(node, this.value); 13627 } 13628 } 13629 checkObjectDiff() { 13630 return !isBaseOrResourceEqual(this.stageValue, this.value); 13631 } 13632} 13633TextInputFontStyleModifier.identity = Symbol('textInputFontStyle'); 13634class TextInputFontWeightModifier extends ModifierWithKey { 13635 constructor(value) { 13636 super(value); 13637 } 13638 applyPeer(node, reset) { 13639 if (reset) { 13640 getUINativeModule().textInput.resetFontWeight(node); 13641 } 13642 else { 13643 getUINativeModule().textInput.setFontWeight(node, this.value); 13644 } 13645 } 13646 checkObjectDiff() { 13647 return !isBaseOrResourceEqual(this.stageValue, this.value); 13648 } 13649} 13650TextInputFontWeightModifier.identity = Symbol('textInputFontWeight'); 13651class TextInputFontFamilyModifier extends ModifierWithKey { 13652 constructor(value) { 13653 super(value); 13654 } 13655 applyPeer(node, reset) { 13656 if (reset) { 13657 getUINativeModule().textInput.resetFontFamily(node); 13658 } 13659 else { 13660 getUINativeModule().textInput.setFontFamily(node, this.value); 13661 } 13662 } 13663 checkObjectDiff() { 13664 return !isBaseOrResourceEqual(this.stageValue, this.value); 13665 } 13666} 13667TextInputFontFamilyModifier.identity = Symbol('textInputFontFamily'); 13668class TextInputCancelButtonModifier extends ModifierWithKey { 13669 constructor(value) { 13670 super(value); 13671 } 13672 applyPeer(node, reset) { 13673 if (reset) { 13674 getUINativeModule().textInput.resetCancelButton(node); 13675 } 13676 else { 13677 let _a, _b, _c; 13678 getUINativeModule().textInput.setCancelButton(node, this.value.style, 13679 (_a = this.value.icon) === null || _a === void 0 ? void 0 : _a.size, 13680 (_b = this.value.icon) === null || _b === void 0 ? void 0 : _b.color, 13681 (_c = this.value.icon) === null || _c === void 0 ? void 0 : _c.src); 13682 } 13683 } 13684 checkObjectDiff() { 13685 let _a, _b, _c, _d, _e, _f; 13686 return this.stageValue.style !== this.value.style || 13687 !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) || 13688 !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) || 13689 !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); 13690 } 13691} 13692TextInputCancelButtonModifier.identity = Symbol('textInputCancelButton'); 13693class TextInputSelectAllModifier extends ModifierWithKey { 13694 constructor(value) { 13695 super(value); 13696 } 13697 applyPeer(node, reset) { 13698 if (reset) { 13699 getUINativeModule().textInput.resetSelectAll(node); 13700 } 13701 else { 13702 getUINativeModule().textInput.setSelectAll(node, this.value); 13703 } 13704 } 13705 checkObjectDiff() { 13706 return !isBaseOrResourceEqual(this.stageValue, this.value); 13707 } 13708} 13709TextInputSelectAllModifier.identity = Symbol('textInputSelectAll'); 13710class TextInputShowCounterModifier extends ModifierWithKey { 13711 constructor(value) { 13712 super(value); 13713 } 13714 applyPeer(node, reset) { 13715 if (reset) { 13716 getUINativeModule().textInput.resetShowCounter(node); 13717 } 13718 else { 13719 getUINativeModule().textInput.setShowCounter(node, this.value.value, this.value.highlightBorder, this.value.thresholdPercentage); 13720 } 13721 } 13722 checkObjectDiff() { 13723 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 13724 !isBaseOrResourceEqual(this.stageValue.highlightBorder, this.value.highlightBorder) || 13725 !isBaseOrResourceEqual(this.stageValue.thresholdPercentage, this.value.thresholdPercentage); 13726 } 13727} 13728TextInputShowCounterModifier.identity = Symbol('textInputShowCounter'); 13729class TextInputOnEditChangeModifier extends ModifierWithKey { 13730 constructor(value) { 13731 super(value); 13732 } 13733 applyPeer(node, reset) { 13734 if (reset) { 13735 getUINativeModule().textInput.resetOnEditChange(node); 13736 } else { 13737 getUINativeModule().textInput.setOnEditChange(node, this.value); 13738 } 13739 } 13740} 13741TextInputOnEditChangeModifier.identity = Symbol('textInputOnEditChange'); 13742class TextInputFilterModifier extends ModifierWithKey { 13743 constructor(value) { 13744 super(value); 13745 } 13746 applyPeer(node, reset) { 13747 if (reset) { 13748 getUINativeModule().textInput.resetInputFilter(node); 13749 } 13750 else { 13751 getUINativeModule().textInput.setInputFilter(node, this.value.value, this.value.error); 13752 } 13753 } 13754 checkObjectDiff() { 13755 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value) || 13756 !isBaseOrResourceEqual(this.stageValue.error, this.value.error); 13757 } 13758} 13759TextInputFilterModifier.identity = Symbol('textInputFilter'); 13760class TextInputOnSubmitModifier extends ModifierWithKey { 13761 constructor(value) { 13762 super(value); 13763 } 13764 applyPeer(node, reset) { 13765 if (reset) { 13766 getUINativeModule().textInput.resetOnSubmit(node); 13767 } else { 13768 getUINativeModule().textInput.setOnSubmit(node, this.value); 13769 } 13770 } 13771} 13772TextInputOnSubmitModifier.identity = Symbol('textInputOnSubmit'); 13773class TextInputOnChangeModifier extends ModifierWithKey { 13774 constructor(value) { 13775 super(value); 13776 } 13777 applyPeer(node, reset) { 13778 if (reset) { 13779 getUINativeModule().textInput.resetOnChange(node); 13780 } else { 13781 getUINativeModule().textInput.setOnChange(node, this.value); 13782 } 13783 } 13784} 13785TextInputOnChangeModifier.identity = Symbol('textInputOnChange'); 13786class TextInputOnTextSelectionChangeModifier extends ModifierWithKey { 13787 constructor(value) { 13788 super(value); 13789 } 13790 applyPeer(node, reset) { 13791 if (reset) { 13792 getUINativeModule().textInput.resetOnTextSelectionChange(node); 13793 } else { 13794 getUINativeModule().textInput.setOnTextSelectionChange(node, this.value); 13795 } 13796 } 13797} 13798TextInputOnTextSelectionChangeModifier.identity = Symbol('textInputOnTextSelectionChange'); 13799class TextInputOnContentScrollModifier extends ModifierWithKey { 13800 constructor(value) { 13801 super(value); 13802 } 13803 applyPeer(node, reset) { 13804 if (reset) { 13805 getUINativeModule().textInput.resetOnContentScroll(node); 13806 } else { 13807 getUINativeModule().textInput.setOnContentScroll(node, this.value); 13808 } 13809 } 13810} 13811TextInputOnContentScrollModifier.identity = Symbol('textInputOnContentScroll'); 13812class TextInputOnCopyModifier extends ModifierWithKey { 13813 constructor(value) { 13814 super(value); 13815 } 13816 applyPeer(node, reset) { 13817 if (reset) { 13818 getUINativeModule().textInput.resetOnCopy(node); 13819 } else { 13820 getUINativeModule().textInput.setOnCopy(node, this.value); 13821 } 13822 } 13823} 13824TextInputOnCopyModifier.identity = Symbol('textInputOnCopy'); 13825class TextInputOnCutModifier extends ModifierWithKey { 13826 constructor(value) { 13827 super(value); 13828 } 13829 applyPeer(node, reset) { 13830 if (reset) { 13831 getUINativeModule().textInput.resetOnCut(node); 13832 } else { 13833 getUINativeModule().textInput.setOnCut(node, this.value); 13834 } 13835 } 13836} 13837TextInputOnCutModifier.identity = Symbol('textInputOnCut'); 13838class TextInputOnPasteModifier extends ModifierWithKey { 13839 constructor(value) { 13840 super(value); 13841 } 13842 applyPeer(node, reset) { 13843 if (reset) { 13844 getUINativeModule().textInput.resetOnPaste(node); 13845 } else { 13846 getUINativeModule().textInput.setOnPaste(node, this.value); 13847 } 13848 } 13849} 13850TextInputOnPasteModifier.identity = Symbol('textInputOnPaste'); 13851class TextInputPaddingModifier extends ModifierWithKey { 13852 constructor(value) { 13853 super(value); 13854 } 13855 applyPeer(node, reset) { 13856 if (reset) { 13857 getUINativeModule().textInput.resetPadding(node); 13858 } 13859 else { 13860 getUINativeModule().textInput.setPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 13861 } 13862 } 13863 checkObjectDiff() { 13864 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 13865 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 13866 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 13867 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 13868 } 13869} 13870TextInputPaddingModifier.identity = Symbol('textInputPadding'); 13871 13872class TextInputTextModifier extends ModifierWithKey { 13873 constructor(value) { 13874 super(value); 13875 } 13876 13877 applyPeer(node, reset) { 13878 if (reset) { 13879 getUINativeModule().textInput.resetText(node); 13880 } else { 13881 getUINativeModule().textInput.setText(node, this.value); 13882 } 13883 } 13884 13885 checkObjectDiff() { 13886 return !isBaseOrResourceEqual(this.stageValue, this.value); 13887 } 13888} 13889TextInputTextModifier.identity = Symbol('textInputText'); 13890 13891class TextInputPlaceholderModifier extends ModifierWithKey { 13892 constructor(value) { 13893 super(value); 13894 } 13895 applyPeer(node, reset) { 13896 if (reset) { 13897 getUINativeModule().textInput.resetPlaceholder(node); 13898 } else { 13899 getUINativeModule().textInput.setPlaceholder(node, this.value); 13900 } 13901 } 13902 13903 checkObjectDiff() { 13904 return !isBaseOrResourceEqual(this.stageValue, this.value); 13905 } 13906} 13907TextInputPlaceholderModifier.identity = Symbol('textInputPlaceholder'); 13908 13909class TextInputControllerModifier extends ModifierWithKey { 13910 constructor(value) { 13911 super(value); 13912 } 13913 13914 applyPeer(node, reset) { 13915 if (reset) { 13916 getUINativeModule().textInput.resetController(node); 13917 } else { 13918 getUINativeModule().textInput.setController(node, this.value); 13919 } 13920 } 13921 13922} 13923TextInputControllerModifier.identity = Symbol('textInputController'); 13924 13925 13926class TextInputContentTypeModifier extends ModifierWithKey { 13927 constructor(value) { 13928 super(value); 13929 } 13930 applyPeer(node, reset) { 13931 if (reset) { 13932 getUINativeModule().textInput.resetContentType(node); 13933 } 13934 else { 13935 getUINativeModule().textInput.setContentType(node, this.value); 13936 } 13937 } 13938 checkObjectDiff() { 13939 return !isBaseOrResourceEqual(this.stageValue, this.value); 13940 } 13941} 13942TextInputContentTypeModifier.identity = Symbol('textInputContentType'); 13943class TextInputBorderModifier extends ModifierWithKey { 13944 constructor(value) { 13945 super(value); 13946 } 13947 applyPeer(node, reset) { 13948 if (reset) { 13949 getUINativeModule().textInput.resetBorder(node); 13950 } else { 13951 getUINativeModule().textInput.setBorder(node, 13952 this.value.arkWidth.left, this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 13953 this.value.arkColor.leftColor, this.value.arkColor.rightColor, this.value.arkColor.topColor, this.value.arkColor.bottomColor, 13954 this.value.arkRadius.topLeft, this.value.arkRadius.topRight, this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, 13955 this.value.arkStyle.top, this.value.arkStyle.right, this.value.arkStyle.bottom, this.value.arkStyle.left); 13956 } 13957 } 13958 checkObjectDiff() { 13959 return this.value.checkObjectDiff(this.stageValue); 13960 } 13961} 13962TextInputBorderModifier.identity = Symbol('textInputBorder'); 13963class TextInputBorderWidthModifier extends ModifierWithKey { 13964 constructor(value) { 13965 super(value); 13966 } 13967 applyPeer(node, reset) { 13968 if (reset) { 13969 getUINativeModule().textInput.resetBorderWidth(node); 13970 } else { 13971 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 13972 getUINativeModule().textInput.setBorderWidth(node, this.value, this.value, this.value, this.value); 13973 } else { 13974 getUINativeModule().textInput.setBorderWidth(node, this.value.top, this.value.right, 13975 this.value.bottom, this.value.left); 13976 } 13977 } 13978 } 13979 checkObjectDiff() { 13980 if (isResource(this.stageValue) && isResource(this.value)) { 13981 return !isResourceEqual(this.stageValue, this.value); 13982 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 13983 return !(this.stageValue.left === this.value.left && 13984 this.stageValue.right === this.value.right && 13985 this.stageValue.top === this.value.top && 13986 this.stageValue.bottom === this.value.bottom); 13987 } else { 13988 return true; 13989 } 13990 } 13991} 13992TextInputBorderWidthModifier.identity = Symbol('textInputBorderWidth'); 13993class TextInputBorderColorModifier extends ModifierWithKey { 13994 constructor(value) { 13995 super(value); 13996 } 13997 applyPeer(node, reset) { 13998 if (reset) { 13999 getUINativeModule().textInput.resetBorderColor(node); 14000 } else { 14001 const valueType = typeof this.value; 14002 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 14003 getUINativeModule().textInput.setBorderColor(node, this.value, this.value, this.value, this.value); 14004 } else { 14005 getUINativeModule().textInput.setBorderColor(node, this.value.top, 14006 this.value.right, this.value.bottom, this.value.left); 14007 } 14008 } 14009 } 14010 checkObjectDiff() { 14011 if (isResource(this.stageValue) && isResource(this.value)) { 14012 return !isResourceEqual(this.stageValue, this.value); 14013 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 14014 return !(this.stageValue.left === this.value.left && 14015 this.stageValue.right === this.value.right && 14016 this.stageValue.top === this.value.top && 14017 this.stageValue.bottom === this.value.bottom); 14018 } else { 14019 return true; 14020 } 14021 } 14022} 14023TextInputBorderColorModifier.identity = Symbol('textInputBorderColor'); 14024class TextInputBorderStyleModifier extends ModifierWithKey { 14025 constructor(value) { 14026 super(value); 14027 } 14028 applyPeer(node, reset) { 14029 if (reset) { 14030 getUINativeModule().textInput.resetBorderStyle(node); 14031 } else { 14032 let type; 14033 let style; 14034 let top; 14035 let right; 14036 let bottom; 14037 let left; 14038 if (isNumber(this.value)) { 14039 style = this.value; 14040 type = true; 14041 } else if (isObject(this.value)) { 14042 top = this.value?.top; 14043 right = this.value?.right; 14044 bottom = this.value?.bottom; 14045 left = this.value?.left; 14046 type = true; 14047 } 14048 if (type === true) { 14049 getUINativeModule().textInput.setBorderStyle(node, type, style, top, right, bottom, left); 14050 } else { 14051 getUINativeModule().textInput.resetBorderStyle(node); 14052 } 14053 } 14054 } 14055 checkObjectDiff() { 14056 return !(this.value?.top === this.stageValue?.top && 14057 this.value?.right === this.stageValue?.right && 14058 this.value?.bottom === this.stageValue?.bottom && 14059 this.value?.left === this.stageValue?.left); 14060 } 14061} 14062TextInputBorderStyleModifier.identity = Symbol('textInputBorderStyle'); 14063class TextInputBorderRadiusModifier extends ModifierWithKey { 14064 constructor(value) { 14065 super(value); 14066 } 14067 applyPeer(node, reset) { 14068 if (reset) { 14069 getUINativeModule().textInput.resetBorderRadius(node); 14070 } else { 14071 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 14072 getUINativeModule().textInput.setBorderRadius(node, this.value, this.value, this.value, this.value); 14073 } else { 14074 getUINativeModule().textInput.setBorderRadius(node, this.value.topLeft, this.value.topRight, 14075 this.value.bottomLeft, this.value.bottomRight); 14076 } 14077 } 14078 } 14079 checkObjectDiff() { 14080 if (isResource(this.stageValue) && isResource(this.value)) { 14081 return !isResourceEqual(this.stageValue, this.value); 14082 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 14083 return !(this.stageValue.topLeft === this.value.topLeft && 14084 this.stageValue.topRight === this.value.topRight && 14085 this.stageValue.bottomLeft === this.value.bottomLeft && 14086 this.stageValue.bottomRight === this.value.bottomRight); 14087 } else { 14088 return true; 14089 } 14090 } 14091} 14092TextInputBorderRadiusModifier.identity = Symbol('textInputBorderRadius'); 14093class TextInputBackgroundColorModifier extends ModifierWithKey { 14094 constructor(value) { 14095 super(value); 14096 } 14097 applyPeer(node, reset) { 14098 if (reset) { 14099 getUINativeModule().textInput.resetBackgroundColor(node); 14100 } else { 14101 getUINativeModule().textInput.setBackgroundColor(node, this.value); 14102 } 14103 } 14104 14105 checkObjectDiff() { 14106 return !isBaseOrResourceEqual(this.stageValue, this.value); 14107 } 14108} 14109TextInputBackgroundColorModifier.identity = Symbol('textInputBackgroundColor'); 14110class TextInputMarginModifier extends ModifierWithKey { 14111 constructor(value) { 14112 super(value); 14113 } 14114 applyPeer(node, reset) { 14115 if (reset) { 14116 getUINativeModule().textInput.resetMargin(node); 14117 } 14118 else { 14119 getUINativeModule().textInput.setMargin(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 14120 } 14121 } 14122 checkObjectDiff() { 14123 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 14124 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 14125 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 14126 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 14127 } 14128} 14129TextInputMarginModifier.identity = Symbol('textInputMargin'); 14130class TextInputOnWillInsertModifier extends ModifierWithKey { 14131 constructor(value) { 14132 super(value); 14133 } 14134 applyPeer(node, reset) { 14135 if (reset) { 14136 getUINativeModule().textInput.resetOnWillInsert(node); 14137 } else { 14138 getUINativeModule().textInput.setOnWillInsert(node, this.value); 14139 } 14140 } 14141} 14142TextInputOnWillInsertModifier.identity = Symbol('textInputOnWillInsert'); 14143 14144class TextInputOnDidInsertModifier extends ModifierWithKey { 14145 constructor(value) { 14146 super(value); 14147 } 14148 applyPeer(node, reset) { 14149 if (reset) { 14150 getUINativeModule().textInput.resetOnDidInsert(node); 14151 } else { 14152 getUINativeModule().textInput.setOnDidInsert(node, this.value); 14153 } 14154 } 14155} 14156TextInputOnDidInsertModifier.identity = Symbol('textInputOnDidInsert'); 14157 14158class TextInputOnWillDeleteModifier extends ModifierWithKey { 14159 constructor(value) { 14160 super(value); 14161 } 14162 applyPeer(node, reset) { 14163 if (reset) { 14164 getUINativeModule().textInput.resetOnWillDelete(node); 14165 } else { 14166 getUINativeModule().textInput.setOnWillDelete(node, this.value); 14167 } 14168 } 14169} 14170TextInputOnWillDeleteModifier.identity = Symbol('textInputOnWillDelete'); 14171 14172class TextInputOnDidDeleteModifier extends ModifierWithKey { 14173 constructor(value) { 14174 super(value); 14175 } 14176 applyPeer(node, reset) { 14177 if (reset) { 14178 getUINativeModule().textInput.resetOnDidDelete(node); 14179 } else { 14180 getUINativeModule().textInput.setOnDidDelete(node, this.value); 14181 } 14182 } 14183} 14184TextInputOnDidDeleteModifier.identity = Symbol('textInputOnDidDelete'); 14185class TextInputEnablePreviewTextModifier extends ModifierWithKey { 14186 constructor(value) { 14187 super(value); 14188 } 14189 applyPeer(node, reset) { 14190 if (reset) { 14191 getUINativeModule().textInput.resetEnablePreviewText(node); 14192 } 14193 else { 14194 getUINativeModule().textInput.setEnablePreviewText(node, this.value); 14195 } 14196 } 14197 checkObjectDiff() { 14198 return !isBaseOrResourceEqual(this.stageValue, this.value); 14199 } 14200} 14201TextInputEnablePreviewTextModifier.identity = Symbol('textInputEnablePreviewText'); 14202class TextInputEditMenuOptionsModifier extends ModifierWithKey { 14203 constructor(value) { 14204 super(value); 14205 } 14206 applyPeer(node, reset) { 14207 if (reset) { 14208 getUINativeModule().textInput.resetSelectionMenuOptions(node); 14209 } else { 14210 getUINativeModule().textInput.setSelectionMenuOptions(node, this.value); 14211 } 14212 } 14213} 14214TextInputEditMenuOptionsModifier.identity = Symbol('textInputEditMenuOptions'); 14215 14216class TextInputWidthModifier extends ModifierWithKey { 14217 constructor(value) { 14218 super(value); 14219 } 14220 applyPeer(node, reset) { 14221 if (reset) { 14222 getUINativeModule().textInput.resetWidth(node); 14223 } else { 14224 getUINativeModule().textInput.setWidth(node, this.value); 14225 } 14226 } 14227} 14228TextInputWidthModifier.identity = Symbol('textInputWidth'); 14229class TextInputEnableHapticFeedbackModifier extends ModifierWithKey { 14230 constructor(value) { 14231 super(value); 14232 } 14233 applyPeer(node, reset) { 14234 if (reset) { 14235 getUINativeModule().textInput.resetEnableHapticFeedback(node); 14236 } 14237 else { 14238 getUINativeModule().textInput.setEnableHapticFeedback(node, this.value); 14239 } 14240 } 14241 checkObjectDiff() { 14242 return !isBaseOrResourceEqual(this.stageValue, this.value); 14243 } 14244} 14245TextInputEnableHapticFeedbackModifier.identity = Symbol('textInputEnableHapticFeedback'); 14246 14247class ArkTextInputComponent extends ArkComponent { 14248 constructor(nativePtr, classType) { 14249 super(nativePtr, classType); 14250 } 14251 initialize(value) { 14252 if (value[0] !== undefined) { 14253 this.setPlaceholder(value[0].placeholder); 14254 this.setText(value[0].text); 14255 this.setController(value[0].controller); 14256 } 14257 return this; 14258 } 14259 setText(value) { 14260 modifierWithKey(this._modifiersWithKeys, TextInputTextModifier.identity, 14261 TextInputTextModifier, value); 14262 return this; 14263 } 14264 setPlaceholder(value) { 14265 modifierWithKey(this._modifiersWithKeys, TextInputPlaceholderModifier.identity, 14266 TextInputPlaceholderModifier, value); 14267 return this; 14268 } 14269 setController(value) { 14270 modifierWithKey(this._modifiersWithKeys, TextInputControllerModifier.identity, 14271 TextInputControllerModifier, value); 14272 return this; 14273 } 14274 14275 cancelButton(value) { 14276 modifierWithKey(this._modifiersWithKeys, TextInputCancelButtonModifier.identity, TextInputCancelButtonModifier, value); 14277 return this; 14278 } 14279 selectAll(value) { 14280 modifierWithKey(this._modifiersWithKeys, TextInputSelectAllModifier.identity, TextInputSelectAllModifier, value); 14281 return this; 14282 } 14283 enableAutoFill(value) { 14284 modifierWithKey(this._modifiersWithKeys, TextInputEnableAutoFillModifier.identity, TextInputEnableAutoFillModifier, value); 14285 return this; 14286 } 14287 passwordRules(value) { 14288 modifierWithKey(this._modifiersWithKeys, TextInputPasswordRulesModifier.identity, TextInputPasswordRulesModifier, value); 14289 return this; 14290 } 14291 showCounter(value, options) { 14292 let arkValue = new ArkTextFieldShowCounter(); 14293 arkValue.value = value; 14294 arkValue.highlightBorder = options?.highlightBorder; 14295 arkValue.thresholdPercentage = options?.thresholdPercentage; 14296 modifierWithKey(this._modifiersWithKeys, TextInputShowCounterModifier.identity, TextInputShowCounterModifier, arkValue); 14297 return this; 14298 } 14299 type(value) { 14300 modifierWithKey(this._modifiersWithKeys, TextInputTypeModifier.identity, TextInputTypeModifier, value); 14301 return this; 14302 } 14303 placeholderColor(value) { 14304 modifierWithKey(this._modifiersWithKeys, TextInputPlaceholderColorModifier.identity, TextInputPlaceholderColorModifier, value); 14305 return this; 14306 } 14307 placeholderFont(value) { 14308 modifierWithKey(this._modifiersWithKeys, TextInputPlaceholderFontModifier.identity, TextInputPlaceholderFontModifier, value); 14309 return this; 14310 } 14311 enterKeyType(value) { 14312 modifierWithKey(this._modifiersWithKeys, TextInputEnterKeyTypeModifier.identity, TextInputEnterKeyTypeModifier, value); 14313 return this; 14314 } 14315 caretColor(value) { 14316 modifierWithKey(this._modifiersWithKeys, TextInputCaretColorModifier.identity, TextInputCaretColorModifier, value); 14317 return this; 14318 } 14319 onEditChanged(callback) { 14320 modifierWithKey(this._modifiersWithKeys, TextInputOnEditChangeModifier.identity, TextInputOnEditChangeModifier, callback); 14321 return this; 14322 } 14323 onEditChange(callback) { 14324 modifierWithKey(this._modifiersWithKeys, TextInputOnEditChangeModifier.identity, TextInputOnEditChangeModifier, callback); 14325 return this; 14326 } 14327 onSubmit(callback) { 14328 modifierWithKey(this._modifiersWithKeys, TextInputOnSubmitModifier.identity, TextInputOnSubmitModifier, callback); 14329 return this; 14330 } 14331 onChange(callback) { 14332 modifierWithKey(this._modifiersWithKeys, TextInputOnChangeModifier.identity, TextInputOnChangeModifier, callback); 14333 return this; 14334 } 14335 onTextSelectionChange(callback) { 14336 modifierWithKey(this._modifiersWithKeys, TextInputOnTextSelectionChangeModifier.identity, TextInputOnTextSelectionChangeModifier, callback); 14337 return this; 14338 } 14339 onContentScroll(callback) { 14340 modifierWithKey(this._modifiersWithKeys, TextInputOnContentScrollModifier.identity, TextInputOnContentScrollModifier, callback); 14341 return this; 14342 } 14343 maxLength(value) { 14344 modifierWithKey(this._modifiersWithKeys, TextInputMaxLengthModifier.identity, TextInputMaxLengthModifier, value); 14345 return this; 14346 } 14347 fontColor(value) { 14348 modifierWithKey(this._modifiersWithKeys, TextInputFontColorModifier.identity, TextInputFontColorModifier, value); 14349 return this; 14350 } 14351 fontSize(value) { 14352 modifierWithKey(this._modifiersWithKeys, TextInputFontSizeModifier.identity, TextInputFontSizeModifier, value); 14353 return this; 14354 } 14355 fontStyle(value) { 14356 modifierWithKey(this._modifiersWithKeys, TextInputFontStyleModifier.identity, TextInputFontStyleModifier, value); 14357 return this; 14358 } 14359 fontWeight(value) { 14360 modifierWithKey(this._modifiersWithKeys, TextInputFontWeightModifier.identity, TextInputFontWeightModifier, value); 14361 return this; 14362 } 14363 fontFamily(value) { 14364 modifierWithKey(this._modifiersWithKeys, TextInputFontFamilyModifier.identity, TextInputFontFamilyModifier, value); 14365 return this; 14366 } 14367 inputFilter(value, error) { 14368 let arkValue = new ArkTextInputFilter(); 14369 arkValue.value = value; 14370 arkValue.error = error; 14371 modifierWithKey(this._modifiersWithKeys, TextInputFilterModifier.identity, TextInputFilterModifier, arkValue); 14372 return this; 14373 } 14374 onCopy(callback) { 14375 modifierWithKey(this._modifiersWithKeys, TextInputOnCopyModifier.identity, TextInputOnCopyModifier, callback); 14376 return this; 14377 } 14378 onCut(callback) { 14379 modifierWithKey(this._modifiersWithKeys, TextInputOnCutModifier.identity, TextInputOnCutModifier, callback); 14380 return this; 14381 } 14382 onPaste(callback) { 14383 modifierWithKey(this._modifiersWithKeys, TextInputOnPasteModifier.identity, TextInputOnPasteModifier, callback); 14384 return this; 14385 } 14386 copyOption(value) { 14387 modifierWithKey(this._modifiersWithKeys, TextInputCopyOptionModifier.identity, TextInputCopyOptionModifier, value); 14388 return this; 14389 } 14390 showPasswordIcon(value) { 14391 modifierWithKey(this._modifiersWithKeys, TextInputShowPasswordIconModifier.identity, TextInputShowPasswordIconModifier, value); 14392 return this; 14393 } 14394 showPassword(value) { 14395 modifierWithKey(this._modifiersWithKeys, TextInputShowPasswordModifier.identity, TextInputShowPasswordModifier, value); 14396 return this; 14397 } 14398 textAlign(value) { 14399 modifierWithKey(this._modifiersWithKeys, TextInputTextAlignModifier.identity, TextInputTextAlignModifier, value); 14400 return this; 14401 } 14402 style(value) { 14403 modifierWithKey(this._modifiersWithKeys, TextInputStyleModifier.identity, TextInputStyleModifier, value); 14404 return this; 14405 } 14406 caretStyle(value) { 14407 modifierWithKey(this._modifiersWithKeys, TextInputCaretStyleModifier.identity, TextInputCaretStyleModifier, value); 14408 return this; 14409 } 14410 selectedBackgroundColor(value) { 14411 modifierWithKey(this._modifiersWithKeys, TextInputSelectedBackgroundColorModifier.identity, TextInputSelectedBackgroundColorModifier, value); 14412 return this; 14413 } 14414 caretPosition(value) { 14415 modifierWithKey(this._modifiersWithKeys, TextInputCaretPositionModifier.identity, TextInputCaretPositionModifier, value); 14416 return this; 14417 } 14418 enableKeyboardOnFocus(value) { 14419 modifierWithKey(this._modifiersWithKeys, TextInputEnableKeyboardOnFocusModifier.identity, TextInputEnableKeyboardOnFocusModifier, value); 14420 return this; 14421 } 14422 passwordIcon(value) { 14423 modifierWithKey(this._modifiersWithKeys, TextInputPasswordIconModifier.identity, TextInputPasswordIconModifier, value); 14424 return this; 14425 } 14426 showError(value) { 14427 modifierWithKey(this._modifiersWithKeys, TextInputShowErrorModifier.identity, TextInputShowErrorModifier, value); 14428 return this; 14429 } 14430 showUnit(event) { 14431 throw new Error('Method not implemented.'); 14432 } 14433 showUnderline(value) { 14434 modifierWithKey(this._modifiersWithKeys, TextInputShowUnderlineModifier.identity, TextInputShowUnderlineModifier, value); 14435 return this; 14436 } 14437 fontFeature(value) { 14438 modifierWithKey(this._modifiersWithKeys, TextInputFontFeatureModifier.identity, TextInputFontFeatureModifier, value); 14439 return this; 14440 } 14441 selectionMenuHidden(value) { 14442 modifierWithKey(this._modifiersWithKeys, TextInputSelectionMenuHiddenModifier.identity, TextInputSelectionMenuHiddenModifier, value); 14443 return this; 14444 } 14445 barState(value) { 14446 modifierWithKey(this._modifiersWithKeys, TextInputBarStateModifier.identity, TextInputBarStateModifier, value); 14447 return this; 14448 } 14449 maxLines(value) { 14450 modifierWithKey(this._modifiersWithKeys, TextInputMaxLinesModifier.identity, TextInputMaxLinesModifier, value); 14451 return this; 14452 } 14453 customKeyboard(event) { 14454 throw new Error('Method not implemented.'); 14455 } 14456 decoration(value) { 14457 modifierWithKey(this._modifiersWithKeys, TextInputDecorationModifier.identity, TextInputDecorationModifier, value); 14458 return this; 14459 } 14460 letterSpacing(value) { 14461 modifierWithKey(this._modifiersWithKeys, TextInputLetterSpacingModifier.identity, TextInputLetterSpacingModifier, value); 14462 return this; 14463 } 14464 lineHeight(value) { 14465 modifierWithKey(this._modifiersWithKeys, TextInputLineHeightModifier.identity, TextInputLineHeightModifier, value); 14466 return this; 14467 } 14468 underlineColor(value) { 14469 modifierWithKey(this._modifiersWithKeys, TextInputUnderlineColorModifier.identity, TextInputUnderlineColorModifier, value); 14470 return this; 14471 } 14472 wordBreak(value) { 14473 modifierWithKey(this._modifiersWithKeys, TextInputWordBreakModifier.identity, TextInputWordBreakModifier, value); 14474 return this; 14475 } 14476 lineBreakStrategy(value) { 14477 modifierWithKey(this._modifiersWithKeys, TextInputLineBreakStrategyModifier.identity, 14478 TextInputLineBreakStrategyModifier, value); 14479 return this; 14480 } 14481 minFontSize(value) { 14482 modifierWithKey(this._modifiersWithKeys, TextInputMinFontSizeModifier.identity, TextInputMinFontSizeModifier, value); 14483 return this; 14484 } 14485 maxFontSize(value) { 14486 modifierWithKey(this._modifiersWithKeys, TextInputMaxFontSizeModifier.identity, TextInputMaxFontSizeModifier, value); 14487 return this; 14488 } 14489 heightAdaptivePolicy(value) { 14490 modifierWithKey(this._modifiersWithKeys, TextInputHeightAdaptivePolicyModifier.identity, TextInputHeightAdaptivePolicyModifier, value); 14491 return this; 14492 } 14493 textOverflow(value) { 14494 modifierWithKey(this._modifiersWithKeys, TextInputTextOverflowModifier.identity, TextInputTextOverflowModifier, value); 14495 return this; 14496 } 14497 textIndent(value) { 14498 modifierWithKey(this._modifiersWithKeys, TextInputTextIndentModifier.identity, TextInputTextIndentModifier, value); 14499 return this; 14500 } 14501 padding(value) { 14502 let arkValue = new ArkPadding(); 14503 if (value !== null && value !== undefined) { 14504 if (isLengthType(value) || isResource(value)) { 14505 arkValue.top = value; 14506 arkValue.right = value; 14507 arkValue.bottom = value; 14508 arkValue.left = value; 14509 } 14510 else { 14511 arkValue.top = value.top; 14512 arkValue.right = value.right; 14513 arkValue.bottom = value.bottom; 14514 arkValue.left = value.left; 14515 } 14516 modifierWithKey(this._modifiersWithKeys, TextInputPaddingModifier.identity, TextInputPaddingModifier, arkValue); 14517 } 14518 else { 14519 modifierWithKey(this._modifiersWithKeys, TextInputPaddingModifier.identity, TextInputPaddingModifier, undefined); 14520 } 14521 return this; 14522 } 14523 contentType(value) { 14524 modifierWithKey(this._modifiersWithKeys, TextInputContentTypeModifier.identity, TextInputContentTypeModifier, value); 14525 return this; 14526 } 14527 border(value) { 14528 let arkBorder = valueToArkBorder(value); 14529 modifierWithKey(this._modifiersWithKeys, TextInputBorderModifier.identity, TextInputBorderModifier, arkBorder); 14530 return this; 14531 } 14532 borderWidth(value) { 14533 modifierWithKey(this._modifiersWithKeys, TextInputBorderWidthModifier.identity, TextInputBorderWidthModifier, value); 14534 return this; 14535 } 14536 borderColor(value) { 14537 modifierWithKey(this._modifiersWithKeys, TextInputBorderColorModifier.identity, TextInputBorderColorModifier, value); 14538 return this; 14539 } 14540 borderStyle(value) { 14541 modifierWithKey(this._modifiersWithKeys, TextInputBorderStyleModifier.identity, TextInputBorderStyleModifier, value); 14542 return this; 14543 } 14544 borderRadius(value) { 14545 modifierWithKey(this._modifiersWithKeys, TextInputBorderRadiusModifier.identity, TextInputBorderRadiusModifier, value); 14546 return this; 14547 } 14548 backgroundColor(value) { 14549 modifierWithKey(this._modifiersWithKeys, TextInputBackgroundColorModifier.identity, TextInputBackgroundColorModifier, value); 14550 return this; 14551 } 14552 margin(value) { 14553 let arkValue = new ArkPadding(); 14554 if (value !== null && value !== undefined) { 14555 if (isLengthType(value) || isResource(value)) { 14556 arkValue.top = value; 14557 arkValue.right = value; 14558 arkValue.bottom = value; 14559 arkValue.left = value; 14560 } 14561 else { 14562 arkValue.top = value.top; 14563 arkValue.right = value.right; 14564 arkValue.bottom = value.bottom; 14565 arkValue.left = value.left; 14566 } 14567 modifierWithKey(this._modifiersWithKeys, TextInputMarginModifier.identity, TextInputMarginModifier, arkValue); 14568 } 14569 else { 14570 modifierWithKey(this._modifiersWithKeys, TextInputMarginModifier.identity, TextInputMarginModifier, undefined); 14571 } 14572 return this; 14573 } 14574 onWillInsert(callback) { 14575 modifierWithKey(this._modifiersWithKeys, TextInputOnWillInsertModifier.identity, TextInputOnWillInsertModifier, callback); 14576 return this; 14577 } 14578 onDidInsert(callback) { 14579 modifierWithKey(this._modifiersWithKeys, TextInputOnDidInsertModifier.identity, TextInputOnDidInsertModifier, callback); 14580 return this; 14581 } 14582 onWillDelete(callback) { 14583 modifierWithKey(this._modifiersWithKeys, TextInputOnWillDeleteModifier.identity, TextInputOnWillDeleteModifier, callback); 14584 return this; 14585 } 14586 onDidDelete(callback) { 14587 modifierWithKey(this._modifiersWithKeys, TextInputOnDidDeleteModifier.identity, TextInputOnDidDeleteModifier, callback); 14588 return this; 14589 } 14590 enablePreviewText(value) { 14591 modifierWithKey(this._modifiersWithKeys, TextInputEnablePreviewTextModifier.identity, TextInputEnablePreviewTextModifier, value); 14592 return this; 14593 } 14594 editMenuOptions(value) { 14595 modifierWithKey(this._modifiersWithKeys, TextInputEditMenuOptionsModifier.identity, 14596 TextInputEditMenuOptionsModifier, value); 14597 return this; 14598 } 14599 width(value) { 14600 modifierWithKey(this._modifiersWithKeys, TextInputWidthModifier.identity, TextInputWidthModifier, value); 14601 return this; 14602 } 14603 enableHapticFeedback(value) { 14604 modifierWithKey(this._modifiersWithKeys, TextInputEnableHapticFeedbackModifier.identity, TextInputEnableHapticFeedbackModifier, value); 14605 return this; 14606 } 14607} 14608// @ts-ignore 14609if (globalThis.TextInput !== undefined) { 14610 globalThis.TextInput.attributeModifier = function (modifier) { 14611 attributeModifierFunc.call(this, modifier, (nativePtr) => { 14612 return new ArkTextInputComponent(nativePtr); 14613 }, (nativePtr, classType, modifierJS) => { 14614 return new modifierJS.TextInputModifier(nativePtr, classType); 14615 }); 14616 }; 14617} 14618 14619/// <reference path='./import.ts' /> 14620class VideoObjectFitModifier extends ModifierWithKey { 14621 constructor(value) { 14622 super(value); 14623 } 14624 applyPeer(node, reset) { 14625 if (reset) { 14626 getUINativeModule().video.resetObjectFit(node); 14627 } 14628 else { 14629 getUINativeModule().video.setObjectFit(node, this.value); 14630 } 14631 } 14632 checkObjectDiff() { 14633 return !isBaseOrResourceEqual(this.stageValue, this.value); 14634 } 14635} 14636VideoObjectFitModifier.identity = Symbol('videoObjectFit'); 14637class VideoAutoPlayModifier extends ModifierWithKey { 14638 constructor(value) { 14639 super(value); 14640 } 14641 applyPeer(node, reset) { 14642 if (reset) { 14643 getUINativeModule().video.resetAutoPlay(node); 14644 } 14645 else { 14646 getUINativeModule().video.setAutoPlay(node, this.value); 14647 } 14648 } 14649 checkObjectDiff() { 14650 return !isBaseOrResourceEqual(this.stageValue, this.value); 14651 } 14652} 14653VideoAutoPlayModifier.identity = Symbol('videoAutoPlayr'); 14654class VideoControlsModifier extends ModifierWithKey { 14655 constructor(value) { 14656 super(value); 14657 } 14658 applyPeer(node, reset) { 14659 if (reset) { 14660 getUINativeModule().video.resetControls(node); 14661 } 14662 else { 14663 getUINativeModule().video.setControls(node, this.value); 14664 } 14665 } 14666 checkObjectDiff() { 14667 return !isBaseOrResourceEqual(this.stageValue, this.value); 14668 } 14669} 14670VideoControlsModifier.identity = Symbol('videoControls'); 14671class VideoLoopModifier extends ModifierWithKey { 14672 constructor(value) { 14673 super(value); 14674 } 14675 applyPeer(node, reset) { 14676 if (reset) { 14677 getUINativeModule().video.resetLoop(node); 14678 } 14679 else { 14680 getUINativeModule().video.setLoop(node, this.value); 14681 } 14682 } 14683 checkObjectDiff() { 14684 return !isBaseOrResourceEqual(this.stageValue, this.value); 14685 } 14686} 14687VideoLoopModifier.identity = Symbol('videoLoop'); 14688class VideoMutedModifier extends ModifierWithKey { 14689 constructor(value) { 14690 super(value); 14691 } 14692 applyPeer(node, reset) { 14693 if (reset) { 14694 getUINativeModule().video.resetMuted(node); 14695 } 14696 else { 14697 getUINativeModule().video.setMuted(node, this.value); 14698 } 14699 } 14700 checkObjectDiff() { 14701 return !isBaseOrResourceEqual(this.stageValue, this.value); 14702 } 14703} 14704VideoMutedModifier.identity = Symbol('videoMuted'); 14705class VideoOpacityModifier extends ModifierWithKey { 14706 constructor(value) { 14707 super(value); 14708 } 14709 applyPeer(node, reset) { 14710 if (reset) { 14711 getUINativeModule().video.resetOpacity(node); 14712 } 14713 else { 14714 getUINativeModule().video.setOpacity(node, this.value); 14715 } 14716 } 14717 checkObjectDiff() { 14718 return !isBaseOrResourceEqual(this.stageValue, this.value); 14719 } 14720} 14721VideoOpacityModifier.identity = Symbol('videoOpacity'); 14722class VideoTransitionModifier extends ModifierWithKey { 14723 constructor(value) { 14724 super(value); 14725 } 14726 applyPeer(node, reset) { 14727 if (reset) { 14728 getUINativeModule().video.resetTransition(node); 14729 } 14730 else { 14731 getUINativeModule().video.setTransition(node, this.value); 14732 } 14733 } 14734 checkObjectDiff() { 14735 return true; 14736 } 14737} 14738VideoTransitionModifier.identity = Symbol('videoTransition'); 14739class ArkVideoComponent extends ArkComponent { 14740 constructor(nativePtr, classType) { 14741 super(nativePtr, classType); 14742 } 14743 muted(value) { 14744 modifierWithKey(this._modifiersWithKeys, VideoMutedModifier.identity, VideoMutedModifier, value); 14745 return this; 14746 } 14747 autoPlay(value) { 14748 modifierWithKey(this._modifiersWithKeys, VideoAutoPlayModifier.identity, VideoAutoPlayModifier, value); 14749 return this; 14750 } 14751 controls(value) { 14752 modifierWithKey(this._modifiersWithKeys, VideoControlsModifier.identity, VideoControlsModifier, value); 14753 return this; 14754 } 14755 loop(value) { 14756 modifierWithKey(this._modifiersWithKeys, VideoLoopModifier.identity, VideoLoopModifier, value); 14757 return this; 14758 } 14759 objectFit(value) { 14760 modifierWithKey(this._modifiersWithKeys, VideoObjectFitModifier.identity, VideoObjectFitModifier, value); 14761 return this; 14762 } 14763 opacity(value) { 14764 modifierWithKey(this._modifiersWithKeys, VideoOpacityModifier.identity, VideoOpacityModifier, value); 14765 return this; 14766 } 14767 transition(value) { 14768 modifierWithKey(this._modifiersWithKeys, VideoTransitionModifier.identity, VideoTransitionModifier, value); 14769 return this; 14770 } 14771 onStart(callback) { 14772 throw new Error('Method not implemented.'); 14773 } 14774 onPause(callback) { 14775 throw new Error('Method not implemented.'); 14776 } 14777 onFinish(event) { 14778 throw new Error('Method not implemented.'); 14779 } 14780 onFullscreenChange(callback) { 14781 throw new Error('Method not implemented.'); 14782 } 14783 onPrepared(callback) { 14784 throw new Error('Method not implemented.'); 14785 } 14786 onSeeking(callback) { 14787 throw new Error('Method not implemented.'); 14788 } 14789 onSeeked(callback) { 14790 throw new Error('Method not implemented.'); 14791 } 14792 onUpdate(callback) { 14793 throw new Error('Method not implemented.'); 14794 } 14795 onError(callback) { 14796 throw new Error('Method not implemented.'); 14797 } 14798 onStop(callback) { 14799 throw new Error('Method not implemented.'); 14800 } 14801} 14802// @ts-ignore 14803if (globalThis.Video !== undefined) { 14804 globalThis.Video.attributeModifier = function (modifier) { 14805 attributeModifierFunc.call(this, modifier, (nativePtr) => { 14806 return new ArkVideoComponent(nativePtr); 14807 }, (nativePtr, classType, modifierJS) => { 14808 return new modifierJS.VideoModifier(nativePtr, classType); 14809 }); 14810 }; 14811} 14812 14813/// <reference path='./import.ts' /> 14814class ArkBorderStyle { 14815 constructor() { 14816 this.type = undefined; 14817 this.style = undefined; 14818 this.top = undefined; 14819 this.right = undefined; 14820 this.bottom = undefined; 14821 this.left = undefined; 14822 } 14823 isEqual(another) { 14824 return (this.type === another.type && 14825 this.style === another.style && 14826 this.top === another.top && 14827 this.right === another.right && 14828 this.bottom === another.bottom && 14829 this.left === another.left); 14830 } 14831 parseBorderStyle(value) { 14832 if (typeof value === 'number') { 14833 this.style = value; 14834 this.type = true; 14835 return true; 14836 } 14837 else if (typeof value === 'object') { 14838 return this.parseEdgeStyles(value); 14839 } 14840 return false; 14841 } 14842 parseEdgeStyles(options) { 14843 this.top = options.top; 14844 this.right = options.right; 14845 this.bottom = options.bottom; 14846 this.left = options.left; 14847 this.type = true; 14848 return true; 14849 } 14850} 14851class ArkBorderColor { 14852 constructor() { 14853 this.startColor = undefined; 14854 this.endColor = undefined; 14855 this.leftColor = undefined; 14856 this.rightColor = undefined; 14857 this.topColor = undefined; 14858 this.bottomColor = undefined; 14859 } 14860 isEqual(another) { 14861 return (this.leftColor === another.leftColor && 14862 this.rightColor === another.rightColor && 14863 this.topColor === another.topColor && 14864 this.bottomColor === another.bottomColor && 14865 this.startColor === another.startColor && 14866 this.endColor === another.endColor); 14867 } 14868} 14869class ArkBorderWidth { 14870 constructor() { 14871 this.start = undefined; 14872 this.end = undefined; 14873 this.left = undefined; 14874 this.right = undefined; 14875 this.top = undefined; 14876 this.bottom = undefined; 14877 } 14878 isEqual(another) { 14879 return (this.left === another.left && 14880 this.right === another.right && 14881 this.top === another.top && 14882 this.bottom === another.bottom && 14883 this.start === another.start && 14884 this.end === another.end); 14885 } 14886} 14887class ArkBorderRadius { 14888 constructor() { 14889 this.topStart = undefined; 14890 this.topEnd = undefined; 14891 this.bottomStart = undefined; 14892 this.bottomEnd = undefined; 14893 this.topLeft = undefined; 14894 this.topRight = undefined; 14895 this.bottomLeft = undefined; 14896 this.bottomRight = undefined; 14897 } 14898 isEqual(another) { 14899 return (this.topLeft === another.topLeft && 14900 this.topRight === another.topRight && 14901 this.bottomLeft === another.bottomLeft && 14902 this.bottomRight === another.bottomRight && 14903 this.topStart === another.topStart && 14904 this.topEnd === another.topEnd && 14905 this.bottomStart === another.bottomStart && 14906 this.bottomEnd === another.bottomEnd); 14907 } 14908} 14909class ArkLabelFont { 14910 constructor() { 14911 this.size = undefined; 14912 this.weight = undefined; 14913 this.family = undefined; 14914 this.style = undefined; 14915 } 14916 isEqual(another) { 14917 return (this.size === another.size && 14918 this.weight === another.weight && 14919 this.family === another.family && 14920 this.style === another.style); 14921 } 14922} 14923function deepCompareArrays(arr1, arr2) { 14924 return (Array.isArray(arr1) && 14925 Array.isArray(arr2) && 14926 arr1.length === arr2.length && 14927 arr1.every((value, index) => { 14928 if (Array.isArray(value) && Array.isArray(arr2[index])) { 14929 return deepCompareArrays(value, arr2[index]); 14930 } 14931 else { 14932 return value === arr2[index]; 14933 } 14934 })); 14935} 14936class ArkLinearGradient { 14937 constructor(angle, direction, colors, repeating) { 14938 this.angle = angle; 14939 this.direction = direction; 14940 this.colors = colors; 14941 this.repeating = repeating; 14942 } 14943 isEqual(another) { 14944 return (this.angle === another.angle && 14945 this.direction === another.direction && 14946 deepCompareArrays(this.colors, another.colors) && 14947 this.repeating === another.repeating); 14948 } 14949} 14950class ArkSweepGradient { 14951 constructor(center, start, end, rotation, colors, repeating) { 14952 this.center = center; 14953 this.start = start; 14954 this.end = end; 14955 this.rotation = rotation; 14956 this.colors = colors; 14957 this.repeating = repeating; 14958 } 14959 isEqual(another) { 14960 return (deepCompareArrays(this.center, another.center) && 14961 this.start === another.start && 14962 this.end === another.end && 14963 this.rotation === another.rotation && 14964 deepCompareArrays(this.colors, another.colors) && 14965 this.repeating === another.repeating); 14966 } 14967} 14968class ArkForegroundBlurStyle { 14969 constructor() { 14970 this.blurStyle = undefined; 14971 this.colorMode = undefined; 14972 this.adaptiveColor = undefined; 14973 this.scale = undefined; 14974 this.blurOptions = undefined; 14975 } 14976 isEqual(another) { 14977 return (this.blurStyle === another.blurStyle && 14978 this.colorMode === another.colorMode && 14979 this.adaptiveColor === another.adaptiveColor && 14980 this.scale === another.scale && 14981 this.blurOptions === another.blurOptions); 14982 } 14983} 14984class ArkLinearGradientBlur { 14985 constructor() { 14986 this.blurRadius = undefined; 14987 this.fractionStops = undefined; 14988 this.direction = undefined; 14989 } 14990 isEqual(another) { 14991 return (this.blurRadius === another.blurRadius && 14992 deepCompareArrays(this.fractionStops, another.fractionStops) && 14993 this.direction === another.direction); 14994 } 14995} 14996class ArkOverlay { 14997 constructor() { 14998 this.value = undefined; 14999 this.align = undefined; 15000 this.offsetX = undefined; 15001 this.offsetY = undefined; 15002 this.hasOptions = undefined; 15003 this.hasOffset = undefined; 15004 } 15005 splitOption(options) { 15006 if (isUndefined(options)) { 15007 return true; 15008 } 15009 this.hasOptions = true; 15010 this.align = options.align; 15011 if (isUndefined(options.offset)) { 15012 return true; 15013 } 15014 this.hasOffset = true; 15015 this.offsetX = options.offset.x; 15016 this.offsetY = options.offset.y; 15017 return true; 15018 } 15019 splitOverlayValue(value, options) { 15020 if (typeof value === 'string') { 15021 this.value = value; 15022 return this.splitOption(options); 15023 } 15024 return false; 15025 } 15026 isEqual(another) { 15027 return ((this.value === another.value) && (this.align === another.align) && 15028 (this.offsetX === another.offsetX) && (this.offsetY === another.offsetY) && 15029 (this.hasOptions === another.hasOptions) && (this.hasOffset === another.hasOffset)); 15030 } 15031 checkObjectDiff(another) { 15032 return !this.isEqual(another); 15033 } 15034} 15035class ArkSharedTransition { 15036 constructor() { 15037 this.id = undefined; 15038 this.options = undefined; 15039 } 15040 isEqual(another) { 15041 return (this.id === another.id) && (this.options === another.options); 15042 } 15043} 15044class ArkListEdgeEffect { 15045 constructor() { 15046 this.value = undefined; 15047 this.options = undefined; 15048 } 15049 isEqual(another) { 15050 return (this.value === another.value) && 15051 (this.options === another.options); 15052 } 15053} 15054class ArkScrollEdgeEffect { 15055 constructor() { 15056 this.value = undefined; 15057 this.options = undefined; 15058 } 15059 isEqual(another) { 15060 return (this.value === another.value) && 15061 (this.options === another.options); 15062 } 15063} 15064class ArkBlurOptions { 15065 constructor() { 15066 this.value = undefined; 15067 this.options = undefined; 15068 } 15069} 15070class InvertOptions { 15071 constructor() { 15072 this.high = undefined; 15073 this.low = undefined; 15074 this.threshold = undefined; 15075 this.thresholdRange = undefined; 15076 } 15077} 15078class ArkMenuAlignType { 15079 constructor(alignType, offset) { 15080 this.alignType = alignType; 15081 if (!isUndefined(offset) && isObject(offset)) { 15082 this.dx = offset.dx; 15083 this.dy = offset.dy; 15084 } 15085 } 15086 isEqual(another) { 15087 return this.alignType === another.alignType && this.dx === another.dx && this.dy === another.dy; 15088 } 15089} 15090 15091class ArkSelection { 15092 constructor() { 15093 this.selectionStart = undefined; 15094 this.selectionEnd = undefined; 15095 } 15096 isEqual(another) { 15097 return this.selectionStart === another.selectionStart && 15098 this.selectionEnd === another.selectionEnd; 15099 } 15100} 15101 15102class TextDataDetectorConfig { 15103 constructor() { 15104 this.types = undefined; 15105 this.onDetectResultUpdate = undefined; 15106 this.color = undefined; 15107 this.decorationType = undefined; 15108 this.decorationColor = undefined; 15109 this.decorationStyle = undefined; 15110 } 15111 isEqual(another) { 15112 return (this.types === another.types) && (this.onDetectResultUpdate === another.onDetectResultUpdate) && 15113 (this.color === another.color) && (this.decorationType === another.decorationType) && 15114 (this.decorationColor === another.decorationColor) && (this.decorationStyle === another.decorationStyle); 15115 } 15116} 15117 15118class ArkSliderTips { 15119 constructor(value, content) { 15120 this.showTip = value; 15121 this.tipText = content; 15122 } 15123 isEqual(another) { 15124 return this.showTip === another.showTip && this.tipText === another.tipText; 15125 } 15126} 15127class ArkStarStyle { 15128 constructor() { 15129 this.backgroundUri = undefined; 15130 this.foregroundUri = undefined; 15131 this.secondaryUri = undefined; 15132 } 15133 isEqual(another) { 15134 return (this.backgroundUri === another.backgroundUri && 15135 this.foregroundUri === another.foregroundUri && 15136 this.secondaryUri === another.secondaryUri); 15137 } 15138} 15139class ArkBackgroundBlurStyle { 15140 constructor() { 15141 this.blurStyle = undefined; 15142 this.colorMode = undefined; 15143 this.adaptiveColor = undefined; 15144 this.scale = undefined; 15145 this.blurOptions = undefined; 15146 } 15147 isEqual(another) { 15148 return (this.blurStyle === another.blurStyle && 15149 this.colorMode === another.colorMode && 15150 this.adaptiveColor === another.adaptiveColor && 15151 this.scale === another.scale && 15152 this.blurOptions === another.blurOptions); 15153 } 15154} 15155class ArkBorderDashGap { 15156 constructor() { 15157 this.left = undefined; 15158 this.right = undefined; 15159 this.top = undefined; 15160 this.bottom = undefined; 15161 } 15162 isEqual(another) { 15163 return (this.left === another.left && 15164 this.right === another.right && 15165 this.top === another.top && 15166 this.bottom === another.bottom); 15167 } 15168} 15169class ArkBorderDashWidth { 15170 constructor() { 15171 this.left = undefined; 15172 this.right = undefined; 15173 this.top = undefined; 15174 this.bottom = undefined; 15175 } 15176 isEqual(another) { 15177 return (this.left === another.left && 15178 this.right === another.right && 15179 this.top === another.top && 15180 this.bottom === another.bottom); 15181 } 15182} 15183class ArkBorder { 15184 constructor() { 15185 this.arkWidth = new ArkBorderWidth(); 15186 this.arkColor = new ArkBorderColor(); 15187 this.arkRadius = new ArkBorderRadius(); 15188 this.arkStyle = new ArkBorderStyle(); 15189 this.arkDashGap = new ArkBorderDashGap(); 15190 this.arkDashWidth = new ArkBorderDashWidth(); 15191 } 15192 isEqual(another) { 15193 return (this.arkWidth.isEqual(another.arkWidth) && 15194 this.arkColor.isEqual(another.arkColor) && 15195 this.arkRadius.isEqual(another.arkRadius) && 15196 this.arkStyle.isEqual(another.arkStyle) && 15197 this.arkDashGap.isEqual(another.arkDashGap) && 15198 this.arkDashWidth.isEqual(another.arkDashWidth)); 15199 } 15200 checkObjectDiff(another) { 15201 return !this.isEqual(another); 15202 } 15203} 15204class ArkBackgroundImageSize { 15205 constructor() { 15206 this.imageSize = undefined; 15207 this.width = undefined; 15208 this.height = undefined; 15209 } 15210 isEqual(another) { 15211 return this.imageSize === another.imageSize && this.width === another.width && this.height === another.height; 15212 } 15213} 15214class ArkBackgroundImage { 15215 constructor() { 15216 this.src = undefined; 15217 this.repeat = undefined; 15218 } 15219 isEqual(another) { 15220 return this.src === another.src && this.repeat === another.repeat; 15221 } 15222} 15223class ArkGridColColumnOption { 15224 constructor() { 15225 this.xs = undefined; 15226 this.sm = undefined; 15227 this.md = undefined; 15228 this.lg = undefined; 15229 this.xl = undefined; 15230 this.xxl = undefined; 15231 } 15232 isEqual(another) { 15233 return (this.xs === another.xs && 15234 this.sm === another.sm && 15235 this.md === another.md && 15236 this.lg === another.lg && 15237 this.xl === another.xl && 15238 this.xxl === another.xxl); 15239 } 15240} 15241class ArkPadding { 15242 constructor() { 15243 this.top = undefined; 15244 this.right = undefined; 15245 this.bottom = undefined; 15246 this.left = undefined; 15247 } 15248 isEqual(another) { 15249 return (this.top === another.top && 15250 this.right === another.right && 15251 this.bottom === another.bottom && 15252 this.left === another.left); 15253 } 15254} 15255 15256class ArkBarMode { 15257 isEqual(another) { 15258 return (this.barMode === another.barMode) && (this.options === another.options); 15259 } 15260} 15261class ArkDivider { 15262 isEqual(another) { 15263 return (this.divider === another.divider); 15264 } 15265} 15266class ArkBarGridAlign { 15267 isEqual(another) { 15268 return (this.barGridAlign === another.barGridAlign); 15269 } 15270} 15271class ArkScrollableBarModeOptions { 15272 isEqual(another) { 15273 return (this.value === another.value); 15274 } 15275} 15276class ArkAlignRules { 15277 constructor() { 15278 this.left = undefined; 15279 this.middle = undefined; 15280 this.right = undefined; 15281 this.top = undefined; 15282 this.center = undefined; 15283 this.bottom = undefined; 15284 } 15285 isEqual(another) { 15286 return (this.left === another.left && 15287 this.middle === another.middle && 15288 this.right === another.right && 15289 this.top === another.top && 15290 this.center === another.center && 15291 this.bottom === another.bottom); 15292 } 15293} 15294class ArkSafeAreaExpandOpts { 15295 constructor() { 15296 this.type = undefined; 15297 this.edges = undefined; 15298 } 15299 isEqual(another) { 15300 return (this.type === another.type) && (this.edges === another.edges); 15301 } 15302} 15303class ArkButtonStyle { 15304 constructor() { 15305 this.left = 16; 15306 this.top = 48; 15307 this.width = 24; 15308 this.height = 24; 15309 this.icons = { 15310 shown: undefined, 15311 hidden: undefined, 15312 switching: undefined 15313 }; 15314 } 15315 isEqual(another) { 15316 return (this.left === another.left && 15317 this.top === another.top && 15318 this.width === another.width && 15319 this.height === another.height && 15320 this.icons === another.icons); 15321 } 15322} 15323class ArkShadowInfoToArray { 15324 constructor() { 15325 this.radius = []; 15326 this.type = []; 15327 this.color = []; 15328 this.offsetX = []; 15329 this.offsetX = []; 15330 this.offsetY = []; 15331 this.fill = []; 15332 } 15333 isEqual(another) { 15334 return (this.radius === another.radius) && 15335 (this.color === another.color) && 15336 (this.offsetX === another.offsetX) && 15337 (this.offsetY === another.offsetY) && 15338 (this.fill === another.fill); 15339 } 15340 convertShadowOptions(value) { 15341 if (Object.getPrototypeOf(value).constructor === Object) { 15342 if (value.radius === null || value.radius === undefined) { 15343 return false; 15344 } 15345 else { 15346 this.radius.push(value.radius); 15347 this.type.push(value.type); 15348 this.color.push(value.color); 15349 this.offsetX.push((value.offsetX === undefined || 15350 value.offsetX === null) ? 0 : value.offsetX); 15351 this.offsetY.push((value.offsetY === undefined || 15352 value.offsetY === null) ? 0 : value.offsetY); 15353 this.fill.push((value.fill === undefined || 15354 value.fill === null) ? false : value.fill); 15355 return true; 15356 } 15357 } 15358 else if (Object.getPrototypeOf(value).constructor === Array) { 15359 let isFlag = true; 15360 for (let item of value) { 15361 if (item.radius === undefined || item.radius === null) { 15362 isFlag = false; 15363 break; 15364 } 15365 } 15366 if (isFlag) { 15367 for (let objValue of value) { 15368 this.radius.push(objValue.radius); 15369 this.type.push(objValue.type); 15370 this.color.push(objValue.color); 15371 this.offsetX.push((objValue.offsetX === undefined || objValue.offsetX === null) ? 0 : objValue.offsetX); 15372 this.offsetY.push((objValue.offsetY === undefined || objValue.offsetY === null) ? 0 : objValue.offsetY); 15373 this.fill.push((objValue.fill === undefined || objValue.fill === null) ? false : objValue.fill); 15374 } 15375 return true; 15376 } 15377 else { 15378 return false; 15379 } 15380 } 15381 } 15382 checkDiff(value, stageValue) { 15383 if (!value || !stageValue || !value.radius || !stageValue.radius) { 15384 return true; 15385 } 15386 if (!((isResource(stageValue.radius) && isResource(value.radius) && 15387 isResourceEqual(stageValue.radius, value.radius)) || 15388 (isNumber(stageValue.radius) && isNumber(value.radius) && 15389 stageValue.radius === value.radius))) { 15390 return true; 15391 } 15392 if (!(isNumber(stageValue.type) && isNumber(value.type) && 15393 stageValue.type === value.type)) { 15394 return true; 15395 } 15396 if (!((isResource(stageValue.color) && isResource(value.color) && 15397 isResourceEqual(stageValue.color, value.color)) || 15398 (!isResource(stageValue.color) && !isResource(value.color) && 15399 stageValue.color === value.color))) { 15400 return true; 15401 } 15402 if (!((isResource(stageValue.offsetX) && isResource(value.offsetX) && 15403 isResourceEqual(stageValue.offsetX, value.offsetX)) || 15404 (isNumber(stageValue.offsetX) && isNumber(value.offsetX) && 15405 stageValue.offsetX === value.offsetX))) { 15406 return true; 15407 } 15408 if (!((isResource(stageValue.offsetY) && isResource(value.offsetY) && 15409 isResourceEqual(stageValue.offsetY, value.offsetY)) || 15410 (isNumber(stageValue.offsetY) && isNumber(value.offsetY) && 15411 stageValue.offsetY === value.offsetY))) { 15412 return true; 15413 } 15414 if (!(isBoolean(stageValue.fill) && isBoolean(value.fill) && 15415 stageValue.fill === value.fill)) { 15416 return true; 15417 } 15418 return false; 15419 } 15420} 15421class ArkTextBackGroundStyle { 15422 constructor() { 15423 this.color = undefined; 15424 this.radius = new ArkBorderRadius(); 15425 } 15426 isEqual(another) { 15427 return (this.color === another.color && 15428 this.radius.isEqual(another.arkRadius)); 15429 } 15430 checkObjectDiff(another) { 15431 return !this.isEqual(another); 15432 } 15433 convertTextBackGroundStyleOptions(value) { 15434 let _a, _b, _c, _d; 15435 if (isUndefined(value)) { 15436 return false; 15437 } 15438 if (!isUndefined(value === null || value === void 0 ? void 0 : value.color) && (value === null || value === void 0 ? void 0 : value.color) !== null) { 15439 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 15440 this.color = value.color; 15441 } 15442 } 15443 15444 if (!isUndefined(value === null || value === void 0 ? void 0 : value.radius) && (value === null || value === void 0 ? void 0 : value.radius) !== null) { 15445 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 15446 this.radius.topLeft = value.radius; 15447 this.radius.topRight = value.radius; 15448 this.radius.bottomLeft = value.radius; 15449 this.radius.bottomRight = value.radius; 15450 } 15451 else { 15452 this.radius.topLeft = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topLeft; 15453 this.radius.topRight = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topRight; 15454 this.radius.bottomLeft = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomLeft; 15455 this.radius.bottomRight = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomRight; 15456 } 15457 } 15458 return true; 15459 } 15460} 15461class ArkSearchButton { 15462 constructor() { 15463 this.value = undefined; 15464 this.fontSize = undefined; 15465 this.fontColor = undefined; 15466 } 15467 isEqual(another) { 15468 return (this.value === another.value) && 15469 (this.fontSize === another.fontSize) && 15470 (this.fontColor === another.fontColor); 15471 } 15472} 15473class ArkSearchInputFilter { 15474 constructor() { 15475 this.value = undefined; 15476 this.error = undefined; 15477 } 15478 isEqual(another) { 15479 return (this.value === another.value) && 15480 (this.error === another.error); 15481 } 15482} 15483class ArkImageFrameInfoToArray { 15484 constructor() { 15485 this.arrSrc = []; 15486 this.arrWidth = []; 15487 this.arrHeight = []; 15488 this.arrTop = []; 15489 this.arrLeft = []; 15490 this.arrDuration = []; 15491 } 15492 isEqual(another) { 15493 return (this.arrSrc.toString() === another.arrSrc.toString()) && 15494 (this.arrWidth.toString() === another.arrWidth.toString()) && 15495 (this.arrHeight.toString() === another.arrHeight.toString()) && 15496 (this.arrTop.toString() === another.arrTop.toString()) && 15497 (this.arrLeft.toString() === another.arrLeft.toString()) && 15498 (this.arrDuration.toString() === another.arrDuration.toString()); 15499 } 15500} 15501class ArkEdgeAlign { 15502 constructor() { 15503 this.alignType = undefined; 15504 this.offset = undefined; 15505 } 15506 isEqual(another) { 15507 return (this.alignType === another.alignType && this.offset === another.offset); 15508 } 15509} 15510class ArkKeyBoardShortCut { 15511 constructor() { 15512 this.value = undefined; 15513 this.keys = undefined; 15514 this.action = undefined; 15515 } 15516 isEqual(another) { 15517 return (this.value === another.value) && (this.keys === another.keys) && 15518 (this.action === another.action); 15519 } 15520} 15521 15522class ArkCustomProperty { 15523 constructor() { 15524 this.key = undefined; 15525 this.value = undefined; 15526 } 15527} 15528 15529class ArkBlendMode { 15530 constructor() { 15531 this.blendMode = undefined; 15532 this.blendApplyType = undefined; 15533 } 15534 isEqual(another) { 15535 return (this.blendMode === another.blendMode) && (this.blendApplyType === another.blendApplyType); 15536 } 15537} 15538class ArkAlignStyle { 15539 constructor() { 15540 this.indexerAlign = undefined; 15541 this.offset = undefined; 15542 } 15543 isEqual(another) { 15544 return (this.indexerAlign === another.indexerAlign && this.offset === another.offset); 15545 } 15546} 15547class ArkNestedScrollOptions { 15548 constructor() { 15549 this.scrollForward = undefined; 15550 this.scrollBackward = undefined; 15551 } 15552 isEqual(another) { 15553 return ((this.scrollForward === another.scrollForward) && (this.scrollBackward === another.scrollBackward)); 15554 } 15555} 15556class ArkConstraintSizeOptions { 15557 constructor() { 15558 this.minWidth = undefined; 15559 this.maxWidth = undefined; 15560 this.minHeight = undefined; 15561 this.maxHeight = undefined; 15562 } 15563 isEqual(another) { 15564 return (this.minWidth === another.minWidth && 15565 this.maxWidth === another.maxWidth && 15566 this.minHeight === another.minHeight && 15567 this.maxHeight === another.maxHeight); 15568 } 15569} 15570class ArkTextFieldShowCounter { 15571 constructor() { 15572 this.value = undefined; 15573 this.highlightBorder = undefined; 15574 this.thresholdPercentage = undefined; 15575 } 15576 isEqual(another) { 15577 return (this.value === another.value) && 15578 (this.highlightBorder === another.highlightBorder) && 15579 (this.thresholdPercentage === another.thresholdPercentage); 15580 } 15581} 15582class ArkTextInputFilter { 15583 constructor() { 15584 this.value = undefined; 15585 this.error = undefined; 15586 } 15587 isEqual(another) { 15588 return (this.value === another.value) && 15589 (this.error === another.error); 15590 } 15591} 15592class ArkDotIndicator extends DotIndicator { 15593 constructor() { 15594 super(); 15595 this.type = undefined; 15596 this.leftValue = undefined; 15597 this.topValue = undefined; 15598 this.rightValue = undefined; 15599 this.bottomValue = undefined; 15600 this.itemWidthValue = undefined; 15601 this.itemHeightValue = undefined; 15602 this.selectedItemWidthValue = undefined; 15603 this.selectedItemHeightValue = undefined; 15604 this.maskValue = undefined; 15605 this.colorValue = undefined; 15606 this.selectedColorValue = undefined; 15607 this.maxDisplayCountValue = undefined; 15608 } 15609 isEqual(another) { 15610 return (this.type === another.type && 15611 this.leftValue === another.leftValue && 15612 this.topValue === another.topValue && 15613 this.rightValue === another.rightValue && 15614 this.bottomValue === another.bottomValue && 15615 this.itemWidthValue === another.itemWidthValue && 15616 this.itemHeightValue === another.itemHeightValue && 15617 this.selectedItemWidthValue === another.selectedItemWidthValue && 15618 this.selectedItemHeightValue === another.selectedItemHeightValue && 15619 this.maskValue === another.maskValue && 15620 this.colorValue === another.colorValue && 15621 this.selectedColorValue === another.selectedColorValue && 15622 this.maxDisplayCountValue === another.maxDisplayCountValue); 15623 } 15624} 15625class ArkDigitIndicator extends DigitIndicator { 15626 constructor() { 15627 super(); 15628 this.type = undefined; 15629 this.leftValue = undefined; 15630 this.topValue = undefined; 15631 this.rightValue = undefined; 15632 this.bottomValue = undefined; 15633 this.fontColorValue = undefined; 15634 this.selectedFontColorValue = undefined; 15635 this.digitFontValue = undefined; 15636 this.selectedDigitFontValue = undefined; 15637 } 15638 isEqual(another) { 15639 return (this.type === another.type && 15640 this.leftValue === another.leftValue && 15641 this.topValue === another.topValue && 15642 this.rightValue === another.rightValue && 15643 this.bottomValue === another.bottomValue && 15644 this.digitFontValue === another.digitFontValue && 15645 this.selectedDigitFontValue === another.selectedDigitFontValue); 15646 } 15647} 15648class ArkDigitFont { 15649 constructor() { 15650 this.size = undefined; 15651 this.weight = undefined; 15652 } 15653 isEqual(another) { 15654 return this.size === another.size && this.weight === another.weight; 15655 } 15656 parseFontWeight(value) { 15657 const valueWeightMap = { 15658 [0]: 'lighter', 15659 [1]: 'normal', 15660 [2]: 'regular', 15661 [3]: 'medium', 15662 [4]: 'bold', 15663 [5]: 'bolder' 15664 }; 15665 if (isUndefined(value)) { 15666 this.weight = '-'; 15667 } 15668 else if (value in valueWeightMap) { 15669 this.weight = valueWeightMap[value]; 15670 } 15671 else { 15672 this.weight = value.toString(); 15673 } 15674 return this.weight; 15675 } 15676} 15677class ArkDisplayArrow { 15678 constructor() { 15679 this.value = undefined; 15680 this.isHoverShow = undefined; 15681 } 15682 isEqual(another) { 15683 return this.value === another.value && this.isHoverShow === another.isHoverShow; 15684 } 15685} 15686class ArkDisplayCount { 15687 constructor() { 15688 this.value = undefined; 15689 this.swipeByGroup = undefined; 15690 } 15691 isEqual(another) { 15692 return this.value === another.value && this.swipeByGroup === another.swipeByGroup; 15693 } 15694} 15695class ArkGridEdgeEffect { 15696 constructor() { 15697 this.value = undefined; 15698 this.options = undefined; 15699 } 15700 isEqual(another) { 15701 return (this.value === another.value) && 15702 (this.options === another.options); 15703 } 15704} 15705 15706class ArkWaterFlowEdgeEffect { 15707 constructor() { 15708 this.value = undefined; 15709 this.options = undefined; 15710 } 15711 isEqual(another) { 15712 return (this.value === another.value) && 15713 (this.options === another.options); 15714 } 15715} 15716class ArkChainMode { 15717 constructor() { 15718 this.direction = undefined; 15719 this.style = undefined; 15720 } 15721 isEqual(another) { 15722 return (this.direction === another.direction) && (this.style === another.style); 15723 } 15724} 15725class ArkMesh { 15726 constructor() { 15727 this.value = undefined; 15728 this.column = undefined; 15729 this.row = undefined; 15730 } 15731 isEqual(another) { 15732 return (deepCompareArrays(this.value, another.value) && 15733 this.column === another.column && 15734 this.row === another.row); 15735 } 15736} 15737class ArkLanesOpt { 15738 constructor() { 15739 this.lanesNum = undefined; 15740 this.minLength = undefined; 15741 this.maxLength = undefined; 15742 this.gutter = undefined; 15743 } 15744 isEqual(another) { 15745 return (this.lanesNum === another.lanesNum && this.minLength === another.minLength 15746 && this.maxLength === another.maxLength && this.gutter === another.gutter); 15747 } 15748} 15749class ArkScrollSnapOptions { 15750 constructor() { 15751 this.snapAlign = undefined; 15752 this.snapPagination = undefined; 15753 this.enableSnapToStart = undefined; 15754 this.enableSnapToEnd = undefined; 15755 } 15756 isEqual(another) { 15757 return ((this.snapAlign === another.snapAlign) && 15758 (this.snapPagination === another.snapPagination) && 15759 (this.enableSnapToStart === another.enableSnapToStart) && 15760 (this.enableSnapToEnd === another.enableSnapToEnd)); 15761 } 15762} 15763class ArkScrollOffsetOptions { 15764 constructor() { 15765 this.xOffset = undefined; 15766 this.yOffset = undefined; 15767 } 15768 isEqual(another) { 15769 return this.xOffset === another.xOffset && this.yOffset === another.yOffset; 15770 } 15771} 15772 15773class ArkGeometryTransition { 15774 constructor() { 15775 this.id = undefined; 15776 this.options = undefined; 15777 } 15778 isEqual(another) { 15779 return (this.id === another.id && this.options === another.options); 15780 } 15781} 15782class ArkSymbolEffect { 15783 constructor() { 15784 this.symbolEffect = undefined; 15785 this.action = undefined; 15786 } 15787 isEqual(another) { 15788 return (this.symbolEffect === another.symbolEffect) && 15789 (this.action === another.action); 15790 } 15791} 15792class ArkFocusScopeId { 15793 constructor() { 15794 this.id = undefined; 15795 this.isGroup = undefined; 15796 } 15797 isEqual(another) { 15798 return (this.id === another.id) && (this.isGroup === another.isGroup); 15799 } 15800} 15801class ArkFocusScopePriority { 15802 constructor() { 15803 this.scopeId = undefined; 15804 this.priority = undefined; 15805 } 15806 isEqual(another) { 15807 return (this.scopeId === another.scopeId) && (this.priority === another.priority); 15808 } 15809} 15810/// <reference path='./import.ts' /> 15811/// <reference path='./ArkComponent.ts' /> 15812const FontWeightMap = { 15813 0: 'lighter', 15814 1: 'normal', 15815 2: 'regular', 15816 3: 'medium', 15817 4: 'bold', 15818 5: 'bolder', 15819 100: '100', 15820 200: '200', 15821 300: '300', 15822 400: '400', 15823 500: '500', 15824 600: '600', 15825 700: '700', 15826 800: '800', 15827 900: '900', 15828}; 15829 15830class ArkDragPreviewOptions { 15831 constructor() { 15832 this.mode = undefined; 15833 this.numberBadge = undefined; 15834 this.isMultiSelectionEnabled = undefined; 15835 this.defaultAnimationBeforeLifting = undefined; 15836 } 15837 15838 isEqual(another) { 15839 return ( 15840 this.mode === another.mode && 15841 this.numberBadge === another.numberBadge && 15842 this.isMultiSelectionEnabled === another.isMultiSelectionEnabled && 15843 this.defaultAnimationBeforeLifting === another.defaultAnimationBeforeLifting 15844 ); 15845 } 15846} 15847 15848class ArkDragPreview { 15849 constructor() { 15850 this.inspectorId = undefined; 15851 } 15852 15853 isEqual(another) { 15854 return this.inspectorId === another.inspectorId; 15855 } 15856} 15857 15858class ArkTextFont { 15859 constructor() { 15860 this.value = undefined; 15861 this.enableVariableFontWeight = undefined; 15862 } 15863 15864 isEqual(another) { 15865 return ( 15866 this.value === another.value && 15867 this.enableVariableFontWeight === another.enableVariableFontWeight 15868 ); 15869 } 15870 15871 checkObjectDiff(another) { 15872 return !this.isEqual(another); 15873 } 15874} 15875 15876class ArkFontWeight { 15877 constructor() { 15878 this.value = undefined; 15879 this.enableVariableFontWeight = undefined; 15880 } 15881 15882 isEqual(another) { 15883 return ( 15884 this.value === another.value && 15885 this.enableVariableFontWeight === another.enableVariableFontWeight 15886 ); 15887 } 15888 15889 checkObjectDiff(another) { 15890 return !this.isEqual(another); 15891 } 15892} 15893 15894class ArkNavigationTitle { 15895 constructor() { 15896 this.navigationTitleOptions = undefined; 15897 } 15898 isEqual(another) { 15899 return this.navigationTitleOptions === another.navigationTitleOptions; 15900 } 15901} 15902 15903class ArkNavHideTitleBarOrToolBar { 15904 constructor() { 15905 this.isHide = undefined; 15906 this.animated = undefined; 15907 } 15908 isEqual(another) { 15909 return (this.isHide === another.isHide) && (this.animated === another.animated); 15910 } 15911} 15912 15913class ArkButtonComponent extends ArkComponent { 15914 constructor(nativePtr, classType) { 15915 super(nativePtr, classType); 15916 } 15917 allowChildCount() { 15918 return 1; 15919 } 15920 initialize(value) { 15921 if (value.length >= 1 && (isResource(value[0]) || isString(value[0]))) { 15922 modifierWithKey(this._modifiersWithKeys, ButtonCreateTypeModifier.identity, ButtonCreateTypeModifier, true); 15923 } else { 15924 modifierWithKey(this._modifiersWithKeys, ButtonCreateTypeModifier.identity, ButtonCreateTypeModifier, false); 15925 } 15926 if (value.length === 1) { 15927 if (!isNull(value[0]) && isObject(value[0])) { 15928 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, value[0]); 15929 } else if (isResource(value[0]) || isString(value[0])) { 15930 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, value[0]); 15931 } else { 15932 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, undefined); 15933 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, undefined); 15934 } 15935 } else if (value.length === 2) { 15936 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, value[0]); 15937 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, value[1]); 15938 } else { 15939 modifierWithKey(this._modifiersWithKeys, ButtonLabelModifier.identity, ButtonLabelModifier, undefined); 15940 modifierWithKey(this._modifiersWithKeys, ButtonOptionsModifier.identity, ButtonOptionsModifier, undefined); 15941 } 15942 return this; 15943 } 15944 backgroundColor(value) { 15945 modifierWithKey(this._modifiersWithKeys, ButtonBackgroundColorModifier.identity, ButtonBackgroundColorModifier, value); 15946 return this; 15947 } 15948 type(value) { 15949 modifierWithKey(this._modifiersWithKeys, ButtonTypeModifier.identity, ButtonTypeModifier, value); 15950 return this; 15951 } 15952 stateEffect(value) { 15953 modifierWithKey(this._modifiersWithKeys, ButtonStateEffectModifier.identity, ButtonStateEffectModifier, value); 15954 return this; 15955 } 15956 fontColor(value) { 15957 modifierWithKey(this._modifiersWithKeys, ButtonFontColorModifier.identity, ButtonFontColorModifier, value); 15958 return this; 15959 } 15960 fontSize(value) { 15961 modifierWithKey(this._modifiersWithKeys, ButtonFontSizeModifier.identity, ButtonFontSizeModifier, value); 15962 return this; 15963 } 15964 fontWeight(value) { 15965 modifierWithKey(this._modifiersWithKeys, ButtonFontWeightModifier.identity, ButtonFontWeightModifier, value); 15966 return this; 15967 } 15968 fontStyle(value) { 15969 modifierWithKey(this._modifiersWithKeys, ButtonFontStyleModifier.identity, ButtonFontStyleModifier, value); 15970 return this; 15971 } 15972 fontFamily(value) { 15973 modifierWithKey(this._modifiersWithKeys, ButtonFontFamilyModifier.identity, ButtonFontFamilyModifier, value); 15974 return this; 15975 } 15976 labelStyle(value) { 15977 modifierWithKey(this._modifiersWithKeys, ButtonLabelStyleModifier.identity, ButtonLabelStyleModifier, value); 15978 return this; 15979 } 15980 borderRadius(value) { 15981 modifierWithKey(this._modifiersWithKeys, ButtonBorderRadiusModifier.identity, ButtonBorderRadiusModifier, value); 15982 return this; 15983 } 15984 border(value) { 15985 modifierWithKey(this._modifiersWithKeys, ButtonBorderModifier.identity, ButtonBorderModifier, value); 15986 return this; 15987 } 15988 size(value) { 15989 modifierWithKey(this._modifiersWithKeys, ButtonSizeModifier.identity, ButtonSizeModifier, value); 15990 return this; 15991 } 15992 contentModifier(value) { 15993 modifierWithKey(this._modifiersWithKeys, ButtonContentModifier.identity, ButtonContentModifier, value); 15994 return this; 15995 } 15996 setContentModifier(modifier) { 15997 if (modifier === undefined || modifier === null) { 15998 getUINativeModule().button.setContentModifierBuilder(this.nativePtr, false); 15999 return; 16000 } 16001 this.needRebuild = false; 16002 this.applyContent = modifier.applyContent(); 16003 if (this.builder !== this.applyContent) { 16004 this.needRebuild = true; 16005 } 16006 this.builder = this.applyContent; 16007 this.modifier = modifier; 16008 getUINativeModule().button.setContentModifierBuilder(this.nativePtr, this); 16009 } 16010 makeContentModifierNode(context, buttonConfiguration) { 16011 buttonConfiguration.contentModifier = this.modifier; 16012 if (isUndefined(this.buttonNode) || this.needRebuild) { 16013 const xNode = globalThis.requireNapi('arkui.node'); 16014 this.buttonNode = new xNode.BuilderNode(context); 16015 this.buttonNode.build(this.builder, buttonConfiguration); 16016 this.needRebuild = false; 16017 } else { 16018 this.buttonNode.update(buttonConfiguration); 16019 } 16020 return this.buttonNode.getFrameNode(); 16021 } 16022 role(value) { 16023 modifierWithKey(this._modifiersWithKeys, ButtonRoleModifier.identity, ButtonRoleModifier, value); 16024 return this; 16025 } 16026 buttonStyle(value) { 16027 modifierWithKey(this._modifiersWithKeys, ButtonStyleModifier.identity, ButtonStyleModifier, value); 16028 return this; 16029 } 16030 controlSize(value) { 16031 modifierWithKey(this._modifiersWithKeys, ButtonControlSizeModifier.identity, ButtonControlSizeModifier, value); 16032 return this; 16033 } 16034} 16035class ButtonBackgroundColorModifier extends ModifierWithKey { 16036 constructor(value) { 16037 super(value); 16038 } 16039 applyPeer(node, reset) { 16040 if (reset) { 16041 getUINativeModule().button.resetBackgroundColor(node); 16042 } 16043 else { 16044 getUINativeModule().button.setBackgroundColor(node, this.value); 16045 } 16046 } 16047 checkObjectDiff() { 16048 return !isBaseOrResourceEqual(this.stageValue, this.value); 16049 } 16050} 16051ButtonBackgroundColorModifier.identity = Symbol('buttonBackgroundColor'); 16052class ButtonRoleModifier extends ModifierWithKey { 16053 constructor(value) { 16054 super(value); 16055 } 16056 applyPeer(node, reset) { 16057 if (reset) { 16058 getUINativeModule().button.resetButtonRole(node); 16059 } else { 16060 getUINativeModule().button.setButtonRole(node, this.value); 16061 } 16062 } 16063 checkObjectDiff() { 16064 return !isBaseOrResourceEqual(this.stageValue, this.value); 16065 } 16066} 16067ButtonRoleModifier.identity = Symbol('buttonRole'); 16068class ButtonStyleModifier extends ModifierWithKey { 16069 constructor(value) { 16070 super(value); 16071 } 16072 applyPeer(node, reset) { 16073 if (reset) { 16074 getUINativeModule().button.resetButtonStyle(node); 16075 } else { 16076 getUINativeModule().button.setButtonStyle(node, this.value); 16077 } 16078 } 16079 checkObjectDiff() { 16080 return !isBaseOrResourceEqual(this.stageValue, this.value); 16081 } 16082} 16083ButtonStyleModifier.identity = Symbol('buttonStyle'); 16084class ButtonControlSizeModifier extends ModifierWithKey { 16085 constructor(value) { 16086 super(value); 16087 } 16088 applyPeer(node, reset) { 16089 if (reset) { 16090 getUINativeModule().button.resetButtonControlSize(node); 16091 } else { 16092 getUINativeModule().button.setButtonControlSize(node, this.value); 16093 } 16094 } 16095 checkObjectDiff() { 16096 return !isBaseOrResourceEqual(this.stageValue, this.value); 16097 } 16098} 16099ButtonControlSizeModifier.identity = Symbol('buttonControlSize'); 16100class ButtonStateEffectModifier extends ModifierWithKey { 16101 constructor(value) { 16102 super(value); 16103 } 16104 applyPeer(node, reset) { 16105 if (reset) { 16106 getUINativeModule().button.resetStateEffect(node); 16107 } 16108 else { 16109 getUINativeModule().button.setStateEffect(node, this.value); 16110 } 16111 } 16112} 16113ButtonStateEffectModifier.identity = Symbol('buttonStateEffect'); 16114class ButtonFontStyleModifier extends ModifierWithKey { 16115 constructor(value) { 16116 super(value); 16117 } 16118 applyPeer(node, reset) { 16119 if (reset) { 16120 getUINativeModule().button.resetFontStyle(node); 16121 } 16122 else { 16123 getUINativeModule().button.setFontStyle(node, this.value); 16124 } 16125 } 16126} 16127ButtonFontStyleModifier.identity = Symbol('buttonFontStyle'); 16128class ButtonFontFamilyModifier extends ModifierWithKey { 16129 constructor(value) { 16130 super(value); 16131 } 16132 applyPeer(node, reset) { 16133 if (reset) { 16134 getUINativeModule().button.resetFontFamily(node); 16135 } 16136 else { 16137 getUINativeModule().button.setFontFamily(node, this.value); 16138 } 16139 } 16140 checkObjectDiff() { 16141 return !isBaseOrResourceEqual(this.stageValue, this.value); 16142 } 16143} 16144ButtonFontFamilyModifier.identity = Symbol('buttonFontFamily'); 16145class ButtonLabelStyleModifier extends ModifierWithKey { 16146 constructor(value) { 16147 super(value); 16148 } 16149 applyPeer(node, reset) { 16150 if (reset) { 16151 getUINativeModule().button.resetLabelStyle(node); 16152 } 16153 else { 16154 let textOverflow = this.value.overflow; // number(enum) -> Ace::TextOverflow 16155 let maxLines = this.value.maxLines; // number -> uint32_t 16156 let minFontSize = this.value.minFontSize; // number | string | Resource -> Dimension 16157 let maxFontSize = this.value.maxFontSize; // number | string | Resource -> Dimension 16158 let heightAdaptivePolicy = this.value.heightAdaptivePolicy; // number(enum) -> Ace::TextHeightAdaptivePolicy 16159 let fontSize; // number | string | Resource -> Dimension 16160 let fontWeight; // number | string | Ace::FontWeight -> string -> Ace::FontWeight 16161 let fontStyle; // number(enum) -> Ace::FontStyle 16162 let fontFamily; // string -> std::vector<std::string> 16163 if (isObject(this.value.font)) { 16164 fontSize = this.value.font.size; 16165 fontStyle = this.value.font.style; 16166 fontFamily = this.value.font.family; 16167 fontWeight = this.value.font.weight; 16168 } 16169 getUINativeModule().button.setLabelStyle(node, textOverflow, maxLines, minFontSize, 16170 maxFontSize, heightAdaptivePolicy, fontSize, fontWeight, fontStyle, fontFamily); 16171 } 16172 } 16173 checkObjectDiff() { 16174 if (isResource(this.stageValue) && isResource(this.value)) { 16175 return !isResourceEqual(this.stageValue, this.value); 16176 } 16177 else if (!isResource(this.stageValue) && !isResource(this.value)) { 16178 return !(this.value.overflow === this.stageValue.overflow && 16179 this.value.maxLines === this.stageValue.maxLines && 16180 this.value.minFontSize === this.stageValue.minFontSize && 16181 this.value.maxFontSize === this.stageValue.maxFontSize && 16182 this.value.heightAdaptivePolicy === this.stageValue.heightAdaptivePolicy && 16183 this.value.font === this.stageValue.font); 16184 } 16185 else { 16186 return true; 16187 } 16188 } 16189} 16190ButtonLabelStyleModifier.identity = Symbol('buttonLabelStyle'); 16191class ButtonTypeModifier extends ModifierWithKey { 16192 constructor(value) { 16193 super(value); 16194 } 16195 applyStage(node, component) { 16196 if (this.stageValue === undefined || this.stageValue === null) { 16197 this.value = this.stageValue; 16198 this.applyPeer(node, true, component); 16199 return true; 16200 } 16201 this.value = this.stageValue; 16202 this.applyPeer(node, false, component); 16203 return false; 16204 } 16205 applyPeer(node, reset) { 16206 if (reset) { 16207 getUINativeModule().button.resetType(node); 16208 } 16209 else { 16210 getUINativeModule().button.setType(node, this.value); 16211 } 16212 } 16213} 16214ButtonTypeModifier.identity = Symbol('buttonType'); 16215class ButtonFontColorModifier extends ModifierWithKey { 16216 constructor(value) { 16217 super(value); 16218 } 16219 applyPeer(node, reset) { 16220 if (reset) { 16221 getUINativeModule().button.resetFontColor(node); 16222 } 16223 else { 16224 getUINativeModule().button.setFontColor(node, this.value); 16225 } 16226 } 16227 checkObjectDiff() { 16228 return !isBaseOrResourceEqual(this.stageValue, this.value); 16229 } 16230} 16231ButtonFontColorModifier.identity = Symbol('buttonFontColor'); 16232class ButtonFontSizeModifier extends ModifierWithKey { 16233 constructor(value) { 16234 super(value); 16235 } 16236 applyPeer(node, reset) { 16237 if (reset) { 16238 getUINativeModule().button.resetFontSize(node); 16239 } 16240 else { 16241 getUINativeModule().button.setFontSize(node, this.value); 16242 } 16243 } 16244 checkObjectDiff() { 16245 return !isBaseOrResourceEqual(this.stageValue, this.value); 16246 } 16247} 16248ButtonFontSizeModifier.identity = Symbol('buttonFontSize'); 16249class ButtonFontWeightModifier extends ModifierWithKey { 16250 constructor(value) { 16251 super(value); 16252 } 16253 applyPeer(node, reset) { 16254 if (reset) { 16255 getUINativeModule().button.resetFontWeight(node); 16256 } 16257 else { 16258 getUINativeModule().button.setFontWeight(node, this.value); 16259 } 16260 } 16261} 16262ButtonFontWeightModifier.identity = Symbol('buttonFontWeight'); 16263class ButtonBorderRadiusModifier extends ModifierWithKey { 16264 constructor(value) { 16265 super(value); 16266 } 16267 applyPeer(node, reset) { 16268 if (reset) { 16269 getUINativeModule().button.resetButtonBorderRadius(node); 16270 } 16271 else { 16272 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 16273 getUINativeModule().button.setButtonBorderRadius(node, this.value, this.value, this.value, this.value); 16274 } 16275 else { 16276 getUINativeModule().button.setButtonBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 16277 } 16278 } 16279 } 16280 checkObjectDiff() { 16281 if (isResource(this.stageValue) && isResource(this.value)) { 16282 return !isResourceEqual(this.stageValue, this.value); 16283 } 16284 else if (!isResource(this.stageValue) && !isResource(this.value)) { 16285 return !(this.stageValue.topLeft === this.value.topLeft && 16286 this.stageValue.topRight === this.value.topRight && 16287 this.stageValue.bottomLeft === this.value.bottomLeft && 16288 this.stageValue.bottomRight === this.value.bottomRight); 16289 } 16290 else { 16291 return true; 16292 } 16293 } 16294} 16295ButtonBorderRadiusModifier.identity = Symbol('buttonBorderRadius'); 16296class ButtonBorderModifier extends ModifierWithKey { 16297 constructor(value) { 16298 super(value); 16299 } 16300 applyPeer(node, reset) { 16301 if (reset) { 16302 getUINativeModule().button.resetButtonBorder(node); 16303 } else { 16304 let widthLeft; 16305 let widthRight; 16306 let widthTop; 16307 let widthBottom; 16308 if (!isUndefined(this.value.width) && this.value.width != null) { 16309 if (isNumber(this.value.width) || isString(this.value.width) || isResource(this.value.width)) { 16310 widthLeft = this.value.width; 16311 widthRight = this.value.width; 16312 widthTop = this.value.width; 16313 widthBottom = this.value.width; 16314 } else { 16315 widthLeft = this.value.width.left; 16316 widthRight = this.value.width.right; 16317 widthTop = this.value.width.top; 16318 widthBottom = this.value.width.bottom; 16319 } 16320 } 16321 let leftColor; 16322 let rightColor; 16323 let topColor; 16324 let bottomColor; 16325 if (!isUndefined(this.value.color) && this.value.color != null) { 16326 if (isNumber(this.value.color) || isString(this.value.color) || isResource(this.value.color)) { 16327 leftColor = this.value.color; 16328 rightColor = this.value.color; 16329 topColor = this.value.color; 16330 bottomColor = this.value.color; 16331 } else { 16332 leftColor = this.value.color.left; 16333 rightColor = this.value.color.right; 16334 topColor = this.value.color.top; 16335 bottomColor = this.value.color.bottom; 16336 } 16337 } 16338 let topLeft; 16339 let topRight; 16340 let bottomLeft; 16341 let bottomRight; 16342 if (!isUndefined(this.value.radius) && this.value.radius != null) { 16343 if (isNumber(this.value.radius) || isString(this.value.radius) || isResource(this.value.radius)) { 16344 topLeft = this.value.radius; 16345 topRight = this.value.radius; 16346 bottomLeft = this.value.radius; 16347 bottomRight = this.value.radius; 16348 } else { 16349 topLeft = this.value.radius.topLeft; 16350 topRight = this.value.radius.topRight; 16351 bottomLeft = this.value.radius.bottomLeft; 16352 bottomRight = this.value.radius.bottomRight; 16353 } 16354 } 16355 let styleTop; 16356 let styleRight; 16357 let styleBottom; 16358 let styleLeft; 16359 if (!isUndefined(this.value.style) && this.value.style != null) { 16360 if (isNumber(this.value.style) || isString(this.value.style) || isResource(this.value.style)) { 16361 styleTop = this.value.style; 16362 styleRight = this.value.style; 16363 styleBottom = this.value.style; 16364 styleLeft = this.value.style; 16365 } else { 16366 styleTop = this.value.style.top; 16367 styleRight = this.value.style.right; 16368 styleBottom = this.value.style.bottom; 16369 styleLeft = this.value.style.left; 16370 } 16371 } 16372 getUINativeModule().button.setButtonBorder( 16373 node, 16374 widthLeft, 16375 widthRight, 16376 widthTop, 16377 widthBottom, 16378 leftColor, 16379 rightColor, 16380 topColor, 16381 bottomColor, 16382 topLeft, 16383 topRight, 16384 bottomLeft, 16385 bottomRight, 16386 styleTop, 16387 styleRight, 16388 styleBottom, 16389 styleLeft 16390 ); 16391 } 16392 } 16393 checkObjectDiff() { 16394 return ( 16395 !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 16396 !isBaseOrResourceEqual(this.stageValue.color, this.value.color) || 16397 !isBaseOrResourceEqual(this.stageValue.radius, this.value.radius) || 16398 !isBaseOrResourceEqual(this.stageValue.style, this.value.style) 16399 ); 16400 } 16401} 16402ButtonBorderModifier.identity = Symbol('buttonBorder'); 16403class ButtonSizeModifier extends ModifierWithKey { 16404 constructor(value) { 16405 super(value); 16406 } 16407 applyPeer(node, reset) { 16408 if (reset) { 16409 getUINativeModule().button.resetButtonSize(node); 16410 } else { 16411 getUINativeModule().button.setButtonSize(node, this.value.width, this.value.height); 16412 } 16413 } 16414 checkObjectDiff() { 16415 return ( 16416 !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 16417 !isBaseOrResourceEqual(this.stageValue.height, this.value.height) 16418 ); 16419 } 16420} 16421ButtonSizeModifier.identity = Symbol('buttonSize'); 16422class ButtonLabelModifier extends ModifierWithKey { 16423 constructor(value) { 16424 super(value); 16425 } 16426 applyPeer(node, reset) { 16427 if (reset) { 16428 getUINativeModule().button.resetLabel(node); 16429 } else { 16430 getUINativeModule().button.setLabel(node, this.value); 16431 } 16432 } 16433 checkObjectDiff() { 16434 return !isBaseOrResourceEqual(this.stageValue, this.value); 16435 } 16436} 16437ButtonLabelModifier.identity = Symbol('buttonLabel'); 16438class ButtonOptionsModifier extends ModifierWithKey { 16439 applyPeer(node, reset) { 16440 if (reset) { 16441 getUINativeModule().button.resetOptions(node); 16442 } else { 16443 getUINativeModule().button.setOptions(node, this.value.type, this.value.stateEffect, 16444 this.value.buttonStyle, this.value.controlSize, this.value.role); 16445 } 16446 } 16447 checkObjectDiff() { 16448 return ( 16449 !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 16450 !isBaseOrResourceEqual(this.stageValue.stateEffect, this.value.stateEffect) || 16451 !isBaseOrResourceEqual(this.stageValue.buttonStyle, this.value.buttonStyle) || 16452 !isBaseOrResourceEqual(this.stageValue.controlSize, this.value.controlSize) || 16453 !isBaseOrResourceEqual(this.stageValue.role, this.value.role) 16454 ); 16455 } 16456} 16457ButtonOptionsModifier.identity = Symbol('buttonOptions'); 16458class ButtonCreateTypeModifier extends ModifierWithKey { 16459 applyPeer(node, reset) { 16460 if (!reset) { 16461 getUINativeModule().button.setCreateWithLabel(node, this.value); 16462 } 16463 } 16464 checkObjectDiff() { 16465 return !isBaseOrResourceEqual(this.stageValue, this.value); 16466 } 16467} 16468ButtonCreateTypeModifier.identity = Symbol('buttonCreateType'); 16469class ButtonContentModifier extends ModifierWithKey { 16470 constructor(value) { 16471 super(value); 16472 } 16473 applyPeer(node, reset, component) { 16474 let buttonComponent = component; 16475 buttonComponent.setContentModifier(this.value); 16476 } 16477} 16478ButtonContentModifier.identity = Symbol('buttonContentModifier'); 16479// @ts-ignore 16480if (globalThis.Button !== undefined) { 16481 globalThis.Button.attributeModifier = function (modifier) { 16482 attributeModifierFunc.call(this, modifier, (nativePtr) => { 16483 return new ArkButtonComponent(nativePtr); 16484 }, (nativePtr, classType, modifierJS) => { 16485 return new modifierJS.ButtonModifier(nativePtr, classType); 16486 }); 16487 }; 16488 // @ts-ignore 16489 globalThis.Button.contentModifier = function (modifier) { 16490 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 16491 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 16492 let component = this.createOrGetNode(elmtId, () => { 16493 return new ArkButtonComponent(nativeNode); 16494 }); 16495 component.setContentModifier(modifier); 16496 }; 16497} 16498 16499/// <reference path='./import.ts' /> 16500class ArkLoadingProgressComponent extends ArkComponent { 16501 constructor(nativePtr, classType) { 16502 super(nativePtr, classType); 16503 } 16504 initialize(value) { 16505 return this; 16506 } 16507 allowChildCount() { 16508 return 0; 16509 } 16510 color(value) { 16511 modifierWithKey(this._modifiersWithKeys, LoadingProgressColorModifier.identity, LoadingProgressColorModifier, value); 16512 return this; 16513 } 16514 enableLoading(value) { 16515 modifierWithKey(this._modifiersWithKeys, LoadingProgressEnableLoadingModifier.identity, LoadingProgressEnableLoadingModifier, value); 16516 return this; 16517 } 16518 foregroundColor(value) { 16519 modifierWithKey(this._modifiersWithKeys, LoadingProgressForegroundColorModifier.identity, 16520 LoadingProgressForegroundColorModifier, value); 16521 return this; 16522 } 16523 contentModifier(value) { 16524 modifierWithKey(this._modifiersWithKeys, LoadingProgressContentModifier.identity, LoadingProgressContentModifier, value); 16525 return this; 16526 } 16527 setContentModifier(modifier) { 16528 if (modifier === undefined || modifier === null) { 16529 getUINativeModule().loadingProgress.setContentModifierBuilder(this.nativePtr, false); 16530 return; 16531 } 16532 this.needRebuild = false; 16533 if (this.builder !== modifier.applyContent()) { 16534 this.needRebuild = true; 16535 } 16536 this.builder = modifier.applyContent(); 16537 this.modifier = modifier; 16538 getUINativeModule().loadingProgress.setContentModifierBuilder(this.nativePtr, this); 16539 } 16540 makeContentModifierNode(context, loadingProgressConfiguration) { 16541 loadingProgressConfiguration.contentModifier = this.modifier; 16542 if (isUndefined(this.loadingProgressNode) || this.needRebuild) { 16543 const xNode = globalThis.requireNapi('arkui.node'); 16544 this.loadingProgressNode = new xNode.BuilderNode(context); 16545 this.loadingProgressNode.build(this.builder, loadingProgressConfiguration); 16546 this.needRebuild = false; 16547 } else { 16548 this.loadingProgressNode.update(loadingProgressConfiguration); 16549 } 16550 return this.loadingProgressNode.getFrameNode(); 16551 } 16552} 16553class LoadingProgressColorModifier extends ModifierWithKey { 16554 constructor(value) { 16555 super(value); 16556 } 16557 applyPeer(node, reset) { 16558 if (reset) { 16559 getUINativeModule().loadingProgress.resetColor(node); 16560 } 16561 else { 16562 getUINativeModule().loadingProgress.setColor(node, this.value); 16563 } 16564 } 16565 checkObjectDiff() { 16566 return !isBaseOrResourceEqual(this.stageValue, this.value); 16567 } 16568} 16569LoadingProgressColorModifier.identity = Symbol('loadingProgressColor'); 16570class LoadingProgressForegroundColorModifier extends ModifierWithKey { 16571 constructor(value) { 16572 super(value); 16573 } 16574 applyPeer(node, reset) { 16575 if (reset) { 16576 getUINativeModule().loadingProgress.resetForegroundColor(node); 16577 } 16578 else { 16579 getUINativeModule().loadingProgress.setForegroundColor(node, this.value); 16580 } 16581 } 16582 checkObjectDiff() { 16583 return !isBaseOrResourceEqual(this.stageValue, this.value); 16584 } 16585} 16586LoadingProgressForegroundColorModifier.identity = Symbol('loadingProgressForegroundColor'); 16587class LoadingProgressContentModifier extends ModifierWithKey { 16588 constructor(value) { 16589 super(value); 16590 } 16591 applyPeer(node, reset, component) { 16592 let loadingProgressComponent = component; 16593 loadingProgressComponent.setContentModifier(this.value); 16594 } 16595} 16596LoadingProgressContentModifier.identity = Symbol('loadingProgressContentModifier'); 16597class LoadingProgressEnableLoadingModifier extends ModifierWithKey { 16598 constructor(value) { 16599 super(value); 16600 } 16601 applyPeer(node, reset) { 16602 if (reset) { 16603 getUINativeModule().loadingProgress.resetEnableLoading(node); 16604 } 16605 else { 16606 getUINativeModule().loadingProgress.setEnableLoading(node, this.value); 16607 } 16608 } 16609} 16610LoadingProgressEnableLoadingModifier.identity = Symbol('loadingProgressEnableLoading'); 16611// @ts-ignore 16612if (globalThis.LoadingProgress !== undefined) { 16613 globalThis.LoadingProgress.attributeModifier = function (modifier) { 16614 attributeModifierFunc.call(this, modifier, (nativePtr) => { 16615 return new ArkLoadingProgressComponent(nativePtr); 16616 }, (nativePtr, classType, modifierJS) => { 16617 return new modifierJS.LoadingProgressModifier(nativePtr, classType); 16618 }); 16619 }; 16620 16621 globalThis.LoadingProgress.contentModifier = function (modifier) { 16622 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 16623 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 16624 let component = this.createOrGetNode(elmtId, () => { 16625 return new ArkLoadingProgressComponent(nativeNode); 16626 }); 16627 component.setContentModifier(modifier); 16628 }; 16629} 16630 16631/// <reference path='./import.ts' /> 16632class ArkRefreshComponent extends ArkComponent { 16633 constructor(nativePtr, classType) { 16634 super(nativePtr, classType); 16635 } 16636 onStateChange(callback) { 16637 throw new Error('Method not implemented.'); 16638 } 16639 onRefreshing(callback) { 16640 throw new Error('Method not implemented.'); 16641 } 16642 refreshOffset(value) { 16643 modifierWithKey(this._modifiersWithKeys, RefreshOffsetModifier.identity, RefreshOffsetModifier, value); 16644 return this; 16645 } 16646 pullToRefresh(value) { 16647 modifierWithKey(this._modifiersWithKeys, PullToRefreshModifier.identity, PullToRefreshModifier, value); 16648 return this; 16649 } 16650 pullDownRatio(value) { 16651 modifierWithKey(this._modifiersWithKeys, PullDownRatioModifier.identity, PullDownRatioModifier, value); 16652 return this; 16653 } 16654} 16655class RefreshOffsetModifier extends ModifierWithKey { 16656 constructor(value) { 16657 super(value); 16658 } 16659 applyPeer(node, reset) { 16660 if (reset) { 16661 getUINativeModule().refresh.resetRefreshOffset(node); 16662 } 16663 else { 16664 getUINativeModule().refresh.setRefreshOffset(node, this.value); 16665 } 16666 } 16667} 16668RefreshOffsetModifier.identity = Symbol('refreshOffset'); 16669class PullToRefreshModifier extends ModifierWithKey { 16670 constructor(value) { 16671 super(value); 16672 } 16673 applyPeer(node, reset) { 16674 if (reset) { 16675 getUINativeModule().refresh.resetPullToRefresh(node); 16676 } 16677 else { 16678 getUINativeModule().refresh.setPullToRefresh(node, this.value); 16679 } 16680 } 16681} 16682PullToRefreshModifier.identity = Symbol('pullToRefresh'); 16683class PullDownRatioModifier extends ModifierWithKey { 16684 constructor(value) { 16685 super(value); 16686 } 16687 applyPeer(node, reset) { 16688 if (reset) { 16689 getUINativeModule().refresh.resetPullDownRatio(node); 16690 } 16691 else { 16692 getUINativeModule().refresh.setPullDownRatio(node, this.value); 16693 } 16694 } 16695 checkObjectDiff() { 16696 return !isBaseOrResourceEqual(this.stageValue, this.value); 16697 } 16698} 16699PullDownRatioModifier.identity = Symbol('pullDownRatio'); 16700// @ts-ignore 16701if (globalThis.Refresh !== undefined) { 16702 globalThis.Refresh.attributeModifier = function (modifier) { 16703 attributeModifierFunc.call(this, modifier, (nativePtr) => { 16704 return new ArkRefreshComponent(nativePtr); 16705 }, (nativePtr, classType, modifierJS) => { 16706 return new modifierJS.RefreshModifier(nativePtr, classType); 16707 }); 16708 }; 16709} 16710 16711/// <reference path='./import.ts' /> 16712class ScrollNestedScrollModifier extends ModifierWithKey { 16713 applyPeer(node, reset) { 16714 if (reset) { 16715 getUINativeModule().scroll.resetNestedScroll(node); 16716 } 16717 else { 16718 getUINativeModule().scroll.setNestedScroll(node, this.value.scrollForward, this.value.scrollBackward); 16719 } 16720 } 16721 checkObjectDiff() { 16722 return !isBaseOrResourceEqual(this.stageValue.scrollForward, this.value.scrollForward) || 16723 !isBaseOrResourceEqual(this.stageValue.scrollBackward, this.value.scrollBackward); 16724 } 16725} 16726ScrollNestedScrollModifier.identity = Symbol('nestedScroll'); 16727class ScrollEnableScrollInteractionModifier extends ModifierWithKey { 16728 applyPeer(node, reset) { 16729 if (reset) { 16730 getUINativeModule().scroll.resetEnableScroll(node); 16731 } 16732 else { 16733 getUINativeModule().scroll.setEnableScroll(node, this.value); 16734 } 16735 } 16736 checkObjectDiff() { 16737 return !isBaseOrResourceEqual(this.stageValue, this.value); 16738 } 16739} 16740ScrollEnableScrollInteractionModifier.identity = Symbol('enableScrollInteraction'); 16741class ScrollEnablePagingModifier extends ModifierWithKey { 16742 applyPeer(node, reset) { 16743 if (reset) { 16744 getUINativeModule().scroll.resetEnablePaging(node); 16745 } else { 16746 getUINativeModule().scroll.setEnablePaging(node, this.value); 16747 } 16748 } 16749} 16750ScrollEnablePagingModifier.identity = Symbol('scrollEnablePaging'); 16751class ScrollFrictionModifier extends ModifierWithKey { 16752 applyPeer(node, reset) { 16753 if (reset) { 16754 getUINativeModule().scroll.resetFriction(node); 16755 } 16756 else { 16757 getUINativeModule().scroll.setFriction(node, this.value); 16758 } 16759 } 16760 checkObjectDiff() { 16761 return !isBaseOrResourceEqual(this.stageValue, this.value); 16762 } 16763} 16764ScrollFrictionModifier.identity = Symbol('friction'); 16765class ScrollScrollSnapModifier extends ModifierWithKey { 16766 applyPeer(node, reset) { 16767 if (reset) { 16768 getUINativeModule().scroll.resetScrollSnap(node); 16769 } 16770 else { 16771 let snapPagination = []; 16772 let isArray = true; 16773 if (Array.isArray(this.value.snapPagination)) { 16774 for (let i = 0; i < this.value.snapPagination.length; i++) { 16775 let item = this.value.snapPagination[i]; 16776 snapPagination.push(item); 16777 } 16778 } 16779 else { 16780 isArray = false; 16781 } 16782 if (isArray) { 16783 getUINativeModule().scroll.setScrollSnap(node, this.value.snapAlign, snapPagination, 16784 this.value.enableSnapToStart, this.value.enableSnapToEnd); 16785 } 16786 else { 16787 getUINativeModule().scroll.setScrollSnap(node, this.value.snapAlign, this.value.snapPagination, 16788 this.value.enableSnapToStart, this.value.enableSnapToEnd); 16789 } 16790 } 16791 } 16792 checkObjectDiff() { 16793 return !((this.stageValue.snapAlign === this.value.snapAlign) && 16794 (this.stageValue.enableSnapToStart === this.value.enableSnapToStart) && 16795 (this.stageValue.enableSnapToEnd === this.value.enableSnapToEnd) && 16796 (this.stageValue.snapPagination === this.value.snapPagination)); 16797 } 16798} 16799ScrollScrollSnapModifier.identity = Symbol('scrollSnap'); 16800class ScrollScrollBarModifier extends ModifierWithKey { 16801 applyPeer(node, reset) { 16802 if (reset) { 16803 getUINativeModule().scroll.resetScrollBar(node); 16804 } 16805 else { 16806 getUINativeModule().scroll.setScrollBar(node, this.value); 16807 } 16808 } 16809 checkObjectDiff() { 16810 return !isBaseOrResourceEqual(this.stageValue, this.value); 16811 } 16812} 16813ScrollScrollBarModifier.identity = Symbol('scrollBar'); 16814class ScrollScrollableModifier extends ModifierWithKey { 16815 constructor(value) { 16816 super(value); 16817 } 16818 applyPeer(node, reset) { 16819 if (reset) { 16820 getUINativeModule().scroll.resetScrollable(node); 16821 } 16822 else { 16823 getUINativeModule().scroll.setScrollable(node, this.value); 16824 } 16825 } 16826 checkObjectDiff() { 16827 return this.stageValue !== this.value; 16828 } 16829} 16830ScrollScrollableModifier.identity = Symbol('scrollable'); 16831class ScrollEdgeEffectModifier extends ModifierWithKey { 16832 constructor(value) { 16833 super(value); 16834 } 16835 applyPeer(node, reset) { 16836 let _a; 16837 if (reset) { 16838 getUINativeModule().scroll.resetEdgeEffect(node); 16839 } 16840 else { 16841 getUINativeModule().scroll.setEdgeEffect(node, this.value.value, (_a = this.value.options) === null || _a === 16842 void 0 ? void 0 : _a.alwaysEnabled); 16843 } 16844 } 16845 checkObjectDiff() { 16846 return !((this.stageValue.value === this.value.value) && 16847 (this.stageValue.options === this.value.options)); 16848 } 16849} 16850ScrollEdgeEffectModifier.identity = Symbol('edgeEffect'); 16851class ScrollScrollBarWidthModifier extends ModifierWithKey { 16852 constructor(value) { 16853 super(value); 16854 } 16855 applyPeer(node, reset) { 16856 if (reset) { 16857 getUINativeModule().scroll.resetScrollBarWidth(node); 16858 } 16859 else { 16860 getUINativeModule().scroll.setScrollBarWidth(node, this.value); 16861 } 16862 } 16863 checkObjectDiff() { 16864 return this.stageValue !== this.value; 16865 } 16866} 16867ScrollScrollBarWidthModifier.identity = Symbol('scrollBarWidth'); 16868class ScrollScrollBarColorModifier extends ModifierWithKey { 16869 constructor(value) { 16870 super(value); 16871 } 16872 applyPeer(node, reset) { 16873 if (reset) { 16874 getUINativeModule().scroll.resetScrollBarColor(node); 16875 } 16876 else { 16877 getUINativeModule().scroll.setScrollBarColor(node, this.value); 16878 } 16879 } 16880 checkObjectDiff() { 16881 return !isBaseOrResourceEqual(this.stageValue, this.value); 16882 } 16883} 16884ScrollScrollBarColorModifier.identity = Symbol('scrollBarColor'); 16885class ScrollClipModifier extends ModifierWithKey { 16886 constructor(value) { 16887 super(value); 16888 } 16889 applyPeer(node, reset) { 16890 if (reset) { 16891 getUINativeModule().common.resetClipWithEdge(node); 16892 } 16893 else { 16894 getUINativeModule().common.setClipWithEdge(node, this.value); 16895 } 16896 } 16897 checkObjectDiff() { 16898 return true; 16899 } 16900} 16901ScrollClipModifier.identity = Symbol('scrollClip'); 16902class ScrollInitialOffsetModifier extends ModifierWithKey { 16903 applyPeer(node, reset) { 16904 if (reset) { 16905 getUINativeModule().scroll.resetInitialOffset(node); 16906 } 16907 else { 16908 getUINativeModule().scroll.setInitialOffset(node, this.value.xOffset, this.value.yOffset); 16909 } 16910 } 16911 checkObjectDiff() { 16912 return !((this.stageValue.xOffset === this.value.xOffset) && 16913 (this.stageValue.yOffset === this.value.yOffset)); 16914 } 16915} 16916ScrollInitialOffsetModifier.identity = Symbol('initialOffset'); 16917 16918class ScrollFlingSpeedLimitModifier extends ModifierWithKey { 16919 applyPeer(node, reset) { 16920 if (reset) { 16921 getUINativeModule().scroll.resetFlingSpeedLimit(node); 16922 } else { 16923 getUINativeModule().scroll.setFlingSpeedLimit(node, this.value); 16924 } 16925 } 16926 checkObjectDiff() { 16927 return true; 16928 } 16929} 16930ScrollFlingSpeedLimitModifier.identity = Symbol('flingSpeedLimit'); 16931 16932class ScrollInitializeModifier extends ModifierWithKey { 16933 constructor(value) { 16934 super(value); 16935 } 16936 applyPeer(node, reset) { 16937 if (reset) { 16938 getUINativeModule().scroll.resetScrollInitialize(node); 16939 } 16940 else { 16941 getUINativeModule().scroll.setScrollInitialize(node, this.value); 16942 } 16943 } 16944} 16945ScrollInitializeModifier.identity = Symbol('scrollInitialize'); 16946 16947class ScrollOnScrollStartModifier extends ModifierWithKey { 16948 constructor(value) { 16949 super(value); 16950 } 16951 applyPeer(node, reset) { 16952 if (reset) { 16953 getUINativeModule().scroll.resetScrollOnScrollStart(node); 16954 } else { 16955 getUINativeModule().scroll.setScrollOnScrollStart(node, this.value); 16956 } 16957 } 16958} 16959ScrollOnScrollStartModifier.identity = Symbol('scrollOnScrollStart'); 16960 16961class ScrollOnScrollEndModifier extends ModifierWithKey { 16962 constructor(value) { 16963 super(value); 16964 } 16965 applyPeer(node, reset) { 16966 if (reset) { 16967 getUINativeModule().scroll.resetScrollOnScrollEnd(node); 16968 } else { 16969 getUINativeModule().scroll.setScrollOnScrollEnd(node, this.value); 16970 } 16971 } 16972} 16973ScrollOnScrollEndModifier.identity = Symbol('scrollOnScrollEnd'); 16974 16975class ScrollOnScrollStopModifier extends ModifierWithKey { 16976 constructor(value) { 16977 super(value); 16978 } 16979 applyPeer(node, reset) { 16980 if (reset) { 16981 getUINativeModule().scroll.resetScrollOnScrollStop(node); 16982 } else { 16983 getUINativeModule().scroll.setScrollOnScrollStop(node, this.value); 16984 } 16985 } 16986} 16987ScrollOnScrollStopModifier.identity = Symbol('scrollOnScrollStop'); 16988 16989class ScrollOnScrollModifier extends ModifierWithKey { 16990 constructor(value) { 16991 super(value); 16992 } 16993 applyPeer(node, reset) { 16994 if (reset) { 16995 getUINativeModule().scroll.resetScrollOnScroll(node); 16996 } else { 16997 getUINativeModule().scroll.setScrollOnScroll(node, this.value); 16998 } 16999 } 17000} 17001ScrollOnScrollModifier.identity = Symbol('scrollOnScroll'); 17002 17003class ScrollOnScrollEdgeModifier extends ModifierWithKey { 17004 constructor(value) { 17005 super(value); 17006 } 17007 applyPeer(node, reset) { 17008 if (reset) { 17009 getUINativeModule().scroll.resetScrollOnScrollEdge(node); 17010 } else { 17011 getUINativeModule().scroll.setScrollOnScrollEdge(node, this.value); 17012 } 17013 } 17014} 17015ScrollOnScrollEdgeModifier.identity = Symbol('scrollOnScrollEdge'); 17016 17017class ScrollOnDidScrollModifier extends ModifierWithKey { 17018 constructor(value) { 17019 super(value); 17020 } 17021 applyPeer(node, reset) { 17022 if (reset) { 17023 getUINativeModule().scroll.resetScrollOnDidScroll(node); 17024 } else { 17025 getUINativeModule().scroll.setScrollOnDidScroll(node, this.value); 17026 } 17027 } 17028} 17029ScrollOnDidScrollModifier.identity = Symbol('scrollOnDidScroll'); 17030 17031class ScrollOnWillScrollModifier extends ModifierWithKey { 17032 constructor(value) { 17033 super(value); 17034 } 17035 applyPeer(node, reset) { 17036 if (reset) { 17037 getUINativeModule().scroll.resetScrollOnWillScroll(node); 17038 } else { 17039 getUINativeModule().scroll.setScrollOnWillScroll(node, this.value); 17040 } 17041 } 17042} 17043ScrollOnWillScrollModifier.identity = Symbol('scrollOnWillScroll'); 17044 17045class ScrollOnScrollFrameBeginModifier extends ModifierWithKey { 17046 constructor(value) { 17047 super(value); 17048 } 17049 applyPeer(node, reset) { 17050 if (reset) { 17051 getUINativeModule().scroll.resetScrollOnScrollFrameBegin(node); 17052 } else { 17053 getUINativeModule().scroll.setScrollOnScrollFrameBegin(node, this.value); 17054 } 17055 } 17056} 17057ScrollOnScrollFrameBeginModifier.identity = Symbol('scrollOnScrollFrameBegin'); 17058 17059class ArkScrollComponent extends ArkComponent { 17060 constructor(nativePtr, classType) { 17061 super(nativePtr, classType); 17062 } 17063 initialize(value) { 17064 if (value[0] !== undefined) { 17065 modifierWithKey(this._modifiersWithKeys, ScrollInitializeModifier.identity, ScrollInitializeModifier, value[0]); 17066 } 17067 return this; 17068 } 17069 allowChildCount() { 17070 return 1; 17071 } 17072 scrollable(value) { 17073 modifierWithKey(this._modifiersWithKeys, ScrollScrollableModifier.identity, ScrollScrollableModifier, value); 17074 return this; 17075 } 17076 onScroll(event) { 17077 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollModifier.identity, ScrollOnScrollModifier, event); 17078 return this; 17079 } 17080 onScrollEdge(event) { 17081 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollEdgeModifier.identity, ScrollOnScrollEdgeModifier, event); 17082 return this; 17083 } 17084 onScrollStart(event) { 17085 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollStartModifier.identity, ScrollOnScrollStartModifier, event); 17086 return this; 17087 } 17088 onScrollEnd(event) { 17089 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollEndModifier.identity, ScrollOnScrollEndModifier, event); 17090 return this; 17091 } 17092 onScrollStop(event) { 17093 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollStopModifier.identity, ScrollOnScrollStopModifier, event); 17094 return this; 17095 } 17096 scrollBar(value) { 17097 if (value in BarState) { 17098 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarModifier.identity, ScrollScrollBarModifier, value); 17099 } 17100 else { 17101 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarModifier.identity, ScrollScrollBarModifier, undefined); 17102 } 17103 return this; 17104 } 17105 scrollBarColor(color) { 17106 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarColorModifier.identity, ScrollScrollBarColorModifier, color); 17107 return this; 17108 } 17109 scrollBarWidth(value) { 17110 modifierWithKey(this._modifiersWithKeys, ScrollScrollBarWidthModifier.identity, ScrollScrollBarWidthModifier, value); 17111 return this; 17112 } 17113 edgeEffect(value, options) { 17114 let effect = new ArkScrollEdgeEffect(); 17115 effect.value = value; 17116 effect.options = options; 17117 modifierWithKey(this._modifiersWithKeys, ScrollEdgeEffectModifier.identity, ScrollEdgeEffectModifier, effect); 17118 return this; 17119 } 17120 onScrollFrameBegin(callback) { 17121 modifierWithKey(this._modifiersWithKeys, ScrollOnScrollFrameBeginModifier.identity, ScrollOnScrollFrameBeginModifier, callback); 17122 return this; 17123 } 17124 17125 onWillScroll(callback) { 17126 modifierWithKey(this._modifiersWithKeys, ScrollOnWillScrollModifier.identity, ScrollOnWillScrollModifier, callback); 17127 return this; 17128 } 17129 17130 onDidScroll(callback) { 17131 modifierWithKey(this._modifiersWithKeys, ScrollOnDidScrollModifier.identity, ScrollOnDidScrollModifier, callback); 17132 return this; 17133 } 17134 17135 nestedScroll(value) { 17136 let options = new ArkNestedScrollOptions(); 17137 if (value) { 17138 if (value.scrollForward) { 17139 options.scrollForward = value.scrollForward; 17140 } 17141 if (value.scrollBackward) { 17142 options.scrollBackward = value.scrollBackward; 17143 } 17144 modifierWithKey(this._modifiersWithKeys, ScrollNestedScrollModifier.identity, ScrollNestedScrollModifier, options); 17145 } 17146 return this; 17147 } 17148 enableScrollInteraction(value) { 17149 modifierWithKey(this._modifiersWithKeys, ScrollEnableScrollInteractionModifier.identity, ScrollEnableScrollInteractionModifier, value); 17150 return this; 17151 } 17152 enablePaging(value) { 17153 modifierWithKey(this._modifiersWithKeys, ScrollEnablePagingModifier.identity, ScrollEnablePagingModifier, value); 17154 return this; 17155 } 17156 friction(value) { 17157 modifierWithKey(this._modifiersWithKeys, ScrollFrictionModifier.identity, ScrollFrictionModifier, value); 17158 return this; 17159 } 17160 scrollSnap(value) { 17161 let options = new ArkScrollSnapOptions(); 17162 if (value) { 17163 if (value.snapAlign) { 17164 options.snapAlign = value.snapAlign; 17165 } 17166 if (value.snapPagination) { 17167 options.snapPagination = value.snapPagination; 17168 } 17169 if (value.enableSnapToStart) { 17170 options.enableSnapToStart = value.enableSnapToStart; 17171 } 17172 if (value.enableSnapToEnd) { 17173 options.enableSnapToEnd = value.enableSnapToEnd; 17174 } 17175 modifierWithKey(this._modifiersWithKeys, ScrollScrollSnapModifier.identity, ScrollScrollSnapModifier, options); 17176 } 17177 return this; 17178 } 17179 clip(value) { 17180 modifierWithKey(this._modifiersWithKeys, ScrollClipModifier.identity, ScrollClipModifier, value); 17181 return this; 17182 } 17183 initialOffset(value) { 17184 let options = new ArkScrollOffsetOptions(); 17185 if (value) { 17186 if (value.xOffset) { 17187 options.xOffset = value.xOffset; 17188 } 17189 if (value.yOffset) { 17190 options.yOffset = value.yOffset; 17191 } 17192 modifierWithKey(this._modifiersWithKeys, ScrollInitialOffsetModifier.identity, ScrollInitialOffsetModifier, options); 17193 } 17194 return this; 17195 } 17196 flingSpeedLimit(value) { 17197 modifierWithKey(this._modifiersWithKeys, ScrollFlingSpeedLimitModifier.identity, ScrollFlingSpeedLimitModifier, value); 17198 return this; 17199 } 17200} 17201// @ts-ignore 17202if (globalThis.Scroll !== undefined) { 17203 globalThis.Scroll.attributeModifier = function (modifier) { 17204 attributeModifierFunc.call(this, modifier, (nativePtr) => { 17205 return new ArkScrollComponent(nativePtr); 17206 }, (nativePtr, classType, modifierJS) => { 17207 return new modifierJS.ScrollModifier(nativePtr, classType); 17208 }); 17209 }; 17210} 17211 17212/// <reference path='./import.ts' /> 17213class ArkToggleComponent extends ArkComponent { 17214 constructor(nativePtr, classType) { 17215 super(nativePtr, classType); 17216 } 17217 onChange(callback) { 17218 throw new Error('Method not implemented.'); 17219 } 17220 selectedColor(value) { 17221 modifierWithKey(this._modifiersWithKeys, ToggleSelectedColorModifier.identity, ToggleSelectedColorModifier, value); 17222 return this; 17223 } 17224 switchPointColor(value) { 17225 modifierWithKey(this._modifiersWithKeys, ToggleSwitchPointColorModifier.identity, ToggleSwitchPointColorModifier, value); 17226 return this; 17227 } 17228 height(value) { 17229 modifierWithKey(this._modifiersWithKeys, ToggleHeightModifier.identity, ToggleHeightModifier, value); 17230 return this; 17231 } 17232 responseRegion(value) { 17233 modifierWithKey(this._modifiersWithKeys, ToggleResponseRegionModifier.identity, ToggleResponseRegionModifier, value); 17234 return this; 17235 } 17236 padding(value) { 17237 modifierWithKey(this._modifiersWithKeys, TogglePaddingModifier.identity, TogglePaddingModifier, value); 17238 return this; 17239 } 17240 backgroundColor(value) { 17241 modifierWithKey(this._modifiersWithKeys, ToggleBackgroundColorModifier.identity, ToggleBackgroundColorModifier, value); 17242 return this; 17243 } 17244 hoverEffect(value) { 17245 modifierWithKey(this._modifiersWithKeys, ToggleHoverEffectModifier.identity, ToggleHoverEffectModifier, value); 17246 return this; 17247 } 17248 switchStyle(value) { 17249 modifierWithKey(this._modifiersWithKeys, ToggleSwitchStyleModifier.identity, ToggleSwitchStyleModifier, value); 17250 return this; 17251 } 17252 contentModifier(value) { 17253 modifierWithKey(this._modifiersWithKeys, ToggleContentModifier.identity, ToggleContentModifier, value); 17254 return this; 17255 } 17256 setContentModifier(modifier) { 17257 if (modifier === undefined || modifier === null) { 17258 getUINativeModule().toggle.setContentModifierBuilder(this.nativePtr, false); 17259 return; 17260 } 17261 this.needRebuild = false; 17262 if (this.builder !== modifier.applyContent()) { 17263 this.needRebuild = true; 17264 } 17265 this.builder = modifier.applyContent(); 17266 this.modifier = modifier; 17267 getUINativeModule().toggle.setContentModifierBuilder(this.nativePtr, this); 17268 } 17269 makeContentModifierNode(context, toggleConfiguration) { 17270 toggleConfiguration.contentModifier = this.modifier; 17271 if (isUndefined(this.toggleNode) || this.needRebuild) { 17272 const xNode = globalThis.requireNapi('arkui.node'); 17273 this.toggleNode = new xNode.BuilderNode(context); 17274 this.toggleNode.build(this.builder, toggleConfiguration); 17275 this.needRebuild = false; 17276 } else { 17277 this.toggleNode.update(toggleConfiguration); 17278 } 17279 return this.toggleNode.getFrameNode(); 17280 } 17281} 17282class ToggleSelectedColorModifier extends ModifierWithKey { 17283 constructor(value) { 17284 super(value); 17285 } 17286 applyPeer(node, reset) { 17287 if (reset) { 17288 getUINativeModule().toggle.resetSelectedColor(node); 17289 } 17290 else { 17291 getUINativeModule().toggle.setSelectedColor(node, this.value); 17292 } 17293 } 17294 checkObjectDiff() { 17295 return !isBaseOrResourceEqual(this.stageValue, this.value); 17296 } 17297} 17298ToggleSelectedColorModifier.identity = Symbol('toggleSelectedColor'); 17299class ToggleSwitchPointColorModifier extends ModifierWithKey { 17300 constructor(value) { 17301 super(value); 17302 } 17303 applyPeer(node, reset) { 17304 if (reset) { 17305 getUINativeModule().toggle.resetSwitchPointColor(node); 17306 } 17307 else { 17308 getUINativeModule().toggle.setSwitchPointColor(node, this.value); 17309 } 17310 } 17311 checkObjectDiff() { 17312 return !isBaseOrResourceEqual(this.stageValue, this.value); 17313 } 17314} 17315ToggleSwitchPointColorModifier.identity = Symbol('toggleSwitchPointColor'); 17316class ToggleHeightModifier extends ModifierWithKey { 17317 constructor(value) { 17318 super(value); 17319 } 17320 applyPeer(node, reset) { 17321 if (reset) { 17322 getUINativeModule().toggle.resetHeight(node); 17323 } 17324 else { 17325 getUINativeModule().toggle.setHeight(node, this.value); 17326 } 17327 } 17328 checkObjectDiff() { 17329 return !isBaseOrResourceEqual(this.stageValue, this.value); 17330 } 17331} 17332ToggleHeightModifier.identity = Symbol('toggleHeight'); 17333class ToggleResponseRegionModifier extends ModifierWithKey { 17334 constructor(value) { 17335 super(value); 17336 } 17337 applyPeer(node, reset) { 17338 let _a, _b, _c, _d, _e, _f, _g, _h; 17339 if (reset) { 17340 getUINativeModule().toggle.resetResponseRegion(node); 17341 } 17342 else { 17343 let responseRegion = []; 17344 if (Array.isArray(this.value)) { 17345 for (let i = 0; i < this.value.length; i++) { 17346 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 17347 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 17348 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 17349 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 17350 } 17351 } 17352 else { 17353 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 17354 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 17355 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 17356 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 17357 } 17358 getUINativeModule().toggle.setResponseRegion(node, responseRegion, responseRegion.length); 17359 } 17360 } 17361 checkObjectDiff() { 17362 if (Array.isArray(this.stageValue) && Array.isArray(this.value)) { 17363 if (this.value.length !== this.stageValue.length) { 17364 return true; 17365 } 17366 else { 17367 for (let i = 0; i < this.value.length; i++) { 17368 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 17369 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 17370 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 17371 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 17372 return true; 17373 } 17374 } 17375 return false; 17376 } 17377 } 17378 else if (typeof this.stageValue === 'object' && typeof this.value === 'object') { 17379 return !(this.stageValue.x === this.value.x && 17380 this.stageValue.y === this.value.y && 17381 this.stageValue.height === this.value.height && 17382 this.stageValue.width === this.value.width); 17383 } 17384 else { 17385 return true; 17386 } 17387 } 17388} 17389ToggleResponseRegionModifier.identity = Symbol('toggleResponseRegion'); 17390class TogglePaddingModifier extends ModifierWithKey { 17391 constructor(value) { 17392 super(value); 17393 } 17394 applyPeer(node, reset) { 17395 if (reset) { 17396 getUINativeModule().toggle.resetPadding(node); 17397 } 17398 else { 17399 let top = undefined; 17400 let right = undefined; 17401 let bottom = undefined; 17402 let left = undefined; 17403 if (isLengthType(this.value) || isResource(this.value)) { 17404 top = this.value; 17405 right = this.value; 17406 bottom = this.value; 17407 left = this.value; 17408 } 17409 else if (typeof this.value === 'object') { 17410 top = this.value.top; 17411 right = this.value.right; 17412 bottom = this.value.bottom; 17413 left = this.value.left; 17414 } 17415 getUINativeModule().toggle.setPadding(node, top, right, bottom, left); 17416 } 17417 } 17418 checkObjectDiff() { 17419 if (isResource(this.stageValue) && isResource(this.value)) { 17420 return !isResourceEqual(this.stageValue, this.value); 17421 } 17422 else if (!isResource(this.stageValue) && !isResource(this.value)) { 17423 if (typeof this.stageValue === 'object' && typeof this.value === 'object') { 17424 return !(this.stageValue.left === this.value.left && 17425 this.stageValue.right === this.value.right && 17426 this.stageValue.top === this.value.top && 17427 this.stageValue.bottom === this.value.bottom); 17428 } 17429 else { 17430 return !(this.stageValue === this.value); 17431 } 17432 } 17433 return true; 17434 } 17435} 17436TogglePaddingModifier.identity = Symbol('togglePadding'); 17437class ToggleBackgroundColorModifier extends ModifierWithKey { 17438 constructor(value) { 17439 super(value); 17440 } 17441 applyPeer(node, reset) { 17442 if (reset) { 17443 getUINativeModule().toggle.resetBackgroundColor(node); 17444 } 17445 else { 17446 getUINativeModule().toggle.setBackgroundColor(node, this.value); 17447 } 17448 } 17449 checkObjectDiff() { 17450 return !isBaseOrResourceEqual(this.stageValue, this.value); 17451 } 17452} 17453ToggleBackgroundColorModifier.identity = Symbol('toggleBackgroundColor'); 17454class ToggleHoverEffectModifier extends ModifierWithKey { 17455 constructor(value) { 17456 super(value); 17457 } 17458 applyPeer(node, reset) { 17459 if (reset) { 17460 getUINativeModule().toggle.resetHoverEffect(node); 17461 } 17462 else { 17463 getUINativeModule().toggle.setHoverEffect(node, this.value); 17464 } 17465 } 17466} 17467ToggleHoverEffectModifier.identity = Symbol('toggleHoverEffect'); 17468class ToggleSwitchStyleModifier extends ModifierWithKey { 17469 constructor(value) { 17470 super(value); 17471 } 17472 applyPeer(node, reset) { 17473 if (reset) { 17474 getUINativeModule().toggle.resetSwitchStyle(node); 17475 } 17476 else { 17477 getUINativeModule().toggle.setSwitchStyle(node, this.value.pointRadius, this.value.unselectedColor, this.value.pointColor, this.value.trackBorderRadius); 17478 } 17479 } 17480 checkObjectDiff() { 17481 if (!isResource(this.stageValue) && !isResource(this.value)) { 17482 return !(this.stageValue.pointRadius === this.value.pointRadius && 17483 this.stageValue.unselectedColor === this.value.unselectedColor && 17484 this.stageValue.pointColor === this.value.pointColor && 17485 this.stageValue.trackBorderRadius === this.value.trackBorderRadius); 17486 } 17487 else if (isResource(this.stageValue) && isResource(this.value)){ 17488 return !(isResourceEqual(this.stageValue.pointRadius, this.value.pointRadius) && 17489 isResourceEqual(this.stageValue.unselectedColor, this.value.unselectedColor) && 17490 isResourceEqual(this.stageValue.pointColor, this.value.pointColor) && 17491 isResourceEqual(this.stageValue.trackBorderRadius, this.value.trackBorderRadius)); 17492 } 17493 else { 17494 return true; 17495 } 17496 } 17497} 17498ToggleSwitchStyleModifier.identity = Symbol('toggleSwitchStyle'); 17499class ToggleContentModifier extends ModifierWithKey { 17500 constructor(value) { 17501 super(value); 17502 } 17503 applyPeer(node, reset, component) { 17504 let toggleComponent = component; 17505 toggleComponent.setNodePtr(node); 17506 toggleComponent.setContentModifier(this.value); 17507 } 17508} 17509ToggleContentModifier.identity = Symbol('toggleContentModifier'); 17510// @ts-ignore 17511if (globalThis.Toggle !== undefined) { 17512 globalThis.Toggle.attributeModifier = function (modifier) { 17513 attributeModifierFunc.call(this, modifier, (nativePtr) => { 17514 return new ArkToggleComponent(nativePtr); 17515 }, (nativePtr, classType, modifierJS) => { 17516 return new modifierJS.ToggleModifier(nativePtr, classType); 17517 }); 17518 }; 17519 globalThis.Toggle.contentModifier = function (modifier) { 17520 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 17521 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 17522 let component = this.createOrGetNode(elmtId, () => { 17523 return new ArkToggleComponent(nativeNode); 17524 }); 17525 component.setNodePtr(nativeNode); 17526 component.setContentModifier(modifier); 17527 }; 17528} 17529 17530/// <reference path='./import.ts' /> 17531class ArkSelectComponent extends ArkComponent { 17532 constructor(nativePtr, classType) { 17533 super(nativePtr, classType); 17534 } 17535 optionWidth(value) { 17536 modifierWithKey(this._modifiersWithKeys, SelectOptionWidthModifier.identity, SelectOptionWidthModifier, value); 17537 return this; 17538 } 17539 optionHeight(value) { 17540 modifierWithKey(this._modifiersWithKeys, SelectOptionHeightModifier.identity, SelectOptionHeightModifier, value); 17541 return this; 17542 } 17543 width(value) { 17544 modifierWithKey(this._modifiersWithKeys, SelectWidthModifier.identity, SelectWidthModifier, value); 17545 return this; 17546 } 17547 height(value) { 17548 modifierWithKey(this._modifiersWithKeys, SelectHeightModifier.identity, SelectHeightModifier, value); 17549 return this; 17550 } 17551 size(value) { 17552 modifierWithKey(this._modifiersWithKeys, SelectSizeModifier.identity, SelectSizeModifier, value); 17553 return this; 17554 } 17555 selected(value) { 17556 modifierWithKey(this._modifiersWithKeys, SelectedModifier.identity, SelectedModifier, value); 17557 return this; 17558 } 17559 value(value) { 17560 modifierWithKey(this._modifiersWithKeys, ValueModifier.identity, ValueModifier, value); 17561 return this; 17562 } 17563 font(value) { 17564 modifierWithKey(this._modifiersWithKeys, FontModifier.identity, FontModifier, value); 17565 return this; 17566 } 17567 fontColor(value) { 17568 modifierWithKey(this._modifiersWithKeys, SelectFontColorModifier.identity, SelectFontColorModifier, value); 17569 return this; 17570 } 17571 selectedOptionBgColor(value) { 17572 modifierWithKey(this._modifiersWithKeys, SelectedOptionBgColorModifier.identity, SelectedOptionBgColorModifier, value); 17573 return this; 17574 } 17575 selectedOptionFont(value) { 17576 modifierWithKey(this._modifiersWithKeys, SelectedOptionFontModifier.identity, SelectedOptionFontModifier, value); 17577 return this; 17578 } 17579 selectedOptionFontColor(value) { 17580 modifierWithKey(this._modifiersWithKeys, SelectedOptionFontColorModifier.identity, SelectedOptionFontColorModifier, value); 17581 return this; 17582 } 17583 optionBgColor(value) { 17584 modifierWithKey(this._modifiersWithKeys, OptionBgColorModifier.identity, OptionBgColorModifier, value); 17585 return this; 17586 } 17587 optionFont(value) { 17588 modifierWithKey(this._modifiersWithKeys, OptionFontModifier.identity, OptionFontModifier, value); 17589 return this; 17590 } 17591 optionFontColor(value) { 17592 modifierWithKey(this._modifiersWithKeys, OptionFontColorModifier.identity, OptionFontColorModifier, value); 17593 return this; 17594 } 17595 onSelect(callback) { 17596 throw new Error('Method not implemented.'); 17597 } 17598 space(value) { 17599 modifierWithKey(this._modifiersWithKeys, SpaceModifier.identity, SpaceModifier, value); 17600 return this; 17601 } 17602 arrowPosition(value) { 17603 modifierWithKey(this._modifiersWithKeys, ArrowPositionModifier.identity, ArrowPositionModifier, value); 17604 return this; 17605 } 17606 menuAlign(alignType, offset) { 17607 let menuAlign = new ArkMenuAlignType(alignType, offset); 17608 modifierWithKey(this._modifiersWithKeys, MenuAlignModifier.identity, MenuAlignModifier, menuAlign); 17609 return this; 17610 } 17611 menuBackgroundColor(value) { 17612 modifierWithKey( 17613 this._modifiersWithKeys, MenuBackgroundColorModifier.identity, MenuBackgroundColorModifier, value); 17614 return this; 17615 } 17616 menuBackgroundBlurStyle(value) { 17617 modifierWithKey( 17618 this._modifiersWithKeys, MenuBackgroundBlurStyleModifier.identity, MenuBackgroundBlurStyleModifier, value); 17619 return this; 17620 } 17621 controlSize(controlSize) { 17622 modifierWithKey(this._modifiersWithKeys, ControlSizeModifier.identity, ControlSizeModifier, controlSize); 17623 return this; 17624 } 17625 setContentModifier(modifier) { 17626 if (modifier === undefined || modifier === null) { 17627 getUINativeModule().select.setContentModifierBuilder(this.nativePtr, false); 17628 return; 17629 } 17630 this.builder = modifier.applyContent(); 17631 this.modifier = modifier; 17632 getUINativeModule().select.setContentModifierBuilder(this.nativePtr, this); 17633 } 17634 makeContentModifierNode(context, menuItemConfiguration) { 17635 menuItemConfiguration.contentModifier = this.modifier; 17636 const index = menuItemConfiguration.index; 17637 const xNode = globalThis.requireNapi('arkui.node'); 17638 this.menuItemNodes = new xNode.BuilderNode(context); 17639 this.menuItemNodes.build(this.builder, menuItemConfiguration); 17640 return this.menuItemNodes.getFrameNode(); 17641 } 17642 divider(value) { 17643 modifierWithKey(this._modifiersWithKeys, SelectDividerModifier.identity, SelectDividerModifier, value); 17644 return this; 17645 } 17646} 17647class MenuBackgroundColorModifier extends ModifierWithKey { 17648 constructor(value) { 17649 super(value); 17650 } 17651 applyPeer(node, reset) { 17652 if (reset) { 17653 getUINativeModule().select.resetMenuBackgroundColor(node); 17654 } 17655 else { 17656 getUINativeModule().select.setMenuBackgroundColor(node, this.value); 17657 } 17658 } 17659 checkObjectDiff() { 17660 return !isBaseOrResourceEqual(this.stageValue, this.value); 17661 } 17662} 17663MenuBackgroundColorModifier.identity = Symbol('selectMenuBackgroundColor'); 17664class MenuBackgroundBlurStyleModifier extends ModifierWithKey { 17665 constructor(value) { 17666 super(value); 17667 } 17668 applyPeer(node, reset) { 17669 if (reset) { 17670 getUINativeModule().select.resetMenuBackgroundBlurStyle(node); 17671 } 17672 else { 17673 getUINativeModule().select.setMenuBackgroundBlurStyle(node, this.value); 17674 } 17675 } 17676 checkObjectDiff() { 17677 return !isBaseOrResourceEqual(this.stageValue, this.value); 17678 } 17679} 17680MenuBackgroundBlurStyleModifier.identity = Symbol('selectMenuBackgroundBlurStyle'); 17681class FontModifier extends ModifierWithKey { 17682 constructor(value) { 17683 super(value); 17684 } 17685 applyPeer(node, reset) { 17686 if (reset) { 17687 getUINativeModule().select.resetFont(node); 17688 } 17689 else { 17690 getUINativeModule().select.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 17691 } 17692 } 17693 checkObjectDiff() { 17694 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 17695 let weightEQ = this.stageValue.weight === this.value.weight; 17696 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 17697 let styleEQ = this.stageValue.style === this.value.style; 17698 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 17699 } 17700} 17701FontModifier.identity = Symbol('selectFont'); 17702class OptionFontModifier extends ModifierWithKey { 17703 constructor(value) { 17704 super(value); 17705 } 17706 applyPeer(node, reset) { 17707 if (reset) { 17708 getUINativeModule().select.resetOptionFont(node); 17709 } 17710 else { 17711 getUINativeModule().select.setOptionFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 17712 } 17713 } 17714 checkObjectDiff() { 17715 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 17716 let weightEQ = this.stageValue.weight === this.value.weight; 17717 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 17718 let styleEQ = this.stageValue.style === this.value.style; 17719 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 17720 } 17721} 17722OptionFontModifier.identity = Symbol('selectOptionFont'); 17723class SelectedOptionFontModifier extends ModifierWithKey { 17724 constructor(value) { 17725 super(value); 17726 } 17727 applyPeer(node, reset) { 17728 if (reset) { 17729 getUINativeModule().select.resetSelectedOptionFont(node); 17730 } 17731 else { 17732 getUINativeModule().select.setSelectedOptionFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 17733 } 17734 } 17735 checkObjectDiff() { 17736 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 17737 let weightEQ = this.stageValue.weight === this.value.weight; 17738 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 17739 let styleEQ = this.stageValue.style === this.value.style; 17740 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 17741 } 17742} 17743SelectedOptionFontModifier.identity = Symbol('selectSelectedOptionFont'); 17744class MenuAlignModifier extends ModifierWithKey { 17745 constructor(value) { 17746 super(value); 17747 } 17748 applyPeer(node, reset) { 17749 if (reset) { 17750 getUINativeModule().select.resetMenuAlign(node); 17751 } 17752 else { 17753 getUINativeModule().select.setMenuAlign(node, this.value.alignType, this.value.dx, this.value.dy); 17754 } 17755 } 17756 checkObjectDiff() { 17757 let alignTypeEQ = this.stageValue.alignType === this.value.alignType; 17758 let dxEQ = isBaseOrResourceEqual(this.stageValue, this.value); 17759 let dyEQ = isBaseOrResourceEqual(this.stageValue, this.value); 17760 return !alignTypeEQ || !dxEQ || !dyEQ; 17761 } 17762 isEqual(stageValue, value) { 17763 if ((!isUndefined(stageValue) && isResource(stageValue)) && 17764 (!isUndefined(value) && isResource(value))) { 17765 return !isResourceEqual(stageValue, value); 17766 } 17767 else { 17768 return stageValue !== value; 17769 } 17770 } 17771} 17772MenuAlignModifier.identity = Symbol('selectMenuAlign'); 17773class SelectDividerModifier extends ModifierWithKey { 17774 constructor(value) { 17775 super(value); 17776 } 17777 applyPeer(node, reset) { 17778 var _a, _b, _c, _d; 17779 if (reset) { 17780 getUINativeModule().select.resetDivider(node, this.value); 17781 } 17782 else { 17783 getUINativeModule().select.setDivider(node, (_a = this.value) === null || _a === void 0 ? void 0 : _a.strokeWidth, 17784 (_b = this.value) === null || _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || _c === void 0 ? void 0 : _c.startMargin, 17785 (_d = this.value) === null || _d === void 0 ? void 0 : _d.endMargin); 17786 } 17787 } 17788 checkObjectDiff() { 17789 var _a, _b, _c, _d, _e, _f, _g, _h; 17790 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 17791 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 17792 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 17793 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 17794 } 17795} 17796SelectDividerModifier.identity = Symbol('selectDivider'); 17797class ControlSizeModifier extends ModifierWithKey { 17798 constructor(value) { 17799 super(value); 17800 } 17801 applyPeer(node, reset) { 17802 if (reset) { 17803 getUINativeModule().select.resetControlSize(node); 17804 } 17805 else { 17806 getUINativeModule().select.setControlSize(node, this.value); 17807 } 17808 } 17809 checkObjectDiff() { 17810 return this.stageValue !== this.value; 17811 } 17812} 17813ControlSizeModifier.identity = Symbol('controlSize'); 17814class ArrowPositionModifier extends ModifierWithKey { 17815 constructor(value) { 17816 super(value); 17817 } 17818 applyPeer(node, reset) { 17819 if (reset) { 17820 getUINativeModule().select.resetArrowPosition(node); 17821 } 17822 else { 17823 getUINativeModule().select.setArrowPosition(node, this.value); 17824 } 17825 } 17826 checkObjectDiff() { 17827 return this.stageValue !== this.value; 17828 } 17829} 17830ArrowPositionModifier.identity = Symbol('selectArrowPosition'); 17831class SpaceModifier extends ModifierWithKey { 17832 constructor(value) { 17833 super(value); 17834 } 17835 applyPeer(node, reset) { 17836 if (reset) { 17837 getUINativeModule().select.resetSpace(node); 17838 } 17839 else { 17840 getUINativeModule().select.setSpace(node, this.value); 17841 } 17842 } 17843 checkObjectDiff() { 17844 return !isBaseOrResourceEqual(this.stageValue, this.value); 17845 } 17846} 17847SpaceModifier.identity = Symbol('selectSpace'); 17848class ValueModifier extends ModifierWithKey { 17849 constructor(value) { 17850 super(value); 17851 } 17852 applyPeer(node, reset) { 17853 if (reset) { 17854 getUINativeModule().select.resetValue(node); 17855 } 17856 else { 17857 getUINativeModule().select.setValue(node, this.value); 17858 } 17859 } 17860 checkObjectDiff() { 17861 return !isBaseOrResourceEqual(this.stageValue, this.value); 17862 } 17863} 17864ValueModifier.identity = Symbol('selectValue'); 17865class SelectedModifier extends ModifierWithKey { 17866 constructor(value) { 17867 super(value); 17868 } 17869 applyPeer(node, reset) { 17870 if (reset) { 17871 getUINativeModule().select.resetSelected(node); 17872 } 17873 else { 17874 getUINativeModule().select.setSelected(node, this.value); 17875 } 17876 } 17877 checkObjectDiff() { 17878 return !isBaseOrResourceEqual(this.stageValue, this.value); 17879 } 17880} 17881SelectedModifier.identity = Symbol('selectSelected'); 17882class SelectFontColorModifier extends ModifierWithKey { 17883 constructor(value) { 17884 super(value); 17885 } 17886 applyPeer(node, reset) { 17887 if (reset) { 17888 getUINativeModule().select.resetFontColor(node); 17889 } 17890 else { 17891 getUINativeModule().select.setFontColor(node, this.value); 17892 } 17893 } 17894 checkObjectDiff() { 17895 return !isBaseOrResourceEqual(this.stageValue, this.value); 17896 } 17897} 17898SelectFontColorModifier.identity = Symbol('selectFontColor'); 17899class SelectedOptionBgColorModifier extends ModifierWithKey { 17900 constructor(value) { 17901 super(value); 17902 } 17903 applyPeer(node, reset) { 17904 if (reset) { 17905 getUINativeModule().select.resetSelectedOptionBgColor(node); 17906 } 17907 else { 17908 getUINativeModule().select.setSelectedOptionBgColor(node, this.value); 17909 } 17910 } 17911 checkObjectDiff() { 17912 return !isBaseOrResourceEqual(this.stageValue, this.value); 17913 } 17914} 17915SelectedOptionBgColorModifier.identity = Symbol('selectSelectedOptionBgColor'); 17916class OptionBgColorModifier extends ModifierWithKey { 17917 constructor(value) { 17918 super(value); 17919 } 17920 applyPeer(node, reset) { 17921 if (reset) { 17922 getUINativeModule().select.resetOptionBgColor(node); 17923 } 17924 else { 17925 getUINativeModule().select.setOptionBgColor(node, this.value); 17926 } 17927 } 17928 checkObjectDiff() { 17929 return !isBaseOrResourceEqual(this.stageValue, this.value); 17930 } 17931} 17932OptionBgColorModifier.identity = Symbol('selectOptionBgColor'); 17933class OptionFontColorModifier extends ModifierWithKey { 17934 constructor(value) { 17935 super(value); 17936 } 17937 applyPeer(node, reset) { 17938 if (reset) { 17939 getUINativeModule().select.resetOptionFontColor(node); 17940 } 17941 else { 17942 getUINativeModule().select.setOptionFontColor(node, this.value); 17943 } 17944 } 17945 checkObjectDiff() { 17946 return !isBaseOrResourceEqual(this.stageValue, this.value); 17947 } 17948} 17949OptionFontColorModifier.identity = Symbol('selectOptionFontColor'); 17950class SelectedOptionFontColorModifier extends ModifierWithKey { 17951 constructor(value) { 17952 super(value); 17953 } 17954 applyPeer(node, reset) { 17955 if (reset) { 17956 getUINativeModule().select.resetSelectedOptionFontColor(node); 17957 } 17958 else { 17959 getUINativeModule().select.setSelectedOptionFontColor(node, this.value); 17960 } 17961 } 17962 checkObjectDiff() { 17963 return !isBaseOrResourceEqual(this.stageValue, this.value); 17964 } 17965} 17966SelectedOptionFontColorModifier.identity = Symbol('selectSelectedOptionFontColor'); 17967class SelectOptionWidthModifier extends ModifierWithKey { 17968 constructor(value) { 17969 super(value); 17970 } 17971 applyPeer(node, reset) { 17972 if (reset) { 17973 getUINativeModule().select.resetOptionWidth(node); 17974 } else { 17975 getUINativeModule().select.setOptionWidth(node, this.value); 17976 } 17977 } 17978 17979 checkObjectDiff() { 17980 return !isBaseOrResourceEqual(this.stageValue, this.value); 17981 } 17982} 17983SelectOptionWidthModifier.identity = Symbol('selectOptionWidth'); 17984class SelectOptionHeightModifier extends ModifierWithKey { 17985 constructor(value) { 17986 super(value); 17987 } 17988 applyPeer(node, reset) { 17989 if (reset) { 17990 getUINativeModule().select.resetOptionHeight(node); 17991 } else { 17992 getUINativeModule().select.setOptionHeight(node, this.value); 17993 } 17994 } 17995 17996 checkObjectDiff() { 17997 return !isBaseOrResourceEqual(this.stageValue, this.value); 17998 } 17999} 18000SelectOptionHeightModifier.identity = Symbol('selectOptionHeight'); 18001class SelectWidthModifier extends ModifierWithKey { 18002 constructor(value) { 18003 super(value); 18004 } 18005 applyPeer(node, reset) { 18006 if (reset) { 18007 getUINativeModule().select.resetWidth(node); 18008 } else { 18009 getUINativeModule().select.setWidth(node, this.value); 18010 } 18011 } 18012 18013 checkObjectDiff() { 18014 return !isBaseOrResourceEqual(this.stageValue, this.value); 18015 } 18016} 18017SelectWidthModifier.identity = Symbol('selectWidth'); 18018class SelectHeightModifier extends ModifierWithKey { 18019 constructor(value) { 18020 super(value); 18021 } 18022 applyPeer(node, reset) { 18023 if (reset) { 18024 getUINativeModule().select.resetHeight(node); 18025 } else { 18026 getUINativeModule().select.setHeight(node, this.value); 18027 } 18028 } 18029 18030 checkObjectDiff() { 18031 return !isBaseOrResourceEqual(this.stageValue, this.value); 18032 } 18033} 18034SelectHeightModifier.identity = Symbol('selectHeight'); 18035class SelectSizeModifier extends ModifierWithKey { 18036 constructor(value) { 18037 super(value); 18038 } 18039 applyPeer(node, reset) { 18040 if (reset) { 18041 getUINativeModule().select.resetSize(node); 18042 } else { 18043 getUINativeModule().select.setSize(node, this.value.width, this.value.height); 18044 } 18045 } 18046 18047 checkObjectDiff() { 18048 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 18049 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 18050 } 18051} 18052SelectSizeModifier.identity = Symbol('selectSize'); 18053// @ts-ignore 18054if (globalThis.Select !== undefined) { 18055 globalThis.Select.attributeModifier = function (modifier) { 18056 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18057 return new ArkSelectComponent(nativePtr); 18058 }, (nativePtr, classType, modifierJS) => { 18059 return new modifierJS.SelectModifier(nativePtr, classType); 18060 }); 18061 }; 18062 18063 globalThis.Select.menuItemContentModifier = function (modifier) { 18064 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 18065 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 18066 let component = this.createOrGetNode(elmtId, () => { 18067 return new ArkSelectComponent(nativeNode); 18068 }); 18069 component.setContentModifier(modifier); 18070 }; 18071} 18072 18073/// <reference path='./import.ts' /> 18074class ArkRadioComponent extends ArkComponent { 18075 constructor(nativePtr, classType) { 18076 super(nativePtr, classType); 18077 } 18078 checked(value) { 18079 modifierWithKey(this._modifiersWithKeys, RadioCheckedModifier.identity, RadioCheckedModifier, value); 18080 return this; 18081 } 18082 onChange(callback) { 18083 throw new Error('Method not implemented.'); 18084 } 18085 radioStyle(value) { 18086 modifierWithKey(this._modifiersWithKeys, RadioStyleModifier.identity, RadioStyleModifier, value); 18087 return this; 18088 } 18089 width(value) { 18090 modifierWithKey(this._modifiersWithKeys, RadioWidthModifier.identity, RadioWidthModifier, value); 18091 return this; 18092 } 18093 height(value) { 18094 modifierWithKey(this._modifiersWithKeys, RadioHeightModifier.identity, RadioHeightModifier, value); 18095 return this; 18096 } 18097 size(value) { 18098 modifierWithKey(this._modifiersWithKeys, RadioSizeModifier.identity, RadioSizeModifier, value); 18099 return this; 18100 } 18101 hoverEffect(value) { 18102 modifierWithKey(this._modifiersWithKeys, RadioHoverEffectModifier.identity, RadioHoverEffectModifier, value); 18103 return this; 18104 } 18105 padding(value) { 18106 modifierWithKey(this._modifiersWithKeys, RadioPaddingModifier.identity, RadioPaddingModifier, value); 18107 return this; 18108 } 18109 responseRegion(value) { 18110 modifierWithKey(this._modifiersWithKeys, RadioResponseRegionModifier.identity, RadioResponseRegionModifier, value); 18111 return this; 18112 } 18113 contentModifier(value) { 18114 modifierWithKey(this._modifiersWithKeys, RadioContentModifier.identity, RadioContentModifier, value); 18115 return this; 18116 } 18117 setContentModifier(modifier) { 18118 if (modifier === undefined || modifier === null) { 18119 getUINativeModule().radio.setContentModifierBuilder(this.nativePtr, false); 18120 return; 18121 } 18122 this.needRebuild = false; 18123 if (this.builder !== modifier.applyContent()) { 18124 this.needRebuild = true; 18125 } 18126 this.builder = modifier.applyContent(); 18127 this.modifier = modifier; 18128 getUINativeModule().radio.setContentModifierBuilder(this.nativePtr, this); 18129 } 18130 makeContentModifierNode(context, radioConfiguration) { 18131 radioConfiguration.contentModifier = this.modifier; 18132 if (isUndefined(this.radioNode) || this.needRebuild) { 18133 const xNode = globalThis.requireNapi('arkui.node'); 18134 this.radioNode = new xNode.BuilderNode(context); 18135 this.radioNode.build(this.builder, radioConfiguration); 18136 this.needRebuild = false; 18137 } else { 18138 this.radioNode.update(radioConfiguration); 18139 } 18140 return this.radioNode.getFrameNode(); 18141 } 18142} 18143class RadioCheckedModifier extends ModifierWithKey { 18144 constructor(value) { 18145 super(value); 18146 } 18147 applyPeer(node, reset) { 18148 if (reset) { 18149 getUINativeModule().radio.resetRadioChecked(node); 18150 } 18151 else { 18152 getUINativeModule().radio.setRadioChecked(node, this.value); 18153 } 18154 } 18155} 18156RadioCheckedModifier.identity = Symbol('radioChecked'); 18157class RadioStyleModifier extends ModifierWithKey { 18158 constructor(value) { 18159 super(value); 18160 } 18161 applyPeer(node, reset) { 18162 if (reset) { 18163 getUINativeModule().radio.resetRadioStyle(node); 18164 } 18165 else { 18166 getUINativeModule().radio.setRadioStyle(node, this.value.checkedBackgroundColor, this.value.uncheckedBorderColor, this.value.indicatorColor); 18167 } 18168 } 18169 checkObjectDiff() { 18170 let checkedBackgroundColorEQ = isBaseOrResourceEqual(this.stageValue.checkedBackgroundColor, this.value.checkedBackgroundColor); 18171 let uncheckedBorderColorEQ = isBaseOrResourceEqual(this.stageValue.uncheckedBorderColor, this.value.uncheckedBorderColor); 18172 let indicatorColorEQ = isBaseOrResourceEqual(this.stageValue.indicatorColor, this.value.indicatorColor); 18173 return !checkedBackgroundColorEQ || 18174 !uncheckedBorderColorEQ || 18175 !indicatorColorEQ; 18176 } 18177} 18178RadioStyleModifier.identity = Symbol('radioStyle'); 18179class RadioWidthModifier extends ModifierWithKey { 18180 constructor(value) { 18181 super(value); 18182 } 18183 applyPeer(node, reset) { 18184 if (reset) { 18185 getUINativeModule().radio.resetRadioWidth(node); 18186 } 18187 else { 18188 getUINativeModule().radio.setRadioWidth(node, this.value); 18189 } 18190 } 18191 checkObjectDiff() { 18192 return !isBaseOrResourceEqual(this.stageValue, this.value); 18193 } 18194} 18195RadioWidthModifier.identity = Symbol('radioWidth'); 18196class RadioHeightModifier extends ModifierWithKey { 18197 constructor(value) { 18198 super(value); 18199 } 18200 applyPeer(node, reset) { 18201 if (reset) { 18202 getUINativeModule().radio.resetRadioHeight(node); 18203 } 18204 else { 18205 getUINativeModule().radio.setRadioHeight(node, this.value); 18206 } 18207 } 18208 checkObjectDiff() { 18209 return !isBaseOrResourceEqual(this.stageValue, this.value); 18210 } 18211} 18212RadioHeightModifier.identity = Symbol('radioHeight'); 18213class RadioSizeModifier extends ModifierWithKey { 18214 constructor(value) { 18215 super(value); 18216 } 18217 applyPeer(node, reset) { 18218 if (reset) { 18219 getUINativeModule().radio.resetRadioSize(node); 18220 } 18221 else { 18222 getUINativeModule().radio.setRadioSize(node, this.value.width, this.value.height); 18223 } 18224 } 18225 checkObjectDiff() { 18226 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 18227 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 18228 } 18229} 18230RadioSizeModifier.identity = Symbol('radioSize'); 18231class RadioHoverEffectModifier extends ModifierWithKey { 18232 constructor(value) { 18233 super(value); 18234 } 18235 applyPeer(node, reset) { 18236 if (reset) { 18237 getUINativeModule().radio.resetRadioHoverEffect(node); 18238 } 18239 else { 18240 getUINativeModule().radio.setRadioHoverEffect(node, this.value); 18241 } 18242 } 18243 checkObjectDiff() { 18244 return !isBaseOrResourceEqual(this.stageValue, this.value); 18245 } 18246} 18247RadioHoverEffectModifier.identity = Symbol('radioHoverEffect'); 18248class RadioPaddingModifier extends ModifierWithKey { 18249 constructor(value) { 18250 super(value); 18251 } 18252 applyPeer(node, reset) { 18253 if (reset) { 18254 getUINativeModule().radio.resetRadioPadding(node); 18255 } 18256 else { 18257 let paddingTop; 18258 let paddingRight; 18259 let paddingBottom; 18260 let paddingLeft; 18261 if (this.value !== null && this.value !== undefined) { 18262 if (isLengthType(this.value) || isResource(this.value)) { 18263 paddingTop = this.value; 18264 paddingRight = this.value; 18265 paddingBottom = this.value; 18266 paddingLeft = this.value; 18267 } 18268 else { 18269 paddingTop = this.value.top; 18270 paddingRight = this.value.right; 18271 paddingBottom = this.value.bottom; 18272 paddingLeft = this.value.left; 18273 } 18274 } 18275 getUINativeModule().radio.setRadioPadding(node, paddingTop, paddingRight, paddingBottom, paddingLeft); 18276 } 18277 } 18278 checkObjectDiff() { 18279 if (isResource(this.stageValue) && isResource(this.value)) { 18280 return !isResourceEqual(this.stageValue, this.value); 18281 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 18282 return !(this.stageValue.left === this.value.left && 18283 this.stageValue.right === this.value.right && 18284 this.stageValue.top === this.value.top && 18285 this.stageValue.bottom === this.value.bottom); 18286 } else { 18287 return true; 18288 } 18289 } 18290} 18291RadioPaddingModifier.identity = Symbol('radioPadding'); 18292class RadioResponseRegionModifier extends ModifierWithKey { 18293 constructor(value) { 18294 super(value); 18295 } 18296 applyPeer(node, reset) { 18297 let _a, _b, _c, _d, _e, _f, _g, _h; 18298 if (reset) { 18299 getUINativeModule().radio.resetRadioResponseRegion(node); 18300 } 18301 else { 18302 let responseRegion = []; 18303 if (Array.isArray(this.value)) { 18304 for (let i = 0; i < this.value.length; i++) { 18305 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 18306 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 18307 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 18308 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 18309 } 18310 } 18311 else { 18312 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 18313 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 18314 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 18315 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 18316 } 18317 getUINativeModule().radio.setRadioResponseRegion(node, responseRegion, responseRegion.length); 18318 } 18319 } 18320 checkObjectDiff() { 18321 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 18322 if (this.value.length !== this.stageValue.length) { 18323 return true; 18324 } 18325 else { 18326 for (let i = 0; i < this.value.length; i++) { 18327 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 18328 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 18329 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 18330 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 18331 return true; 18332 } 18333 } 18334 return false; 18335 } 18336 } 18337 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 18338 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 18339 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 18340 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 18341 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 18342 } 18343 else { 18344 return true; 18345 } 18346 } 18347} 18348RadioResponseRegionModifier.identity = Symbol('radioResponseRegion'); 18349class RadioContentModifier extends ModifierWithKey { 18350 constructor(value) { 18351 super(value); 18352 } 18353 applyPeer(node, reset, component) { 18354 let radioComponent = component; 18355 radioComponent.setContentModifier(this.value); 18356 } 18357} 18358RadioContentModifier.identity = Symbol('radioContentModifier'); 18359// @ts-ignore 18360if (globalThis.Radio !== undefined) { 18361 globalThis.Radio.attributeModifier = function (modifier) { 18362 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18363 return new ArkRadioComponent(nativePtr); 18364 }, (nativePtr, classType, modifierJS) => { 18365 return new modifierJS.RadioModifier(nativePtr, classType); 18366 }); 18367 }; 18368 globalThis.Radio.contentModifier = function (modifier) { 18369 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 18370 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 18371 let component = this.createOrGetNode(elmtId, () => { 18372 return new ArkRadioComponent(nativeNode); 18373 }); 18374 component.setContentModifier(modifier); 18375 }; 18376} 18377 18378/// <reference path='./import.ts' /> 18379class ArkTimePickerComponent extends ArkComponent { 18380 constructor(nativePtr, classType) { 18381 super(nativePtr, classType); 18382 } 18383 loop(value) { 18384 modifierWithKey(this._modifiersWithKeys, TimepickerLoopModifier.identity, TimepickerLoopModifier, value); 18385 return this; 18386 } 18387 useMilitaryTime(value) { 18388 modifierWithKey(this._modifiersWithKeys, TimepickerUseMilitaryTimeModifier.identity, TimepickerUseMilitaryTimeModifier, value); 18389 return this; 18390 } 18391 disappearTextStyle(value) { 18392 modifierWithKey(this._modifiersWithKeys, TimepickerDisappearTextStyleModifier.identity, TimepickerDisappearTextStyleModifier, value); 18393 return this; 18394 } 18395 textStyle(value) { 18396 modifierWithKey(this._modifiersWithKeys, TimepickerTextStyleModifier.identity, TimepickerTextStyleModifier, value); 18397 return this; 18398 } 18399 selectedTextStyle(value) { 18400 modifierWithKey(this._modifiersWithKeys, TimepickerSelectedTextStyleModifier.identity, TimepickerSelectedTextStyleModifier, value); 18401 return this; 18402 } 18403 onChange(callback) { 18404 throw new Error('Method not implemented.'); 18405 } 18406 dateTimeOptions(value) { 18407 modifierWithKey(this._modifiersWithKeys, TimepickerDateTimeOptionsModifier.identity, TimepickerDateTimeOptionsModifier, value); 18408 return this; 18409 } 18410} 18411class TimepickerTextStyleModifier extends ModifierWithKey { 18412 constructor(value) { 18413 super(value); 18414 } 18415 applyPeer(node, reset) { 18416 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 18417 if (reset) { 18418 getUINativeModule().timepicker.resetTextStyle(node); 18419 } 18420 else { 18421 getUINativeModule().timepicker.setTextStyle(node, (_b = (_a = this.value) === null || 18422 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 18423 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 18424 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 18425 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 18426 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 18427 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 18428 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 18429 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 18430 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 18431 } 18432 } 18433 checkObjectDiff() { 18434 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 18435 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 18436 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 18437 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 18438 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 18439 return true; 18440 } 18441 else { 18442 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 18443 _k === void 0 ? void 0 : _k.color) || 18444 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 18445 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 18446 _p === void 0 ? void 0 : _p.size) || 18447 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 18448 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 18449 _t === void 0 ? void 0 : _t.family); 18450 } 18451 } 18452} 18453TimepickerTextStyleModifier.identity = Symbol('textStyle'); 18454class TimepickerSelectedTextStyleModifier extends ModifierWithKey { 18455 constructor(value) { 18456 super(value); 18457 } 18458 applyPeer(node, reset) { 18459 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 18460 if (reset) { 18461 getUINativeModule().timepicker.resetSelectedTextStyle(node); 18462 } 18463 else { 18464 getUINativeModule().timepicker.setSelectedTextStyle(node, (_b = (_a = this.value) === null || 18465 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 18466 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 18467 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 18468 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 18469 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 18470 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 18471 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 18472 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 18473 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 18474 } 18475 } 18476 checkObjectDiff() { 18477 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 18478 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 18479 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 18480 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 18481 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 18482 return true; 18483 } 18484 else { 18485 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || _k === void 0 ? void 0 : _k.color) || 18486 !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) || 18487 !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); 18488 } 18489 } 18490} 18491TimepickerSelectedTextStyleModifier.identity = Symbol('selectedTextStyle'); 18492class TimepickerDisappearTextStyleModifier extends ModifierWithKey { 18493 constructor(value) { 18494 super(value); 18495 } 18496 applyPeer(node, reset) { 18497 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 18498 if (reset) { 18499 getUINativeModule().timepicker.resetDisappearTextStyle(node); 18500 } 18501 else { 18502 getUINativeModule().timepicker.setDisappearTextStyle(node, (_b = (_a = this.value) === null || 18503 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 18504 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 18505 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 18506 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 18507 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 18508 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 18509 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 18510 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 18511 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 18512 } 18513 } 18514 checkObjectDiff() { 18515 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 18516 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? 18517 void 0 : _b.weight) === ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 18518 _d === void 0 ? void 0 : _d.weight) && 18519 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? 18520 void 0 : _f.style) === ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || 18521 _h === void 0 ? void 0 : _h.style))) { 18522 return true; 18523 } 18524 else { 18525 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, 18526 (_k = this.value) === null || _k === void 0 ? void 0 : _k.color) || 18527 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 18528 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 18529 _p === void 0 ? void 0 : _p.size) || 18530 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 18531 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 18532 _t === void 0 ? void 0 : _t.family); 18533 } 18534 } 18535} 18536TimepickerDisappearTextStyleModifier.identity = Symbol('disappearTextStyle'); 18537class TimepickerUseMilitaryTimeModifier extends ModifierWithKey { 18538 constructor(value) { 18539 super(value); 18540 } 18541 applyPeer(node, reset) { 18542 if (reset) { 18543 getUINativeModule().timepicker.resetTimepickerUseMilitaryTime(node); 18544 } 18545 else { 18546 getUINativeModule().timepicker.setTimepickerUseMilitaryTime(node, this.value); 18547 } 18548 } 18549} 18550TimepickerUseMilitaryTimeModifier.identity = Symbol('timepickerUseMilitaryTime'); 18551 18552class TimepickerLoopModifier extends ModifierWithKey { 18553 constructor(value) { 18554 super(value); 18555 } 18556 applyPeer(node, reset) { 18557 if (reset) { 18558 getUINativeModule().timepicker.resetTimepickerLoop(node); 18559 } 18560 else { 18561 getUINativeModule().timepicker.setTimepickerLoop(node, this.value); 18562 } 18563 } 18564} 18565TimepickerLoopModifier.identity = Symbol('timepickerLoop'); 18566 18567class TimepickerDateTimeOptionsModifier extends ModifierWithKey { 18568 constructor(value) { 18569 super(value); 18570 } 18571 applyPeer(node, reset) { 18572 if (reset) { 18573 getUINativeModule().timepicker.resetTimepickerDateTimeOptions(node); 18574 } 18575 else { 18576 getUINativeModule().timepicker.setTimepickerDateTimeOptions(node, this.value.hour, this.value.minute, this.value.second); 18577 } 18578 } 18579} 18580TimepickerDateTimeOptionsModifier.identity = Symbol('timepickerDateTimeOptions'); 18581 18582// @ts-ignore 18583if (globalThis.TimePicker !== undefined) { 18584 globalThis.TimePicker.attributeModifier = function (modifier) { 18585 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18586 return new ArkTimePickerComponent(nativePtr); 18587 }, (nativePtr, classType, modifierJS) => { 18588 return new modifierJS.TimePickerModifier(nativePtr, classType); 18589 }); 18590 }; 18591} 18592 18593/// <reference path='./import.ts' /> 18594class ArkTextPickerComponent extends ArkComponent { 18595 constructor(nativePtr, classType) { 18596 super(nativePtr, classType); 18597 } 18598 defaultPickerItemHeight(value) { 18599 modifierWithKey(this._modifiersWithKeys, TextpickerDefaultPickerItemHeightModifier.identity, TextpickerDefaultPickerItemHeightModifier, value); 18600 return this; 18601 } 18602 canLoop(value) { 18603 modifierWithKey(this._modifiersWithKeys, TextpickerCanLoopModifier.identity, TextpickerCanLoopModifier, value); 18604 return this; 18605 } 18606 disappearTextStyle(value) { 18607 modifierWithKey(this._modifiersWithKeys, TextpickerDisappearTextStyleModifier.identity, TextpickerDisappearTextStyleModifier, value); 18608 return this; 18609 } 18610 textStyle(value) { 18611 modifierWithKey(this._modifiersWithKeys, TextpickerTextStyleModifier.identity, TextpickerTextStyleModifier, value); 18612 return this; 18613 } 18614 selectedTextStyle(value) { 18615 modifierWithKey(this._modifiersWithKeys, TextpickerSelectedTextStyleModifier.identity, TextpickerSelectedTextStyleModifier, value); 18616 return this; 18617 } 18618 onAccept(callback) { 18619 throw new Error('Method not implemented.'); 18620 } 18621 onCancel(callback) { 18622 throw new Error('Method not implemented.'); 18623 } 18624 onChange(callback) { 18625 throw new Error('Method not implemented.'); 18626 } 18627 selectedIndex(value) { 18628 modifierWithKey(this._modifiersWithKeys, TextpickerSelectedIndexModifier.identity, TextpickerSelectedIndexModifier, value); 18629 return this; 18630 } 18631 divider(value) { 18632 modifierWithKey(this._modifiersWithKeys, TextpickerDividerModifier.identity, TextpickerDividerModifier, value); 18633 return this; 18634 } 18635 gradientHeight(value) { 18636 modifierWithKey(this._modifiersWithKeys, TextpickerGradientHeightModifier.identity, TextpickerGradientHeightModifier, value); 18637 return this; 18638 } 18639} 18640class TextpickerCanLoopModifier extends ModifierWithKey { 18641 constructor(value) { 18642 super(value); 18643 } 18644 applyPeer(node, reset) { 18645 if (reset) { 18646 getUINativeModule().textpicker.resetCanLoop(node); 18647 } 18648 else { 18649 getUINativeModule().textpicker.setCanLoop(node, this.value); 18650 } 18651 } 18652} 18653TextpickerCanLoopModifier.identity = Symbol('textpickerCanLoop'); 18654class TextpickerSelectedIndexModifier extends ModifierWithKey { 18655 constructor(value) { 18656 super(value); 18657 } 18658 applyPeer(node, reset) { 18659 if (reset) { 18660 getUINativeModule().textpicker.resetSelectedIndex(node); 18661 } 18662 else { 18663 getUINativeModule().textpicker.setSelectedIndex(node, this.value); 18664 } 18665 } 18666 checkObjectDiff() { 18667 if (Array.isArray(this.stageValue) && Array.isArray(this.value)) { 18668 return !deepCompareArrays(this.stageValue, this.value); 18669 } 18670 else if (Array.isArray(this.stageValue) || Array.isArray(this.value)) { 18671 return true; 18672 } 18673 else { 18674 return this.stageValue !== this.value; 18675 } 18676 } 18677} 18678TextpickerSelectedIndexModifier.identity = Symbol('textpickerSelectedIndex'); 18679class TextpickerDividerModifier extends ModifierWithKey { 18680 constructor(value) { 18681 super(value); 18682 } 18683 applyPeer(node, reset) { 18684 var _a, _b, _c, _d; 18685 if (reset) { 18686 getUINativeModule().textpicker.resetDivider(node); 18687 } 18688 else { 18689 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); 18690 } 18691 } 18692 checkObjectDiff() { 18693 var _a, _b, _c, _d, _e, _f, _g, _h; 18694 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 18695 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 18696 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 18697 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 18698 } 18699} 18700TextpickerDividerModifier.identity = Symbol('textpickerDivider'); 18701 18702class TextpickerGradientHeightModifier extends ModifierWithKey { 18703 constructor(value) { 18704 super(value); 18705 } 18706 applyPeer(node, reset) { 18707 if (reset) { 18708 getUINativeModule().textpicker.resetGradientHeight(node); 18709 } 18710 else { 18711 getUINativeModule().textpicker.setGradientHeight(node, this.value); 18712 } 18713 } 18714 checkObjectDiff() { 18715 return !isBaseOrResourceEqual(this.stageValue, this.value); 18716 } 18717} 18718TextpickerGradientHeightModifier.identity = Symbol('textpickerGradientHeight'); 18719class TextpickerTextStyleModifier extends ModifierWithKey { 18720 constructor(value) { 18721 super(value); 18722 } 18723 applyPeer(node, reset) { 18724 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 18725 if (reset) { 18726 getUINativeModule().textpicker.resetTextStyle(node); 18727 } 18728 else { 18729 getUINativeModule().textpicker.setTextStyle(node, (_b = (_a = this.value) === null || 18730 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, (_e = 18731 (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 18732 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = 18733 (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 18734 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 18735 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 18736 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 18737 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 18738 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 18739 } 18740 } 18741 checkObjectDiff() { 18742 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 18743 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 18744 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 18745 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 18746 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 18747 return true; 18748 } 18749 else { 18750 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 18751 _k === void 0 ? void 0 : _k.color) || 18752 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 18753 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 18754 _p === void 0 ? void 0 : _p.size) || 18755 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 18756 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 18757 _t === void 0 ? void 0 : _t.family); 18758 } 18759 } 18760} 18761TextpickerTextStyleModifier.identity = Symbol('textpickerTextStyle'); 18762class TextpickerSelectedTextStyleModifier extends ModifierWithKey { 18763 constructor(value) { 18764 super(value); 18765 } 18766 applyPeer(node, reset) { 18767 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 18768 if (reset) { 18769 getUINativeModule().textpicker.resetSelectedTextStyle(node); 18770 } 18771 else { 18772 getUINativeModule().textpicker.setSelectedTextStyle(node, (_b = 18773 (_a = this.value) === null || _a === void 0 ? void 0 : _a.color) !== null && 18774 _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || 18775 _c === void 0 ? void 0 : _c.font) === null || 18776 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 18777 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 18778 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 18779 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 18780 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 18781 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 18782 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 18783 } 18784 } 18785 checkObjectDiff() { 18786 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 18787 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 18788 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 18789 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 18790 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 18791 return true; 18792 } 18793 else { 18794 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 18795 _k === void 0 ? void 0 : _k.color) || 18796 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 18797 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 18798 _p === void 0 ? void 0 : _p.size) || 18799 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 18800 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 18801 _t === void 0 ? void 0 : _t.family); 18802 } 18803 } 18804} 18805TextpickerSelectedTextStyleModifier.identity = Symbol('textpickerSelectedTextStyle'); 18806class TextpickerDisappearTextStyleModifier extends ModifierWithKey { 18807 constructor(value) { 18808 super(value); 18809 } 18810 applyPeer(node, reset) { 18811 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 18812 if (reset) { 18813 getUINativeModule().textpicker.resetDisappearTextStyle(node); 18814 } 18815 else { 18816 getUINativeModule().textpicker.setDisappearTextStyle(node, (_b = 18817 (_a = this.value) === null || _a === void 0 ? void 0 : _a.color) !== null && 18818 _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || 18819 _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.size) !== null && 18820 _e !== void 0 ? _e : undefined, (_h = (_g = (_f = this.value) === null || 18821 _f === void 0 ? void 0 : _f.font) === null || _g === void 0 ? void 0 : _g.weight) !== null && 18822 _h !== void 0 ? _h : undefined, (_l = (_k = (_j = this.value) === null || 18823 _j === void 0 ? void 0 : _j.font) === null || _k === void 0 ? void 0 : _k.family) !== null && 18824 _l !== void 0 ? _l : undefined, (_p = (_o = (_m = this.value) === null || 18825 _m === void 0 ? void 0 : _m.font) === null || _o === void 0 ? void 0 : _o.style) !== null && 18826 _p !== void 0 ? _p : undefined); 18827 } 18828 } 18829 checkObjectDiff() { 18830 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 18831 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) && 18832 ((_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))) { 18833 return true; 18834 } 18835 else { 18836 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || _k === void 0 ? void 0 : _k.color) || 18837 !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) || 18838 !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); 18839 } 18840 } 18841} 18842TextpickerDisappearTextStyleModifier.identity = Symbol('textpickerDisappearTextStyle'); 18843class TextpickerDefaultPickerItemHeightModifier extends ModifierWithKey { 18844 constructor(value) { 18845 super(value); 18846 } 18847 applyPeer(node, reset) { 18848 if (reset) { 18849 getUINativeModule().textpicker.resetDefaultPickerItemHeight(node); 18850 } 18851 else { 18852 getUINativeModule().textpicker.setDefaultPickerItemHeight(node, this.value); 18853 } 18854 } 18855} 18856TextpickerDefaultPickerItemHeightModifier.identity = Symbol('textpickerDefaultPickerItemHeight'); 18857// @ts-ignore 18858if (globalThis.TextPicker !== undefined) { 18859 globalThis.TextPicker.attributeModifier = function (modifier) { 18860 attributeModifierFunc.call(this, modifier, (nativePtr) => { 18861 return new ArkTextPickerComponent(nativePtr); 18862 }, (nativePtr, classType, modifierJS) => { 18863 return new modifierJS.TextPickerModifier(nativePtr, classType); 18864 }); 18865 }; 18866} 18867 18868/// <reference path='./import.ts' /> 18869class ArkSliderComponent extends ArkComponent { 18870 constructor(nativePtr, classType) { 18871 super(nativePtr, classType); 18872 } 18873 blockColor(value) { 18874 modifierWithKey(this._modifiersWithKeys, BlockColorModifier.identity, BlockColorModifier, value); 18875 return this; 18876 } 18877 trackColor(value) { 18878 modifierWithKey(this._modifiersWithKeys, TrackColorModifier.identity, TrackColorModifier, value); 18879 return this; 18880 } 18881 selectedColor(value) { 18882 modifierWithKey(this._modifiersWithKeys, SelectColorModifier.identity, SelectColorModifier, value); 18883 return this; 18884 } 18885 minLabel(value) { 18886 throw new Error('Method not implemented.'); 18887 } 18888 maxLabel(value) { 18889 throw new Error('Method not implemented.'); 18890 } 18891 showSteps(value) { 18892 modifierWithKey(this._modifiersWithKeys, ShowStepsModifier.identity, ShowStepsModifier, value); 18893 return this; 18894 } 18895 showTips(value, content) { 18896 let showTips = new ArkSliderTips(value, content); 18897 modifierWithKey(this._modifiersWithKeys, ShowTipsModifier.identity, ShowTipsModifier, showTips); 18898 return this; 18899 } 18900 trackThickness(value) { 18901 modifierWithKey(this._modifiersWithKeys, TrackThicknessModifier.identity, TrackThicknessModifier, value); 18902 return this; 18903 } 18904 onChange(callback) { 18905 throw new Error('Method not implemented.'); 18906 } 18907 blockBorderColor(value) { 18908 modifierWithKey(this._modifiersWithKeys, BlockBorderColorModifier.identity, BlockBorderColorModifier, value); 18909 return this; 18910 } 18911 blockBorderWidth(value) { 18912 modifierWithKey(this._modifiersWithKeys, BlockBorderWidthModifier.identity, BlockBorderWidthModifier, value); 18913 return this; 18914 } 18915 stepColor(value) { 18916 modifierWithKey(this._modifiersWithKeys, StepColorModifier.identity, StepColorModifier, value); 18917 return this; 18918 } 18919 trackBorderRadius(value) { 18920 modifierWithKey(this._modifiersWithKeys, TrackBorderRadiusModifier.identity, TrackBorderRadiusModifier, value); 18921 return this; 18922 } 18923 selectedBorderRadius(value) { 18924 modifierWithKey(this._modifiersWithKeys, SelectedBorderRadiusModifier.identity, SelectedBorderRadiusModifier, value); 18925 return this; 18926 } 18927 blockSize(value) { 18928 modifierWithKey(this._modifiersWithKeys, BlockSizeModifier.identity, BlockSizeModifier, value); 18929 return this; 18930 } 18931 blockStyle(value) { 18932 modifierWithKey(this._modifiersWithKeys, BlockStyleModifier.identity, BlockStyleModifier, value); 18933 return this; 18934 } 18935 stepSize(value) { 18936 modifierWithKey(this._modifiersWithKeys, StepSizeModifier.identity, StepSizeModifier, value); 18937 return this; 18938 } 18939 sliderInteractionMode(value) { 18940 modifierWithKey(this._modifiersWithKeys, InteractionModeModifier.identity, InteractionModeModifier, value); 18941 return this; 18942 } 18943 minResponsiveDistance(value) { 18944 modifierWithKey(this._modifiersWithKeys, MinResponsiveDistanceModifier.identity, MinResponsiveDistanceModifier, value); 18945 return this; 18946 } 18947 contentModifier(value) { 18948 modifierWithKey(this._modifiersWithKeys, SliderContentModifier.identity, SliderContentModifier, value); 18949 return this; 18950 } 18951 slideRange(value) { 18952 modifierWithKey(this._modifiersWithKeys, ValidSlideRangeModifier.identity, ValidSlideRangeModifier, value); 18953 return this; 18954 } 18955 setContentModifier(modifier) { 18956 if (modifier === undefined || modifier === null) { 18957 getUINativeModule().slider.setContentModifierBuilder(this.nativePtr, false); 18958 return; 18959 } 18960 this.needRebuild = false; 18961 if (this.builder !== modifier.applyContent()) { 18962 this.needRebuild = true; 18963 } 18964 this.builder = modifier.applyContent(); 18965 this.modifier = modifier; 18966 getUINativeModule().slider.setContentModifierBuilder(this.nativePtr, this); 18967 } 18968 makeContentModifierNode(context, sliderConfiguration) { 18969 sliderConfiguration.contentModifier = this.modifier; 18970 if (isUndefined(this.sliderNode) || this.needRebuild) { 18971 const xNode = globalThis.requireNapi('arkui.node'); 18972 this.sliderNode = new xNode.BuilderNode(context); 18973 this.sliderNode.build(this.builder, sliderConfiguration); 18974 this.needRebuild = false; 18975 } else { 18976 this.sliderNode.update(sliderConfiguration); 18977 } 18978 return this.sliderNode.getFrameNode(); 18979 } 18980} 18981class BlockStyleModifier extends ModifierWithKey { 18982 constructor(value) { 18983 super(value); 18984 } 18985 applyPeer(node, reset) { 18986 if (reset) { 18987 getUINativeModule().slider.resetBlockStyle(node); 18988 } 18989 else { 18990 getUINativeModule().slider.setBlockStyle(node, this.value); 18991 } 18992 } 18993 checkObjectDiff() { 18994 return !(this.stageValue.type === this.value.type && 18995 this.stageValue.image === this.value.image && 18996 this.stageValue.shape === this.value.shape); 18997 } 18998} 18999BlockStyleModifier.identity = Symbol('sliderBlockStyle'); 19000class ShowTipsModifier extends ModifierWithKey { 19001 constructor(value) { 19002 super(value); 19003 } 19004 applyPeer(node, reset) { 19005 let _a; 19006 if (reset) { 19007 getUINativeModule().slider.resetShowTips(node); 19008 } 19009 else { 19010 getUINativeModule().slider.setShowTips(node, this.value.showTip, (_a = this.value) === null || _a === void 0 ? void 0 : _a.tipText); 19011 } 19012 } 19013 checkObjectDiff() { 19014 let showTipDiff = this.stageValue.showTip !== this.value.showTip; 19015 let tipTextDiff = !isBaseOrResourceEqual(this.stageValue.tipText, this.value.tipText); 19016 return showTipDiff || tipTextDiff; 19017 } 19018} 19019ShowTipsModifier.identity = Symbol('sliderShowTips'); 19020class StepSizeModifier extends ModifierWithKey { 19021 constructor(value) { 19022 super(value); 19023 } 19024 applyPeer(node, reset) { 19025 if (reset) { 19026 getUINativeModule().slider.resetStepSize(node); 19027 } 19028 else { 19029 getUINativeModule().slider.setStepSize(node, this.value); 19030 } 19031 } 19032 checkObjectDiff() { 19033 return !isBaseOrResourceEqual(this.stageValue, this.value); 19034 } 19035} 19036StepSizeModifier.identity = Symbol('sliderStepSize'); 19037class BlockSizeModifier extends ModifierWithKey { 19038 constructor(value) { 19039 super(value); 19040 } 19041 applyPeer(node, reset) { 19042 if (reset) { 19043 getUINativeModule().slider.resetBlockSize(node); 19044 } 19045 else { 19046 getUINativeModule().slider.setBlockSize(node, this.value.width, this.value.height); 19047 } 19048 } 19049 checkObjectDiff() { 19050 if (isResource(this.stageValue.height) && isResource(this.value.height) && isResource(this.stageValue.width) && isResource(this.value.width)) { 19051 return !(isResourceEqual(this.stageValue.height, this.value.height) && isResourceEqual(this.stageValue.width, this.value.width)); 19052 } 19053 else { 19054 return true; 19055 } 19056 } 19057} 19058BlockSizeModifier.identity = Symbol('sliderBlockSize'); 19059class TrackBorderRadiusModifier extends ModifierWithKey { 19060 constructor(value) { 19061 super(value); 19062 } 19063 applyPeer(node, reset) { 19064 if (reset) { 19065 getUINativeModule().slider.resetTrackBorderRadius(node); 19066 } 19067 else { 19068 getUINativeModule().slider.setTrackBorderRadius(node, this.value); 19069 } 19070 } 19071 checkObjectDiff() { 19072 return !isBaseOrResourceEqual(this.stageValue, this.value); 19073 } 19074} 19075TrackBorderRadiusModifier.identity = Symbol('sliderTrackBorderRadius'); 19076class StepColorModifier extends ModifierWithKey { 19077 constructor(value) { 19078 super(value); 19079 } 19080 applyPeer(node, reset) { 19081 if (reset) { 19082 getUINativeModule().slider.resetStepColor(node); 19083 } 19084 else { 19085 getUINativeModule().slider.setStepColor(node, this.value); 19086 } 19087 } 19088 checkObjectDiff() { 19089 return !isBaseOrResourceEqual(this.stageValue, this.value); 19090 } 19091} 19092StepColorModifier.identity = Symbol('sliderStepColor'); 19093class BlockBorderColorModifier extends ModifierWithKey { 19094 constructor(value) { 19095 super(value); 19096 } 19097 applyPeer(node, reset) { 19098 if (reset) { 19099 getUINativeModule().slider.resetBlockBorderColor(node); 19100 } 19101 else { 19102 getUINativeModule().slider.setBlockBorderColor(node, this.value); 19103 } 19104 } 19105 checkObjectDiff() { 19106 return !isBaseOrResourceEqual(this.stageValue, this.value); 19107 } 19108} 19109BlockBorderColorModifier.identity = Symbol('sliderBlockBorderColor'); 19110class BlockBorderWidthModifier extends ModifierWithKey { 19111 constructor(value) { 19112 super(value); 19113 } 19114 applyPeer(node, reset) { 19115 if (reset) { 19116 getUINativeModule().slider.resetBlockBorderWidth(node); 19117 } 19118 else { 19119 getUINativeModule().slider.setBlockBorderWidth(node, this.value); 19120 } 19121 } 19122 checkObjectDiff() { 19123 return !isBaseOrResourceEqual(this.stageValue, this.value); 19124 } 19125} 19126BlockBorderWidthModifier.identity = Symbol('sliderBlockBorderWidth'); 19127class BlockColorModifier extends ModifierWithKey { 19128 constructor(value) { 19129 super(value); 19130 } 19131 applyPeer(node, reset) { 19132 if (reset) { 19133 getUINativeModule().slider.resetBlockColor(node); 19134 } 19135 else { 19136 getUINativeModule().slider.setBlockColor(node, this.value); 19137 } 19138 } 19139 checkObjectDiff() { 19140 return !isBaseOrResourceEqual(this.stageValue, this.value); 19141 } 19142} 19143BlockColorModifier.identity = Symbol('sliderBlockColor'); 19144class TrackColorModifier extends ModifierWithKey { 19145 constructor(value) { 19146 super(value); 19147 } 19148 applyPeer(node, reset) { 19149 if (reset) { 19150 getUINativeModule().slider.resetTrackBackgroundColor(node); 19151 } 19152 else { 19153 getUINativeModule().slider.setTrackBackgroundColor(node, this.value); 19154 } 19155 } 19156 checkObjectDiff() { 19157 return !isBaseOrResourceEqual(this.stageValue, this.value); 19158 } 19159} 19160TrackColorModifier.identity = Symbol('sliderTrackColor'); 19161class SelectColorModifier extends ModifierWithKey { 19162 constructor(value) { 19163 super(value); 19164 } 19165 applyPeer(node, reset) { 19166 if (reset) { 19167 getUINativeModule().slider.resetSelectColor(node); 19168 } 19169 else { 19170 getUINativeModule().slider.setSelectColor(node, this.value); 19171 } 19172 } 19173 checkObjectDiff() { 19174 return !isBaseOrResourceEqual(this.stageValue, this.value); 19175 } 19176} 19177SelectColorModifier.identity = Symbol('sliderSelectColor'); 19178class ShowStepsModifier extends ModifierWithKey { 19179 constructor(value) { 19180 super(value); 19181 } 19182 applyPeer(node, reset) { 19183 if (reset) { 19184 getUINativeModule().slider.resetShowSteps(node); 19185 } 19186 else { 19187 getUINativeModule().slider.setShowSteps(node, this.value); 19188 } 19189 } 19190 checkObjectDiff() { 19191 return this.stageValue !== this.value; 19192 } 19193} 19194ShowStepsModifier.identity = Symbol('sliderShowSteps'); 19195class TrackThicknessModifier extends ModifierWithKey { 19196 constructor(value) { 19197 super(value); 19198 } 19199 applyPeer(node, reset) { 19200 if (reset) { 19201 getUINativeModule().slider.resetThickness(node); 19202 } 19203 else { 19204 getUINativeModule().slider.setThickness(node, this.value); 19205 } 19206 } 19207 checkObjectDiff() { 19208 return !isBaseOrResourceEqual(this.stageValue, this.value); 19209 } 19210} 19211TrackThicknessModifier.identity = Symbol('sliderTrackThickness'); 19212class ValidSlideRangeModifier extends ModifierWithKey { 19213 constructor(value) { 19214 super(value); 19215 } 19216 applyPeer(node, reset) { 19217 if (reset) { 19218 getUINativeModule().slider.resetValidSlideRange(node); 19219 } else { 19220 getUINativeModule().slider.setValidSlideRange(node, this.value); 19221 } 19222 } 19223 checkObjectDiff() { 19224 return !isBaseOrResourceEqual(this.stageValue, this.value); 19225 } 19226} 19227ValidSlideRangeModifier.identity = Symbol('slideRange'); 19228class SelectedBorderRadiusModifier extends ModifierWithKey { 19229 constructor(value) { 19230 super(value); 19231 } 19232 applyPeer(node, reset) { 19233 if (reset) { 19234 getUINativeModule().slider.resetSelectedBorderRadius(node); 19235 } else { 19236 getUINativeModule().slider.setSelectedBorderRadius(node, this.value); 19237 } 19238 } 19239 checkObjectDiff() { 19240 return !isBaseOrResourceEqual(this.stageValue, this.value); 19241 } 19242} 19243SelectedBorderRadiusModifier.identity = Symbol('sliderSelectedBorderRadius'); 19244class InteractionModeModifier extends ModifierWithKey { 19245 constructor(value) { 19246 super(value); 19247 } 19248 applyPeer(node, reset) { 19249 if (reset) { 19250 getUINativeModule().slider.resetInteractionMode(node); 19251 } else { 19252 getUINativeModule().slider.setInteractionMode(node, this.value); 19253 } 19254 } 19255 checkObjectDiff() { 19256 return !isBaseOrResourceEqual(this.stageValue, this.value); 19257 } 19258} 19259InteractionModeModifier.identity = Symbol('sliderInteractionMode'); 19260class MinResponsiveDistanceModifier extends ModifierWithKey { 19261 constructor(value) { 19262 super(value); 19263 } 19264 applyPeer(node, reset) { 19265 if (reset) { 19266 getUINativeModule().slider.resetMinResponsiveDistance(node); 19267 } else { 19268 getUINativeModule().slider.setMinResponsiveDistance(node, this.value); 19269 } 19270 } 19271 checkObjectDiff() { 19272 return !isBaseOrResourceEqual(this.stageValue, this.value); 19273 } 19274} 19275MinResponsiveDistanceModifier.identity = Symbol('sliderMinResponsiveDistance'); 19276class SliderContentModifier extends ModifierWithKey { 19277 constructor(value) { 19278 super(value); 19279 } 19280 applyPeer(nodenode, reset, component) { 19281 let sliderComponent = component; 19282 sliderComponent.setContentModifier(this.value); 19283 } 19284} 19285SliderContentModifier.identity = Symbol('sliderContentModifier'); 19286// @ts-ignore 19287if (globalThis.Slider !== undefined) { 19288 globalThis.Slider.attributeModifier = function (modifier) { 19289 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19290 return new ArkSliderComponent(nativePtr); 19291 }, (nativePtr, classType, modifierJS) => { 19292 return new modifierJS.SliderModifier(nativePtr, classType); 19293 }); 19294 }; 19295 globalThis.Slider.contentModifier = function (modifier) { 19296 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 19297 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 19298 let component = this.createOrGetNode(elmtId, () => { 19299 return new ArkSliderComponent(nativeNode); 19300 }); 19301 component.setContentModifier(modifier); 19302 }; 19303} 19304 19305/// <reference path='./import.ts' /> 19306class RatingStarsModifier extends ModifierWithKey { 19307 constructor(value) { 19308 super(value); 19309 } 19310 applyPeer(node, reset) { 19311 if (reset) { 19312 getUINativeModule().rating.resetStars(node); 19313 } 19314 else { 19315 getUINativeModule().rating.setStars(node, this.value); 19316 } 19317 } 19318} 19319RatingStarsModifier.identity = Symbol('ratingStars'); 19320class RatingStepSizeModifier extends ModifierWithKey { 19321 constructor(value) { 19322 super(value); 19323 } 19324 applyPeer(node, reset) { 19325 if (reset) { 19326 getUINativeModule().rating.resetStepSize(node); 19327 } 19328 else { 19329 getUINativeModule().rating.setStepSize(node, this.value); 19330 } 19331 } 19332} 19333RatingStepSizeModifier.identity = Symbol('ratingStepSize'); 19334class RatingStarStyleModifier extends ModifierWithKey { 19335 constructor(value) { 19336 super(value); 19337 } 19338 applyPeer(node, reset) { 19339 let _a, _b, _c; 19340 if (reset) { 19341 getUINativeModule().rating.resetStarStyle(node); 19342 } 19343 else { 19344 getUINativeModule().rating.setStarStyle(node, (_a = this.value) === null || 19345 _a === void 0 ? void 0 : _a.backgroundUri, (_b = this.value) === null || 19346 _b === void 0 ? void 0 : _b.foregroundUri, (_c = this.value) === null || 19347 _c === void 0 ? void 0 : _c.secondaryUri); 19348 } 19349 } 19350 checkObjectDiff() { 19351 let _a, _b, _c, _d, _e, _f; 19352 return ((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.backgroundUri) !== 19353 ((_b = this.value) === null || _b === void 0 ? void 0 : _b.backgroundUri) || 19354 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.foregroundUri) !== 19355 ((_d = this.value) === null || _d === void 0 ? void 0 : _d.foregroundUri) || 19356 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.secondaryUri) !== 19357 ((_f = this.value) === null || _f === void 0 ? void 0 : _f.secondaryUri); 19358 } 19359} 19360RatingStarStyleModifier.identity = Symbol('ratingStarStyle'); 19361class RatingContentModifier extends ModifierWithKey { 19362 constructor(value) { 19363 super(value); 19364 } 19365 applyPeer(node, reset, component) { 19366 let ratingComponent = component; 19367 ratingComponent.setContentModifier(this.value); 19368 } 19369} 19370RatingStarStyleModifier.identity = Symbol('ratingContentModifier'); 19371class ArkRatingComponent extends ArkComponent { 19372 constructor(nativePtr, classType) { 19373 super(nativePtr, classType); 19374 } 19375 stars(value) { 19376 modifierWithKey(this._modifiersWithKeys, RatingStarsModifier.identity, RatingStarsModifier, value); 19377 return this; 19378 } 19379 stepSize(value) { 19380 modifierWithKey(this._modifiersWithKeys, RatingStepSizeModifier.identity, RatingStepSizeModifier, value); 19381 return this; 19382 } 19383 starStyle(value) { 19384 let starStyle = new ArkStarStyle(); 19385 if (!isUndefined(value)) { 19386 starStyle.backgroundUri = value.backgroundUri; 19387 starStyle.foregroundUri = value.foregroundUri; 19388 starStyle.secondaryUri = value.secondaryUri; 19389 modifierWithKey(this._modifiersWithKeys, RatingStarStyleModifier.identity, RatingStarStyleModifier, value); 19390 } 19391 else { 19392 modifierWithKey(this._modifiersWithKeys, RatingStarStyleModifier.identity, RatingStarStyleModifier, undefined); 19393 } 19394 return this; 19395 } 19396 onChange(callback) { 19397 throw new Error('Method not implemented.'); 19398 } 19399 contentModifier(value) { 19400 modifierWithKey(this._modifiersWithKeys, RatingContentModifier.identity, RatingContentModifier, value); 19401 return this; 19402 } 19403 setContentModifier(modifier) { 19404 if (modifier === undefined || modifier === null) { 19405 getUINativeModule().rating.setContentModifierBuilder(this.nativePtr, false); 19406 return; 19407 } 19408 this.needRebuild = false; 19409 if (this.builder !== modifier.applyContent()) { 19410 this.needRebuild = true; 19411 } 19412 this.builder = modifier.applyContent(); 19413 this.modifier = modifier; 19414 getUINativeModule().rating.setContentModifierBuilder(this.nativePtr, this); 19415 } 19416 makeContentModifierNode(context, ratingConfiguration) { 19417 ratingConfiguration.contentModifier = this.modifier; 19418 if (isUndefined(this.ratingNode) || this.needRebuild) { 19419 const xNode = globalThis.requireNapi('arkui.node'); 19420 this.ratingNode = new xNode.BuilderNode(context); 19421 this.ratingNode.build(this.builder, ratingConfiguration); 19422 this.needRebuild = false; 19423 } else { 19424 this.ratingNode.update(ratingConfiguration); 19425 } 19426 return this.ratingNode.getFrameNode(); 19427 } 19428} 19429// @ts-ignore 19430if (globalThis.Rating !== undefined) { 19431 globalThis.Rating.attributeModifier = function (modifier) { 19432 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19433 return new ArkRatingComponent(nativePtr); 19434 }, (nativePtr, classType, modifierJS) => { 19435 return new modifierJS.RatingModifier(nativePtr, classType); 19436 }); 19437 }; 19438 globalThis.Rating.contentModifier = function (modifier) { 19439 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 19440 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 19441 let component = this.createOrGetNode(elmtId, () => { 19442 return new ArkRatingComponent(nativeNode); 19443 }); 19444 component.setContentModifier(modifier); 19445 }; 19446} 19447 19448/// <reference path='./import.ts' /> 19449class ArkCheckboxComponent extends ArkComponent { 19450 constructor(nativePtr, classType) { 19451 super(nativePtr, classType); 19452 } 19453 shape(value) { 19454 modifierWithKey(this._modifiersWithKeys, CheckBoxShapeModifier.identity, CheckBoxShapeModifier, value); 19455 return this; 19456 } 19457 width(value) { 19458 modifierWithKey(this._modifiersWithKeys, CheckboxWidthModifier.identity, CheckboxWidthModifier, value); 19459 return this; 19460 } 19461 height(value) { 19462 modifierWithKey(this._modifiersWithKeys, CheckboxHeightModifier.identity, CheckboxHeightModifier, value); 19463 return this; 19464 } 19465 select(value) { 19466 modifierWithKey(this._modifiersWithKeys, CheckboxSelectModifier.identity, CheckboxSelectModifier, value); 19467 return this; 19468 } 19469 selectedColor(value) { 19470 modifierWithKey(this._modifiersWithKeys, CheckboxSelectedColorModifier.identity, CheckboxSelectedColorModifier, value); 19471 return this; 19472 } 19473 unselectedColor(value) { 19474 modifierWithKey(this._modifiersWithKeys, CheckboxUnselectedColorModifier.identity, CheckboxUnselectedColorModifier, value); 19475 return this; 19476 } 19477 mark(value) { 19478 modifierWithKey(this._modifiersWithKeys, CheckboxMarkModifier.identity, CheckboxMarkModifier, value); 19479 return this; 19480 } 19481 padding(value) { 19482 let arkValue = new ArkPadding(); 19483 if (value !== null && value !== undefined) { 19484 if (isLengthType(value) || isResource(value)) { 19485 arkValue.top = value; 19486 arkValue.right = value; 19487 arkValue.bottom = value; 19488 arkValue.left = value; 19489 } 19490 else { 19491 arkValue.top = value.top; 19492 arkValue.right = value.right; 19493 arkValue.bottom = value.bottom; 19494 arkValue.left = value.left; 19495 } 19496 modifierWithKey(this._modifiersWithKeys, CheckBoxPaddingModifier.identity, CheckBoxPaddingModifier, arkValue); 19497 } 19498 else { 19499 modifierWithKey(this._modifiersWithKeys, CheckBoxPaddingModifier.identity, CheckBoxPaddingModifier, undefined); 19500 } 19501 return this; 19502 } 19503 size(value) { 19504 modifierWithKey(this._modifiersWithKeys, CheckBoxSizeModifier.identity, CheckBoxSizeModifier, value); 19505 return this; 19506 } 19507 responseRegion(value) { 19508 modifierWithKey(this._modifiersWithKeys, CheckBoxResponseRegionModifier.identity, CheckBoxResponseRegionModifier, value); 19509 return this; 19510 } 19511 contentModifier(value) { 19512 modifierWithKey(this._modifiersWithKeys, CheckBoxContentModifier.identity, CheckBoxContentModifier, value); 19513 return this; 19514 } 19515 setContentModifier(modifier) { 19516 if (modifier === undefined || modifier === null) { 19517 getUINativeModule().checkbox.setContentModifierBuilder(this.nativePtr, false); 19518 return; 19519 } 19520 this.needRebuild = false; 19521 if (this.builder !== modifier.applyContent()) { 19522 this.needRebuild = true; 19523 } 19524 this.builder = modifier.applyContent(); 19525 this.modifier = modifier; 19526 getUINativeModule().checkbox.setContentModifierBuilder(this.nativePtr, this); 19527 } 19528 makeContentModifierNode(context, checkBoxConfiguration) { 19529 checkBoxConfiguration.contentModifier = this.modifier; 19530 if (isUndefined(this.checkboxNode) || this.needRebuild) { 19531 const xNode = globalThis.requireNapi('arkui.node'); 19532 this.checkboxNode = new xNode.BuilderNode(context); 19533 this.checkboxNode.build(this.builder, checkBoxConfiguration); 19534 this.needRebuild = false; 19535 } else { 19536 this.checkboxNode.update(checkBoxConfiguration); 19537 } 19538 return this.checkboxNode.getFrameNode(); 19539 } 19540 onChange(callback) { 19541 throw new Error('Method not implemented.'); 19542 } 19543} 19544class CheckBoxResponseRegionModifier extends ModifierWithKey { 19545 constructor(value) { 19546 super(value); 19547 } 19548 applyPeer(node, reset) { 19549 let _a, _b, _c, _d, _e, _f, _g, _h; 19550 if (reset) { 19551 getUINativeModule().checkbox.resetCheckboxResponseRegion(node); 19552 } 19553 else { 19554 let responseRegion = []; 19555 if (Array.isArray(this.value)) { 19556 for (let i = 0; i < this.value.length; i++) { 19557 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 19558 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 19559 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 19560 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 19561 } 19562 } 19563 else { 19564 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 19565 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 19566 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 19567 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 19568 } 19569 getUINativeModule().checkbox.setCheckboxResponseRegion(node, responseRegion, responseRegion.length); 19570 } 19571 } 19572 checkObjectDiff() { 19573 if (Array.isArray(this.value) && Array.isArray(this.stageValue)) { 19574 if (this.value.length !== this.stageValue.length) { 19575 return true; 19576 } 19577 else { 19578 for (let i = 0; i < this.value.length; i++) { 19579 if (!(isBaseOrResourceEqual(this.stageValue[i].x, this.value[i].x) && 19580 isBaseOrResourceEqual(this.stageValue[i].y, this.value[i].y) && 19581 isBaseOrResourceEqual(this.stageValue[i].width, this.value[i].width) && 19582 isBaseOrResourceEqual(this.stageValue[i].height, this.value[i].height))) { 19583 return true; 19584 } 19585 } 19586 return false; 19587 } 19588 } 19589 else if (!Array.isArray(this.value) && !Array.isArray(this.stageValue)) { 19590 return (!(isBaseOrResourceEqual(this.stageValue.x, this.value.x) && 19591 isBaseOrResourceEqual(this.stageValue.y, this.value.y) && 19592 isBaseOrResourceEqual(this.stageValue.width, this.value.width) && 19593 isBaseOrResourceEqual(this.stageValue.height, this.value.height))); 19594 } 19595 else { 19596 return true; 19597 } 19598 } 19599} 19600CheckBoxResponseRegionModifier.identity = Symbol('responseRegion'); 19601class CheckBoxContentModifier extends ModifierWithKey { 19602 constructor(value) { 19603 super(value); 19604 } 19605 applyPeer(node, reset, component) { 19606 let checkboxComponent = component; 19607 checkboxComponent.setContentModifier(this.value); 19608 } 19609} 19610CheckBoxContentModifier.identity = Symbol('checkBoxContentModifier'); 19611class CheckBoxShapeModifier extends ModifierWithKey { 19612 constructor(value) { 19613 super(value); 19614 } 19615 applyPeer(node, reset) { 19616 if (reset) { 19617 getUINativeModule().checkbox.resetCheckboxShape(node); 19618 } else { 19619 getUINativeModule().checkbox.setCheckboxShape(node, this.value); 19620 } 19621 } 19622 19623 checkObjectDiff() { 19624 return !isBaseOrResourceEqual(this.stageValue, this.value); 19625 } 19626} 19627CheckBoxShapeModifier.identity = Symbol('checkboxShape'); 19628class CheckBoxSizeModifier extends ModifierWithKey { 19629 constructor(value) { 19630 super(value); 19631 } 19632 applyPeer(node, reset) { 19633 if (reset) { 19634 getUINativeModule().checkbox.resetCheckboxSize(node); 19635 } 19636 else { 19637 getUINativeModule().checkbox.setCheckboxSize(node, this.value.width, this.value.height); 19638 } 19639 } 19640 checkObjectDiff() { 19641 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 19642 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 19643 } 19644} 19645CheckBoxSizeModifier.identity = Symbol('size'); 19646class CheckBoxPaddingModifier extends ModifierWithKey { 19647 constructor(value) { 19648 super(value); 19649 } 19650 applyPeer(node, reset) { 19651 if (reset) { 19652 getUINativeModule().checkbox.resetCheckboxPadding(node); 19653 } 19654 else { 19655 getUINativeModule().checkbox.setCheckboxPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 19656 } 19657 } 19658 checkObjectDiff() { 19659 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 19660 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 19661 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 19662 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 19663 } 19664} 19665CheckBoxPaddingModifier.identity = Symbol('padding'); 19666class CheckboxMarkModifier extends ModifierWithKey { 19667 constructor(value) { 19668 super(value); 19669 } 19670 applyPeer(node, reset) { 19671 let _a, _b, _c; 19672 if (reset) { 19673 getUINativeModule().checkbox.resetMark(node); 19674 } 19675 else { 19676 getUINativeModule().checkbox.setMark(node, (_a = this.value) === null || 19677 _a === void 0 ? void 0 : _a.strokeColor, (_b = this.value) === null || 19678 _b === void 0 ? void 0 : _b.size, (_c = this.value) === null || 19679 _c === void 0 ? void 0 : _c.strokeWidth); 19680 } 19681 } 19682 checkObjectDiff() { 19683 let colorEQ = isBaseOrResourceEqual(this.stageValue.strokeColor, this.value.strokeColor); 19684 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 19685 let widthEQ = isBaseOrResourceEqual(this.stageValue.strokeWidth, this.value.strokeWidth); 19686 return !colorEQ || !sizeEQ || !widthEQ; 19687 } 19688} 19689CheckboxMarkModifier.identity = Symbol('checkboxMark'); 19690class CheckboxSelectModifier extends ModifierWithKey { 19691 constructor(value) { 19692 super(value); 19693 } 19694 applyPeer(node, reset) { 19695 if (reset) { 19696 getUINativeModule().checkbox.resetSelect(node); 19697 } 19698 else { 19699 getUINativeModule().checkbox.setSelect(node, this.value); 19700 } 19701 } 19702 checkObjectDiff() { 19703 return this.stageValue !== this.value; 19704 } 19705} 19706CheckboxSelectModifier.identity = Symbol('checkboxSelect'); 19707class CheckboxHeightModifier extends ModifierWithKey { 19708 constructor(value) { 19709 super(value); 19710 } 19711 applyPeer(node, reset) { 19712 if (reset) { 19713 getUINativeModule().checkbox.resetHeight(node); 19714 } 19715 else { 19716 getUINativeModule().checkbox.setHeight(node, this.value); 19717 } 19718 } 19719 checkObjectDiff() { 19720 return !isBaseOrResourceEqual(this.stageValue, this.value); 19721 } 19722} 19723CheckboxHeightModifier.identity = Symbol('checkboxHeight'); 19724class CheckboxWidthModifier extends ModifierWithKey { 19725 constructor(value) { 19726 super(value); 19727 } 19728 applyPeer(node, reset) { 19729 if (reset) { 19730 getUINativeModule().checkbox.resetWidth(node); 19731 } 19732 else { 19733 getUINativeModule().checkbox.setWidth(node, this.value); 19734 } 19735 } 19736 checkObjectDiff() { 19737 return !isBaseOrResourceEqual(this.stageValue, this.value); 19738 } 19739} 19740CheckboxWidthModifier.identity = Symbol('checkboxWidth'); 19741class CheckboxSelectedColorModifier extends ModifierWithKey { 19742 constructor(value) { 19743 super(value); 19744 } 19745 applyPeer(node, reset) { 19746 if (reset) { 19747 getUINativeModule().checkbox.resetSelectedColor(node); 19748 } 19749 else { 19750 getUINativeModule().checkbox.setSelectedColor(node, this.value); 19751 } 19752 } 19753 checkObjectDiff() { 19754 return !isBaseOrResourceEqual(this.stageValue, this.value); 19755 } 19756} 19757CheckboxSelectedColorModifier.identity = Symbol('checkboxSelectedColor'); 19758class CheckboxUnselectedColorModifier extends ModifierWithKey { 19759 constructor(value) { 19760 super(value); 19761 } 19762 applyPeer(node, reset) { 19763 if (reset) { 19764 getUINativeModule().checkbox.resetUnSelectedColor(node); 19765 } 19766 else { 19767 getUINativeModule().checkbox.setUnSelectedColor(node, this.value); 19768 } 19769 } 19770 checkObjectDiff() { 19771 return !isBaseOrResourceEqual(this.stageValue, this.value); 19772 } 19773} 19774CheckboxUnselectedColorModifier.identity = Symbol('checkboxUnselectedColor'); 19775// @ts-ignore 19776if (globalThis.Checkbox !== undefined) { 19777 globalThis.Checkbox.attributeModifier = function (modifier) { 19778 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19779 return new ArkCheckboxComponent(nativePtr); 19780 }, (nativePtr, classType, modifierJS) => { 19781 return new modifierJS.CheckboxModifier(nativePtr, classType); 19782 }); 19783 }; 19784 globalThis.Checkbox.contentModifier = function (modifier) { 19785 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 19786 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 19787 let component = this.createOrGetNode(elmtId, () => { 19788 return new ArkCheckboxComponent(nativeNode); 19789 }); 19790 component.setContentModifier(modifier); 19791 }; 19792} 19793 19794/// <reference path='./import.ts' /> 19795class ArkNavDestinationComponent extends ArkComponent { 19796 constructor(nativePtr, classType) { 19797 super(nativePtr, classType); 19798 } 19799 title(value, options) { 19800 let arkNavigationTitle = new ArkNavigationTitle(); 19801 if (!isUndefined(options) && !isNull(options) && isObject(options)) { 19802 if (Object.keys(options).length !== 0) { 19803 arkNavigationTitle.navigationTitleOptions = options; 19804 } 19805 } 19806 modifierWithKey(this._modifiersWithKeys, NavDestinationTitleModifier.identity, 19807 NavDestinationTitleModifier, arkNavigationTitle); 19808 return this; 19809 } 19810 hideTitleBar(isHide, animated) { 19811 let arkNavDestinationHideTitleBar = new ArkNavHideTitleBarOrToolBar(); 19812 if (!isUndefined(isHide) && !isNull(isHide)) { 19813 arkNavDestinationHideTitleBar.isHide = isHide; 19814 } 19815 if (!isUndefined(animated) && !isNull(animated)) { 19816 arkNavDestinationHideTitleBar.animated = animated; 19817 } 19818 if (arkNavDestinationHideTitleBar.isHide === undefined && arkNavDestinationHideTitleBar.animated === undefined) { 19819 modifierWithKey(this._modifiersWithKeys, HideTitleBarModifier.identity, HideTitleBarModifier, undefined); 19820 } else { 19821 modifierWithKey(this._modifiersWithKeys, HideTitleBarModifier.identity, HideTitleBarModifier, arkNavDestinationHideTitleBar); 19822 } 19823 return this; 19824 } 19825 hideToolBar(isHide, animated) { 19826 let arkNavDestinationHideToolBar = new ArkNavHideTitleBarOrToolBar(); 19827 if (!isUndefined(isHide) && !isNull(isHide)) { 19828 arkNavDestinationHideToolBar.isHide = isHide; 19829 } 19830 if (!isUndefined(animated) && !isNull(animated)) { 19831 arkNavDestinationHideToolBar.animated = animated; 19832 } 19833 if (arkNavDestinationHideToolBar.isHide === undefined && arkNavDestinationHideToolBar.animated === undefined) { 19834 modifierWithKey(this._modifiersWithKeys, NavDestinationHideToolBarModifier.identity, 19835 NavDestinationHideToolBarModifier, undefined); 19836 } else { 19837 modifierWithKey(this._modifiersWithKeys, NavDestinationHideToolBarModifier.identity, 19838 NavDestinationHideToolBarModifier, arkNavDestinationHideToolBar); 19839 } 19840 return this; 19841 } 19842 toolbarConfiguration(value) { 19843 throw new Error('Method not implemented.'); 19844 } 19845 backButtonIcon(value) { 19846 modifierWithKey(this._modifiersWithKeys, NavDestinationBackButtonIconModifier.identity, 19847 NavDestinationBackButtonIconModifier, value); 19848 return this; 19849 } 19850 mode(value) { 19851 modifierWithKey(this._modifiersWithKeys, NavDestinationModeModifier.identity, 19852 NavDestinationModeModifier, value); 19853 return this; 19854 } 19855 onShown(callback) { 19856 throw new Error('Method not implemented.'); 19857 } 19858 onHidden(callback) { 19859 throw new Error('Method not implemented.'); 19860 } 19861 onBackPressed(callback) { 19862 throw new Error('Method not implemented.'); 19863 } 19864 ignoreLayoutSafeArea(types, edges) { 19865 let opts = new ArkSafeAreaExpandOpts(); 19866 if (types && types.length >= 0) { 19867 let safeAreaType = ''; 19868 for (let param of types) { 19869 if (!isNumber(param) || param >= SAFE_AREA_TYPE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 19870 safeAreaType = undefined; 19871 break; 19872 } 19873 if (safeAreaType) { 19874 safeAreaType += '|'; 19875 safeAreaType += param.toString(); 19876 } 19877 else { 19878 safeAreaType += param.toString(); 19879 } 19880 } 19881 opts.type = safeAreaType; 19882 } 19883 if (edges && edges.length >= 0) { 19884 let safeAreaEdge = ''; 19885 for (let param of edges) { 19886 if (!isNumber(param) || param >= SAFE_AREA_EDGE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 19887 safeAreaEdge = undefined; 19888 break; 19889 } 19890 if (safeAreaEdge) { 19891 safeAreaEdge += '|'; 19892 safeAreaEdge += param.toString(); 19893 } 19894 else { 19895 safeAreaEdge += param.toString(); 19896 } 19897 } 19898 opts.edges = safeAreaEdge; 19899 } 19900 if (opts.type === undefined && opts.edges === undefined) { 19901 modifierWithKey(this._modifiersWithKeys, IgnoreLayoutSafeAreaModifier.identity, IgnoreLayoutSafeAreaModifier, undefined); 19902 } 19903 else { 19904 modifierWithKey(this._modifiersWithKeys, IgnoreLayoutSafeAreaModifier.identity, IgnoreLayoutSafeAreaModifier, opts); 19905 } 19906 return this; 19907 } 19908} 19909class HideTitleBarModifier extends ModifierWithKey { 19910 constructor(value) { 19911 super(value); 19912 } 19913 applyPeer(node, reset) { 19914 if (reset) { 19915 getUINativeModule().navDestination.resetHideTitleBar(node); 19916 } 19917 else { 19918 getUINativeModule().navDestination.setHideTitleBar(node, this.value?.isHide, this.value?.animated); 19919 } 19920 } 19921} 19922HideTitleBarModifier.identity = Symbol('hideTitleBar'); 19923 19924class NavDestinationHideToolBarModifier extends ModifierWithKey { 19925 constructor(value) { 19926 super(value); 19927 } 19928 applyPeer(node, reset) { 19929 if (reset) { 19930 getUINativeModule().navDestination.resetHideToolBar(node); 19931 } 19932 else { 19933 getUINativeModule().navDestination.setHideToolBar(node, this.value?.isHide, this.value?.animated); 19934 } 19935 } 19936} 19937NavDestinationHideToolBarModifier.identity = Symbol('hideToolBar'); 19938 19939class IgnoreLayoutSafeAreaModifier extends ModifierWithKey { 19940 constructor(value) { 19941 super(value); 19942 } 19943 applyPeer(node, reset) { 19944 if (reset) { 19945 getUINativeModule().navDestination.resetIgnoreLayoutSafeArea(node); 19946 } 19947 else { 19948 getUINativeModule().navDestination.setIgnoreLayoutSafeArea(node, this.value.type, this.value.edges); 19949 } 19950 } 19951 checkObjectDiff() { 19952 return !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 19953 !isBaseOrResourceEqual(this.stageValue.edges, this.value.edges); 19954 } 19955} 19956IgnoreLayoutSafeAreaModifier.identity = Symbol('ignoreLayoutSafeArea'); 19957 19958class NavDestinationTitleModifier extends ModifierWithKey { 19959 constructor(value) { 19960 super(value); 19961 } 19962 applyPeer(node, reset) { 19963 if (reset) { 19964 getUINativeModule().navDestination.resetTitle(node); 19965 } else { 19966 getUINativeModule().navDestination.setTitle(node, this.value?.navigationTitleOptions); 19967 } 19968 } 19969 checkObjectDiff() { 19970 return !this.value.isEqual(this.stageValue); 19971 } 19972} 19973NavDestinationTitleModifier.identity = Symbol('title'); 19974 19975//@ts-ignore 19976if (globalThis.NavDestination !== undefined) { 19977 globalThis.NavDestination.attributeModifier = function (modifier) { 19978 attributeModifierFunc.call(this, modifier, (nativePtr) => { 19979 return new ArkNavDestinationComponent(nativePtr); 19980 }, (nativePtr, classType, modifierJS) => { 19981 return new modifierJS.NavDestinationModifier(nativePtr, classType); 19982 }); 19983 }; 19984} 19985 19986/// <reference path='./import.ts' /> 19987class ArkCounterComponent extends ArkComponent { 19988 constructor(nativePtr, classType) { 19989 super(nativePtr, classType); 19990 } 19991 onInc(event) { 19992 throw new Error('Method not implemented.'); 19993 } 19994 onDec(event) { 19995 throw new Error('Method not implemented.'); 19996 } 19997 enableDec(value) { 19998 modifierWithKey(this._modifiersWithKeys, EnableDecModifier.identity, EnableDecModifier, value); 19999 return this; 20000 } 20001 enableInc(value) { 20002 modifierWithKey(this._modifiersWithKeys, EnableIncModifier.identity, EnableIncModifier, value); 20003 return this; 20004 } 20005 backgroundColor(value) { 20006 modifierWithKey(this._modifiersWithKeys, CounterBackgroundColorModifier.identity, CounterBackgroundColorModifier, value); 20007 return this; 20008 } 20009 width(value) { 20010 modifierWithKey(this._modifiersWithKeys, CounterWidthModifier.identity, CounterWidthModifier, value); 20011 return this; 20012 } 20013 height(value) { 20014 modifierWithKey(this._modifiersWithKeys, CounterHeightModifier.identity, CounterHeightModifier, value); 20015 return this; 20016 } 20017 size(value) { 20018 modifierWithKey(this._modifiersWithKeys, CounterSizeModifier.identity, CounterSizeModifier, value); 20019 return this; 20020 } 20021} 20022class CounterHeightModifier extends ModifierWithKey { 20023 constructor(value) { 20024 super(value); 20025 } 20026 applyPeer(node, reset) { 20027 if (reset) { 20028 getUINativeModule().counter.resetCounterHeight(node); 20029 } 20030 else { 20031 getUINativeModule().counter.setCounterHeight(node, this.value); 20032 } 20033 } 20034 checkObjectDiff() { 20035 return !isBaseOrResourceEqual(this.stageValue, this.value); 20036 } 20037} 20038CounterHeightModifier.identity = Symbol('CounterHeight'); 20039class CounterWidthModifier extends ModifierWithKey { 20040 constructor(value) { 20041 super(value); 20042 } 20043 applyPeer(node, reset) { 20044 if (reset) { 20045 getUINativeModule().counter.resetCounterWidth(node); 20046 } 20047 else { 20048 getUINativeModule().counter.setCounterWidth(node, this.value); 20049 } 20050 } 20051 checkObjectDiff() { 20052 return !isBaseOrResourceEqual(this.stageValue, this.value); 20053 } 20054} 20055CounterWidthModifier.identity = Symbol('CounterWidth'); 20056class CounterBackgroundColorModifier extends ModifierWithKey { 20057 constructor(value) { 20058 super(value); 20059 } 20060 applyPeer(node, reset) { 20061 if (reset) { 20062 getUINativeModule().counter.resetCounterBackgroundColor(node); 20063 } 20064 else { 20065 getUINativeModule().counter.setCounterBackgroundColor(node, this.value); 20066 } 20067 } 20068 checkObjectDiff() { 20069 return !isBaseOrResourceEqual(this.stageValue, this.value); 20070 } 20071} 20072CounterBackgroundColorModifier.identity = Symbol('CounterBackgroundColor'); 20073class CounterSizeModifier extends ModifierWithKey { 20074 constructor(value) { 20075 super(value); 20076 } 20077 applyPeer(node, reset) { 20078 if (reset) { 20079 getUINativeModule().counter.resetCounterSize(node); 20080 } 20081 else { 20082 getUINativeModule().counter.setCounterSize(node, this.value.width, this.value.height); 20083 } 20084 } 20085 checkObjectDiff() { 20086 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 20087 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 20088 } 20089} 20090CounterSizeModifier.identity = Symbol('CounterSize'); 20091class EnableIncModifier extends ModifierWithKey { 20092 constructor(value) { 20093 super(value); 20094 } 20095 applyPeer(node, reset) { 20096 if (reset) { 20097 getUINativeModule().counter.resetEnableInc(node); 20098 } 20099 else { 20100 getUINativeModule().counter.setEnableInc(node, this.value); 20101 } 20102 } 20103} 20104EnableIncModifier.identity = Symbol('enableInc'); 20105class EnableDecModifier extends ModifierWithKey { 20106 constructor(value) { 20107 super(value); 20108 } 20109 applyPeer(node, reset) { 20110 if (reset) { 20111 getUINativeModule().counter.resetEnableDec(node); 20112 } 20113 else { 20114 getUINativeModule().counter.setEnableDec(node, this.value); 20115 } 20116 } 20117} 20118EnableDecModifier.identity = Symbol('enableDec'); 20119// @ts-ignore 20120if (globalThis.Counter !== undefined) { 20121 globalThis.Counter.attributeModifier = function (modifier) { 20122 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20123 return new ArkCounterComponent(nativePtr); 20124 }, (nativePtr, classType, modifierJS) => { 20125 return new modifierJS.CounterModifier(nativePtr, classType); 20126 }); 20127 }; 20128} 20129 20130/// <reference path='./import.ts' /> 20131class CheckboxGroupSelectAllModifier extends ModifierWithKey { 20132 constructor(value) { 20133 super(value); 20134 } 20135 applyPeer(node, reset) { 20136 if (reset) { 20137 getUINativeModule().checkboxgroup.resetCheckboxGroupSelectAll(node); 20138 } 20139 else { 20140 getUINativeModule().checkboxgroup.setCheckboxGroupSelectAll(node, this.value); 20141 } 20142 } 20143} 20144CheckboxGroupSelectAllModifier.identity = Symbol('checkboxgroupSelectAll'); 20145class CheckboxGroupSelectedColorModifier extends ModifierWithKey { 20146 constructor(value) { 20147 super(value); 20148 } 20149 applyPeer(node, reset) { 20150 if (reset) { 20151 getUINativeModule().checkboxgroup.resetCheckboxGroupSelectedColor(node); 20152 } 20153 else { 20154 getUINativeModule().checkboxgroup.setCheckboxGroupSelectedColor(node, this.value); 20155 } 20156 } 20157 checkObjectDiff() { 20158 return !isBaseOrResourceEqual(this.stageValue, this.value); 20159 } 20160} 20161CheckboxGroupSelectedColorModifier.identity = Symbol('checkboxgroupSelectedColor'); 20162class CheckboxGroupUnselectedColorModifier extends ModifierWithKey { 20163 constructor(value) { 20164 super(value); 20165 } 20166 applyPeer(node, reset) { 20167 if (reset) { 20168 getUINativeModule().checkboxgroup.resetCheckboxGroupUnSelectedColor(node); 20169 } 20170 else { 20171 getUINativeModule().checkboxgroup.setCheckboxGroupUnSelectedColor(node, this.value); 20172 } 20173 } 20174 checkObjectDiff() { 20175 return !isBaseOrResourceEqual(this.stageValue, this.value); 20176 } 20177} 20178CheckboxGroupUnselectedColorModifier.identity = Symbol('checkboxgroupUnselectedColor'); 20179class CheckboxGroupMarkModifier extends ModifierWithKey { 20180 constructor(value) { 20181 super(value); 20182 } 20183 applyPeer(node, reset) { 20184 let _a, _b, _c; 20185 if (reset) { 20186 getUINativeModule().checkboxgroup.resetCheckboxGroupMark(node); 20187 } 20188 else { 20189 getUINativeModule().checkboxgroup.setCheckboxGroupMark(node, (_a = this.value) === null || 20190 _a === void 0 ? void 0 : _a.strokeColor, (_b = this.value) === null || 20191 _b === void 0 ? void 0 : _b.size, (_c = this.value) === null || 20192 _c === void 0 ? void 0 : _c.strokeWidth); 20193 } 20194 } 20195 checkObjectDiff() { 20196 let colorEQ = isBaseOrResourceEqual(this.stageValue.strokeColor, this.value.strokeColor); 20197 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 20198 let widthEQ = isBaseOrResourceEqual(this.stageValue.strokeWidth, this.value.strokeWidth); 20199 return !colorEQ || !sizeEQ || !widthEQ; 20200 } 20201} 20202CheckboxGroupMarkModifier.identity = Symbol('checkboxgroupMark'); 20203class CheckboxGroupWidthModifier extends ModifierWithKey { 20204 constructor(value) { 20205 super(value); 20206 } 20207 applyPeer(node, reset) { 20208 if (reset) { 20209 getUINativeModule().checkboxgroup.resetCheckboxGroupWidth(node); 20210 } 20211 else { 20212 getUINativeModule().checkboxgroup.setCheckboxGroupWidth(node, this.value); 20213 } 20214 } 20215 checkObjectDiff() { 20216 return !isBaseOrResourceEqual(this.stageValue, this.value); 20217 } 20218} 20219CheckboxGroupWidthModifier.identity = Symbol('checkboxGroupWidth'); 20220class CheckboxGroupSizeModifier extends ModifierWithKey { 20221 constructor(value) { 20222 super(value); 20223 } 20224 applyPeer(node, reset) { 20225 if (reset) { 20226 getUINativeModule().checkboxgroup.resetCheckboxGroupSize(node); 20227 } 20228 else { 20229 getUINativeModule().checkboxgroup.setCheckboxGroupSize(node, this.value.width, this.value.height); 20230 } 20231 } 20232 checkObjectDiff() { 20233 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 20234 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 20235 } 20236} 20237CheckboxGroupSizeModifier.identity = Symbol('checkboxGroupSize'); 20238class CheckboxGroupHeightModifier extends ModifierWithKey { 20239 constructor(value) { 20240 super(value); 20241 } 20242 applyPeer(node, reset) { 20243 if (reset) { 20244 getUINativeModule().checkboxgroup.resetCheckboxGroupHeight(node); 20245 } 20246 else { 20247 getUINativeModule().checkboxgroup.setCheckboxGroupHeight(node, this.value); 20248 } 20249 } 20250 checkObjectDiff() { 20251 return !isBaseOrResourceEqual(this.stageValue, this.value); 20252 } 20253} 20254CheckboxGroupHeightModifier.identity = Symbol('checkboxGroupHeight'); 20255class CheckboxGroupStyleModifier extends ModifierWithKey { 20256 constructor(value) { 20257 super(value); 20258 } 20259 applyPeer(node, reset) { 20260 if (reset) { 20261 getUINativeModule().checkboxgroup.resetCheckboxGroupStyle(node); 20262 } else { 20263 getUINativeModule().checkboxgroup.setCheckboxGroupStyle(node, this.value); 20264 } 20265 } 20266 20267 checkObjectDiff() { 20268 return !isBaseOrResourceEqual(this.stageValue, this.value); 20269 } 20270} 20271CheckboxGroupStyleModifier.identity = Symbol('checkboxgroupStyle'); 20272class ArkCheckboxGroupComponent extends ArkComponent { 20273 constructor(nativePtr, classType) { 20274 super(nativePtr, classType); 20275 } 20276 selectAll(value) { 20277 modifierWithKey(this._modifiersWithKeys, CheckboxGroupSelectAllModifier.identity, CheckboxGroupSelectAllModifier, value); 20278 return this; 20279 } 20280 selectedColor(value) { 20281 modifierWithKey(this._modifiersWithKeys, CheckboxGroupSelectedColorModifier.identity, CheckboxGroupSelectedColorModifier, value); 20282 return this; 20283 } 20284 unselectedColor(value) { 20285 modifierWithKey(this._modifiersWithKeys, CheckboxGroupUnselectedColorModifier.identity, CheckboxGroupUnselectedColorModifier, value); 20286 return this; 20287 } 20288 mark(value) { 20289 modifierWithKey(this._modifiersWithKeys, CheckboxGroupMarkModifier.identity, CheckboxGroupMarkModifier, value); 20290 return this; 20291 } 20292 onChange(callback) { 20293 throw new Error('Method not implemented.'); 20294 } 20295 size(value) { 20296 modifierWithKey(this._modifiersWithKeys, CheckboxGroupSizeModifier.identity, CheckboxGroupSizeModifier, value); 20297 return this; 20298 } 20299 width(value) { 20300 modifierWithKey(this._modifiersWithKeys, CheckboxGroupWidthModifier.identity, CheckboxGroupWidthModifier, value); 20301 return this; 20302 } 20303 height(value) { 20304 modifierWithKey(this._modifiersWithKeys, CheckboxGroupHeightModifier.identity, CheckboxGroupHeightModifier, value); 20305 return this; 20306 } 20307 checkboxShape(value) { 20308 modifierWithKey(this._modifiersWithKeys, CheckboxGroupStyleModifier.identity, CheckboxGroupStyleModifier, value); 20309 return this; 20310 } 20311} 20312// @ts-ignore 20313if (globalThis.CheckboxGroup !== undefined) { 20314 globalThis.CheckboxGroup.attributeModifier = function (modifier) { 20315 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20316 return new ArkCheckboxGroupComponent(nativePtr); 20317 }, (nativePtr, classType, modifierJS) => { 20318 return new modifierJS.CheckboxGroupModifier(nativePtr, classType); 20319 }); 20320 }; 20321} 20322 20323/// <reference path='./import.ts' /> 20324class ArkPanelComponent extends ArkComponent { 20325 constructor(nativePtr, classType) { 20326 super(nativePtr, classType); 20327 } 20328 mode(value) { 20329 modifierWithKey(this._modifiersWithKeys, PanelModeModifier.identity, PanelModeModifier, value); 20330 return this; 20331 } 20332 type(value) { 20333 modifierWithKey(this._modifiersWithKeys, PanelTypeModifier.identity, PanelTypeModifier, value); 20334 return this; 20335 } 20336 dragBar(value) { 20337 modifierWithKey(this._modifiersWithKeys, DragBarModifier.identity, DragBarModifier, value); 20338 return this; 20339 } 20340 customHeight(value) { 20341 modifierWithKey(this._modifiersWithKeys, PanelCustomHeightModifier.identity, PanelCustomHeightModifier, value); 20342 return this; 20343 } 20344 fullHeight(value) { 20345 modifierWithKey(this._modifiersWithKeys, PanelFullHeightModifier.identity, PanelFullHeightModifier, value); 20346 return this; 20347 } 20348 halfHeight(value) { 20349 modifierWithKey(this._modifiersWithKeys, PanelHalfHeightModifier.identity, PanelHalfHeightModifier, value); 20350 return this; 20351 } 20352 miniHeight(value) { 20353 modifierWithKey(this._modifiersWithKeys, PanelMiniHeightModifier.identity, PanelMiniHeightModifier, value); 20354 return this; 20355 } 20356 show(value) { 20357 modifierWithKey(this._modifiersWithKeys, ShowModifier.identity, ShowModifier, value); 20358 return this; 20359 } 20360 backgroundMask(color) { 20361 modifierWithKey(this._modifiersWithKeys, PanelBackgroundMaskModifier.identity, PanelBackgroundMaskModifier, color); 20362 return this; 20363 } 20364 showCloseIcon(value) { 20365 modifierWithKey(this._modifiersWithKeys, ShowCloseIconModifier.identity, ShowCloseIconModifier, value); 20366 return this; 20367 } 20368 onChange(event) { 20369 throw new Error('Method not implemented.'); 20370 } 20371 onHeightChange(callback) { 20372 throw new Error('Method not implemented.'); 20373 } 20374} 20375class PanelBackgroundMaskModifier extends ModifierWithKey { 20376 constructor(value) { 20377 super(value); 20378 } 20379 applyPeer(node, reset) { 20380 if (reset) { 20381 getUINativeModule().panel.resetPanelBackgroundMask(node); 20382 } 20383 else { 20384 getUINativeModule().panel.setPanelBackgroundMask(node, this.value); 20385 } 20386 } 20387 checkObjectDiff() { 20388 return !isBaseOrResourceEqual(this.stageValue, this.value); 20389 } 20390} 20391PanelBackgroundMaskModifier.identity = Symbol('panelBackgroundMask'); 20392class PanelModeModifier extends ModifierWithKey { 20393 constructor(value) { 20394 super(value); 20395 } 20396 applyPeer(node, reset) { 20397 if (reset) { 20398 getUINativeModule().panel.resetPanelMode(node); 20399 } 20400 else { 20401 getUINativeModule().panel.setPanelMode(node, this.value); 20402 } 20403 } 20404 checkObjectDiff() { 20405 return !isBaseOrResourceEqual(this.stageValue, this.value); 20406 } 20407} 20408PanelModeModifier.identity = Symbol('panelMode'); 20409class PanelTypeModifier extends ModifierWithKey { 20410 constructor(value) { 20411 super(value); 20412 } 20413 applyPeer(node, reset) { 20414 if (reset) { 20415 getUINativeModule().panel.resetPanelType(node); 20416 } 20417 else { 20418 getUINativeModule().panel.setPanelType(node, this.value); 20419 } 20420 } 20421 checkObjectDiff() { 20422 return !isBaseOrResourceEqual(this.stageValue, this.value); 20423 } 20424} 20425PanelTypeModifier.identity = Symbol('panelType'); 20426class PanelCustomHeightModifier extends ModifierWithKey { 20427 constructor(value) { 20428 super(value); 20429 } 20430 applyPeer(node, reset) { 20431 if (reset) { 20432 getUINativeModule().panel.resetPanelCustomHeight(node); 20433 } 20434 else { 20435 getUINativeModule().panel.setPanelCustomHeight(node, this.value); 20436 } 20437 } 20438 checkObjectDiff() { 20439 return !isBaseOrResourceEqual(this.stageValue, this.value); 20440 } 20441} 20442PanelCustomHeightModifier.identity = Symbol('panelCustomHeight'); 20443class PanelFullHeightModifier extends ModifierWithKey { 20444 constructor(value) { 20445 super(value); 20446 } 20447 applyPeer(node, reset) { 20448 if (reset) { 20449 getUINativeModule().panel.resetPanelFullHeight(node); 20450 } 20451 else { 20452 getUINativeModule().panel.setPanelFullHeight(node, this.value); 20453 } 20454 } 20455 checkObjectDiff() { 20456 return !isBaseOrResourceEqual(this.stageValue, this.value); 20457 } 20458} 20459PanelFullHeightModifier.identity = Symbol('panelFullHeight'); 20460class PanelHalfHeightModifier extends ModifierWithKey { 20461 constructor(value) { 20462 super(value); 20463 } 20464 applyPeer(node, reset) { 20465 if (reset) { 20466 getUINativeModule().panel.resetPanelHalfHeight(node); 20467 } 20468 else { 20469 getUINativeModule().panel.setPanelHalfHeight(node, this.value); 20470 } 20471 } 20472 checkObjectDiff() { 20473 return !isBaseOrResourceEqual(this.stageValue, this.value); 20474 } 20475} 20476PanelHalfHeightModifier.identity = Symbol('panelHalfHeight'); 20477class PanelMiniHeightModifier extends ModifierWithKey { 20478 constructor(value) { 20479 super(value); 20480 } 20481 applyPeer(node, reset) { 20482 if (reset) { 20483 getUINativeModule().panel.resetPanelMiniHeight(node); 20484 } 20485 else { 20486 getUINativeModule().panel.setPanelMiniHeight(node, this.value); 20487 } 20488 } 20489 checkObjectDiff() { 20490 return !isBaseOrResourceEqual(this.stageValue, this.value); 20491 } 20492} 20493PanelMiniHeightModifier.identity = Symbol('panelMiniHeight'); 20494class ShowCloseIconModifier extends ModifierWithKey { 20495 constructor(value) { 20496 super(value); 20497 } 20498 applyPeer(node, reset) { 20499 if (reset) { 20500 getUINativeModule().panel.resetShowCloseIcon(node); 20501 } 20502 else { 20503 getUINativeModule().panel.setShowCloseIcon(node, this.value); 20504 } 20505 } 20506 checkObjectDiff() { 20507 return !isBaseOrResourceEqual(this.stageValue, this.value); 20508 } 20509} 20510ShowCloseIconModifier.identity = Symbol('showCloseIcon'); 20511class DragBarModifier extends ModifierWithKey { 20512 constructor(value) { 20513 super(value); 20514 } 20515 applyPeer(node, reset) { 20516 if (reset) { 20517 getUINativeModule().panel.resetDragBar(node); 20518 } 20519 else { 20520 getUINativeModule().panel.setDragBar(node, this.value); 20521 } 20522 } 20523 checkObjectDiff() { 20524 return !isBaseOrResourceEqual(this.stageValue, this.value); 20525 } 20526} 20527DragBarModifier.identity = Symbol('dragBar'); 20528class ShowModifier extends ModifierWithKey { 20529 constructor(value) { 20530 super(value); 20531 } 20532 applyPeer(node, reset) { 20533 if (reset) { 20534 getUINativeModule().panel.resetShow(node); 20535 } 20536 else { 20537 getUINativeModule().panel.setShow(node, this.value); 20538 } 20539 } 20540 checkObjectDiff() { 20541 return !isBaseOrResourceEqual(this.stageValue, this.value); 20542 } 20543} 20544ShowModifier.identity = Symbol('show'); 20545// @ts-ignore 20546if (globalThis.Panel !== undefined) { 20547 globalThis.Panel.attributeModifier = function (modifier) { 20548 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20549 return new ArkPanelComponent(nativePtr); 20550 }, (nativePtr, classType, modifierJS) => { 20551 return new modifierJS.PanelModifier(nativePtr, classType); 20552 }); 20553 }; 20554} 20555 20556/// <reference path='./import.ts' /> 20557const TITLE_MODE_RANGE = 2; 20558const NAV_BAR_POSITION_RANGE = 1; 20559const NAVIGATION_MODE_RANGE = 2; 20560const DEFAULT_NAV_BAR_WIDTH = 240; 20561const MIN_NAV_BAR_WIDTH_DEFAULT = '240vp'; 20562const MAX_NAV_BAR_WIDTH_DEFAULT = '40%'; 20563const NAVIGATION_TITLE_MODE_DEFAULT = 0; 20564const DEFAULT_UNIT = 'vp'; 20565class ArkNavigationComponent extends ArkComponent { 20566 constructor(nativePtr, classType) { 20567 super(nativePtr, classType); 20568 } 20569 navBarWidth(value) { 20570 modifierWithKey(this._modifiersWithKeys, NavBarWidthModifier.identity, NavBarWidthModifier, value); 20571 return this; 20572 } 20573 navBarPosition(value) { 20574 modifierWithKey(this._modifiersWithKeys, NavBarPositionModifier.identity, NavBarPositionModifier, value); 20575 return this; 20576 } 20577 navBarWidthRange(value) { 20578 modifierWithKey(this._modifiersWithKeys, NavBarWidthRangeModifier.identity, NavBarWidthRangeModifier, value); 20579 return this; 20580 } 20581 minContentWidth(value) { 20582 modifierWithKey(this._modifiersWithKeys, MinContentWidthModifier.identity, MinContentWidthModifier, value); 20583 return this; 20584 } 20585 mode(value) { 20586 modifierWithKey(this._modifiersWithKeys, ModeModifier.identity, ModeModifier, value); 20587 return this; 20588 } 20589 backButtonIcon(value) { 20590 modifierWithKey(this._modifiersWithKeys, BackButtonIconModifier.identity, BackButtonIconModifier, value); 20591 return this; 20592 } 20593 hideNavBar(value) { 20594 modifierWithKey(this._modifiersWithKeys, HideNavBarModifier.identity, HideNavBarModifier, value); 20595 return this; 20596 } 20597 title(value, options) { 20598 let arkNavigationTitle = new ArkNavigationTitle(); 20599 if (!isUndefined(options) && !isNull(options) && isObject(options)) { 20600 if (Object.keys(options).length !== 0) { 20601 arkNavigationTitle.navigationTitleOptions = options; 20602 } 20603 } 20604 modifierWithKey(this._modifiersWithKeys, TitleModifier.identity, 20605 TitleModifier, arkNavigationTitle); 20606 return this; 20607 } 20608 subTitle(value) { 20609 modifierWithKey(this._modifiersWithKeys, SubTitleModifier.identity, SubTitleModifier, value); 20610 return this; 20611 } 20612 hideTitleBar(isHide, animated) { 20613 let arkNavigationHideTitleBar = new ArkNavHideTitleBarOrToolBar(); 20614 if (!isUndefined(isHide) && !isNull(isHide)) { 20615 arkNavigationHideTitleBar.isHide = isHide; 20616 } 20617 if (!isUndefined(animated) && !isNull(animated)) { 20618 arkNavigationHideTitleBar.animated = animated; 20619 } 20620 if (arkNavigationHideTitleBar.isHide === undefined && arkNavigationHideTitleBar.animated === undefined) { 20621 modifierWithKey(this._modifiersWithKeys, NavigationHideTitleBarModifier.identity, NavigationHideTitleBarModifier, undefined); 20622 } else { 20623 modifierWithKey(this._modifiersWithKeys, NavigationHideTitleBarModifier.identity, NavigationHideTitleBarModifier, arkNavigationHideTitleBar); 20624 } 20625 return this; 20626 } 20627 hideBackButton(value) { 20628 modifierWithKey(this._modifiersWithKeys, HideBackButtonModifier.identity, HideBackButtonModifier, value); 20629 return this; 20630 } 20631 titleMode(value) { 20632 modifierWithKey(this._modifiersWithKeys, TitleModeModifier.identity, TitleModeModifier, value); 20633 return this; 20634 } 20635 menus(value) { 20636 throw new Error('Method not implemented.'); 20637 } 20638 toolBar(value) { 20639 throw new Error('Method not implemented.'); 20640 } 20641 toolbarConfiguration(value) { 20642 throw new Error('Method not implemented.'); 20643 } 20644 hideToolBar(isHide, animated) { 20645 let arkNavigationHideToolBar = new ArkNavHideTitleBarOrToolBar(); 20646 if (!isUndefined(isHide) && !isNull(isHide)) { 20647 arkNavigationHideToolBar.isHide = isHide; 20648 } 20649 if (!isUndefined(animated) && !isNull(animated)) { 20650 arkNavigationHideToolBar.animated = animated; 20651 } 20652 if (arkNavigationHideToolBar.isHide === undefined && arkNavigationHideToolBar.animated === undefined) { 20653 modifierWithKey(this._modifiersWithKeys, HideToolBarModifier.identity, HideToolBarModifier, undefined); 20654 } else { 20655 modifierWithKey(this._modifiersWithKeys, HideToolBarModifier.identity, HideToolBarModifier, arkNavigationHideToolBar); 20656 } 20657 return this; 20658 } 20659 onTitleModeChange(callback) { 20660 throw new Error('Method not implemented.'); 20661 } 20662 onNavBarStateChange(callback) { 20663 throw new Error('Method not implemented.'); 20664 } 20665 onNavigationModeChange(callback) { 20666 throw new Error('Method not implemented.'); 20667 } 20668 navDestination(builder) { 20669 throw new Error('Method not implemented.'); 20670 } 20671 ignoreLayoutSafeArea(types, edges) { 20672 let opts = new ArkSafeAreaExpandOpts(); 20673 if (types && types.length >= 0) { 20674 let safeAreaType = ''; 20675 for (let param of types) { 20676 if (!isNumber(param) || param >= SAFE_AREA_TYPE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 20677 safeAreaType = undefined; 20678 break; 20679 } 20680 if (safeAreaType) { 20681 safeAreaType += '|'; 20682 safeAreaType += param.toString(); 20683 } 20684 else { 20685 safeAreaType += param.toString(); 20686 } 20687 } 20688 opts.type = safeAreaType; 20689 } 20690 if (edges && edges.length >= 0) { 20691 let safeAreaEdge = ''; 20692 for (let param of edges) { 20693 if (!isNumber(param) || param >= SAFE_AREA_EDGE_LIMIT || param < SAFE_AREA_LOWER_LIMIT) { 20694 safeAreaEdge = undefined; 20695 break; 20696 } 20697 if (safeAreaEdge) { 20698 safeAreaEdge += '|'; 20699 safeAreaEdge += param.toString(); 20700 } 20701 else { 20702 safeAreaEdge += param.toString(); 20703 } 20704 } 20705 opts.edges = safeAreaEdge; 20706 } 20707 if (opts.type === undefined && opts.edges === undefined) { 20708 modifierWithKey(this._modifiersWithKeys, IgnoreNavLayoutSafeAreaModifier.identity, IgnoreNavLayoutSafeAreaModifier, undefined); 20709 } 20710 else { 20711 modifierWithKey(this._modifiersWithKeys, IgnoreNavLayoutSafeAreaModifier.identity, IgnoreNavLayoutSafeAreaModifier, opts); 20712 } 20713 return this; 20714 } 20715} 20716class BackButtonIconModifier extends ModifierWithKey { 20717 constructor(value) { 20718 super(value); 20719 } 20720 applyPeer(node, reset) { 20721 if (reset) { 20722 getUINativeModule().navigation.resetBackButtonIcon(node); 20723 } 20724 else { 20725 getUINativeModule().navigation.setBackButtonIcon(node, this.value); 20726 } 20727 } 20728 checkObjectDiff() { 20729 return !isBaseOrResourceEqual(this.stageValue, this.value); 20730 } 20731} 20732BackButtonIconModifier.identity = Symbol('backButtonIcon'); 20733class NavBarWidthRangeModifier extends ModifierWithKey { 20734 constructor(value) { 20735 super(value); 20736 } 20737 applyPeer(node, reset) { 20738 if (reset) { 20739 getUINativeModule().navigation.resetNavBarWidthRange(node); 20740 } 20741 else { 20742 getUINativeModule().navigation.setNavBarWidthRange(node, this.value); 20743 } 20744 } 20745 checkObjectDiff() { 20746 return !isBaseOrResourceEqual(this.stageValue, this.value); 20747 } 20748} 20749NavBarWidthRangeModifier.identity = Symbol('navBarWidthRange'); 20750class MinContentWidthModifier extends ModifierWithKey { 20751 constructor(value) { 20752 super(value); 20753 } 20754 applyPeer(node, reset) { 20755 if (reset) { 20756 getUINativeModule().navigation.resetMinContentWidth(node); 20757 } 20758 else { 20759 getUINativeModule().navigation.setMinContentWidth(node, this.value); 20760 } 20761 } 20762 checkObjectDiff() { 20763 return !isBaseOrResourceEqual(this.stageValue, this.value); 20764 } 20765} 20766MinContentWidthModifier.identity = Symbol('minContentWidth'); 20767class NavBarWidthModifier extends ModifierWithKey { 20768 constructor(value) { 20769 super(value); 20770 } 20771 applyPeer(node, reset) { 20772 if (reset) { 20773 getUINativeModule().navigation.resetNavBarWidth(node); 20774 } 20775 else { 20776 getUINativeModule().navigation.setNavBarWidth(node, this.value); 20777 } 20778 } 20779 checkObjectDiff() { 20780 return !isBaseOrResourceEqual(this.stageValue, this.value); 20781 } 20782} 20783NavBarWidthModifier.identity = Symbol('navBarWidth'); 20784class NavBarPositionModifier extends ModifierWithKey { 20785 constructor(value) { 20786 super(value); 20787 } 20788 applyPeer(node, reset) { 20789 if (reset) { 20790 getUINativeModule().navigation.resetNavBarPosition(node); 20791 } 20792 else { 20793 getUINativeModule().navigation.setNavBarPosition(node, this.value); 20794 } 20795 } 20796} 20797NavBarPositionModifier.identity = Symbol('navBarPosition'); 20798class ModeModifier extends ModifierWithKey { 20799 constructor(value) { 20800 super(value); 20801 } 20802 static identity = Symbol('mode'); 20803 applyPeer(node, reset) { 20804 if (reset) { 20805 getUINativeModule().navigation.resetMode(node); 20806 } 20807 else { 20808 getUINativeModule().navigation.setMode(node, this.value); 20809 } 20810 } 20811} 20812class NavDestinationBackButtonIconModifier extends ModifierWithKey { 20813 constructor(value) { 20814 super(value); 20815 } 20816 static identity = Symbol('backButtonIcon'); 20817 applyPeer(node, reset) { 20818 if (reset) { 20819 getUINativeModule().navDestination.resetBackButtonIcon(node); 20820 } else { 20821 getUINativeModule().navDestination.setBackButtonIcon(node, this.value); 20822 } 20823 } 20824} 20825 20826class NavDestinationModeModifier extends ModifierWithKey { 20827 constructor(value) { 20828 super(value); 20829 } 20830 applyPeer(node, reset) { 20831 if (reset) { 20832 getUINativeModule().navDestination.resetMode(node); 20833 } 20834 else { 20835 getUINativeModule().navDestination.setMode(node, this.value); 20836 } 20837 } 20838} 20839NavDestinationModeModifier.identity = Symbol('mode'); 20840class HideToolBarModifier extends ModifierWithKey { 20841 constructor(value) { 20842 super(value); 20843 } 20844 applyPeer(node, reset) { 20845 if (reset) { 20846 getUINativeModule().navigation.resetHideToolBar(node); 20847 } 20848 else { 20849 getUINativeModule().navigation.setHideToolBar(node, this.value?.isHide, this.value?.animated); 20850 } 20851 } 20852} 20853HideToolBarModifier.identity = Symbol('hideToolBar'); 20854class TitleModeModifier extends ModifierWithKey { 20855 constructor(value) { 20856 super(value); 20857 } 20858 applyPeer(node, reset) { 20859 if (reset) { 20860 getUINativeModule().navigation.resetTitleMode(node); 20861 } 20862 else { 20863 getUINativeModule().navigation.setTitleMode(node, this.value); 20864 } 20865 } 20866} 20867TitleModeModifier.identity = Symbol('titleMode'); 20868class HideBackButtonModifier extends ModifierWithKey { 20869 constructor(value) { 20870 super(value); 20871 } 20872 applyPeer(node, reset) { 20873 if (reset) { 20874 getUINativeModule().navigation.resetHideBackButton(node); 20875 } 20876 else { 20877 getUINativeModule().navigation.setHideBackButton(node, this.value); 20878 } 20879 } 20880} 20881HideBackButtonModifier.identity = Symbol('hideBackButton'); 20882class SubTitleModifier extends ModifierWithKey { 20883 constructor(value) { 20884 super(value); 20885 } 20886 applyPeer(node, reset) { 20887 if (reset) { 20888 getUINativeModule().navigation.resetSubTitle(node); 20889 } 20890 else { 20891 getUINativeModule().navigation.setSubTitle(node, this.value); 20892 } 20893 } 20894} 20895SubTitleModifier.identity = Symbol('subTitle'); 20896class NavigationHideTitleBarModifier extends ModifierWithKey { 20897 constructor(value) { 20898 super(value); 20899 } 20900 applyPeer(node, reset) { 20901 if (reset) { 20902 getUINativeModule().navigation.resetHideTitleBar(node); 20903 } 20904 else { 20905 getUINativeModule().navigation.setHideTitleBar(node, this.value?.isHide, this.value?.animated); 20906 } 20907 } 20908} 20909NavigationHideTitleBarModifier.identity = Symbol('hideTitleBar'); 20910class HideNavBarModifier extends ModifierWithKey { 20911 constructor(value) { 20912 super(value); 20913 } 20914 applyPeer(node, reset) { 20915 if (reset) { 20916 getUINativeModule().navigation.resetHideNavBar(node); 20917 } 20918 else { 20919 getUINativeModule().navigation.setHideNavBar(node, this.value); 20920 } 20921 } 20922} 20923HideNavBarModifier.identity = Symbol('hideNavBar'); 20924class IgnoreNavLayoutSafeAreaModifier extends ModifierWithKey { 20925 constructor(value) { 20926 super(value); 20927 } 20928 applyPeer(node, reset) { 20929 if (reset) { 20930 getUINativeModule().navigation.resetIgnoreLayoutSafeArea(node); 20931 } 20932 else { 20933 getUINativeModule().navigation.setIgnoreLayoutSafeArea(node, this.value.type, this.value.edges); 20934 } 20935 } 20936 checkObjectDiff() { 20937 return !isBaseOrResourceEqual(this.stageValue.type, this.value.type) || 20938 !isBaseOrResourceEqual(this.stageValue.edges, this.value.edges); 20939 } 20940} 20941IgnoreNavLayoutSafeAreaModifier.identity = Symbol('ignoreLayoutSafeArea'); 20942 20943class TitleModifier extends ModifierWithKey { 20944 constructor(value) { 20945 super(value); 20946 } 20947 applyPeer(node, reset) { 20948 if (reset) { 20949 getUINativeModule().navigation.resetTitle(node); 20950 } else { 20951 getUINativeModule().navigation.setTitle(node, this.value?.navigationTitleOptions); 20952 } 20953 } 20954 checkObjectDiff() { 20955 return !this.value.isEqual(this.stageValue); 20956 } 20957} 20958TitleModifier.identity = Symbol('title'); 20959 20960// @ts-ignore 20961if (globalThis.Navigation !== undefined) { 20962 globalThis.Navigation.attributeModifier = function (modifier) { 20963 attributeModifierFunc.call(this, modifier, (nativePtr) => { 20964 return new ArkNavigationComponent(nativePtr); 20965 }, (nativePtr, classType, modifierJS) => { 20966 return new modifierJS.NavigationModifier(nativePtr, classType); 20967 }); 20968 }; 20969} 20970 20971/// <reference path='./import.ts' /> 20972class ArkNavRouterComponent extends ArkComponent { 20973 constructor(nativePtr, classType) { 20974 super(nativePtr, classType); 20975 } 20976 onStateChange(callback) { 20977 throw new Error('Method not implemented.'); 20978 } 20979 mode(mode) { 20980 modifierWithKey(this._modifiersWithKeys, NavRouterModeModifier.identity, NavRouterModeModifier, mode); 20981 return this; 20982 } 20983} 20984class NavRouterModeModifier extends ModifierWithKey { 20985 constructor(value) { 20986 super(value); 20987 } 20988 applyPeer(node, reset) { 20989 if (reset) { 20990 getUINativeModule().navRouter.resetMode(node); 20991 } 20992 else { 20993 getUINativeModule().navRouter.setMode(node, this.value); 20994 } 20995 } 20996} 20997NavRouterModeModifier.identity = Symbol('mode'); 20998// @ts-ignore 20999if (globalThis.NavRouter !== undefined) { 21000 globalThis.NavRouter.attributeModifier = function (modifier) { 21001 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21002 return new ArkNavRouterComponent(nativePtr); 21003 }, (nativePtr, classType, modifierJS) => { 21004 return new modifierJS.NavRouterModifier(nativePtr, classType); 21005 }); 21006 }; 21007} 21008 21009/// <reference path='./import.ts' /> 21010class ArkNavigatorComponent extends ArkComponent { 21011 constructor(nativePtr, classType) { 21012 super(nativePtr, classType); 21013 } 21014 active(value) { 21015 modifierWithKey(this._modifiersWithKeys, ActiveModifier.identity, ActiveModifier, value); 21016 return this; 21017 } 21018 type(value) { 21019 modifierWithKey(this._modifiersWithKeys, TypeModifier.identity, TypeModifier, value); 21020 return this; 21021 } 21022 target(value) { 21023 modifierWithKey(this._modifiersWithKeys, TargetModifier.identity, TargetModifier, value); 21024 return this; 21025 } 21026 params(value) { 21027 modifierWithKey(this._modifiersWithKeys, ParamsModifier.identity, ParamsModifier, JSON.stringify(value)); 21028 return this; 21029 } 21030} 21031class ParamsModifier extends ModifierWithKey { 21032 constructor(value) { 21033 super(value); 21034 } 21035 applyPeer(node, reset) { 21036 if (reset) { 21037 getUINativeModule().navigator.resetParams(node); 21038 } 21039 else { 21040 getUINativeModule().navigator.setParams(node, this.value); 21041 } 21042 } 21043} 21044ParamsModifier.identity = Symbol('params'); 21045class TypeModifier extends ModifierWithKey { 21046 constructor(value) { 21047 super(value); 21048 } 21049 applyPeer(node, reset) { 21050 if (reset) { 21051 getUINativeModule().navigator.resetType(node); 21052 } 21053 else { 21054 getUINativeModule().navigator.setType(node, this.value); 21055 } 21056 } 21057} 21058TypeModifier.identity = Symbol('type'); 21059class ActiveModifier extends ModifierWithKey { 21060 constructor(value) { 21061 super(value); 21062 } 21063 applyPeer(node, reset) { 21064 if (reset) { 21065 getUINativeModule().navigator.resetActive(node); 21066 } 21067 else { 21068 getUINativeModule().navigator.setActive(node, this.value); 21069 } 21070 } 21071} 21072ActiveModifier.identity = Symbol('active'); 21073class TargetModifier extends ModifierWithKey { 21074 constructor(value) { 21075 super(value); 21076 } 21077 applyPeer(node, reset) { 21078 if (reset) { 21079 getUINativeModule().navigator.resetTarget(node); 21080 } 21081 else { 21082 getUINativeModule().navigator.setTarget(node, this.value); 21083 } 21084 } 21085} 21086TargetModifier.identity = Symbol('target'); 21087// @ts-ignore 21088if (globalThis.Navigator !== undefined) { 21089 globalThis.Navigator.attributeModifier = function (modifier) { 21090 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21091 return new ArkNavigatorComponent(nativePtr); 21092 }, (nativePtr, classType, modifierJS) => { 21093 return new modifierJS.NavigatorModifier(nativePtr, classType); 21094 }); 21095 }; 21096} 21097 21098/// <reference path='./import.ts' /> 21099class ArkAlphabetIndexerComponent extends ArkComponent { 21100 constructor(nativePtr, classType) { 21101 super(nativePtr, classType); 21102 } 21103 onSelected(callback) { 21104 throw new Error('Method not implemented.'); 21105 } 21106 color(value) { 21107 modifierWithKey(this._modifiersWithKeys, ColorModifier.identity, ColorModifier, value); 21108 return this; 21109 } 21110 selectedColor(value) { 21111 modifierWithKey(this._modifiersWithKeys, SelectedColorModifier.identity, SelectedColorModifier, value); 21112 return this; 21113 } 21114 popupColor(value) { 21115 modifierWithKey(this._modifiersWithKeys, PopupColorModifier.identity, PopupColorModifier, value); 21116 return this; 21117 } 21118 selectedBackgroundColor(value) { 21119 modifierWithKey(this._modifiersWithKeys, SelectedBackgroundColorModifier.identity, SelectedBackgroundColorModifier, value); 21120 return this; 21121 } 21122 popupBackground(value) { 21123 modifierWithKey(this._modifiersWithKeys, PopupBackgroundModifier.identity, PopupBackgroundModifier, value); 21124 return this; 21125 } 21126 popupSelectedColor(value) { 21127 modifierWithKey(this._modifiersWithKeys, PopupSelectedColorModifier.identity, PopupSelectedColorModifier, value); 21128 return this; 21129 } 21130 popupUnselectedColor(value) { 21131 modifierWithKey(this._modifiersWithKeys, PopupUnselectedColorModifier.identity, PopupUnselectedColorModifier, value); 21132 return this; 21133 } 21134 popupItemBackgroundColor(value) { 21135 modifierWithKey(this._modifiersWithKeys, PopupItemBackgroundColorModifier.identity, PopupItemBackgroundColorModifier, value); 21136 return this; 21137 } 21138 usingPopup(value) { 21139 modifierWithKey(this._modifiersWithKeys, UsingPopupModifier.identity, UsingPopupModifier, value); 21140 return this; 21141 } 21142 selectedFont(value) { 21143 modifierWithKey(this._modifiersWithKeys, SelectedFontModifier.identity, SelectedFontModifier, value); 21144 return this; 21145 } 21146 popupFont(value) { 21147 modifierWithKey(this._modifiersWithKeys, PopupFontModifier.identity, PopupFontModifier, value); 21148 return this; 21149 } 21150 popupItemFont(value) { 21151 modifierWithKey(this._modifiersWithKeys, PopupItemFontModifier.identity, PopupItemFontModifier, value); 21152 return this; 21153 } 21154 itemSize(value) { 21155 modifierWithKey(this._modifiersWithKeys, ItemSizeModifier.identity, ItemSizeModifier, value); 21156 return this; 21157 } 21158 font(value) { 21159 modifierWithKey(this._modifiersWithKeys, AlphabetIndexerFontModifier.identity, AlphabetIndexerFontModifier, value); 21160 return this; 21161 } 21162 alignStyle(value, offset) { 21163 let alignStyle = new ArkAlignStyle; 21164 alignStyle.indexerAlign = value; 21165 alignStyle.offset = offset; 21166 modifierWithKey(this._modifiersWithKeys, AlignStyleModifier.identity, AlignStyleModifier, alignStyle); 21167 return this; 21168 } 21169 onSelect(callback) { 21170 throw new Error('Method not implemented.'); 21171 } 21172 onRequestPopupData(callback) { 21173 throw new Error('Method not implemented.'); 21174 } 21175 onPopupSelect(callback) { 21176 throw new Error('Method not implemented.'); 21177 } 21178 selected(index) { 21179 modifierWithKey(this._modifiersWithKeys, AlphabetIndexerSelectedModifier.identity, AlphabetIndexerSelectedModifier, index); 21180 return this; 21181 } 21182 popupPosition(value) { 21183 modifierWithKey(this._modifiersWithKeys, PopupPositionModifier.identity, PopupPositionModifier, value); 21184 return this; 21185 } 21186 popupItemBorderRadius(value) { 21187 modifierWithKey(this._modifiersWithKeys, PopupItemBorderRadiusModifier.identity, PopupItemBorderRadiusModifier, value); 21188 return this; 21189 } 21190 itemBorderRadius(value) { 21191 modifierWithKey(this._modifiersWithKeys, ItemBorderRadiusModifier.identity, ItemBorderRadiusModifier, value); 21192 return this; 21193 } 21194 popupBackgroundBlurStyle(value) { 21195 modifierWithKey(this._modifiersWithKeys, PopupBackgroundBlurStyleModifier.identity, PopupBackgroundBlurStyleModifier, value); 21196 return this; 21197 } 21198 popupTitleBackground(value) { 21199 modifierWithKey(this._modifiersWithKeys, PopupTitleBackgroundModifier.identity, PopupTitleBackgroundModifier, value); 21200 return this; 21201 } 21202 width(value) { 21203 modifierWithKey(this._modifiersWithKeys, AdaptiveWidthModifier.identity, AdaptiveWidthModifier, value); 21204 return this; 21205 } 21206 autoCollapse(value) { 21207 modifierWithKey(this._modifiersWithKeys, AutoCollapseModifier.identity, AutoCollapseModifier, value); 21208 return this; 21209 } 21210 enableHapticFeedback(value) { 21211 modifierWithKey(this._modifiersWithKeys, EnableHapticFeedbackModifier.identity, EnableHapticFeedbackModifier, value); 21212 return this; 21213 } 21214} 21215// @ts-ignore 21216if (globalThis.AlphabetIndexer !== undefined) { 21217 globalThis.AlphabetIndexer.attributeModifier = function (modifier) { 21218 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21219 return new ArkAlphabetIndexerComponent(nativePtr); 21220 }, (nativePtr, classType, modifierJS) => { 21221 return new modifierJS.AlphabetIndexerModifier(nativePtr, classType); 21222 }); 21223 }; 21224} 21225 21226class PopupItemFontModifier extends ModifierWithKey { 21227 constructor(value) { 21228 super(value); 21229 } 21230 applyPeer(node, reset) { 21231 if (reset) { 21232 getUINativeModule().alphabetIndexer.resetPopupItemFont(node); 21233 } 21234 else { 21235 getUINativeModule().alphabetIndexer.setPopupItemFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 21236 } 21237 } 21238 checkObjectDiff() { 21239 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 21240 let weightEQ = this.stageValue.weight === this.value.weight; 21241 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 21242 let styleEQ = this.stageValue.style === this.value.style; 21243 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 21244 } 21245} 21246PopupItemFontModifier.identity = Symbol('popupItemFont'); 21247class SelectedFontModifier extends ModifierWithKey { 21248 constructor(value) { 21249 super(value); 21250 } 21251 applyPeer(node, reset) { 21252 if (reset) { 21253 getUINativeModule().alphabetIndexer.resetSelectedFont(node); 21254 } 21255 else { 21256 getUINativeModule().alphabetIndexer.setSelectedFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 21257 } 21258 } 21259 checkObjectDiff() { 21260 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 21261 let weightEQ = this.stageValue.weight === this.value.weight; 21262 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 21263 let styleEQ = this.stageValue.style === this.value.style; 21264 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 21265 } 21266} 21267SelectedFontModifier.identity = Symbol('alphaBetIndexerSelectedFont'); 21268class PopupFontModifier extends ModifierWithKey { 21269 constructor(value) { 21270 super(value); 21271 } 21272 applyPeer(node, reset) { 21273 if (reset) { 21274 getUINativeModule().alphabetIndexer.resetPopupFont(node); 21275 } 21276 else { 21277 getUINativeModule().alphabetIndexer.setPopupFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 21278 } 21279 } 21280 checkObjectDiff() { 21281 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 21282 let weightEQ = this.stageValue.weight === this.value.weight; 21283 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 21284 let styleEQ = this.stageValue.style === this.value.style; 21285 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 21286 } 21287} 21288PopupFontModifier.identity = Symbol('popupFont'); 21289class AlphabetIndexerFontModifier extends ModifierWithKey { 21290 constructor(value) { 21291 super(value); 21292 } 21293 applyPeer(node, reset) { 21294 if (reset) { 21295 getUINativeModule().alphabetIndexer.resetFont(node); 21296 } 21297 else { 21298 getUINativeModule().alphabetIndexer.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 21299 } 21300 } 21301 checkObjectDiff() { 21302 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 21303 let weightEQ = this.stageValue.weight === this.value.weight; 21304 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 21305 let styleEQ = this.stageValue.style === this.value.style; 21306 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 21307 } 21308} 21309AlphabetIndexerFontModifier.identity = Symbol('alphaBetIndexerFont'); 21310class PopupItemBackgroundColorModifier extends ModifierWithKey { 21311 constructor(value) { 21312 super(value); 21313 } 21314 applyPeer(node, reset) { 21315 if (reset) { 21316 getUINativeModule().alphabetIndexer.resetPopupItemBackgroundColor(node); 21317 } 21318 else { 21319 getUINativeModule().alphabetIndexer.setPopupItemBackgroundColor(node, this.value); 21320 } 21321 } 21322 checkObjectDiff() { 21323 return !isBaseOrResourceEqual(this.stageValue, this.value); 21324 } 21325} 21326PopupItemBackgroundColorModifier.identity = Symbol('popupItemBackgroundColor'); 21327class ColorModifier extends ModifierWithKey { 21328 constructor(value) { 21329 super(value); 21330 } 21331 applyPeer(node, reset) { 21332 if (reset) { 21333 getUINativeModule().alphabetIndexer.resetColor(node); 21334 } 21335 else { 21336 getUINativeModule().alphabetIndexer.setColor(node, this.value); 21337 } 21338 } 21339 checkObjectDiff() { 21340 return !isBaseOrResourceEqual(this.stageValue, this.value); 21341 } 21342} 21343ColorModifier.identity = Symbol('alphabetColor'); 21344class PopupColorModifier extends ModifierWithKey { 21345 constructor(value) { 21346 super(value); 21347 } 21348 applyPeer(node, reset) { 21349 if (reset) { 21350 getUINativeModule().alphabetIndexer.resetPopupColor(node); 21351 } 21352 else { 21353 getUINativeModule().alphabetIndexer.setPopupColor(node, this.value); 21354 } 21355 } 21356 checkObjectDiff() { 21357 return !isBaseOrResourceEqual(this.stageValue, this.value); 21358 } 21359} 21360PopupColorModifier.identity = Symbol('popupColor'); 21361class SelectedColorModifier extends ModifierWithKey { 21362 constructor(value) { 21363 super(value); 21364 } 21365 applyPeer(node, reset) { 21366 if (reset) { 21367 getUINativeModule().alphabetIndexer.resetSelectedColor(node); 21368 } 21369 else { 21370 getUINativeModule().alphabetIndexer.setSelectedColor(node, this.value); 21371 } 21372 } 21373 checkObjectDiff() { 21374 return !isBaseOrResourceEqual(this.stageValue, this.value); 21375 } 21376} 21377SelectedColorModifier.identity = Symbol('selectedColor'); 21378class PopupBackgroundModifier extends ModifierWithKey { 21379 constructor(value) { 21380 super(value); 21381 } 21382 applyPeer(node, reset) { 21383 if (reset) { 21384 getUINativeModule().alphabetIndexer.resetPopupBackground(node); 21385 } 21386 else { 21387 getUINativeModule().alphabetIndexer.setPopupBackground(node, this.value); 21388 } 21389 } 21390 checkObjectDiff() { 21391 return !isBaseOrResourceEqual(this.stageValue, this.value); 21392 } 21393} 21394PopupBackgroundModifier.identity = Symbol('popupBackground'); 21395class SelectedBackgroundColorModifier extends ModifierWithKey { 21396 constructor(value) { 21397 super(value); 21398 } 21399 applyPeer(node, reset) { 21400 if (reset) { 21401 getUINativeModule().alphabetIndexer.resetSelectedBackgroundColor(node); 21402 } 21403 else { 21404 getUINativeModule().alphabetIndexer.setSelectedBackgroundColor(node, this.value); 21405 } 21406 } 21407 checkObjectDiff() { 21408 return !isBaseOrResourceEqual(this.stageValue, this.value); 21409 } 21410} 21411SelectedBackgroundColorModifier.identity = Symbol('selectedBackgroundColor'); 21412class PopupUnselectedColorModifier extends ModifierWithKey { 21413 constructor(value) { 21414 super(value); 21415 } 21416 applyPeer(node, reset) { 21417 if (reset) { 21418 getUINativeModule().alphabetIndexer.resetPopupUnselectedColor(node); 21419 } 21420 else { 21421 getUINativeModule().alphabetIndexer.setPopupUnselectedColor(node, this.value); 21422 } 21423 } 21424 checkObjectDiff() { 21425 return !isBaseOrResourceEqual(this.stageValue, this.value); 21426 } 21427} 21428PopupUnselectedColorModifier.identity = Symbol('popupUnselectedColor'); 21429class PopupSelectedColorModifier extends ModifierWithKey { 21430 constructor(value) { 21431 super(value); 21432 } 21433 applyPeer(node, reset) { 21434 if (reset) { 21435 getUINativeModule().alphabetIndexer.resetPopupSelectedColor(node); 21436 } 21437 else { 21438 getUINativeModule().alphabetIndexer.setPopupSelectedColor(node, this.value); 21439 } 21440 } 21441 checkObjectDiff() { 21442 return !isBaseOrResourceEqual(this.stageValue, this.value); 21443 } 21444} 21445PopupSelectedColorModifier.identity = Symbol('popupSelectedColor'); 21446class AlignStyleModifier extends ModifierWithKey { 21447 constructor(value) { 21448 super(value); 21449 } 21450 applyPeer(node, reset) { 21451 if (reset) { 21452 getUINativeModule().alphabetIndexer.resetAlignStyle(node); 21453 } 21454 else { 21455 getUINativeModule().alphabetIndexer.setAlignStyle(node, this.value.indexerAlign, this.value.offset); 21456 } 21457 } 21458 checkObjectDiff() { 21459 let indexerAlignEQ = isBaseOrResourceEqual(this.stageValue.indexerAlign, this.value.indexerAlign); 21460 let offsetEQ = isBaseOrResourceEqual(this.stageValue.offset, this.value.offset); 21461 return !indexerAlignEQ || !offsetEQ; 21462 } 21463} 21464AlignStyleModifier.identity = Symbol('alignStyle'); 21465class UsingPopupModifier extends ModifierWithKey { 21466 constructor(value) { 21467 super(value); 21468 } 21469 applyPeer(node, reset) { 21470 if (reset) { 21471 getUINativeModule().alphabetIndexer.resetUsingPopup(node); 21472 } 21473 else { 21474 getUINativeModule().alphabetIndexer.setUsingPopup(node, this.value); 21475 } 21476 } 21477} 21478UsingPopupModifier.identity = Symbol('usingPopup'); 21479class AlphabetIndexerSelectedModifier extends ModifierWithKey { 21480 constructor(value) { 21481 super(value); 21482 } 21483 applyPeer(node, reset) { 21484 if (reset) { 21485 getUINativeModule().alphabetIndexer.resetSelected(node); 21486 } 21487 else { 21488 getUINativeModule().alphabetIndexer.setSelected(node, this.value); 21489 } 21490 } 21491} 21492AlphabetIndexerSelectedModifier.identity = Symbol('alphabetIndexerSelected'); 21493class ItemSizeModifier extends ModifierWithKey { 21494 constructor(value) { 21495 super(value); 21496 } 21497 applyPeer(node, reset) { 21498 if (reset) { 21499 getUINativeModule().alphabetIndexer.resetItemSize(node); 21500 } 21501 else { 21502 getUINativeModule().alphabetIndexer.setItemSize(node, this.value); 21503 } 21504 } 21505} 21506ItemSizeModifier.identity = Symbol('itemSize'); 21507class PopupPositionModifier extends ModifierWithKey { 21508 constructor(value) { 21509 super(value); 21510 } 21511 applyPeer(node, reset) { 21512 if (reset) { 21513 getUINativeModule().alphabetIndexer.resetPopupPosition(node); 21514 } 21515 else { 21516 getUINativeModule().alphabetIndexer.setPopupPosition(node, this.value.x, this.value.y); 21517 } 21518 } 21519 checkObjectDiff() { 21520 let xEQ = isBaseOrResourceEqual(this.stageValue.x, this.value.x); 21521 let yEQ = isBaseOrResourceEqual(this.stageValue.y, this.value.y); 21522 return !xEQ || !yEQ; 21523 } 21524} 21525PopupPositionModifier.identity = Symbol('popupPosition'); 21526class PopupItemBorderRadiusModifier extends ModifierWithKey { 21527 constructor(value) { 21528 super(value); 21529 } 21530 applyPeer(node, reset) { 21531 if (reset) { 21532 getUINativeModule().alphabetIndexer.resetPopupItemBorderRadius(node); 21533 } else { 21534 getUINativeModule().alphabetIndexer.setPopupItemBorderRadius(node, this.value); 21535 } 21536 } 21537} 21538PopupItemBorderRadiusModifier.identity = Symbol('popupItemBorderRadius'); 21539class ItemBorderRadiusModifier extends ModifierWithKey { 21540 constructor(value) { 21541 super(value); 21542 } 21543 applyPeer(node, reset) { 21544 if (reset) { 21545 getUINativeModule().alphabetIndexer.resetItemBorderRadius(node); 21546 } else { 21547 getUINativeModule().alphabetIndexer.setItemBorderRadius(node, this.value); 21548 } 21549 } 21550} 21551ItemBorderRadiusModifier.identity = Symbol('itemBorderRadius'); 21552class PopupBackgroundBlurStyleModifier extends ModifierWithKey { 21553 constructor(value) { 21554 super(value); 21555 } 21556 applyPeer(node, reset) { 21557 if (reset) { 21558 getUINativeModule().alphabetIndexer.resetPopupBackgroundBlurStyle(node); 21559 } else { 21560 getUINativeModule().alphabetIndexer.setPopupBackgroundBlurStyle(node, this.value); 21561 } 21562 } 21563} 21564ItemBorderRadiusModifier.identity = Symbol('popupBackgroundBlurStyle'); 21565 21566class PopupTitleBackgroundModifier extends ModifierWithKey { 21567 constructor(value) { 21568 super(value); 21569 } 21570 applyPeer(node, reset) { 21571 if (reset) { 21572 getUINativeModule().alphabetIndexer.resetPopupTitleBackground(node); 21573 } else { 21574 getUINativeModule().alphabetIndexer.setPopupTitleBackground(node, this.value); 21575 } 21576 } 21577} 21578PopupTitleBackgroundModifier.identity = Symbol('popupTitleBackground'); 21579class AdaptiveWidthModifier extends ModifierWithKey { 21580 constructor(value) { 21581 super(value); 21582 } 21583 applyPeer(node, reset) { 21584 if (reset) { 21585 getUINativeModule().alphabetIndexer.resetAdaptiveWidth(node); 21586 } else { 21587 getUINativeModule().alphabetIndexer.setAdaptiveWidth(node, this.value); 21588 } 21589 } 21590} 21591AdaptiveWidthModifier.identity = Symbol('adaptiveWidth'); 21592class AutoCollapseModifier extends ModifierWithKey { 21593 constructor(value) { 21594 super(value); 21595 } 21596 applyPeer(node, reset) { 21597 if (reset) { 21598 getUINativeModule().alphabetIndexer.resetAutoCollapse(node); 21599 } 21600 else { 21601 getUINativeModule().alphabetIndexer.setAutoCollapse(node, this.value); 21602 } 21603 } 21604 checkObjectDiff() { 21605 return !isBaseOrResourceEqual(this.stageValue, this.value); 21606 } 21607} 21608AutoCollapseModifier.identity = Symbol('autoCollapse'); 21609class EnableHapticFeedbackModifier extends ModifierWithKey { 21610 constructor(value) { 21611 super(value); 21612 } 21613 applyPeer(node, reset) { 21614 if (reset) { 21615 getUINativeModule().alphabetIndexer.resetEnableHapticFeedback(node); 21616 } 21617 else { 21618 getUINativeModule().alphabetIndexer.setEnableHapticFeedback(node, this.value); 21619 } 21620 } 21621 checkObjectDiff() { 21622 return !isBaseOrResourceEqual(this.stageValue, this.value); 21623 } 21624} 21625EnableHapticFeedbackModifier.identity = Symbol('enableHapticFeedback'); 21626 21627/// <reference path='./import.ts' /> 21628class TextStyleModifier extends ModifierWithKey { 21629 constructor(value) { 21630 super(value); 21631 } 21632 applyPeer(node, reset) { 21633 let _a, _b, _c, _d, _e, _f, _g, _h; 21634 if (reset) { 21635 getUINativeModule().calendarPicker.resetTextStyle(node); 21636 } 21637 else { 21638 getUINativeModule().calendarPicker.setTextStyle(node, (_b = (_a = this.value) === null || 21639 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 21640 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 21641 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = 21642 (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 21643 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined); 21644 } 21645 } 21646 checkObjectDiff() { 21647 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; 21648 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 21649 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight))) { 21650 return true; 21651 } 21652 else { 21653 return !isBaseOrResourceEqual((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.color, (_f = this.value) === null || 21654 _f === void 0 ? void 0 : _f.color) || 21655 !isBaseOrResourceEqual((_h = (_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.font) === null || 21656 _h === void 0 ? void 0 : _h.size, (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 21657 _k === void 0 ? void 0 : _k.size); 21658 } 21659 } 21660} 21661TextStyleModifier.identity = Symbol('textStyle'); 21662class EdgeAlignModifier extends ModifierWithKey { 21663 constructor(value) { 21664 super(value); 21665 } 21666 applyPeer(node, reset) { 21667 let _a, _b, _c, _d, _e, _f, _g, _h; 21668 if (reset) { 21669 getUINativeModule().calendarPicker.resetEdgeAlign(node); 21670 } 21671 else { 21672 getUINativeModule().calendarPicker.setEdgeAlign(node, (_b = (_a = this.value) === null || 21673 _a === void 0 ? void 0 : _a.alignType) !== null && _b !== void 0 ? _b : undefined, 21674 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.offset) === null || 21675 _d === void 0 ? void 0 : _d.dx) !== null && _e !== void 0 ? _e : undefined, (_h = (_g = 21676 (_f = this.value) === null || _f === void 0 ? void 0 : _f.offset) === null || 21677 _g === void 0 ? void 0 : _g.dy) !== null && _h !== void 0 ? _h : undefined); 21678 } 21679 } 21680 checkObjectDiff() { 21681 let _a, _b, _c, _d, _e, _f, _g, _h; 21682 if (!(this.stageValue.alignType === this.value.alignType)) { 21683 return true; 21684 } 21685 else { 21686 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) || 21687 !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); 21688 } 21689 } 21690} 21691EdgeAlignModifier.identity = Symbol('edgeAlign'); 21692class CalendarPickerPaddingModifier extends ModifierWithKey { 21693 constructor(value) { 21694 super(value); 21695 } 21696 applyPeer(node, reset) { 21697 if (reset) { 21698 getUINativeModule().calendarPicker.resetCalendarPickerPadding(node); 21699 } 21700 else { 21701 getUINativeModule().calendarPicker.setCalendarPickerPadding(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 21702 } 21703 } 21704 checkObjectDiff() { 21705 return !isBaseOrResourceEqual(this.stageValue.top, this.value.top) || 21706 !isBaseOrResourceEqual(this.stageValue.right, this.value.right) || 21707 !isBaseOrResourceEqual(this.stageValue.bottom, this.value.bottom) || 21708 !isBaseOrResourceEqual(this.stageValue.left, this.value.left); 21709 } 21710} 21711CalendarPickerPaddingModifier.identity = Symbol('calendarPickerPadding'); 21712class CalendarPickerBorderModifier extends ModifierWithKey { 21713 constructor(value) { 21714 super(value); 21715 } 21716 applyPeer(node, reset) { 21717 if (reset) { 21718 getUINativeModule().calendarPicker.resetCalendarPickerBorder(node); 21719 } 21720 else { 21721 getUINativeModule().calendarPicker.setCalendarPickerBorder(node, this.value.arkWidth.left, 21722 this.value.arkWidth.right, this.value.arkWidth.top, this.value.arkWidth.bottom, 21723 this.value.arkColor.leftColor, this.value.arkColor.rightColor, this.value.arkColor.topColor, 21724 this.value.arkColor.bottomColor, this.value.arkRadius.topLeft, this.value.arkRadius.topRight, 21725 this.value.arkRadius.bottomLeft, this.value.arkRadius.bottomRight, this.value.arkStyle.top, 21726 this.value.arkStyle.right, this.value.arkStyle.bottom, this.value.arkStyle.left); 21727 } 21728 } 21729 checkObjectDiff() { 21730 return this.value.checkObjectDiff(this.stageValue); 21731 } 21732} 21733CalendarPickerBorderModifier.identity = Symbol('calendarPickerBorder'); 21734 21735class CalendarPickerHeightModifier extends ModifierWithKey { 21736 constructor(value) { 21737 super(value); 21738 } 21739 applyPeer(node, reset) { 21740 if (reset) { 21741 getUINativeModule().calendarPicker.resetCalendarPickerHeight(node); 21742 } 21743 else { 21744 getUINativeModule().calendarPicker.setCalendarPickerHeight(node, this.value); 21745 } 21746 } 21747 checkObjectDiff() { 21748 return !isBaseOrResourceEqual(this.stageValue, this.value); 21749 } 21750} 21751CalendarPickerHeightModifier.identity = Symbol('calendarPickerHeight'); 21752 21753class CalendarPickerBorderRadiusModifier extends ModifierWithKey { 21754 constructor(value) { 21755 super(value); 21756 } 21757 applyPeer(node, reset) { 21758 if (reset) { 21759 getUINativeModule().calendarPicker.resetCalendarPickerBorderRadius(node); 21760 } 21761 else { 21762 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 21763 getUINativeModule().calendarPicker.setCalendarPickerBorderRadius(node, this.value, this.value, this.value, this.value); 21764 } 21765 else { 21766 if ((Object.keys(this.value).indexOf('topStart') >= 0) || 21767 (Object.keys(this.value).indexOf('topEnd') >= 0) || 21768 (Object.keys(this.value).indexOf('bottomStart') >= 0) || 21769 (Object.keys(this.value).indexOf('bottomEnd') >= 0)) { 21770 getUINativeModule().calendarPicker.setCalendarPickerBorderRadius(node, this.value.topStart, this.value.topEnd, this.value.bottomStart, this.value.bottomEnd); 21771 } else { 21772 getUINativeModule().calendarPicker.setCalendarPickerBorderRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight); 21773 } 21774 } 21775 } 21776 } 21777 checkObjectDiff() { 21778 if (isResource(this.stageValue) && isResource(this.value)) { 21779 return !isResourceEqual(this.stageValue, this.value); 21780 } 21781 else if (!isResource(this.stageValue) && !isResource(this.value)) { 21782 if ((Object.keys(this.value).indexOf('topStart') >= 0) || 21783 (Object.keys(this.value).indexOf('topEnd') >= 0) || 21784 (Object.keys(this.value).indexOf('bottomStart') >= 0) || 21785 (Object.keys(this.value).indexOf('bottomEnd') >= 0)) { 21786 return !(this.stageValue.topStart === this.value.topStart && 21787 this.stageValue.topEnd === this.value.topEnd && 21788 this.stageValue.bottomStart === this.value.bottomStart && 21789 this.stageValue.bottomEnd === this.value.bottomEnd); 21790 } 21791 return !(this.stageValue.topLeft === this.value.topLeft && 21792 this.stageValue.topRight === this.value.topRight && 21793 this.stageValue.bottomLeft === this.value.bottomLeft && 21794 this.stageValue.bottomRight === this.value.bottomRight); 21795 } 21796 else { 21797 return true; 21798 } 21799 } 21800} 21801CalendarPickerBorderRadiusModifier.identity = Symbol('calendarPickerBorderRadius'); 21802 21803class CalendarPickerBorderColorModifier extends ModifierWithKey { 21804 constructor(value) { 21805 super(value); 21806 } 21807 applyPeer(node, reset) { 21808 if (reset) { 21809 getUINativeModule().calendarPicker.resetCalendarPickerBorderColor(node); 21810 } 21811 else { 21812 const valueType = typeof this.value; 21813 if (valueType === 'number' || valueType === 'string' || isResource(this.value)) { 21814 getUINativeModule().calendarPicker.setCalendarPickerBorderColor(node, this.value, this.value, this.value, this.value, false); 21815 } 21816 else { 21817 if ((Object.keys(this.value).indexOf('start') >= 0) || 21818 (Object.keys(this.value).indexOf('end') >= 0)) { 21819 getUINativeModule().calendarPicker.setCalendarPickerBorderColor(node, this.value.top, this.value.end, this.value.bottom, this.value.start, true); 21820 } else { 21821 getUINativeModule().calendarPicker.setCalendarPickerBorderColor(node, this.value.top, this.value.right, this.value.bottom, this.value.left, false); 21822 } 21823 } 21824 } 21825 } 21826 checkObjectDiff() { 21827 if (isResource(this.stageValue) && isResource(this.value)) { 21828 return !isResourceEqual(this.stageValue, this.value); 21829 } 21830 else if (!isResource(this.stageValue) && !isResource(this.value)) { 21831 if ((Object.keys(this.value).indexOf('start') >= 0) || 21832 (Object.keys(this.value).indexOf('end') >= 0)) { 21833 return !(this.stageValue.start === this.value.start && 21834 this.stageValue.end === this.value.end && 21835 this.stageValue.top === this.value.top && 21836 this.stageValue.bottom === this.value.bottom); 21837 } 21838 return !(this.stageValue.left === this.value.left && 21839 this.stageValue.right === this.value.right && 21840 this.stageValue.top === this.value.top && 21841 this.stageValue.bottom === this.value.bottom); 21842 } 21843 else { 21844 return true; 21845 } 21846 } 21847} 21848CalendarPickerBorderColorModifier.identity = Symbol('calendarPickerBorderColor'); 21849 21850class ArkCalendarPickerComponent extends ArkComponent { 21851 constructor(nativePtr, classType) { 21852 super(nativePtr, classType); 21853 } 21854 edgeAlign(alignType, offset) { 21855 let arkEdgeAlign = new ArkEdgeAlign(); 21856 arkEdgeAlign.alignType = alignType; 21857 arkEdgeAlign.offset = offset; 21858 modifierWithKey(this._modifiersWithKeys, EdgeAlignModifier.identity, EdgeAlignModifier, arkEdgeAlign); 21859 return this; 21860 } 21861 textStyle(value) { 21862 modifierWithKey(this._modifiersWithKeys, TextStyleModifier.identity, TextStyleModifier, value); 21863 return this; 21864 } 21865 onChange(callback) { 21866 throw new Error('Method not implemented.'); 21867 } 21868 padding(value) { 21869 let arkValue = new ArkPadding(); 21870 if (value !== null && value !== undefined) { 21871 if (isLengthType(value) || isResource(value)) { 21872 arkValue.top = value; 21873 arkValue.right = value; 21874 arkValue.bottom = value; 21875 arkValue.left = value; 21876 } 21877 else { 21878 arkValue.top = value.top; 21879 arkValue.right = value.right; 21880 arkValue.bottom = value.bottom; 21881 arkValue.left = value.left; 21882 } 21883 modifierWithKey(this._modifiersWithKeys, CalendarPickerPaddingModifier.identity, CalendarPickerPaddingModifier, arkValue); 21884 } 21885 else { 21886 modifierWithKey(this._modifiersWithKeys, CalendarPickerPaddingModifier.identity, CalendarPickerPaddingModifier, undefined); 21887 } 21888 return this; 21889 } 21890 border(value) { 21891 let _a, _b, _c, _d; 21892 let arkBorder = new ArkBorder(); 21893 if (isUndefined(value)) { 21894 arkBorder = undefined; 21895 } 21896 if (!isUndefined(value === null || value === void 0 ? void 0 : value.width) && (value === null || value === void 0 ? void 0 : value.width) !== null) { 21897 if (isNumber(value.width) || isString(value.width) || isResource(value.width)) { 21898 arkBorder.arkWidth.left = value.width; 21899 arkBorder.arkWidth.right = value.width; 21900 arkBorder.arkWidth.top = value.width; 21901 arkBorder.arkWidth.bottom = value.width; 21902 } 21903 else { 21904 arkBorder.arkWidth.left = value.width.left; 21905 arkBorder.arkWidth.right = value.width.right; 21906 arkBorder.arkWidth.top = value.width.top; 21907 arkBorder.arkWidth.bottom = value.width.bottom; 21908 } 21909 } 21910 if (!isUndefined(value === null || value === void 0 ? void 0 : value.color) && (value === null || value === void 0 ? void 0 : value.color) !== null) { 21911 if (isNumber(value.color) || isString(value.color) || isResource(value.color)) { 21912 arkBorder.arkColor.leftColor = value.color; 21913 arkBorder.arkColor.rightColor = value.color; 21914 arkBorder.arkColor.topColor = value.color; 21915 arkBorder.arkColor.bottomColor = value.color; 21916 } 21917 else { 21918 arkBorder.arkColor.leftColor = value.color.left; 21919 arkBorder.arkColor.rightColor = value.color.right; 21920 arkBorder.arkColor.topColor = value.color.top; 21921 arkBorder.arkColor.bottomColor = value.color.bottom; 21922 } 21923 } 21924 if (!isUndefined(value === null || value === void 0 ? void 0 : value.radius) && (value === null || value === void 0 ? void 0 : value.radius) !== null) { 21925 if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) { 21926 arkBorder.arkRadius.topLeft = value.radius; 21927 arkBorder.arkRadius.topRight = value.radius; 21928 arkBorder.arkRadius.bottomLeft = value.radius; 21929 arkBorder.arkRadius.bottomRight = value.radius; 21930 } 21931 else { 21932 arkBorder.arkRadius.topLeft = (_a = value.radius) === null || _a === void 0 ? void 0 : _a.topLeft; 21933 arkBorder.arkRadius.topRight = (_b = value.radius) === null || _b === void 0 ? void 0 : _b.topRight; 21934 arkBorder.arkRadius.bottomLeft = (_c = value.radius) === null || _c === void 0 ? void 0 : _c.bottomLeft; 21935 arkBorder.arkRadius.bottomRight = (_d = value.radius) === null || _d === void 0 ? void 0 : _d.bottomRight; 21936 } 21937 } 21938 if (!isUndefined(value === null || value === void 0 ? void 0 : value.style) && (value === null || value === void 0 ? void 0 : value.style) !== null) { 21939 let arkBorderStyle = new ArkBorderStyle(); 21940 if (arkBorderStyle.parseBorderStyle(value.style)) { 21941 if (!isUndefined(arkBorderStyle.style)) { 21942 arkBorder.arkStyle.top = arkBorderStyle.style; 21943 arkBorder.arkStyle.left = arkBorderStyle.style; 21944 arkBorder.arkStyle.bottom = arkBorderStyle.style; 21945 arkBorder.arkStyle.right = arkBorderStyle.style; 21946 } 21947 else { 21948 arkBorder.arkStyle.top = arkBorderStyle.top; 21949 arkBorder.arkStyle.left = arkBorderStyle.left; 21950 arkBorder.arkStyle.bottom = arkBorderStyle.bottom; 21951 arkBorder.arkStyle.right = arkBorderStyle.right; 21952 } 21953 } 21954 } 21955 modifierWithKey(this._modifiersWithKeys, CalendarPickerBorderModifier.identity, CalendarPickerBorderModifier, arkBorder); 21956 return this; 21957 } 21958 height(value) { 21959 modifierWithKey(this._modifiersWithKeys, CalendarPickerHeightModifier.identity, CalendarPickerHeightModifier, value); 21960 return this; 21961 } 21962 borderRadius(value) { 21963 modifierWithKey(this._modifiersWithKeys, CalendarPickerBorderRadiusModifier.identity, CalendarPickerBorderRadiusModifier, value); 21964 return this; 21965 } 21966 borderColor(value) { 21967 modifierWithKey(this._modifiersWithKeys, CalendarPickerBorderColorModifier.identity, CalendarPickerBorderColorModifier, value); 21968 return this; 21969 } 21970} 21971// @ts-ignore 21972if (globalThis.CalendarPicker !== undefined) { 21973 globalThis.CalendarPicker.attributeModifier = function (modifier) { 21974 attributeModifierFunc.call(this, modifier, (nativePtr) => { 21975 return new ArkCalendarPickerComponent(nativePtr); 21976 }, (nativePtr, classType, modifierJS) => { 21977 return new modifierJS.CalendarPickerModifier(nativePtr, classType); 21978 }); 21979 }; 21980} 21981 21982/// <reference path='./import.ts' /> 21983class ArkDataPanelComponent extends ArkComponent { 21984 constructor(nativePtr, classType) { 21985 super(nativePtr, classType); 21986 } 21987 closeEffect(value) { 21988 modifierWithKey(this._modifiersWithKeys, DataPanelCloseEffectModifier.identity, DataPanelCloseEffectModifier, value); 21989 return this; 21990 } 21991 valueColors(value) { 21992 modifierWithKey(this._modifiersWithKeys, DataPanelValueColorsModifier.identity, DataPanelValueColorsModifier, value); 21993 return this; 21994 } 21995 trackBackgroundColor(value) { 21996 modifierWithKey(this._modifiersWithKeys, DataPanelTrackBackgroundColorModifier.identity, DataPanelTrackBackgroundColorModifier, value); 21997 return this; 21998 } 21999 strokeWidth(value) { 22000 modifierWithKey(this._modifiersWithKeys, DataPanelStrokeWidthModifier.identity, DataPanelStrokeWidthModifier, value); 22001 return this; 22002 } 22003 trackShadow(value) { 22004 modifierWithKey(this._modifiersWithKeys, DataPanelTrackShadowModifier.identity, DataPanelTrackShadowModifier, value); 22005 return this; 22006 } 22007 contentModifier(value) { 22008 modifierWithKey(this._modifiersWithKeys, DataPanelContentModifier.identity, DataPanelContentModifier, value); 22009 return this; 22010 } 22011 setContentModifier(modifier) { 22012 if (modifier === undefined || modifier === null) { 22013 getUINativeModule().dataPanel.setContentModifierBuilder(this.nativePtr, false); 22014 return; 22015 } 22016 if (this.builder !== modifier.applyContent()) { 22017 this.needRebuild = true; 22018 } 22019 this.builder = modifier.applyContent(); 22020 this.modifier = modifier; 22021 getUINativeModule().dataPanel.setContentModifierBuilder(this.nativePtr, this); 22022 } 22023 makeContentModifierNode(context, dataPanelConfig) { 22024 dataPanelConfig.contentModifier = this.modifier; 22025 if (isUndefined(this.dataPanelNode) || this.needRebuild) { 22026 let xNode = globalThis.requireNapi('arkui.node'); 22027 this.dataPanelNode = new xNode.BuilderNode(context); 22028 this.dataPanelNode.build(this.builder, dataPanelConfig); 22029 this.needRebuild = false; 22030 } else { 22031 this.dataPanelNode.update(dataPanelConfig); 22032 } 22033 return this.dataPanelNode.getFrameNode(); 22034 } 22035} 22036class DataPanelStrokeWidthModifier extends ModifierWithKey { 22037 applyPeer(node, reset) { 22038 if (reset) { 22039 getUINativeModule().dataPanel.resetDataPanelStrokeWidth(node); 22040 } 22041 else { 22042 getUINativeModule().dataPanel.setDataPanelStrokeWidth(node, this.value); 22043 } 22044 } 22045 checkObjectDiff() { 22046 return !isBaseOrResourceEqual(this.stageValue, this.value); 22047 } 22048} 22049DataPanelStrokeWidthModifier.identity = Symbol('dataPanelStrokeWidth'); 22050class DataPanelCloseEffectModifier extends ModifierWithKey { 22051 applyPeer(node, reset) { 22052 if (reset) { 22053 getUINativeModule().dataPanel.resetCloseEffect(node); 22054 } 22055 else { 22056 getUINativeModule().dataPanel.setCloseEffect(node, this.value); 22057 } 22058 } 22059 checkObjectDiff() { 22060 return !isBaseOrResourceEqual(this.stageValue, this.value); 22061 } 22062} 22063DataPanelCloseEffectModifier.identity = Symbol('dataPanelCloseEffect'); 22064class DataPanelTrackBackgroundColorModifier extends ModifierWithKey { 22065 applyPeer(node, reset) { 22066 if (reset) { 22067 getUINativeModule().dataPanel.resetDataPanelTrackBackgroundColor(node); 22068 } 22069 else { 22070 getUINativeModule().dataPanel.setDataPanelTrackBackgroundColor(node, this.value); 22071 } 22072 } 22073 checkObjectDiff() { 22074 return !isBaseOrResourceEqual(this.stageValue, this.value); 22075 } 22076} 22077DataPanelTrackBackgroundColorModifier.identity = Symbol('dataPanelTrackBackgroundColorModifier'); 22078class DataPanelTrackShadowModifier extends ModifierWithKey { 22079 applyPeer(node, reset) { 22080 if (reset) { 22081 if (this.value === null) { 22082 getUINativeModule().dataPanel.setDataPanelTrackShadow(node, null); 22083 } 22084 getUINativeModule().dataPanel.resetDataPanelTrackShadow(node); 22085 } 22086 else { 22087 getUINativeModule().dataPanel.setDataPanelTrackShadow(node, this.value); 22088 } 22089 } 22090 checkObjectDiff() { 22091 return true; 22092 } 22093} 22094DataPanelTrackShadowModifier.identity = Symbol('dataPanelTrackShadow'); 22095class DataPanelContentModifier extends ModifierWithKey { 22096 constructor(value) { 22097 super(value); 22098 } 22099 applyPeer(node, reset, component) { 22100 let dataPanelComponent = component; 22101 dataPanelComponent.setContentModifier(this.value); 22102 } 22103} 22104DataPanelContentModifier.identity = Symbol('dataPanelContentModifier'); 22105class DataPanelValueColorsModifier extends ModifierWithKey { 22106 applyPeer(node, reset) { 22107 if (reset) { 22108 getUINativeModule().dataPanel.resetDataPanelValueColors(node); 22109 return; 22110 } 22111 else { 22112 getUINativeModule().dataPanel.setDataPanelValueColors(node, this.value); 22113 } 22114 } 22115 checkObjectDiff() { 22116 return true; 22117 } 22118} 22119DataPanelValueColorsModifier.identity = Symbol('dataPanelValueColors'); 22120// @ts-ignore 22121if (globalThis.DataPanel !== undefined) { 22122 globalThis.DataPanel.attributeModifier = function (modifier) { 22123 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22124 return new ArkDataPanelComponent(nativePtr); 22125 }, (nativePtr, classType, modifierJS) => { 22126 return new modifierJS.DataPanelModifier(nativePtr, classType); 22127 }); 22128 }; 22129} 22130 22131/// <reference path='./import.ts' /> 22132class ArkDatePickerComponent extends ArkComponent { 22133 constructor(nativePtr, classType) { 22134 super(nativePtr, classType); 22135 } 22136 lunar(value) { 22137 modifierWithKey(this._modifiersWithKeys, DatePickerLunarModifier.identity, DatePickerLunarModifier, value); 22138 return this; 22139 } 22140 disappearTextStyle(value) { 22141 modifierWithKey(this._modifiersWithKeys, DatePickerDisappearTextStyleModifier.identity, DatePickerDisappearTextStyleModifier, value); 22142 return this; 22143 } 22144 textStyle(value) { 22145 modifierWithKey(this._modifiersWithKeys, DatePickerTextStyleModifier.identity, DatePickerTextStyleModifier, value); 22146 return this; 22147 } 22148 selectedTextStyle(value) { 22149 modifierWithKey(this._modifiersWithKeys, DatePickerSelectedTextStyleModifier.identity, DatePickerSelectedTextStyleModifier, value); 22150 return this; 22151 } 22152 onChange(callback) { 22153 throw new Error('Method not implemented.'); 22154 } 22155 onDateChange(callback) { 22156 throw new Error('Method not implemented.'); 22157 } 22158 backgroundColor(value) { 22159 modifierWithKey(this._modifiersWithKeys, DatePickerBackgroundColorModifier.identity, DatePickerBackgroundColorModifier, value); 22160 return this; 22161 } 22162} 22163class DatePickerLunarModifier extends ModifierWithKey { 22164 constructor(value) { 22165 super(value); 22166 } 22167 applyPeer(node, reset) { 22168 if (reset) { 22169 getUINativeModule().datePicker.resetLunar(node); 22170 } 22171 else { 22172 getUINativeModule().datePicker.setLunar(node, this.value); 22173 } 22174 } 22175} 22176DatePickerLunarModifier.identity = Symbol('lunar'); 22177class DatePickerTextStyleModifier extends ModifierWithKey { 22178 constructor(value) { 22179 super(value); 22180 } 22181 applyPeer(node, reset) { 22182 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 22183 if (reset) { 22184 getUINativeModule().datePicker.resetTextStyle(node); 22185 } 22186 else { 22187 getUINativeModule().datePicker.setTextStyle(node, (_b = (_a = this.value) === null || 22188 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, (_e = (_d = (_c = this.value) === null || 22189 _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 22190 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 22191 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 22192 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 22193 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 22194 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 22195 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 22196 } 22197 } 22198 checkObjectDiff() { 22199 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 22200 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 22201 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 22202 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 22203 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 22204 return true; 22205 } 22206 else { 22207 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 22208 _k === void 0 ? void 0 : _k.color) || 22209 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 22210 _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) || 22211 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 22212 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || 22213 _t === void 0 ? void 0 : _t.family); 22214 } 22215 } 22216} 22217DatePickerTextStyleModifier.identity = Symbol('textStyle'); 22218class DatePickerSelectedTextStyleModifier extends ModifierWithKey { 22219 constructor(value) { 22220 super(value); 22221 } 22222 applyPeer(node, reset) { 22223 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 22224 if (reset) { 22225 getUINativeModule().datePicker.resetSelectedTextStyle(node); 22226 } 22227 else { 22228 getUINativeModule().datePicker.setSelectedTextStyle(node, (_b = (_a = this.value) === null || 22229 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 22230 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 22231 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, (_h = (_g = 22232 (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 22233 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 22234 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 22235 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, (_p = 22236 (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 22237 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 22238 } 22239 } 22240 checkObjectDiff() { 22241 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 22242 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 22243 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 22244 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 22245 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 22246 return true; 22247 } 22248 else { 22249 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 22250 _k === void 0 ? void 0 : _k.color) || 22251 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || _m === 22252 void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || _p === 22253 void 0 ? void 0 : _p.size) || 22254 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || _r === 22255 void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || _s === void 0 ? void 0 : _s.font) === null || _t === 22256 void 0 ? void 0 : _t.family); 22257 } 22258 } 22259} 22260DatePickerSelectedTextStyleModifier.identity = Symbol('selectedTextStyle'); 22261class DatePickerDisappearTextStyleModifier extends ModifierWithKey { 22262 constructor(value) { 22263 super(value); 22264 } 22265 applyPeer(node, reset) { 22266 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; 22267 if (reset) { 22268 getUINativeModule().datePicker.resetDisappearTextStyle(node); 22269 } 22270 else { 22271 getUINativeModule().datePicker.setDisappearTextStyle(node, (_b = (_a = this.value) === null || 22272 _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : undefined, 22273 (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || 22274 _d === void 0 ? void 0 : _d.size) !== null && _e !== void 0 ? _e : undefined, 22275 (_h = (_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.font) === null || 22276 _g === void 0 ? void 0 : _g.weight) !== null && _h !== void 0 ? _h : undefined, 22277 (_l = (_k = (_j = this.value) === null || _j === void 0 ? void 0 : _j.font) === null || 22278 _k === void 0 ? void 0 : _k.family) !== null && _l !== void 0 ? _l : undefined, 22279 (_p = (_o = (_m = this.value) === null || _m === void 0 ? void 0 : _m.font) === null || 22280 _o === void 0 ? void 0 : _o.style) !== null && _p !== void 0 ? _p : undefined); 22281 } 22282 } 22283 checkObjectDiff() { 22284 let _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t; 22285 if (!(((_b = (_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.weight) === 22286 ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.font) === null || _d === void 0 ? void 0 : _d.weight) && 22287 ((_f = (_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.font) === null || _f === void 0 ? void 0 : _f.style) === 22288 ((_h = (_g = this.value) === null || _g === void 0 ? void 0 : _g.font) === null || _h === void 0 ? void 0 : _h.style))) { 22289 return true; 22290 } 22291 else { 22292 return !isBaseOrResourceEqual((_j = this.stageValue) === null || _j === void 0 ? void 0 : _j.color, (_k = this.value) === null || 22293 _k === void 0 ? void 0 : _k.color) || 22294 !isBaseOrResourceEqual((_m = (_l = this.stageValue) === null || _l === void 0 ? void 0 : _l.font) === null || 22295 _m === void 0 ? void 0 : _m.size, (_p = (_o = this.value) === null || _o === void 0 ? void 0 : _o.font) === null || 22296 _p === void 0 ? void 0 : _p.size) || 22297 !isBaseOrResourceEqual((_r = (_q = this.stageValue) === null || _q === void 0 ? void 0 : _q.font) === null || 22298 _r === void 0 ? void 0 : _r.family, (_t = (_s = this.value) === null || 22299 _s === void 0 ? void 0 : _s.font) === null || _t === void 0 ? void 0 : _t.family); 22300 } 22301 } 22302} 22303DatePickerDisappearTextStyleModifier.identity = Symbol('disappearTextStyle'); 22304class DatePickerBackgroundColorModifier extends ModifierWithKey { 22305 constructor(value) { 22306 super(value); 22307 } 22308 applyPeer(node, reset) { 22309 if (reset) { 22310 getUINativeModule().datePicker.resetBackgroundColor(node); 22311 } 22312 else { 22313 getUINativeModule().datePicker.setBackgroundColor(node, this.value); 22314 } 22315 } 22316 checkObjectDiff() { 22317 return !isBaseOrResourceEqual(this.stageValue, this.value); 22318 } 22319} 22320DatePickerBackgroundColorModifier.identity = Symbol('datePickerBackgroundColor'); 22321//@ts-ignore 22322if (globalThis.DatePicker !== undefined) { 22323 globalThis.DatePicker.attributeModifier = function (modifier) { 22324 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22325 return new ArkDatePickerComponent(nativePtr); 22326 }, (nativePtr, classType, modifierJS) => { 22327 return new modifierJS.DatePickerModifier(nativePtr, classType); 22328 }); 22329 }; 22330} 22331 22332/// <reference path='./import.ts' /> 22333class ArkFormComponentComponent extends ArkComponent { 22334 constructor(nativePtr, classType) { 22335 super(nativePtr, classType); 22336 } 22337 size(value) { 22338 modifierWithKey(this._modifiersWithKeys, FormComponentSizeModifier.identity, FormComponentSizeModifier, value); 22339 return this; 22340 } 22341 visibility(value) { 22342 modifierWithKey(this._modifiersWithKeys, FormComponentVisibilityModifier.identity, FormComponentVisibilityModifier, value); 22343 return this; 22344 } 22345 moduleName(value) { 22346 modifierWithKey(this._modifiersWithKeys, FormComponentModuleNameModifier.identity, FormComponentModuleNameModifier, value); 22347 return this; 22348 } 22349 dimension(value) { 22350 modifierWithKey(this._modifiersWithKeys, FormComponentDimensionModifier.identity, FormComponentDimensionModifier, value); 22351 return this; 22352 } 22353 allowUpdate(value) { 22354 modifierWithKey(this._modifiersWithKeys, FormComponentAllowUpdateModifier.identity, FormComponentAllowUpdateModifier, value); 22355 return this; 22356 } 22357 onAcquired(callback) { 22358 throw new Error('Method not implemented.'); 22359 } 22360 onError(callback) { 22361 throw new Error('Method not implemented.'); 22362 } 22363 onRouter(callback) { 22364 throw new Error('Method not implemented.'); 22365 } 22366 onUninstall(callback) { 22367 throw new Error('Method not implemented.'); 22368 } 22369 onLoad(callback) { 22370 throw new Error('Method not implemented.'); 22371 } 22372} 22373class FormComponentModuleNameModifier extends ModifierWithKey { 22374 constructor(value) { 22375 super(value); 22376 } 22377 applyPeer(node, reset) { 22378 if (reset) { 22379 getUINativeModule().formComponent.resetModuleName(node); 22380 } 22381 else { 22382 getUINativeModule().formComponent.setModuleName(node, this.value); 22383 } 22384 } 22385} 22386FormComponentModuleNameModifier.identity = Symbol('formComponentModuleName'); 22387class FormComponentDimensionModifier extends ModifierWithKey { 22388 constructor(value) { 22389 super(value); 22390 } 22391 applyPeer(node, reset) { 22392 if (reset) { 22393 getUINativeModule().formComponent.resetDimension(node); 22394 } 22395 else { 22396 getUINativeModule().formComponent.setDimension(node, this.value); 22397 } 22398 } 22399 checkObjectDiff() { 22400 return !isBaseOrResourceEqual(this.stageValue, this.value); 22401 } 22402} 22403FormComponentDimensionModifier.identity = Symbol('formComponentDimension'); 22404class FormComponentAllowUpdateModifier extends ModifierWithKey { 22405 constructor(value) { 22406 super(value); 22407 } 22408 applyPeer(node, reset) { 22409 if (reset) { 22410 getUINativeModule().formComponent.resetAllowUpdate(node); 22411 } 22412 else { 22413 getUINativeModule().formComponent.setAllowUpdate(node, this.value); 22414 } 22415 } 22416} 22417FormComponentAllowUpdateModifier.identity = Symbol('formComponentAllowUpdate'); 22418class FormComponentSizeModifier extends ModifierWithKey { 22419 constructor(value) { 22420 super(value); 22421 } 22422 applyPeer(node, reset) { 22423 if (reset) { 22424 getUINativeModule().formComponent.resetSize(node); 22425 } 22426 else { 22427 getUINativeModule().formComponent.setSize(node, this.value.width, this.value.height); 22428 } 22429 } 22430 checkObjectDiff() { 22431 let widthEQ = isBaseOrResourceEqual(this.stageValue.width, this.value.width); 22432 let heightEQ = isBaseOrResourceEqual(this.stageValue.height, this.value.height); 22433 return !widthEQ || !heightEQ; 22434 } 22435} 22436FormComponentSizeModifier.identity = Symbol('formComponentSize'); 22437class FormComponentVisibilityModifier extends ModifierWithKey { 22438 constructor(value) { 22439 super(value); 22440 } 22441 applyPeer(node, reset) { 22442 if (reset) { 22443 getUINativeModule().formComponent.resetVisibility(node); 22444 } 22445 else { 22446 getUINativeModule().formComponent.setVisibility(node, this.value); 22447 } 22448 } 22449} 22450FormComponentVisibilityModifier.identity = Symbol('formComponentVisibility'); 22451// @ts-ignore 22452if (globalThis.FormComponent !== undefined) { 22453 globalThis.FormComponent.attributeModifier = function (modifier) { 22454 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22455 return new ArkFormComponentComponent(nativePtr); 22456 }, (nativePtr, classType, modifierJS) => { 22457 return new modifierJS.FormComponentModifier(nativePtr, classType); 22458 }); 22459 }; 22460} 22461 22462/// <reference path='./import.ts' /> 22463class ArkGaugeComponent extends ArkComponent { 22464 constructor(nativePtr, classType) { 22465 super(nativePtr, classType); 22466 } 22467 value(value) { 22468 modifierWithKey(this._modifiersWithKeys, GaugeVauleModifier.identity, GaugeVauleModifier, value); 22469 return this; 22470 } 22471 startAngle(angle) { 22472 modifierWithKey(this._modifiersWithKeys, GaugeStartAngleModifier.identity, GaugeStartAngleModifier, angle); 22473 return this; 22474 } 22475 endAngle(angle) { 22476 modifierWithKey(this._modifiersWithKeys, GaugeEndAngleModifier.identity, GaugeEndAngleModifier, angle); 22477 return this; 22478 } 22479 colors(colors) { 22480 modifierWithKey(this._modifiersWithKeys, GaugeColorsModifier.identity, GaugeColorsModifier, colors); 22481 return this; 22482 } 22483 strokeWidth(length) { 22484 modifierWithKey(this._modifiersWithKeys, GaugeStrokeWidthModifier.identity, GaugeStrokeWidthModifier, length); 22485 return this; 22486 } 22487 description(value) { 22488 throw new Error('Method not implemented.'); 22489 } 22490 trackShadow(value) { 22491 modifierWithKey(this._modifiersWithKeys, GaugeTrackShadowModifier.identity, GaugeTrackShadowModifier, value); 22492 return this; 22493 } 22494 indicator(value) { 22495 modifierWithKey(this._modifiersWithKeys, GaugeIndicatorModifier.identity, GaugeIndicatorModifier, value); 22496 return this; 22497 } 22498 contentModifier(value) { 22499 modifierWithKey(this._modifiersWithKeys, GaugeContentModifier.identity, GaugeContentModifier, value); 22500 return this; 22501 } 22502 setContentModifier(modifier) { 22503 if (modifier === undefined || modifier === null) { 22504 getUINativeModule().gauge.setContentModifierBuilder(this.nativePtr, false); 22505 return; 22506 } 22507 this.needRebuild = false; 22508 if (this.builder !== modifier.applyContent()) { 22509 this.needRebuild = true; 22510 } 22511 this.builder = modifier.applyContent(); 22512 this.modifier = modifier; 22513 getUINativeModule().gauge.setContentModifierBuilder(this.nativePtr, this); 22514 } 22515 makeContentModifierNode(context, gaugeConfiguration) { 22516 gaugeConfiguration.contentModifier = this.modifier; 22517 if (isUndefined(this.gaugeNode) || this.needRebuild) { 22518 let xNode = globalThis.requireNapi('arkui.node'); 22519 this.gaugeNode = new xNode.BuilderNode(context); 22520 this.gaugeNode.build(this.builder, gaugeConfiguration); 22521 this.needRebuild = false; 22522 } else { 22523 this.gaugeNode.update(gaugeConfiguration); 22524 } 22525 return this.gaugeNode.getFrameNode(); 22526 } 22527} 22528class GaugeIndicatorModifier extends ModifierWithKey { 22529 applyPeer(node, reset) { 22530 if (reset) { 22531 getUINativeModule().gauge.resetGaugeIndicator(node, this.value); 22532 } 22533 else { 22534 getUINativeModule().gauge.setGaugeIndicator(node, this.value.icon, this.value.space); 22535 } 22536 } 22537 checkObjectDiff() { 22538 return !isBaseOrResourceEqual(this.stageValue.icon, this.value.icon) || 22539 !isBaseOrResourceEqual(this.stageValue.space, this.value.space); 22540 } 22541} 22542GaugeIndicatorModifier.identity = Symbol('gaugeIndicator'); 22543class GaugeContentModifier extends ModifierWithKey { 22544 constructor(value) { 22545 super(value); 22546 } 22547 applyPeer(node, reset, component) { 22548 let gaugeComponent = component; 22549 gaugeComponent.setContentModifier(this.value); 22550 } 22551} 22552GaugeContentModifier.identity = Symbol('gaugeContentModifier'); 22553class GaugeColorsModifier extends ModifierWithKey { 22554 applyPeer(node, reset) { 22555 if (reset) { 22556 getUINativeModule().gauge.resetGaugeColors(node); 22557 } 22558 else { 22559 getUINativeModule().gauge.setGaugeColors(node, this.value); 22560 } 22561 } 22562 checkObjectDiff() { 22563 return true; 22564 } 22565} 22566GaugeColorsModifier.identity = Symbol('gaugeColors'); 22567class GaugeVauleModifier extends ModifierWithKey { 22568 applyPeer(node, reset) { 22569 if (reset) { 22570 getUINativeModule().gauge.resetGaugeVaule(node); 22571 } 22572 else { 22573 getUINativeModule().gauge.setGaugeVaule(node, this.value); 22574 } 22575 } 22576 checkObjectDiff() { 22577 return !isBaseOrResourceEqual(this.stageValue, this.value); 22578 } 22579} 22580GaugeVauleModifier.identity = Symbol('gaugeVaule'); 22581class GaugeStartAngleModifier extends ModifierWithKey { 22582 applyPeer(node, reset) { 22583 if (reset) { 22584 getUINativeModule().gauge.resetGaugeStartAngle(node); 22585 } 22586 else { 22587 getUINativeModule().gauge.setGaugeStartAngle(node, this.value); 22588 } 22589 } 22590 checkObjectDiff() { 22591 return !isBaseOrResourceEqual(this.stageValue, this.value); 22592 } 22593} 22594GaugeStartAngleModifier.identity = Symbol('gaugeStartAngle'); 22595class GaugeEndAngleModifier extends ModifierWithKey { 22596 applyPeer(node, reset) { 22597 if (reset) { 22598 getUINativeModule().gauge.resetGaugeEndAngle(node); 22599 } 22600 else { 22601 getUINativeModule().gauge.setGaugeEndAngle(node, this.value); 22602 } 22603 } 22604 checkObjectDiff() { 22605 return !isBaseOrResourceEqual(this.stageValue, this.value); 22606 } 22607} 22608GaugeEndAngleModifier.identity = Symbol('gaugeEndAngle'); 22609class GaugeStrokeWidthModifier extends ModifierWithKey { 22610 applyPeer(node, reset) { 22611 if (reset) { 22612 getUINativeModule().gauge.resetGaugeStrokeWidth(node); 22613 } 22614 else { 22615 getUINativeModule().gauge.setGaugeStrokeWidth(node, this.value); 22616 } 22617 } 22618 checkObjectDiff() { 22619 return !isBaseOrResourceEqual(this.stageValue, this.value); 22620 } 22621} 22622GaugeStrokeWidthModifier.identity = Symbol('gaugeStrokeWidth'); 22623class GaugeTrackShadowModifier extends ModifierWithKey { 22624 applyPeer(node, reset) { 22625 if (reset) { 22626 getUINativeModule().gauge.resetGaugeTrackShadow(node); 22627 } 22628 else { 22629 getUINativeModule().gauge.setGaugeTrackShadow(node, this.value, this.value.radius, this.value.offsetX, this.value.offsetY); 22630 } 22631 } 22632 checkObjectDiff() { 22633 return !isBaseOrResourceEqual(this.stageValue, this.value); 22634 } 22635} 22636GaugeTrackShadowModifier.identity = Symbol('gaugeTrackShadow'); 22637// @ts-ignore 22638if (globalThis.Gauge !== undefined) { 22639 globalThis.Gauge.attributeModifier = function (modifier) { 22640 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22641 return new ArkGaugeComponent(nativePtr); 22642 }, (nativePtr, classType, modifierJS) => { 22643 return new modifierJS.GaugeModifier(nativePtr, classType); 22644 }); 22645 }; 22646 globalThis.Gauge.contentModifier = function (modifier) { 22647 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 22648 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 22649 let component = this.createOrGetNode(elmtId, () => { 22650 return new ArkGaugeComponent(nativeNode); 22651 }); 22652 component.setContentModifier(modifier); 22653 }; 22654} 22655 22656/// <reference path='./import.ts' /> 22657class ArkMarqueeComponent extends ArkComponent { 22658 constructor(nativePtr, classType) { 22659 super(nativePtr, classType); 22660 } 22661 fontSize(value) { 22662 modifierWithKey(this._modifiersWithKeys, MarqueeFontSizeModifier.identity, MarqueeFontSizeModifier, value); 22663 return this; 22664 } 22665 fontColor(value) { 22666 modifierWithKey(this._modifiersWithKeys, MarqueeFontColorModifier.identity, MarqueeFontColorModifier, value); 22667 return this; 22668 } 22669 allowScale(value) { 22670 modifierWithKey(this._modifiersWithKeys, MarqueeAllowScaleModifier.identity, MarqueeAllowScaleModifier, value); 22671 return this; 22672 } 22673 fontWeight(value) { 22674 modifierWithKey(this._modifiersWithKeys, MarqueeFontWeightModifier.identity, MarqueeFontWeightModifier, value); 22675 return this; 22676 } 22677 fontFamily(value) { 22678 modifierWithKey(this._modifiersWithKeys, MarqueeFontFamilyModifier.identity, MarqueeFontFamilyModifier, value); 22679 return this; 22680 } 22681 onStart(event) { 22682 modifierWithKey(this._modifiersWithKeys, MarqueeOnStartModifier.identity, MarqueeOnStartModifier, event); 22683 return this; 22684 } 22685 onBounce(event) { 22686 modifierWithKey(this._modifiersWithKeys, MarqueeOnBounceModifier.identity, MarqueeOnBounceModifier, event); 22687 return this; 22688 } 22689 onFinish(event) { 22690 modifierWithKey(this._modifiersWithKeys, MarqueeOnFinishModifier.identity, MarqueeOnFinishModifier, event); 22691 return this; 22692 } 22693 marqueeUpdateStrategy(value) { 22694 modifierWithKey(this._modifiersWithKeys, MarqueeUpdateStrategyModifier.identity, MarqueeUpdateStrategyModifier, value); 22695 return this; 22696 } 22697} 22698class MarqueeFontColorModifier extends ModifierWithKey { 22699 constructor(value) { 22700 super(value); 22701 } 22702 applyPeer(node, reset) { 22703 if (reset) { 22704 getUINativeModule().marquee.resetFontColor(node); 22705 } 22706 else { 22707 getUINativeModule().marquee.setFontColor(node, this.value); 22708 } 22709 } 22710 checkObjectDiff() { 22711 return !isBaseOrResourceEqual(this.stageValue, this.value); 22712 } 22713} 22714MarqueeFontColorModifier.identity = Symbol('fontColor'); 22715class MarqueeFontSizeModifier extends ModifierWithKey { 22716 constructor(value) { 22717 super(value); 22718 } 22719 applyPeer(node, reset) { 22720 if (reset) { 22721 getUINativeModule().marquee.resetFontSize(node); 22722 } 22723 else { 22724 getUINativeModule().marquee.setFontSize(node, this.value); 22725 } 22726 } 22727 checkObjectDiff() { 22728 return !isBaseOrResourceEqual(this.stageValue, this.value); 22729 } 22730} 22731MarqueeFontSizeModifier.identity = Symbol('fontSize'); 22732class MarqueeAllowScaleModifier extends ModifierWithKey { 22733 constructor(value) { 22734 super(value); 22735 } 22736 applyPeer(node, reset) { 22737 if (reset) { 22738 getUINativeModule().marquee.resetAllowScale(node); 22739 } 22740 else { 22741 getUINativeModule().marquee.setAllowScale(node, this.value); 22742 } 22743 } 22744} 22745MarqueeAllowScaleModifier.identity = Symbol('allowScale'); 22746class MarqueeFontWeightModifier extends ModifierWithKey { 22747 constructor(value) { 22748 super(value); 22749 } 22750 applyPeer(node, reset) { 22751 if (reset) { 22752 getUINativeModule().marquee.resetFontWeight(node); 22753 } 22754 else { 22755 getUINativeModule().marquee.setFontWeight(node, this.value); 22756 } 22757 } 22758 checkObjectDiff() { 22759 return this.stageValue !== this.value; 22760 } 22761} 22762MarqueeFontWeightModifier.identity = Symbol('fontWeight'); 22763class MarqueeFontFamilyModifier extends ModifierWithKey { 22764 constructor(value) { 22765 super(value); 22766 } 22767 applyPeer(node, reset) { 22768 if (reset) { 22769 getUINativeModule().marquee.resetFontFamily(node); 22770 } 22771 else { 22772 getUINativeModule().marquee.setFontFamily(node, this.value); 22773 } 22774 } 22775} 22776MarqueeFontFamilyModifier.identity = Symbol('fontFamily'); 22777class MarqueeUpdateStrategyModifier extends ModifierWithKey { 22778 constructor(value) { 22779 super(value); 22780 } 22781 applyPeer(node, reset) { 22782 if (reset) { 22783 getUINativeModule().marquee.resetMarqueeUpdateStrategy(node); 22784 } 22785 else { 22786 getUINativeModule().marquee.setMarqueeUpdateStrategy(node, this.value); 22787 } 22788 } 22789} 22790MarqueeUpdateStrategyModifier.identity = Symbol('marqueeUpdateStrategy'); 22791class MarqueeOnStartModifier extends ModifierWithKey { 22792 constructor(value) { 22793 super(value); 22794 } 22795 applyPeer(node, reset) { 22796 if (reset) { 22797 getUINativeModule().marquee.resetMarqueeOnStart(node); 22798 } else { 22799 getUINativeModule().marquee.setMarqueeOnStart(node, this.value); 22800 } 22801 } 22802} 22803MarqueeOnStartModifier.identity = Symbol('marqueeOnStart'); 22804class MarqueeOnBounceModifier extends ModifierWithKey { 22805 constructor(value) { 22806 super(value); 22807 } 22808 applyPeer(node, reset) { 22809 if (reset) { 22810 getUINativeModule().marquee.resetMarqueeOnBounce(node); 22811 } else { 22812 getUINativeModule().marquee.setMarqueeOnBounce(node, this.value); 22813 } 22814 } 22815} 22816MarqueeOnBounceModifier.identity = Symbol('marqueeOnBounce'); 22817class MarqueeOnFinishModifier extends ModifierWithKey { 22818 constructor(value) { 22819 super(value); 22820 } 22821 applyPeer(node, reset) { 22822 if (reset) { 22823 getUINativeModule().marquee.resetMarqueeOnFinish(node); 22824 } else { 22825 getUINativeModule().marquee.setMarqueeOnFinish(node, this.value); 22826 } 22827 } 22828} 22829MarqueeOnFinishModifier.identity = Symbol('marqueeOnFinish'); 22830// @ts-ignore 22831if (globalThis.Marquee !== undefined) { 22832 globalThis.Marquee.attributeModifier = function (modifier) { 22833 attributeModifierFunc.call(this, modifier, (nativePtr) => { 22834 return new ArkMarqueeComponent(nativePtr); 22835 }, (nativePtr, classType, modifierJS) => { 22836 return new modifierJS.MarqueeModifier(nativePtr, classType); 22837 }); 22838 }; 22839} 22840 22841/// <reference path='./import.ts' /> 22842class MenuFontColorModifier extends ModifierWithKey { 22843 constructor(value) { 22844 super(value); 22845 } 22846 applyPeer(node, reset) { 22847 if (reset) { 22848 getUINativeModule().menu.resetMenuFontColor(node); 22849 } 22850 else { 22851 getUINativeModule().menu.setMenuFontColor(node, this.value); 22852 } 22853 } 22854 checkObjectDiff() { 22855 return !isBaseOrResourceEqual(this.stageValue, this.value); 22856 } 22857} 22858MenuFontColorModifier.identity = Symbol('fontColor'); 22859class MenuWidthModifier extends ModifierWithKey { 22860 applyPeer(node, reset) { 22861 if (reset) { 22862 getUINativeModule().menu.resetWidth(node); 22863 } else { 22864 getUINativeModule().menu.setWidth(node, this.value); 22865 } 22866 } 22867 22868 checkObjectDiff() { 22869 return !isBaseOrResourceEqual(this.stageValue, this.value); 22870 } 22871} 22872MenuWidthModifier.identity = Symbol('menuWidth'); 22873class MenuFontModifier extends ModifierWithKey { 22874 constructor(value) { 22875 super(value); 22876 } 22877 applyPeer(node, reset) { 22878 if (reset || !this.value) { 22879 getUINativeModule().menu.resetFont(node); 22880 } 22881 else { 22882 getUINativeModule().menu.setFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 22883 } 22884 } 22885 checkObjectDiff() { 22886 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 22887 let weightEQ = this.stageValue.weight === this.value.weight; 22888 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 22889 let styleEQ = this.stageValue.style === this.value.style; 22890 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 22891 } 22892} 22893MenuFontModifier.identity = Symbol('font'); 22894class RadiusModifier extends ModifierWithKey { 22895 constructor(value) { 22896 super(value); 22897 } 22898 applyPeer(node, reset) { 22899 if (reset) { 22900 getUINativeModule().menu.resetRadius(node); 22901 } 22902 else { 22903 if (isNumber(this.value) || isString(this.value) || isResource(this.value)) { 22904 getUINativeModule().menu.setRadius(node, this.value, this.value, this.value, this.value, false); 22905 } 22906 else { 22907 getUINativeModule().menu.setRadius(node, this.value.topLeft, this.value.topRight, this.value.bottomLeft, this.value.bottomRight, true); 22908 } 22909 } 22910 } 22911 checkObjectDiff() { 22912 if (isResource(this.stageValue) && isResource(this.value)) { 22913 return !isResourceEqual(this.stageValue, this.value); 22914 } 22915 else if (!isResource(this.stageValue) && !isResource(this.value)) { 22916 return !(this.stageValue.topLeft === this.value.topLeft && 22917 this.stageValue.topRight === this.value.topRight && 22918 this.stageValue.bottomLeft === this.value.bottomLeft && 22919 this.stageValue.bottomRight === this.value.bottomRight); 22920 } 22921 else { 22922 return true; 22923 } 22924 } 22925} 22926RadiusModifier.identity = Symbol('radius'); 22927class MenuItemDividerModifier extends ModifierWithKey { 22928 constructor(value) { 22929 super(value); 22930 } 22931 applyPeer(node, reset) { 22932 if (reset || !this.value) { 22933 getUINativeModule().menu.resetMenuItemDivider(node); 22934 } else { 22935 getUINativeModule().menu.setMenuItemDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 22936 } 22937 } 22938 checkObjectDiff() { 22939 if (isResource(this.stageValue) && isResource(this.value)) { 22940 return !isResourceEqual(this.stageValue, this.value); 22941 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 22942 return !(this.stageValue.strokeWidth === this.value.strokeWidth && 22943 this.stageValue.color === this.value.color && 22944 this.stageValue.startMargin === this.value.startMargin && 22945 this.stageValue.endMargin === this.value.endMargin); 22946 } else { 22947 return true; 22948 } 22949 } 22950} 22951MenuItemDividerModifier.identity = Symbol('menuItemDivider'); 22952class MenuItemGroupDividerModifier extends ModifierWithKey { 22953 constructor(value) { 22954 super(value); 22955 } 22956 applyPeer(node, reset) { 22957 if (reset || !this.value) { 22958 getUINativeModule().menu.resetMenuItemGroupDivider(node); 22959 } else { 22960 getUINativeModule().menu.setMenuItemGroupDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 22961 } 22962 } 22963 22964 checkObjectDiff() { 22965 if (isResource(this.stageValue) && isResource(this.value)) { 22966 return !isResourceEqual(this.stageValue, this.value); 22967 } else if (!isResource(this.stageValue) && !isResource(this.value)) { 22968 return !(this.stageValue.strokeWidth === this.value.strokeWidth && 22969 this.stageValue.color === this.value.color && 22970 this.stageValue.startMargin === this.value.startMargin && 22971 this.stageValue.endMargin === this.value.endMargin); 22972 } else { 22973 return true; 22974 } 22975 } 22976} 22977MenuItemGroupDividerModifier.identity = Symbol('menuItemGroupDivider'); 22978class SubMenuExpandingModeModifier extends ModifierWithKey { 22979 constructor(value) { 22980 super(value); 22981 } 22982 applyPeer(node, reset) { 22983 if (reset) { 22984 getUINativeModule().menu.resetSubMenuExpandingMode(node); 22985 } else { 22986 getUINativeModule().menu.setSubMenuExpandingMode(node, this.value); 22987 } 22988 } 22989} 22990SubMenuExpandingModeModifier.identity = Symbol('subMenuExpandingMode'); 22991class ArkMenuComponent extends ArkComponent { 22992 constructor(nativePtr, classType) { 22993 super(nativePtr, classType); 22994 } 22995 width(value) { 22996 modifierWithKey(this._modifiersWithKeys, MenuWidthModifier.identity, MenuWidthModifier, value); 22997 return this; 22998 } 22999 fontSize(value) { 23000 throw new Error('Method not implemented.'); 23001 } 23002 font(value) { 23003 modifierWithKey(this._modifiersWithKeys, MenuFontModifier.identity, MenuFontModifier, value); 23004 return this; 23005 } 23006 fontColor(value) { 23007 modifierWithKey(this._modifiersWithKeys, MenuFontColorModifier.identity, MenuFontColorModifier, value); 23008 return this; 23009 } 23010 radius(value) { 23011 modifierWithKey(this._modifiersWithKeys, RadiusModifier.identity, RadiusModifier, value); 23012 return this; 23013 } 23014 menuItemDivider(value) { 23015 modifierWithKey(this._modifiersWithKeys, MenuItemDividerModifier.identity, MenuItemDividerModifier, value); 23016 return this; 23017 } 23018 menuItemGroupDivider(value) { 23019 modifierWithKey(this._modifiersWithKeys, MenuItemGroupDividerModifier.identity, MenuItemGroupDividerModifier, value); 23020 return this; 23021 } 23022 subMenuExpandingMode(value) { 23023 modifierWithKey(this._modifiersWithKeys, SubMenuExpandingModeModifier.identity, SubMenuExpandingModeModifier, value); 23024 return this; 23025 } 23026} 23027// @ts-ignore 23028if (globalThis.Menu !== undefined) { 23029 globalThis.Menu.attributeModifier = function (modifier) { 23030 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23031 return new ArkMenuComponent(nativePtr); 23032 }, (nativePtr, classType, modifierJS) => { 23033 return new modifierJS.MenuModifier(nativePtr, classType); 23034 }); 23035 }; 23036} 23037 23038/// <reference path='./import.ts' /> 23039class MenuItemSelectedModifier extends ModifierWithKey { 23040 constructor(value) { 23041 super(value); 23042 } 23043 applyPeer(node, reset) { 23044 if (reset) { 23045 getUINativeModule().menuitem.resetMenuItemSelected(node); 23046 } 23047 else { 23048 getUINativeModule().menuitem.setMenuItemSelected(node, this.value); 23049 } 23050 } 23051 checkObjectDiff() { 23052 return !isBaseOrResourceEqual(this.stageValue, this.value); 23053 } 23054} 23055MenuItemSelectedModifier.identity = Symbol('menuItemSelected'); 23056class LabelFontColorModifier extends ModifierWithKey { 23057 constructor(value) { 23058 super(value); 23059 } 23060 applyPeer(node, reset) { 23061 if (reset) { 23062 getUINativeModule().menuitem.resetLabelFontColor(node); 23063 } 23064 else { 23065 getUINativeModule().menuitem.setLabelFontColor(node, this.value); 23066 } 23067 } 23068 checkObjectDiff() { 23069 return !isBaseOrResourceEqual(this.stageValue, this.value); 23070 } 23071} 23072LabelFontColorModifier.identity = Symbol('labelfontColor'); 23073class ContentFontColorModifier extends ModifierWithKey { 23074 constructor(value) { 23075 super(value); 23076 } 23077 applyPeer(node, reset) { 23078 if (reset) { 23079 getUINativeModule().menuitem.resetContentFontColor(node); 23080 } 23081 else { 23082 getUINativeModule().menuitem.setContentFontColor(node, this.value); 23083 } 23084 } 23085 checkObjectDiff() { 23086 return !isBaseOrResourceEqual(this.stageValue, this.value); 23087 } 23088} 23089ContentFontColorModifier.identity = Symbol('contentfontColor'); 23090class LabelFontModifier extends ModifierWithKey { 23091 constructor(value) { 23092 super(value); 23093 } 23094 applyPeer(node, reset) { 23095 if (reset || !this.value) { 23096 getUINativeModule().menuitem.resetLabelFont(node); 23097 } 23098 else { 23099 getUINativeModule().menuitem.setLabelFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 23100 } 23101 } 23102 checkObjectDiff() { 23103 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 23104 let weightEQ = this.stageValue.weight === this.value.weight; 23105 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 23106 let styleEQ = this.stageValue.style === this.value.style; 23107 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 23108 } 23109} 23110LabelFontModifier.identity = Symbol('labelFont'); 23111class ContentFontModifier extends ModifierWithKey { 23112 constructor(value) { 23113 super(value); 23114 } 23115 applyPeer(node, reset) { 23116 if (reset || !this.value) { 23117 getUINativeModule().menuitem.resetContentFont(node); 23118 } 23119 else { 23120 getUINativeModule().menuitem.setContentFont(node, this.value.size, this.value.weight, this.value.family, this.value.style); 23121 } 23122 } 23123 checkObjectDiff() { 23124 let sizeEQ = isBaseOrResourceEqual(this.stageValue.size, this.value.size); 23125 let weightEQ = this.stageValue.weight === this.value.weight; 23126 let familyEQ = isBaseOrResourceEqual(this.stageValue.family, this.value.family); 23127 let styleEQ = this.stageValue.style === this.value.style; 23128 return !sizeEQ || !weightEQ || !familyEQ || !styleEQ; 23129 } 23130} 23131ContentFontModifier.identity = Symbol('contentFont'); 23132class MenuItemSelectIconModifier extends ModifierWithKey { 23133 applyPeer(node, reset) { 23134 if (reset || !this.value) { 23135 getUINativeModule().menuitem.resetSelectIcon(node); 23136 } else { 23137 getUINativeModule().menuitem.setSelectIcon(node, this.value); 23138 } 23139 } 23140 checkObjectDiff() { 23141 return !isBaseOrResourceEqual(this.stageValue, this.value); 23142 } 23143} 23144MenuItemSelectIconModifier.identity = Symbol('selectIcon'); 23145class ArkMenuItemComponent extends ArkComponent { 23146 constructor(nativePtr, classType) { 23147 super(nativePtr, classType); 23148 } 23149 selected(value) { 23150 modifierWithKey(this._modifiersWithKeys, MenuItemSelectedModifier.identity, MenuItemSelectedModifier, value); 23151 return this; 23152 } 23153 selectIcon(value) { 23154 modifierWithKey(this._modifiersWithKeys, MenuItemSelectIconModifier.identity, MenuItemSelectIconModifier, value); 23155 return this; 23156 } 23157 onChange(callback) { 23158 throw new Error('Method not implemented.'); 23159 } 23160 contentFont(value) { 23161 modifierWithKey(this._modifiersWithKeys, ContentFontModifier.identity, ContentFontModifier, value); 23162 return this; 23163 } 23164 contentFontColor(value) { 23165 modifierWithKey(this._modifiersWithKeys, ContentFontColorModifier.identity, ContentFontColorModifier, value); 23166 return this; 23167 } 23168 labelFont(value) { 23169 modifierWithKey(this._modifiersWithKeys, LabelFontModifier.identity, LabelFontModifier, value); 23170 return this; 23171 } 23172 labelFontColor(value) { 23173 modifierWithKey(this._modifiersWithKeys, LabelFontColorModifier.identity, LabelFontColorModifier, value); 23174 return this; 23175 } 23176} 23177// @ts-ignore 23178if (globalThis.MenuItem !== undefined) { 23179 globalThis.MenuItem.attributeModifier = function (modifier) { 23180 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23181 return new ArkMenuItemComponent(nativePtr); 23182 }, (nativePtr, classType, modifierJS) => { 23183 return new modifierJS.MenuItemModifier(nativePtr, classType); 23184 }); 23185 }; 23186} 23187 23188/// <reference path='./import.ts' /> 23189class ArkMenuItemGroupComponent extends ArkComponent { 23190 constructor(nativePtr, classType) { 23191 super(nativePtr, classType); 23192 } 23193} 23194// @ts-ignore 23195if (globalThis.MenuItemGroup !== undefined) { 23196 globalThis.MenuItemGroup.attributeModifier = function (modifier) { 23197 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23198 return new ArkMenuItemGroupComponent(nativePtr); 23199 }, (nativePtr, classType, modifierJS) => { 23200 return new modifierJS.CommonModifier(nativePtr, classType); 23201 }); 23202 }; 23203} 23204 23205/// <reference path='./import.ts' /> 23206class ArkPluginComponent extends ArkComponent { 23207 constructor(nativePtr, classType) { 23208 super(nativePtr, classType); 23209 } 23210 onComplete(callback) { 23211 throw new Error('Method not implemented.'); 23212 } 23213 onError(callback) { 23214 throw new Error('Method not implemented.'); 23215 } 23216 size(value) { 23217 modifierWithKey(this._modifiersWithKeys, PluginSizeModifier.identity, PluginSizeModifier, value); 23218 return this; 23219 } 23220 width(value) { 23221 modifierWithKey(this._modifiersWithKeys, PluginWidthModifier.identity, PluginWidthModifier, value); 23222 return this; 23223 } 23224 height(value) { 23225 modifierWithKey(this._modifiersWithKeys, PluginHeightModifier.identity, PluginHeightModifier, value); 23226 return this; 23227 } 23228} 23229class PluginWidthModifier extends ModifierWithKey { 23230 constructor(value) { 23231 super(value); 23232 } 23233 applyPeer(node, reset) { 23234 if (reset) { 23235 getUINativeModule().plugin.resetWidth(node); 23236 } 23237 else { 23238 getUINativeModule().plugin.setWidth(node, this.value); 23239 } 23240 } 23241 checkObjectDiff() { 23242 if (isResource(this.stageValue) && isResource(this.value)) { 23243 return !isResourceEqual(this.stageValue, this.value); 23244 } 23245 else { 23246 return true; 23247 } 23248 } 23249} 23250PluginWidthModifier.identity = Symbol('pluginWidth'); 23251class PluginHeightModifier extends ModifierWithKey { 23252 constructor(value) { 23253 super(value); 23254 } 23255 applyPeer(node, reset) { 23256 if (reset) { 23257 getUINativeModule().plugin.resetHeight(node); 23258 } 23259 else { 23260 getUINativeModule().plugin.setHeight(node, this.value); 23261 } 23262 } 23263 checkObjectDiff() { 23264 if (isResource(this.stageValue) && isResource(this.value)) { 23265 return !isResourceEqual(this.stageValue, this.value); 23266 } 23267 else { 23268 return true; 23269 } 23270 } 23271} 23272PluginHeightModifier.identity = Symbol('pluginHeight'); 23273class PluginSizeModifier extends ModifierWithKey { 23274 constructor(value) { 23275 super(value); 23276 } 23277 applyPeer(node, reset) { 23278 if (reset) { 23279 getUINativeModule().plugin.resetSize(node); 23280 } 23281 else { 23282 getUINativeModule().plugin.setSize(node, this.value.width, this.value.height); 23283 } 23284 } 23285 checkObjectDiff() { 23286 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 23287 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 23288 } 23289} 23290PluginSizeModifier.identity = Symbol('size'); 23291// @ts-ignore 23292if (globalThis.PluginComponent !== undefined) { 23293 globalThis.PluginComponent.attributeModifier = function (modifier) { 23294 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23295 return new ArkPluginComponent(nativePtr); 23296 }, (nativePtr, classType, modifierJS) => { 23297 return new modifierJS.PluginComponentModifier(nativePtr, classType); 23298 }); 23299 }; 23300} 23301 23302/// <reference path='./import.ts' /> 23303class ArkProgressComponent extends ArkComponent { 23304 constructor(nativePtr, classType) { 23305 super(nativePtr, classType); 23306 } 23307 initialize(value) { 23308 if (value[0] !== undefined) { 23309 modifierWithKey(this._modifiersWithKeys, 23310 ProgressInitializeModifier.identity, ProgressInitializeModifier, value[0]); 23311 } 23312 return this; 23313 } 23314 allowChildCount() { 23315 return 0; 23316 } 23317 value(value) { 23318 modifierWithKey(this._modifiersWithKeys, ProgressValueModifier.identity, ProgressValueModifier, value); 23319 return this; 23320 } 23321 color(value) { 23322 modifierWithKey(this._modifiersWithKeys, ProgressColorModifier.identity, ProgressColorModifier, value); 23323 return this; 23324 } 23325 style(value) { 23326 modifierWithKey(this._modifiersWithKeys, ProgressStyleModifier.identity, ProgressStyleModifier, value); 23327 return this; 23328 } 23329 backgroundColor(value) { 23330 modifierWithKey(this._modifiersWithKeys, ProgressBackgroundColorModifier.identity, ProgressBackgroundColorModifier, value); 23331 return this; 23332 } 23333 contentModifier(value) { 23334 modifierWithKey(this._modifiersWithKeys, ProgressContentModifier.identity, ProgressContentModifier, value); 23335 return this; 23336 } 23337 setContentModifier(modifier) { 23338 if (modifier === undefined || modifier === null) { 23339 getUINativeModule().progress.setContentModifierBuilder(this.nativePtr, false); 23340 return; 23341 } 23342 this.needRebuild = false; 23343 if (this.builder !== modifier.applyContent()) { 23344 this.needRebuild = true; 23345 } 23346 this.builder = modifier.applyContent(); 23347 this.modifier = modifier; 23348 getUINativeModule().progress.setContentModifierBuilder(this.nativePtr, this); 23349 return this; 23350 } 23351 makeContentModifierNode(context, progressConfig) { 23352 progressConfig.contentModifier = this.modifier; 23353 if (isUndefined(this.progressNode) || this.needRebuild) { 23354 let xNode = globalThis.requireNapi('arkui.node'); 23355 this.progressNode = new xNode.BuilderNode(context); 23356 this.progressNode.build(this.builder, progressConfig); 23357 this.needRebuild = false; 23358 } else { 23359 this.progressNode.update(progressConfig); 23360 } 23361 return this.progressNode.getFrameNode(); 23362 } 23363} 23364class ProgressInitializeModifier extends ModifierWithKey { 23365 constructor(value) { 23366 super(value); 23367 } 23368 applyPeer(node, reset) { 23369 if (reset) { 23370 getUINativeModule().progress.resetProgressInitialize(node); 23371 } 23372 else { 23373 getUINativeModule().progress.setProgressInitialize(node, this.value.value, 23374 this.value.total, this.value.style, this.value.type); 23375 } 23376 } 23377} 23378ProgressInitializeModifier.identity = Symbol('progressInitialize'); 23379class ProgressValueModifier extends ModifierWithKey { 23380 applyPeer(node, reset) { 23381 if (reset) { 23382 getUINativeModule().progress.ResetProgressValue(node); 23383 } 23384 else { 23385 getUINativeModule().progress.SetProgressValue(node, this.value); 23386 } 23387 } 23388 checkObjectDiff() { 23389 return true; 23390 } 23391} 23392ProgressValueModifier.identity = Symbol('value'); 23393class ProgressColorModifier extends ModifierWithKey { 23394 applyPeer(node, reset) { 23395 if (reset) { 23396 getUINativeModule().progress.resetProgressColor(node); 23397 } 23398 else { 23399 getUINativeModule().progress.setProgressColor(node, this.value); 23400 } 23401 } 23402 checkObjectDiff() { 23403 return this.stageValue !== this.value; 23404 } 23405} 23406ProgressColorModifier.identity = Symbol('color'); 23407class ProgressStyleModifier extends ModifierWithKey { 23408 applyPeer(node, reset) { 23409 if (reset) { 23410 getUINativeModule().progress.ResetProgressStyle(node); 23411 } 23412 else { 23413 let strokeWidth = this.value.strokeWidth; 23414 let scaleCount = this.value.scaleCount; 23415 let scaleWidth = this.value.scaleWidth; 23416 let enableSmoothEffect = this.value.enableSmoothEffect; 23417 let borderColor = this.value.borderColor; 23418 let borderWidth = this.value.borderWidth; 23419 let content = this.value.content; 23420 let fontSize; 23421 let fontWeight; 23422 let fontFamily; 23423 let fontStyle; 23424 if (this.value.font) { 23425 fontSize = this.value.font.size; 23426 fontWeight = this.value.font.weight; 23427 fontFamily = this.value.font.family; 23428 fontStyle = this.value.font.style; 23429 } 23430 let fontColor = this.value.fontColor; 23431 let enableScanEffect = this.value.enableScanEffect; 23432 let showDefaultPercentage = this.value.showDefaultPercentage; 23433 let shadow = this.value.shadow; 23434 let status = this.value.status; 23435 let strokeRadius = this.value.strokeRadius; 23436 getUINativeModule().progress.SetProgressStyle(node, strokeWidth, scaleCount, 23437 scaleWidth, enableSmoothEffect, borderColor, borderWidth, content, fontSize, 23438 fontWeight, fontFamily, fontStyle, fontColor, enableScanEffect, showDefaultPercentage, 23439 shadow, status, strokeRadius); 23440 } 23441 } 23442 checkObjectDiff() { 23443 return true; 23444 } 23445} 23446ProgressStyleModifier.identity = Symbol('style'); 23447class ProgressBackgroundColorModifier extends ModifierWithKey { 23448 applyPeer(node, reset) { 23449 if (reset) { 23450 getUINativeModule().progress.resetProgressBackgroundColor(node); 23451 } 23452 else { 23453 getUINativeModule().progress.setProgressBackgroundColor(node, this.value); 23454 } 23455 } 23456 checkObjectDiff() { 23457 return !isBaseOrResourceEqual(this.stageValue, this.value); 23458 } 23459} 23460ProgressBackgroundColorModifier.identity = Symbol('progressBackgroundColor'); 23461class ProgressContentModifier extends ModifierWithKey { 23462 constructor(value) { 23463 super(value); 23464 } 23465 applyPeer(node, reset, component) { 23466 let progressComponent = component; 23467 progressComponent.setContentModifier(this.value); 23468 } 23469} 23470ProgressContentModifier.identity = Symbol('progressContentModifier'); 23471// @ts-ignore 23472if (globalThis.Progress !== undefined) { 23473 globalThis.Progress.attributeModifier = function (modifier) { 23474 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23475 return new ArkProgressComponent(nativePtr); 23476 }, (nativePtr, classType, modifierJS) => { 23477 return new modifierJS.ProgressModifier(nativePtr, classType); 23478 }); 23479 }; 23480 23481 globalThis.Progress.contentModifier = function (modifier) { 23482 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 23483 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 23484 let component = this.createOrGetNode(elmtId, () => { 23485 return new ArkProgressComponent(nativeNode); 23486 }); 23487 component.setContentModifier(modifier); 23488 }; 23489} 23490 23491/// <reference path='./import.ts' /> 23492class ArkQRCodeComponent extends ArkComponent { 23493 constructor(nativePtr, classType) { 23494 super(nativePtr, classType); 23495 } 23496 color(value) { 23497 modifierWithKey(this._modifiersWithKeys, QRColorModifier.identity, QRColorModifier, value); 23498 return this; 23499 } 23500 backgroundColor(value) { 23501 modifierWithKey(this._modifiersWithKeys, QRBackgroundColorModifier.identity, QRBackgroundColorModifier, value); 23502 return this; 23503 } 23504 contentOpacity(value) { 23505 modifierWithKey(this._modifiersWithKeys, QRContentOpacityModifier.identity, QRContentOpacityModifier, value); 23506 return this; 23507 } 23508} 23509class QRColorModifier extends ModifierWithKey { 23510 constructor(value) { 23511 super(value); 23512 } 23513 applyPeer(node, reset) { 23514 if (reset) { 23515 getUINativeModule().qrcode.resetQRColor(node); 23516 } 23517 else { 23518 getUINativeModule().qrcode.setQRColor(node, this.value); 23519 } 23520 } 23521 checkObjectDiff() { 23522 return !isBaseOrResourceEqual(this.stageValue, this.value); 23523 } 23524} 23525QRColorModifier.identity = Symbol('color'); 23526class QRBackgroundColorModifier extends ModifierWithKey { 23527 constructor(value) { 23528 super(value); 23529 } 23530 applyPeer(node, reset) { 23531 if (reset) { 23532 getUINativeModule().qrcode.resetQRBackgroundColor(node); 23533 } 23534 else { 23535 getUINativeModule().qrcode.setQRBackgroundColor(node, this.value); 23536 } 23537 } 23538 checkObjectDiff() { 23539 return !isBaseOrResourceEqual(this.stageValue, this.value); 23540 } 23541} 23542QRBackgroundColorModifier.identity = Symbol('qrBackgroundColor'); 23543class QRContentOpacityModifier extends ModifierWithKey { 23544 constructor(value) { 23545 super(value); 23546 } 23547 applyPeer(node, reset) { 23548 if (reset) { 23549 getUINativeModule().qrcode.resetContentOpacity(node); 23550 } 23551 else { 23552 getUINativeModule().qrcode.setContentOpacity(node, this.value); 23553 } 23554 } 23555 checkObjectDiff() { 23556 return !isBaseOrResourceEqual(this.stageValue, this.value); 23557 } 23558} 23559QRContentOpacityModifier.identity = Symbol('qrContentOpacity'); 23560// @ts-ignore 23561if (globalThis.QRCode !== undefined) { 23562 globalThis.QRCode.attributeModifier = function (modifier) { 23563 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23564 return new ArkQRCodeComponent(nativePtr); 23565 }, (nativePtr, classType, modifierJS) => { 23566 return new modifierJS.QRCodeModifier(nativePtr, classType); 23567 }); 23568 }; 23569} 23570 23571/// <reference path='./import.ts' /> 23572class ArkRichTextComponent extends ArkComponent { 23573 constructor(nativePtr, classType) { 23574 super(nativePtr, classType); 23575 } 23576 onStart(callback) { 23577 throw new Error('Method not implemented.'); 23578 } 23579 onComplete(callback) { 23580 throw new Error('Method not implemented.'); 23581 } 23582} 23583// @ts-ignore 23584if (globalThis.RichText !== undefined) { 23585 globalThis.RichText.attributeModifier = function (modifier) { 23586 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23587 return new ArkRichTextComponent(nativePtr); 23588 }, (nativePtr, classType, modifierJS) => { 23589 return new modifierJS.CommonModifier(nativePtr, classType); 23590 }); 23591 }; 23592} 23593 23594/// <reference path='./import.ts' /> 23595class ArkScrollBarComponent extends ArkComponent { 23596 constructor(nativePtr, classType) { 23597 super(nativePtr, classType); 23598 } 23599} 23600// @ts-ignore 23601if (globalThis.ScrollBar !== undefined) { 23602 globalThis.ScrollBar.attributeModifier = function (modifier) { 23603 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23604 return new ArkScrollBarComponent(nativePtr); 23605 }, (nativePtr, classType, modifierJS) => { 23606 return new modifierJS.CommonModifier(nativePtr, classType); 23607 }); 23608 }; 23609} 23610 23611/// <reference path='./import.ts' /> 23612class ArkStepperComponent extends ArkComponent { 23613 constructor(nativePtr, classType) { 23614 super(nativePtr, classType); 23615 } 23616 onFinish(callback) { 23617 throw new Error('Method not implemented.'); 23618 } 23619 onSkip(callback) { 23620 throw new Error('Method not implemented.'); 23621 } 23622 onChange(callback) { 23623 throw new Error('Method not implemented.'); 23624 } 23625 onNext(callback) { 23626 throw new Error('Method not implemented.'); 23627 } 23628 onPrevious(callback) { 23629 throw new Error('Method not implemented.'); 23630 } 23631} 23632// @ts-ignore 23633if (globalThis.Stepper !== undefined) { 23634 globalThis.Stepper.attributeModifier = function (modifier) { 23635 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23636 return new ArkStepperComponent(nativePtr); 23637 }, (nativePtr, classType, modifierJS) => { 23638 return new modifierJS.CommonModifier(nativePtr, classType); 23639 }); 23640 }; 23641} 23642 23643/// <reference path='./import.ts' /> 23644class ArkStepperItemComponent extends ArkComponent { 23645 constructor(nativePtr, classType) { 23646 super(nativePtr, classType); 23647 } 23648 prevLabel(value) { 23649 modifierWithKey(this._modifiersWithKeys, PrevLabelModifier.identity, PrevLabelModifier, value); 23650 return this; 23651 } 23652 nextLabel(value) { 23653 modifierWithKey(this._modifiersWithKeys, NextLabelModifier.identity, NextLabelModifier, value); 23654 return this; 23655 } 23656 status(value) { 23657 modifierWithKey(this._modifiersWithKeys, StatusModifier.identity, StatusModifier, value); 23658 return this; 23659 } 23660} 23661class NextLabelModifier extends ModifierWithKey { 23662 constructor(value) { 23663 super(value); 23664 } 23665 applyPeer(node, reset) { 23666 if (reset) { 23667 getUINativeModule().stepperItem.resetNextLabel(node); 23668 } 23669 else { 23670 getUINativeModule().stepperItem.setNextLabel(node, this.value); 23671 } 23672 } 23673} 23674NextLabelModifier.identity = Symbol('NextLabel'); 23675 23676class PrevLabelModifier extends ModifierWithKey { 23677 constructor(value) { 23678 super(value); 23679 } 23680 static identity = Symbol('prevLabel'); 23681 applyPeer(node, reset) { 23682 if (reset) { 23683 getUINativeModule().stepperItem.resetPrevLabel(node); 23684 } 23685 else { 23686 getUINativeModule().stepperItem.setPrevLabel(node, this.value); 23687 } 23688 } 23689} 23690 23691class StatusModifier extends ModifierWithKey { 23692 constructor(value) { 23693 super(value); 23694 } 23695 static identity = Symbol('status'); 23696 applyPeer(node, reset) { 23697 if (reset) { 23698 getUINativeModule().stepperItem.resetStatus(node); 23699 } 23700 else { 23701 getUINativeModule().stepperItem.setStatus(node, this.value); 23702 } 23703 } 23704} 23705// @ts-ignore 23706if (globalThis.StepperItem !== undefined) { 23707 globalThis.StepperItem.attributeModifier = function (modifier) { 23708 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23709 return new ArkStepperItemComponent(nativePtr); 23710 }, (nativePtr, classType, modifierJS) => { 23711 return new modifierJS.StepperItemModifier(nativePtr, classType); 23712 }); 23713 }; 23714} 23715 23716/// <reference path='./import.ts' /> 23717class ArkTextClockComponent extends ArkComponent { 23718 constructor(nativePtr, classType) { 23719 super(nativePtr, classType); 23720 } 23721 format(value) { 23722 modifierWithKey(this._modifiersWithKeys, TextClockFormatModifier.identity, TextClockFormatModifier, value); 23723 return this; 23724 } 23725 onDateChange(event) { 23726 throw new Error('Method not implemented.'); 23727 } 23728 fontColor(value) { 23729 modifierWithKey(this._modifiersWithKeys, TextClockFontColorModifier.identity, TextClockFontColorModifier, value); 23730 return this; 23731 } 23732 fontSize(value) { 23733 modifierWithKey(this._modifiersWithKeys, TextClockFontSizeModifier.identity, TextClockFontSizeModifier, value); 23734 return this; 23735 } 23736 fontStyle(value) { 23737 modifierWithKey(this._modifiersWithKeys, TextClockFontStyleModifier.identity, TextClockFontStyleModifier, value); 23738 return this; 23739 } 23740 fontWeight(value) { 23741 modifierWithKey(this._modifiersWithKeys, TextClockFontWeightModifier.identity, TextClockFontWeightModifier, value); 23742 return this; 23743 } 23744 fontFamily(value) { 23745 modifierWithKey(this._modifiersWithKeys, TextClockFontFamilyModifier.identity, TextClockFontFamilyModifier, value); 23746 return this; 23747 } 23748 textShadow(value) { 23749 modifierWithKey(this._modifiersWithKeys, TextClockTextShadowModifier.identity, TextClockTextShadowModifier, value); 23750 return this; 23751 } 23752 fontFeature(value) { 23753 modifierWithKey(this._modifiersWithKeys, TextClockFontFeatureModifier.identity, TextClockFontFeatureModifier, value); 23754 return this; 23755 } 23756 contentModifier(value) { 23757 modifierWithKey(this._modifiersWithKeys, TextClockContentModifier.identity, TextClockContentModifier, value); 23758 return this; 23759 } 23760 setContentModifier(modifier) { 23761 if (modifier === undefined || modifier === null) { 23762 getUINativeModule().textClock.setContentModifierBuilder(this.nativePtr, false); 23763 return; 23764 } 23765 this.needRebuild = false; 23766 if (this.builder !== modifier.applyContent()) { 23767 this.needRebuild = true; 23768 } 23769 this.builder = modifier.applyContent(); 23770 this.modifier = modifier; 23771 getUINativeModule().textClock.setContentModifierBuilder(this.nativePtr, this); 23772 } 23773 makeContentModifierNode(context, textClockConfiguration) { 23774 textClockConfiguration.contentModifier = this.modifier; 23775 if (isUndefined(this.textClockNode) || this.needRebuild) { 23776 const xNode = globalThis.requireNapi('arkui.node'); 23777 this.textClockNode = new xNode.BuilderNode(context); 23778 this.textClockNode.build(this.builder, textClockConfiguration); 23779 this.needRebuild = false; 23780 } else { 23781 this.textClockNode.update(textClockConfiguration); 23782 } 23783 return this.textClockNode.getFrameNode(); 23784 } 23785 dateTimeOptions(value) { 23786 modifierWithKey(this._modifiersWithKeys, TextClockDateTimeOptionsModifier.identity, TextClockDateTimeOptionsModifier, value); 23787 return this; 23788 } 23789} 23790class TextClockFormatModifier extends ModifierWithKey { 23791 constructor(value) { 23792 super(value); 23793 } 23794 applyPeer(node, reset) { 23795 if (reset) { 23796 getUINativeModule().textClock.resetFormat(node); 23797 } 23798 else { 23799 getUINativeModule().textClock.setFormat(node, this.value); 23800 } 23801 } 23802} 23803TextClockFormatModifier.identity = Symbol('textClockFormat'); 23804class TextClockFontColorModifier extends ModifierWithKey { 23805 constructor(value) { 23806 super(value); 23807 } 23808 applyPeer(node, reset) { 23809 if (reset) { 23810 getUINativeModule().textClock.resetFontColor(node); 23811 } 23812 else { 23813 getUINativeModule().textClock.setFontColor(node, this.value); 23814 } 23815 } 23816 checkObjectDiff() { 23817 return !isBaseOrResourceEqual(this.stageValue, this.value); 23818 } 23819} 23820TextClockFontColorModifier.identity = Symbol('textClockFontColor'); 23821class TextClockFontSizeModifier extends ModifierWithKey { 23822 constructor(value) { 23823 super(value); 23824 } 23825 applyPeer(node, reset) { 23826 if (reset) { 23827 getUINativeModule().textClock.resetFontSize(node); 23828 } 23829 else { 23830 getUINativeModule().textClock.setFontSize(node, this.value); 23831 } 23832 } 23833 checkObjectDiff() { 23834 return !isBaseOrResourceEqual(this.stageValue, this.value); 23835 } 23836} 23837TextClockFontSizeModifier.identity = Symbol('textClockFontSize'); 23838class TextClockFontStyleModifier extends ModifierWithKey { 23839 constructor(value) { 23840 super(value); 23841 } 23842 applyPeer(node, reset) { 23843 if (reset) { 23844 getUINativeModule().textClock.resetFontStyle(node); 23845 } 23846 else { 23847 getUINativeModule().textClock.setFontStyle(node, this.value); 23848 } 23849 } 23850} 23851TextClockFontStyleModifier.identity = Symbol('textClockFontStyle'); 23852class TextClockFontWeightModifier extends ModifierWithKey { 23853 constructor(value) { 23854 super(value); 23855 } 23856 applyPeer(node, reset) { 23857 if (reset) { 23858 getUINativeModule().textClock.resetFontWeight(node); 23859 } 23860 else { 23861 getUINativeModule().textClock.setFontWeight(node, this.value); 23862 } 23863 } 23864} 23865TextClockFontWeightModifier.identity = Symbol('textClockFontWeight'); 23866class TextClockFontFamilyModifier extends ModifierWithKey { 23867 constructor(value) { 23868 super(value); 23869 } 23870 applyPeer(node, reset) { 23871 if (reset) { 23872 getUINativeModule().textClock.resetFontFamily(node); 23873 } 23874 else { 23875 getUINativeModule().textClock.setFontFamily(node, this.value); 23876 } 23877 } 23878 checkObjectDiff() { 23879 return !isBaseOrResourceEqual(this.stageValue, this.value); 23880 } 23881} 23882TextClockFontFamilyModifier.identity = Symbol('textClockFontFamily'); 23883class TextClockFontFeatureModifier extends ModifierWithKey { 23884 constructor(value) { 23885 super(value); 23886 } 23887 applyPeer(node, reset) { 23888 if (reset) { 23889 getUINativeModule().textClock.resetFontFeature(node); 23890 } 23891 else { 23892 getUINativeModule().textClock.setFontFeature(node, this.value); 23893 } 23894 } 23895 checkObjectDiff() { 23896 return !isBaseOrResourceEqual(this.stageValue, this.value); 23897 } 23898} 23899TextClockFontFeatureModifier.identity = Symbol('textClockFontFeature'); 23900class TextClockContentModifier extends ModifierWithKey { 23901 constructor(value) { 23902 super(value); 23903 } 23904 applyPeer(node, reset, component) { 23905 let textClockComponent = component; 23906 textClockComponent.setContentModifier(this.value); 23907 } 23908} 23909TextClockContentModifier.identity = Symbol('textClockContentModifier'); 23910class TextClockTextShadowModifier extends ModifierWithKey { 23911 constructor(value) { 23912 super(value); 23913 } 23914 applyPeer(node, reset) { 23915 if (reset) { 23916 getUINativeModule().textClock.resetTextShadow(node); 23917 } 23918 else { 23919 let shadow = new ArkShadowInfoToArray(); 23920 if (!shadow.convertShadowOptions(this.value)) { 23921 getUINativeModule().textClock.resetTextShadow(node); 23922 } 23923 else { 23924 getUINativeModule().textClock.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 23925 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 23926 } 23927 } 23928 } 23929 checkObjectDiff() { 23930 let checkDiff = true; 23931 let arkShadow = new ArkShadowInfoToArray(); 23932 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 23933 Object.getPrototypeOf(this.value).constructor === Object) { 23934 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 23935 } 23936 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 23937 Object.getPrototypeOf(this.value).constructor === Array && 23938 this.stageValue.length === this.value.length) { 23939 let isDiffItem = false; 23940 for (let i = 0; i < this.value.length; i++) { 23941 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 23942 isDiffItem = true; 23943 break; 23944 } 23945 } 23946 if (!isDiffItem) { 23947 checkDiff = false; 23948 } 23949 } 23950 return checkDiff; 23951 } 23952} 23953TextClockTextShadowModifier.identity = Symbol('textClockTextShadow'); 23954 23955class TextClockDateTimeOptionsModifier extends ModifierWithKey { 23956 constructor(value) { 23957 super(value); 23958 } 23959 applyPeer(node, reset) { 23960 if (reset) { 23961 getUINativeModule().textClock.resetDateTimeOptions(node); 23962 } 23963 else { 23964 getUINativeModule().textClock.setDateTimeOptions(node, this.value.hour); 23965 } 23966 } 23967 checkObjectDiff() { 23968 return !isBaseOrResourceEqual(this.stageValue, this.value); 23969 } 23970} 23971TextClockDateTimeOptionsModifier.identity = Symbol('textClockDateTimeOptions'); 23972 23973// @ts-ignore 23974if (globalThis.TextClock !== undefined) { 23975 globalThis.TextClock.attributeModifier = function (modifier) { 23976 attributeModifierFunc.call(this, modifier, (nativePtr) => { 23977 return new ArkTextClockComponent(nativePtr); 23978 }, (nativePtr, classType, modifierJS) => { 23979 return new modifierJS.TextClockModifier(nativePtr, classType); 23980 }); 23981 }; 23982 globalThis.TextClock.contentModifier = function (modifier) { 23983 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 23984 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 23985 let component = this.createOrGetNode(elmtId, () => { 23986 return new ArkTextClockComponent(nativeNode); 23987 }); 23988 component.setContentModifier(modifier); 23989 }; 23990} 23991 23992/// <reference path='./import.ts' /> 23993class ArkTextTimerComponent extends ArkComponent { 23994 constructor(nativePtr, classType) { 23995 super(nativePtr, classType); 23996 } 23997 fontColor(value) { 23998 modifierWithKey(this._modifiersWithKeys, TextTimerFontColorModifier.identity, TextTimerFontColorModifier, value); 23999 return this; 24000 } 24001 fontSize(value) { 24002 modifierWithKey(this._modifiersWithKeys, TextTimerFontSizeModifier.identity, TextTimerFontSizeModifier, value); 24003 return this; 24004 } 24005 fontWeight(value) { 24006 modifierWithKey(this._modifiersWithKeys, TextTimerFontWeightModifier.identity, TextTimerFontWeightModifier, value); 24007 return this; 24008 } 24009 fontStyle(value) { 24010 modifierWithKey(this._modifiersWithKeys, TextTimerFontStyleModifier.identity, TextTimerFontStyleModifier, value); 24011 return this; 24012 } 24013 fontFamily(value) { 24014 modifierWithKey(this._modifiersWithKeys, TextTimerFontFamilyModifier.identity, TextTimerFontFamilyModifier, value); 24015 return this; 24016 } 24017 format(value) { 24018 modifierWithKey(this._modifiersWithKeys, TextTimerFormatModifier.identity, TextTimerFormatModifier, value); 24019 return this; 24020 } 24021 textShadow(value) { 24022 modifierWithKey(this._modifiersWithKeys, TextTimerTextShadowModifier.identity, TextTimerTextShadowModifier, value); 24023 return this; 24024 } 24025 contentModifier(value) { 24026 modifierWithKey(this._modifiersWithKeys, TextTimerContentModifier.identity, TextTimerContentModifier, value); 24027 return this; 24028 } 24029 setContentModifier(modifier) { 24030 if (modifier === undefined || modifier === null) { 24031 getUINativeModule().textTimer.setContentModifierBuilder(this.nativePtr, false); 24032 return; 24033 } 24034 this.builder = modifier.applyContent(); 24035 this.modifier = modifier; 24036 getUINativeModule().textTimer.setContentModifierBuilder(this.nativePtr, this); 24037 } 24038 makeContentModifierNode(context, textTimerConfiguration) { 24039 textTimerConfiguration.contentModifier = this.modifier; 24040 if (isUndefined(this.textTimerNode)) { 24041 let xNode = globalThis.requireNapi('arkui.node'); 24042 this.textTimerNode = new xNode.BuilderNode(context); 24043 this.textTimerNode.build(this.builder, textTimerConfiguration); 24044 } else { 24045 this.textTimerNode.update(textTimerConfiguration); 24046 } 24047 return this.textTimerNode.getFrameNode(); 24048 } 24049 onTimer(event) { 24050 throw new Error('Method not implemented.'); 24051 } 24052} 24053class TextTimerFontColorModifier extends ModifierWithKey { 24054 applyPeer(node, reset) { 24055 if (reset) { 24056 getUINativeModule().textTimer.resetFontColor(node); 24057 } 24058 else { 24059 getUINativeModule().textTimer.setFontColor(node, this.value); 24060 } 24061 } 24062 checkObjectDiff() { 24063 return !isBaseOrResourceEqual(this.stageValue, this.value); 24064 } 24065} 24066TextTimerFontColorModifier.identity = Symbol('fontColor'); 24067class TextTimerFontSizeModifier extends ModifierWithKey { 24068 applyPeer(node, reset) { 24069 if (reset) { 24070 getUINativeModule().textTimer.resetFontSize(node); 24071 } 24072 else { 24073 getUINativeModule().textTimer.setFontSize(node, this.value); 24074 } 24075 } 24076 checkObjectDiff() { 24077 return !isBaseOrResourceEqual(this.stageValue, this.value); 24078 } 24079} 24080TextTimerFontSizeModifier.identity = Symbol('fontSize'); 24081class TextTimerFontWeightModifier extends ModifierWithKey { 24082 applyPeer(node, reset) { 24083 if (reset) { 24084 getUINativeModule().textTimer.resetFontWeight(node); 24085 } 24086 else { 24087 getUINativeModule().textTimer.setFontWeight(node, this.value); 24088 } 24089 } 24090} 24091TextTimerFontWeightModifier.identity = Symbol('fontWeight'); 24092class TextTimerFontStyleModifier extends ModifierWithKey { 24093 applyPeer(node, reset) { 24094 if (reset) { 24095 getUINativeModule().textTimer.resetFontStyle(node); 24096 } 24097 else { 24098 getUINativeModule().textTimer.setFontStyle(node, this.value); 24099 } 24100 } 24101 checkObjectDiff() { 24102 return !isBaseOrResourceEqual(this.stageValue, this.value); 24103 } 24104} 24105TextTimerFontStyleModifier.identity = Symbol('fontStyle'); 24106class TextTimerFontFamilyModifier extends ModifierWithKey { 24107 applyPeer(node, reset) { 24108 if (reset) { 24109 getUINativeModule().textTimer.resetFontFamily(node); 24110 } 24111 else { 24112 getUINativeModule().textTimer.setFontFamily(node, this.value); 24113 } 24114 } 24115 checkObjectDiff() { 24116 return !isBaseOrResourceEqual(this.stageValue, this.value); 24117 } 24118} 24119TextTimerFontFamilyModifier.identity = Symbol('fontFamily'); 24120class TextTimerFormatModifier extends ModifierWithKey { 24121 applyPeer(node, reset) { 24122 if (reset) { 24123 getUINativeModule().textTimer.resetFormat(node); 24124 } 24125 else { 24126 getUINativeModule().textTimer.setFormat(node, this.value); 24127 } 24128 } 24129} 24130TextTimerFormatModifier.identity = Symbol('textTimerFormat'); 24131class TextTimerTextShadowModifier extends ModifierWithKey { 24132 constructor(value) { 24133 super(value); 24134 } 24135 applyPeer(node, reset) { 24136 if (reset) { 24137 getUINativeModule().textTimer.resetTextShadow(node); 24138 } 24139 else { 24140 let shadow = new ArkShadowInfoToArray(); 24141 if (!shadow.convertShadowOptions(this.value)) { 24142 getUINativeModule().textTimer.resetTextShadow(node); 24143 } 24144 else { 24145 getUINativeModule().textTimer.setTextShadow(node, shadow.radius, shadow.type, shadow.color, 24146 shadow.offsetX, shadow.offsetY, shadow.fill, shadow.radius.length); 24147 } 24148 } 24149 } 24150 checkObjectDiff() { 24151 let checkDiff = true; 24152 let arkShadow = new ArkShadowInfoToArray(); 24153 if (Object.getPrototypeOf(this.stageValue).constructor === Object && 24154 Object.getPrototypeOf(this.value).constructor === Object) { 24155 checkDiff = arkShadow.checkDiff(this.stageValue, this.value); 24156 } 24157 else if (Object.getPrototypeOf(this.stageValue).constructor === Array && 24158 Object.getPrototypeOf(this.value).constructor === Array && 24159 this.stageValue.length === this.value.length) { 24160 let isDiffItem = false; 24161 for (let i = 0; i < this.value.length; i++) { 24162 if (arkShadow.checkDiff(this.stageValue[i], this.value[1])) { 24163 isDiffItem = true; 24164 break; 24165 } 24166 } 24167 if (!isDiffItem) { 24168 checkDiff = false; 24169 } 24170 } 24171 return checkDiff; 24172 } 24173} 24174TextTimerTextShadowModifier.identity = Symbol('textTimerTextShadow'); 24175class TextTimerContentModifier extends ModifierWithKey { 24176 constructor(value) { 24177 super(value); 24178 } 24179 applyPeer(node, reset, component) { 24180 let textTimerComponent = component; 24181 textTimerComponent.setContentModifier(this.value); 24182 } 24183} 24184TextTimerContentModifier.identity = Symbol('textTimerContentModifier'); 24185// @ts-ignore 24186if (globalThis.TextTimer !== undefined) { 24187 globalThis.TextTimer.attributeModifier = function (modifier) { 24188 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24189 return new ArkTextTimerComponent(nativePtr); 24190 }, (nativePtr, classType, modifierJS) => { 24191 return new modifierJS.TextTimerModifier(nativePtr, classType); 24192 }); 24193 }; 24194 globalThis.TextTimer.contentModifier = function (modifier) { 24195 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 24196 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 24197 let component = this.createOrGetNode(elmtId, () => { 24198 return new ArkTextTimerComponent(nativeNode); 24199 }); 24200 component.setContentModifier(modifier); 24201 }; 24202} 24203 24204/// <reference path='./import.ts' /> 24205class ArkWebComponent extends ArkComponent { 24206 constructor(nativePtr, classType) { 24207 super(nativePtr, classType); 24208 } 24209 javaScriptAccess(javaScriptAccess) { 24210 throw new Error('Method not implemented.'); 24211 } 24212 fileAccess(fileAccess) { 24213 throw new Error('Method not implemented.'); 24214 } 24215 onlineImageAccess(onlineImageAccess) { 24216 throw new Error('Method not implemented.'); 24217 } 24218 domStorageAccess(domStorageAccess) { 24219 throw new Error('Method not implemented.'); 24220 } 24221 imageAccess(imageAccess) { 24222 throw new Error('Method not implemented.'); 24223 } 24224 mixedMode(mixedMode) { 24225 throw new Error('Method not implemented.'); 24226 } 24227 zoomAccess(zoomAccess) { 24228 throw new Error('Method not implemented.'); 24229 } 24230 geolocationAccess(geolocationAccess) { 24231 throw new Error('Method not implemented.'); 24232 } 24233 javaScriptProxy(javaScriptProxy) { 24234 throw new Error('Method not implemented.'); 24235 } 24236 password(password) { 24237 throw new Error('Method not implemented.'); 24238 } 24239 cacheMode(cacheMode) { 24240 throw new Error('Method not implemented.'); 24241 } 24242 darkMode(mode) { 24243 throw new Error('Method not implemented.'); 24244 } 24245 forceDarkAccess(access) { 24246 throw new Error('Method not implemented.'); 24247 } 24248 mediaOptions(options) { 24249 throw new Error('Method not implemented.'); 24250 } 24251 tableData(tableData) { 24252 throw new Error('Method not implemented.'); 24253 } 24254 wideViewModeAccess(wideViewModeAccess) { 24255 throw new Error('Method not implemented.'); 24256 } 24257 overviewModeAccess(overviewModeAccess) { 24258 throw new Error('Method not implemented.'); 24259 } 24260 overScrollMode(mode) { 24261 throw new Error('Method not implemented.'); 24262 } 24263 textZoomAtio(textZoomAtio) { 24264 throw new Error('Method not implemented.'); 24265 } 24266 textZoomRatio(textZoomRatio) { 24267 throw new Error('Method not implemented.'); 24268 } 24269 databaseAccess(databaseAccess) { 24270 throw new Error('Method not implemented.'); 24271 } 24272 initialScale(percent) { 24273 throw new Error('Method not implemented.'); 24274 } 24275 userAgent(userAgent) { 24276 throw new Error('Method not implemented.'); 24277 } 24278 onPageEnd(callback) { 24279 throw new Error('Method not implemented.'); 24280 } 24281 onPageBegin(callback) { 24282 throw new Error('Method not implemented.'); 24283 } 24284 onProgressChange(callback) { 24285 throw new Error('Method not implemented.'); 24286 } 24287 onTitleReceive(callback) { 24288 throw new Error('Method not implemented.'); 24289 } 24290 onGeolocationHide(callback) { 24291 throw new Error('Method not implemented.'); 24292 } 24293 onGeolocationShow(callback) { 24294 throw new Error('Method not implemented.'); 24295 } 24296 onRequestSelected(callback) { 24297 throw new Error('Method not implemented.'); 24298 } 24299 onAlert(callback) { 24300 throw new Error('Method not implemented.'); 24301 } 24302 onBeforeUnload(callback) { 24303 throw new Error('Method not implemented.'); 24304 } 24305 onConfirm(callback) { 24306 throw new Error('Method not implemented.'); 24307 } 24308 onPrompt(callback) { 24309 throw new Error('Method not implemented.'); 24310 } 24311 onConsole(callback) { 24312 throw new Error('Method not implemented.'); 24313 } 24314 onErrorReceive(callback) { 24315 throw new Error('Method not implemented.'); 24316 } 24317 onHttpErrorReceive(callback) { 24318 throw new Error('Method not implemented.'); 24319 } 24320 onDownloadStart(callback) { 24321 throw new Error('Method not implemented.'); 24322 } 24323 onRefreshAccessedHistory(callback) { 24324 throw new Error('Method not implemented.'); 24325 } 24326 onUrlLoadIntercept(callback) { 24327 throw new Error('Method not implemented.'); 24328 } 24329 onSslErrorReceive(callback) { 24330 throw new Error('Method not implemented.'); 24331 } 24332 onRenderExited(callback) { 24333 throw new Error('Method not implemented.'); 24334 } 24335 onShowFileSelector(callback) { 24336 throw new Error('Method not implemented.'); 24337 } 24338 onFileSelectorShow(callback) { 24339 throw new Error('Method not implemented.'); 24340 } 24341 onResourceLoad(callback) { 24342 throw new Error('Method not implemented.'); 24343 } 24344 onFullScreenExit(callback) { 24345 throw new Error('Method not implemented.'); 24346 } 24347 onFullScreenEnter(callback) { 24348 throw new Error('Method not implemented.'); 24349 } 24350 onScaleChange(callback) { 24351 throw new Error('Method not implemented.'); 24352 } 24353 onHttpAuthRequest(callback) { 24354 throw new Error('Method not implemented.'); 24355 } 24356 onInterceptRequest(callback) { 24357 throw new Error('Method not implemented.'); 24358 } 24359 onPermissionRequest(callback) { 24360 throw new Error('Method not implemented.'); 24361 } 24362 onScreenCaptureRequest(callback) { 24363 throw new Error('Method not implemented.'); 24364 } 24365 onContextMenuShow(callback) { 24366 throw new Error('Method not implemented.'); 24367 } 24368 mediaPlayGestureAccess(access) { 24369 throw new Error('Method not implemented.'); 24370 } 24371 onSearchResultReceive(callback) { 24372 throw new Error('Method not implemented.'); 24373 } 24374 onScroll(callback) { 24375 throw new Error('Method not implemented.'); 24376 } 24377 onSslErrorEventReceive(callback) { 24378 throw new Error('Method not implemented.'); 24379 } 24380 onSslErrorEvent(callback) { 24381 throw new Error('Method not implemented.'); 24382 } 24383 onClientAuthenticationRequest(callback) { 24384 throw new Error('Method not implemented.'); 24385 } 24386 onWindowNew(callback) { 24387 throw new Error('Method not implemented.'); 24388 } 24389 onWindowExit(callback) { 24390 throw new Error('Method not implemented.'); 24391 } 24392 multiWindowAccess(multiWindow) { 24393 throw new Error('Method not implemented.'); 24394 } 24395 onInterceptKeyEvent(callback) { 24396 throw new Error('Method not implemented.'); 24397 } 24398 webStandardFont(family) { 24399 throw new Error('Method not implemented.'); 24400 } 24401 webSerifFont(family) { 24402 throw new Error('Method not implemented.'); 24403 } 24404 webSansSerifFont(family) { 24405 throw new Error('Method not implemented.'); 24406 } 24407 webFixedFont(family) { 24408 throw new Error('Method not implemented.'); 24409 } 24410 webFantasyFont(family) { 24411 throw new Error('Method not implemented.'); 24412 } 24413 webCursiveFont(family) { 24414 throw new Error('Method not implemented.'); 24415 } 24416 defaultFixedFontSize(size) { 24417 throw new Error('Method not implemented.'); 24418 } 24419 defaultFontSize(size) { 24420 throw new Error('Method not implemented.'); 24421 } 24422 minFontSize(size) { 24423 throw new Error('Method not implemented.'); 24424 } 24425 minLogicalFontSize(size) { 24426 throw new Error('Method not implemented.'); 24427 } 24428 blockNetwork(block) { 24429 throw new Error('Method not implemented.'); 24430 } 24431 horizontalScrollBarAccess(horizontalScrollBar) { 24432 throw new Error('Method not implemented.'); 24433 } 24434 verticalScrollBarAccess(verticalScrollBar) { 24435 throw new Error('Method not implemented.'); 24436 } 24437 onTouchIconUrlReceived(callback) { 24438 throw new Error('Method not implemented.'); 24439 } 24440 onFaviconReceived(callback) { 24441 throw new Error('Method not implemented.'); 24442 } 24443 onPageVisible(callback) { 24444 throw new Error('Method not implemented.'); 24445 } 24446 onDataResubmitted(callback) { 24447 throw new Error('Method not implemented.'); 24448 } 24449 pinchSmooth(isEnabled) { 24450 throw new Error('Method not implemented.'); 24451 } 24452 allowWindowOpenMethod(flag) { 24453 throw new Error('Method not implemented.'); 24454 } 24455 onAudioStateChanged(callback) { 24456 throw new Error('Method not implemented.'); 24457 } 24458 onFirstContentfulPaint(callback) { 24459 throw new Error('Method not implemented.'); 24460 } 24461 onLoadIntercept(callback) { 24462 throw new Error('Method not implemented.'); 24463 } 24464 onControllerAttached(callback) { 24465 throw new Error('Method not implemented.'); 24466 } 24467 onOverScroll(callback) { 24468 throw new Error('Method not implemented.'); 24469 } 24470 javaScriptOnDocumentStart(scripts) { 24471 throw new Error('Method not implemented.'); 24472 } 24473 layoutMode(mode) { 24474 throw new Error('Method not implemented.'); 24475 } 24476 nestedScroll(value) { 24477 throw new Error('Method not implemented.'); 24478 } 24479 onOverrideUrlLoading(callback) { 24480 throw new Error('Method not implemented.'); 24481 } 24482 enableNativeMediaPlayer(config) { 24483 throw new Error('Method not implemented.'); 24484 } 24485 onRenderProcessNotResponding(callback) { 24486 throw new Error('Method not implemented.'); 24487 } 24488 onRenderProcessResponding(callback) { 24489 throw new Error('Method not implemented.'); 24490 } 24491 onViewportFitChanged(callback) { 24492 throw new Error('Method not implemented.'); 24493 } 24494 onAdsBlocked(callback) { 24495 throw new Error('Method not implemented.'); 24496 } 24497} 24498// @ts-ignore 24499if (globalThis.Web !== undefined) { 24500 globalThis.Web.attributeModifier = function (modifier) { 24501 attributeModifierFunc.call(this, modifier, (nativePtr) => { 24502 return new ArkWebComponent(nativePtr); 24503 }, (nativePtr, classType, modifierJS) => { 24504 return new modifierJS.CommonModifier(nativePtr, classType); 24505 }); 24506 }; 24507} 24508 24509/// <reference path='./import.ts' /> 24510class ArkXComponentComponent extends ArkComponent { 24511 constructor(nativePtr, classType) { 24512 super(nativePtr, classType); 24513 } 24514 allowChildCount() { 24515 return 0; 24516 } 24517 initialize(value) { 24518 if (value[0]) { 24519 modifierWithKey(this._modifiersWithKeys, XComponentInitializeModifier.identity, 24520 XComponentInitializeModifier, value[0]); 24521 } 24522 return this; 24523 } 24524 applyModifierPatch() { 24525 let expiringItemsWithKeys = []; 24526 this._modifiersWithKeys.forEach((value, key) => { 24527 if (value.applyStage(this.nativePtr)) { 24528 expiringItemsWithKeys.push(key); 24529 } 24530 }); 24531 expiringItemsWithKeys.forEach(key => { 24532 this._modifiersWithKeys.delete(key); 24533 }); 24534 } 24535 outline(value) { 24536 throw new Error('Method not implemented.'); 24537 } 24538 outlineColor(value) { 24539 throw new Error('Method not implemented.'); 24540 } 24541 outlineRadius(value) { 24542 throw new Error('Method not implemented.'); 24543 } 24544 outlineStyle(value) { 24545 throw new Error('Method not implemented.'); 24546 } 24547 outlineWidth(value) { 24548 throw new Error('Method not implemented.'); 24549 } 24550 expandSafeArea(types, edges) { 24551 throw new Error('Method not implemented.'); 24552 } 24553 responseRegion(value) { 24554 throw new Error('Method not implemented.'); 24555 } 24556 mouseResponseRegion(value) { 24557 throw new Error('Method not implemented.'); 24558 } 24559 size(value) { 24560 throw new Error('Method not implemented.'); 24561 } 24562 constraintSize(value) { 24563 throw new Error('Method not implemented.'); 24564 } 24565 touchable(value) { 24566 throw new Error('Method not implemented.'); 24567 } 24568 hitTestBehavior(value) { 24569 throw new Error('Method not implemented.'); 24570 } 24571 layoutWeight(value) { 24572 throw new Error('Method not implemented.'); 24573 } 24574 padding(value) { 24575 throw new Error('Method not implemented.'); 24576 } 24577 margin(value) { 24578 throw new Error('Method not implemented.'); 24579 } 24580 background(builder, options) { 24581 throw new Error('Method not implemented.'); 24582 } 24583 backgroundColor(value) { 24584 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundColorModifier.identity, XComponentBackgroundColorModifier, value); 24585 return this; 24586 } 24587 backgroundImage(src, repeat) { 24588 let arkBackgroundImage = new ArkBackgroundImage(); 24589 arkBackgroundImage.src = src; 24590 arkBackgroundImage.repeat = repeat; 24591 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundImageModifier.identity, XComponentBackgroundImageModifier, arkBackgroundImage); 24592 return this; 24593 } 24594 backgroundImageSize(value) { 24595 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundImageSizeModifier.identity, XComponentBackgroundImageSizeModifier, value); 24596 return this; 24597 } 24598 backgroundImagePosition(value) { 24599 modifierWithKey(this._modifiersWithKeys, XComponentBackgroundImagePositionModifier.identity, XComponentBackgroundImagePositionModifier, value); 24600 return this; 24601 } 24602 backgroundBlurStyle(value, options) { 24603 throw new Error('Method not implemented.'); 24604 } 24605 foregroundBlurStyle(value, options) { 24606 throw new Error('Method not implemented.'); 24607 } 24608 opacity(value) { 24609 modifierWithKey(this._modifiersWithKeys, XComponentOpacityModifier.identity, XComponentOpacityModifier, value); 24610 return this; 24611 } 24612 border(value) { 24613 throw new Error('Method not implemented.'); 24614 } 24615 borderStyle(value) { 24616 throw new Error('Method not implemented.'); 24617 } 24618 borderWidth(value) { 24619 throw new Error('Method not implemented.'); 24620 } 24621 borderColor(value) { 24622 throw new Error('Method not implemented.'); 24623 } 24624 borderRadius(value) { 24625 throw new Error('Method not implemented.'); 24626 } 24627 borderImage(value) { 24628 throw new Error('Method not implemented.'); 24629 } 24630 foregroundColor(value) { 24631 throw new Error('Method not implemented.'); 24632 } 24633 onClick(event) { 24634 throw new Error('Method not implemented.'); 24635 } 24636 onHover(event) { 24637 throw new Error('Method not implemented.'); 24638 } 24639 hoverEffect(value) { 24640 throw new Error('Method not implemented.'); 24641 } 24642 onMouse(event) { 24643 throw new Error('Method not implemented.'); 24644 } 24645 onTouch(event) { 24646 throw new Error('Method not implemented.'); 24647 } 24648 onKeyEvent(event) { 24649 throw new Error('Method not implemented.'); 24650 } 24651 focusable(value) { 24652 throw new Error('Method not implemented.'); 24653 } 24654 onFocus(event) { 24655 throw new Error('Method not implemented.'); 24656 } 24657 onBlur(event) { 24658 throw new Error('Method not implemented.'); 24659 } 24660 tabIndex(index) { 24661 throw new Error('Method not implemented.'); 24662 } 24663 defaultFocus(value) { 24664 throw new Error('Method not implemented.'); 24665 } 24666 groupDefaultFocus(value) { 24667 throw new Error('Method not implemented.'); 24668 } 24669 focusOnTouch(value) { 24670 throw new Error('Method not implemented.'); 24671 } 24672 animation(value) { 24673 throw new Error('Method not implemented.'); 24674 } 24675 transition(value) { 24676 throw new Error('Method not implemented.'); 24677 } 24678 gesture(gesture, mask) { 24679 throw new Error('Method not implemented.'); 24680 } 24681 priorityGesture(gesture, mask) { 24682 throw new Error('Method not implemented.'); 24683 } 24684 parallelGesture(gesture, mask) { 24685 throw new Error('Method not implemented.'); 24686 } 24687 blur(value) { 24688 modifierWithKey(this._modifiersWithKeys, XComponentBlurModifier.identity, XComponentBlurModifier, value); 24689 return this; 24690 } 24691 linearGradientBlur(value, options) { 24692 if (isUndefined(value) || isNull(value) || isUndefined(options) || isNull(options)) { 24693 modifierWithKey(this._modifiersWithKeys, XComponentLinearGradientBlurModifier.identity, XComponentLinearGradientBlurModifier, undefined); 24694 return this; 24695 } 24696 let arkLinearGradientBlur = new ArkLinearGradientBlur(); 24697 arkLinearGradientBlur.blurRadius = value; 24698 arkLinearGradientBlur.fractionStops = options.fractionStops; 24699 arkLinearGradientBlur.direction = options.direction; 24700 modifierWithKey(this._modifiersWithKeys, XComponentLinearGradientBlurModifier.identity, XComponentLinearGradientBlurModifier, arkLinearGradientBlur); 24701 return this; 24702 } 24703 brightness(value) { 24704 modifierWithKey(this._modifiersWithKeys, XComponentBrightnessModifier.identity, XComponentBrightnessModifier, value); 24705 return this; 24706 } 24707 contrast(value) { 24708 modifierWithKey(this._modifiersWithKeys, XComponentContrastModifier.identity, XComponentContrastModifier, value); 24709 return this; 24710 } 24711 grayscale(value) { 24712 modifierWithKey(this._modifiersWithKeys, XComponentGrayscaleModifier.identity, XComponentGrayscaleModifier, value); 24713 return this; 24714 } 24715 colorBlend(value) { 24716 modifierWithKey(this._modifiersWithKeys, XComponentColorBlendModifier.identity, XComponentColorBlendModifier, value); 24717 return this; 24718 } 24719 saturate(value) { 24720 modifierWithKey(this._modifiersWithKeys, XComponentSaturateModifier.identity, XComponentSaturateModifier, value); 24721 return this; 24722 } 24723 sepia(value) { 24724 modifierWithKey(this._modifiersWithKeys, XComponentSepiaModifier.identity, XComponentSepiaModifier, value); 24725 return this; 24726 } 24727 invert(value) { 24728 modifierWithKey(this._modifiersWithKeys, XComponentInvertModifier.identity, XComponentInvertModifier, value); 24729 return this; 24730 } 24731 hueRotate(value) { 24732 modifierWithKey(this._modifiersWithKeys, XComponentHueRotateModifier.identity, XComponentHueRotateModifier, value); 24733 return this; 24734 } 24735 useEffect(value) { 24736 throw new Error('Method not implemented.'); 24737 } 24738 backdropBlur(value) { 24739 modifierWithKey(this._modifiersWithKeys, XComponentBackdropBlurModifier.identity, XComponentBackdropBlurModifier, value); 24740 return this; 24741 } 24742 renderGroup(value) { 24743 throw new Error('Method not implemented.'); 24744 } 24745 translate(value) { 24746 throw new Error('Method not implemented.'); 24747 } 24748 scale(value) { 24749 throw new Error('Method not implemented.'); 24750 } 24751 gridSpan(value) { 24752 throw new Error('Method not implemented.'); 24753 } 24754 gridOffset(value) { 24755 throw new Error('Method not implemented.'); 24756 } 24757 rotate(value) { 24758 throw new Error('Method not implemented.'); 24759 } 24760 transform(value) { 24761 throw new Error('Method not implemented.'); 24762 } 24763 onAppear(event) { 24764 throw new Error('Method not implemented.'); 24765 } 24766 onDisAppear(event) { 24767 throw new Error('Method not implemented.'); 24768 } 24769 onAttach(event) { 24770 throw new Error('Method not implemented.'); 24771 } 24772 onDetach(event) { 24773 throw new Error('Method not implemented.'); 24774 } 24775 onAreaChange(event) { 24776 throw new Error('Method not implemented.'); 24777 } 24778 visibility(value) { 24779 throw new Error('Method not implemented.'); 24780 } 24781 flexGrow(value) { 24782 throw new Error('Method not implemented.'); 24783 } 24784 flexShrink(value) { 24785 throw new Error('Method not implemented.'); 24786 } 24787 flexBasis(value) { 24788 throw new Error('Method not implemented.'); 24789 } 24790 alignSelf(value) { 24791 throw new Error('Method not implemented.'); 24792 } 24793 displayPriority(value) { 24794 throw new Error('Method not implemented.'); 24795 } 24796 zIndex(value) { 24797 throw new Error('Method not implemented.'); 24798 } 24799 sharedTransition(id, options) { 24800 throw new Error('Method not implemented.'); 24801 } 24802 direction(value) { 24803 throw new Error('Method not implemented.'); 24804 } 24805 align(value) { 24806 throw new Error('Method not implemented.'); 24807 } 24808 position(value) { 24809 throw new Error('Method not implemented.'); 24810 } 24811 markAnchor(value) { 24812 throw new Error('Method not implemented.'); 24813 } 24814 offset(value) { 24815 throw new Error('Method not implemented.'); 24816 } 24817 enabled(value) { 24818 throw new Error('Method not implemented.'); 24819 } 24820 useSizeType(value) { 24821 throw new Error('Method not implemented.'); 24822 } 24823 alignRules(value) { 24824 throw new Error('Method not implemented.'); 24825 } 24826 aspectRatio(value) { 24827 throw new Error('Method not implemented.'); 24828 } 24829 clickEffect(value) { 24830 throw new Error('Method not implemented.'); 24831 } 24832 onDragStart(event) { 24833 throw new Error('Method not implemented.'); 24834 } 24835 onDragEnter(event) { 24836 throw new Error('Method not implemented.'); 24837 } 24838 onDragMove(event) { 24839 throw new Error('Method not implemented.'); 24840 } 24841 onDragLeave(event) { 24842 throw new Error('Method not implemented.'); 24843 } 24844 onDrop(event) { 24845 throw new Error('Method not implemented.'); 24846 } 24847 onDragEnd(event) { 24848 throw new Error('Method not implemented.'); 24849 } 24850 allowDrop(value) { 24851 throw new Error('Method not implemented.'); 24852 } 24853 draggable(value) { 24854 throw new Error('Method not implemented.'); 24855 } 24856 privacySensitive(value) { 24857 throw new Error('Method not implemented.'); 24858 } 24859 overlay(value, options) { 24860 throw new Error('Method not implemented.'); 24861 } 24862 linearGradient(value) { 24863 throw new Error('Method not implemented.'); 24864 } 24865 sweepGradient(value) { 24866 throw new Error('Method not implemented.'); 24867 } 24868 radialGradient(value) { 24869 throw new Error('Method not implemented.'); 24870 } 24871 motionPath(value) { 24872 throw new Error('Method not implemented.'); 24873 } 24874 motionBlur(value) { 24875 throw new Error('Method not implemented.'); 24876 } 24877 shadow(value) { 24878 modifierWithKey(this._modifiersWithKeys, ShadowModifier.identity, ShadowModifier, value); 24879 return this; 24880 } 24881 blendMode(value) { 24882 throw new Error('Method not implemented.'); 24883 } 24884 clip(value) { 24885 throw new Error('Method not implemented.'); 24886 } 24887 mask(value) { 24888 throw new Error('Method not implemented.'); 24889 } 24890 key(value) { 24891 throw new Error('Method not implemented.'); 24892 } 24893 id(value) { 24894 throw new Error('Method not implemented.'); 24895 } 24896 geometryTransition(id) { 24897 throw new Error('Method not implemented.'); 24898 } 24899 bindPopup(show, popup) { 24900 throw new Error('Method not implemented.'); 24901 } 24902 bindMenu(content, options) { 24903 throw new Error('Method not implemented.'); 24904 } 24905 bindContextMenu(content, responseType, options) { 24906 throw new Error('Method not implemented.'); 24907 } 24908 bindContentCover(isShow, builder, options) { 24909 throw new Error('Method not implemented.'); 24910 } 24911 bindSheet(isShow, builder, options) { 24912 throw new Error('Method not implemented.'); 24913 } 24914 stateStyles(value) { 24915 throw new Error('Method not implemented.'); 24916 } 24917 restoreId(value) { 24918 throw new Error('Method not implemented.'); 24919 } 24920 onVisibleAreaChange(ratios, event) { 24921 throw new Error('Method not implemented.'); 24922 } 24923 sphericalEffect(value) { 24924 modifierWithKey(this._modifiersWithKeys, XComponentSphericalEffectModifier.identity, XComponentSphericalEffectModifier, value); 24925 return this; 24926 } 24927 lightUpEffect(value) { 24928 modifierWithKey(this._modifiersWithKeys, XComponentLightUpEffectModifier.identity, XComponentLightUpEffectModifier, value); 24929 return this; 24930 } 24931 pixelStretchEffect(options) { 24932 modifierWithKey(this._modifiersWithKeys, XComponentPixelStretchEffectModifier.identity, XComponentPixelStretchEffectModifier, options); 24933 return this; 24934 } 24935 keyboardShortcut(value, keys, action) { 24936 throw new Error('Method not implemented.'); 24937 } 24938 accessibilityGroup(value) { 24939 throw new Error('Method not implemented.'); 24940 } 24941 accessibilityText(value) { 24942 throw new Error('Method not implemented.'); 24943 } 24944 accessibilityDescription(value) { 24945 throw new Error('Method not implemented.'); 24946 } 24947 accessibilityLevel(value) { 24948 throw new Error('Method not implemented.'); 24949 } 24950 obscured(reasons) { 24951 throw new Error('Method not implemented.'); 24952 } 24953 reuseId(id) { 24954 throw new Error('Method not implemented.'); 24955 } 24956 renderFit(fitMode) { 24957 throw new Error('Method not implemented.'); 24958 } 24959 attributeModifier(modifier) { 24960 return this; 24961 } 24962 onGestureJudgeBegin(callback) { 24963 throw new Error('Method not implemented.'); 24964 } 24965 onLoad(callback) { 24966 modifierWithKey(this._modifiersWithKeys, XComponentOnLoadModifier.identity, XComponentOnLoadModifier, callback); 24967 return this; 24968 } 24969 onDestroy(event) { 24970 modifierWithKey(this._modifiersWithKeys, XComponentOnDestroyModifier.identity, XComponentOnDestroyModifier, event); 24971 return this; 24972 } 24973 enableAnalyzer(value) { 24974 modifierWithKey(this._modifiersWithKeys, XComponentEnableAnalyzerModifier.identity, XComponentEnableAnalyzerModifier, value); 24975 return this; 24976 } 24977 enableSecure(value) { 24978 modifierWithKey(this._modifiersWithKeys, XComponentEnableSecureModifier.identity, XComponentEnableSecureModifier, value); 24979 return this; 24980 } 24981} 24982// @ts-ignore 24983if (globalThis.XComponent !== undefined) { 24984 globalThis.XComponent.attributeModifier = function (modifier) { 24985 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 24986 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 24987 let component = this.createOrGetNode(elmtId, () => { 24988 return new ArkXComponentComponent(nativeNode); 24989 }); 24990 applyUIAttributes(modifier, nativeNode, component); 24991 component.applyModifierPatch(); 24992 }; 24993 globalThis.DataPanel.contentModifier = function (style) { 24994 const elmtId = ViewStackProcessor.GetElmtIdToAccountFor(); 24995 let nativeNode = getUINativeModule().getFrameNodeById(elmtId); 24996 let component = this.createOrGetNode(elmtId, () => { 24997 return new ArkDataPanelComponent(nativeNode); 24998 }); 24999 component.setContentModifier(style); 25000 }; 25001} 25002 25003class XComponentInitializeModifier extends ModifierWithKey { 25004 constructor(value) { 25005 super(value); 25006 } 25007 applyPeer(node, reset) { 25008 if (reset) { 25009 getUINativeModule().xComponent.resetXComponentInitialize(node); 25010 } 25011 else { 25012 getUINativeModule().xComponent.setXComponentInitialize(node, this.value?.id, 25013 this.value?.type, this.value?.imageAIOptions, this.value?.libraryname, this.value?.controller); 25014 25015 } 25016 } 25017} 25018XComponentInitializeModifier.identity = Symbol('xComponentInitialize'); 25019class XComponentOpacityModifier extends ModifierWithKey { 25020 constructor(value) { 25021 super(value); 25022 } 25023 applyPeer(node, reset) { 25024 if (reset) { 25025 getUINativeModule().xComponent.resetOpacity(node); 25026 } 25027 else { 25028 getUINativeModule().xComponent.setOpacity(node, this.value); 25029 } 25030 } 25031 checkObjectDiff() { 25032 return !isBaseOrResourceEqual(this.stageValue, this.value); 25033 } 25034} 25035XComponentOpacityModifier.identity = Symbol('xComponentOpacity'); 25036class XComponentBackgroundColorModifier extends ModifierWithKey { 25037 constructor(value) { 25038 super(value); 25039 } 25040 applyPeer(node, reset) { 25041 if (reset) { 25042 getUINativeModule().xComponent.resetBackgroundColor(node); 25043 } 25044 else { 25045 getUINativeModule().xComponent.setBackgroundColor(node, this.value); 25046 } 25047 } 25048 checkObjectDiff() { 25049 return !isBaseOrResourceEqual(this.stageValue, this.value); 25050 } 25051} 25052XComponentBackgroundColorModifier.identity = Symbol('xComponentBackgroundColor'); 25053class XComponentBackgroundImageModifier extends ModifierWithKey { 25054 constructor(value) { 25055 super(value); 25056 } 25057 applyPeer(node, reset) { 25058 if (reset) { 25059 getUINativeModule().xComponent.resetBackgroundImage(node); 25060 } 25061 else { 25062 getUINativeModule().xComponent.setBackgroundImage(node, this.value.src, this.value.repeat); 25063 } 25064 } 25065 checkObjectDiff() { 25066 return !(this.stageValue.src === this.value.src && 25067 this.stageValue.repeat === this.value.repeat); 25068 } 25069} 25070XComponentBackgroundImageModifier.identity = Symbol('xComponentBackgroundImage'); 25071class XComponentBackgroundImageSizeModifier extends ModifierWithKey { 25072 constructor(value) { 25073 super(value); 25074 } 25075 applyPeer(node, reset) { 25076 let _a, _b; 25077 if (reset) { 25078 getUINativeModule().xComponent.resetBackgroundImageSize(node); 25079 } 25080 else { 25081 if (isNumber(this.value)) { 25082 getUINativeModule().xComponent.setBackgroundImageSize(node, this.value, undefined, undefined); 25083 } 25084 else { 25085 getUINativeModule().xComponent.setBackgroundImageSize(node, undefined, (_a = this.value) === null || 25086 _a === void 0 ? void 0 : _a.width, (_b = this.value) === null || _b === void 0 ? void 0 : _b.height); 25087 } 25088 } 25089 } 25090 checkObjectDiff() { 25091 return !(this.value.width === this.stageValue.width && 25092 this.value.height === this.stageValue.height); 25093 } 25094} 25095XComponentBackgroundImageSizeModifier.identity = Symbol('xComponentBackgroundImageSize'); 25096class XComponentBackgroundImagePositionModifier extends ModifierWithKey { 25097 constructor(value) { 25098 super(value); 25099 } 25100 applyPeer(node, reset) { 25101 let _a, _b; 25102 if (reset) { 25103 getUINativeModule().xComponent.resetBackgroundImagePosition(node); 25104 } 25105 else { 25106 if (isNumber(this.value)) { 25107 getUINativeModule().xComponent.setBackgroundImagePosition(node, this.value, undefined, undefined); 25108 } 25109 else { 25110 getUINativeModule().xComponent.setBackgroundImagePosition(node, undefined, (_a = this.value) === null || 25111 _a === void 0 ? void 0 : _a.x, (_b = this.value) === null || _b === void 0 ? void 0 : _b.y); 25112 } 25113 } 25114 } 25115 checkObjectDiff() { 25116 let _a, _b, _c, _d; 25117 return !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.x) === ((_b = this.stageValue) === null || _b === void 0 ? void 0 : _b.x) && 25118 ((_c = this.value) === null || _c === void 0 ? void 0 : _c.y) === ((_d = this.stageValue) === null || _d === void 0 ? void 0 : _d.y)); 25119 } 25120} 25121XComponentBackgroundImagePositionModifier.identity = Symbol('xComponentBackgroundImagePosition'); 25122class XComponentBlurModifier extends ModifierWithKey { 25123 constructor(value) { 25124 super(value); 25125 } 25126 applyPeer(node, reset) { 25127 if (reset) { 25128 getUINativeModule().xComponent.resetBlur(node); 25129 } 25130 else { 25131 getUINativeModule().xComponent.setBlur(node, this.value); 25132 } 25133 } 25134} 25135XComponentBlurModifier.identity = Symbol('xComponentBlur'); 25136class XComponentBackdropBlurModifier extends ModifierWithKey { 25137 constructor(value) { 25138 super(value); 25139 } 25140 applyPeer(node, reset) { 25141 if (reset) { 25142 getUINativeModule().xComponent.resetBackdropBlur(node); 25143 } 25144 else { 25145 getUINativeModule().xComponent.setBackdropBlur(node, this.value); 25146 } 25147 } 25148} 25149XComponentBackdropBlurModifier.identity = Symbol('xComponentBackdropBlur'); 25150class XComponentGrayscaleModifier extends ModifierWithKey { 25151 constructor(value) { 25152 super(value); 25153 } 25154 applyPeer(node, reset) { 25155 if (reset) { 25156 getUINativeModule().xComponent.resetGrayscale(node); 25157 } 25158 else { 25159 getUINativeModule().xComponent.setGrayscale(node, this.value); 25160 } 25161 } 25162} 25163XComponentGrayscaleModifier.identity = Symbol('xComponentGrayscale'); 25164class XComponentBrightnessModifier extends ModifierWithKey { 25165 constructor(value) { 25166 super(value); 25167 } 25168 applyPeer(node, reset) { 25169 if (reset) { 25170 getUINativeModule().xComponent.resetBrightness(node); 25171 } 25172 else { 25173 getUINativeModule().xComponent.setBrightness(node, this.value); 25174 } 25175 } 25176} 25177XComponentBrightnessModifier.identity = Symbol('xComponentBrightness'); 25178class XComponentSaturateModifier extends ModifierWithKey { 25179 constructor(value) { 25180 super(value); 25181 } 25182 applyPeer(node, reset) { 25183 if (reset) { 25184 getUINativeModule().xComponent.resetSaturate(node); 25185 } 25186 else { 25187 getUINativeModule().xComponent.setSaturate(node, this.value); 25188 } 25189 } 25190} 25191XComponentSaturateModifier.identity = Symbol('xComponentSaturate'); 25192class XComponentContrastModifier extends ModifierWithKey { 25193 constructor(value) { 25194 super(value); 25195 } 25196 applyPeer(node, reset) { 25197 if (reset) { 25198 getUINativeModule().xComponent.resetContrast(node); 25199 } 25200 else { 25201 getUINativeModule().xComponent.setContrast(node, this.value); 25202 } 25203 } 25204} 25205XComponentContrastModifier.identity = Symbol('xComponentContrast'); 25206class XComponentInvertModifier extends ModifierWithKey { 25207 constructor(value) { 25208 super(value); 25209 } 25210 applyPeer(node, reset) { 25211 if (reset) { 25212 getUINativeModule().xComponent.resetInvert(node); 25213 } 25214 else { 25215 getUINativeModule().xComponent.setInvert(node, this.value); 25216 } 25217 } 25218} 25219XComponentInvertModifier.identity = Symbol('xComponentInvert'); 25220class XComponentSepiaModifier extends ModifierWithKey { 25221 constructor(value) { 25222 super(value); 25223 } 25224 applyPeer(node, reset) { 25225 if (reset) { 25226 getUINativeModule().xComponent.resetSepia(node); 25227 } 25228 else { 25229 getUINativeModule().xComponent.setSepia(node, this.value); 25230 } 25231 } 25232} 25233XComponentSepiaModifier.identity = Symbol('xComponentSepia'); 25234class XComponentHueRotateModifier extends ModifierWithKey { 25235 constructor(value) { 25236 super(value); 25237 } 25238 applyPeer(node, reset) { 25239 if (reset) { 25240 getUINativeModule().xComponent.resetHueRotate(node); 25241 } 25242 else { 25243 getUINativeModule().xComponent.setHueRotate(node, this.value); 25244 } 25245 } 25246} 25247XComponentHueRotateModifier.identity = Symbol('xComponentHueRotate'); 25248class XComponentColorBlendModifier extends ModifierWithKey { 25249 constructor(value) { 25250 super(value); 25251 } 25252 applyPeer(node, reset) { 25253 if (reset) { 25254 getUINativeModule().xComponent.resetColorBlend(node); 25255 } 25256 else { 25257 getUINativeModule().xComponent.setColorBlend(node, this.value); 25258 } 25259 } 25260 checkObjectDiff() { 25261 return !isBaseOrResourceEqual(this.stageValue, this.value); 25262 } 25263} 25264XComponentColorBlendModifier.identity = Symbol('xComponentColorBlend'); 25265class XComponentSphericalEffectModifier extends ModifierWithKey { 25266 constructor(value) { 25267 super(value); 25268 } 25269 applyPeer(node, reset) { 25270 if (reset) { 25271 getUINativeModule().xComponent.resetSphericalEffect(node); 25272 } 25273 else { 25274 getUINativeModule().xComponent.setSphericalEffect(node, this.value); 25275 } 25276 } 25277} 25278XComponentSphericalEffectModifier.identity = Symbol('xComponentSphericalEffect'); 25279class XComponentLightUpEffectModifier extends ModifierWithKey { 25280 constructor(value) { 25281 super(value); 25282 } 25283 applyPeer(node, reset) { 25284 if (reset) { 25285 getUINativeModule().xComponent.resetLightUpEffect(node); 25286 } 25287 else { 25288 getUINativeModule().xComponent.setLightUpEffect(node, this.value); 25289 } 25290 } 25291} 25292XComponentLightUpEffectModifier.identity = Symbol('xComponentLightUpEffect'); 25293class XComponentPixelStretchEffectModifier extends ModifierWithKey { 25294 constructor(value) { 25295 super(value); 25296 } 25297 applyPeer(node, reset) { 25298 if (reset) { 25299 getUINativeModule().xComponent.resetPixelStretchEffect(node); 25300 } 25301 else { 25302 getUINativeModule().xComponent.setPixelStretchEffect(node, this.value.top, this.value.right, this.value.bottom, this.value.left); 25303 } 25304 } 25305 checkObjectDiff() { 25306 return !(this.stageValue.left === this.value.left && 25307 this.stageValue.right === this.value.right && 25308 this.stageValue.top === this.value.top && 25309 this.stageValue.bottom === this.value.bottom); 25310 } 25311} 25312XComponentPixelStretchEffectModifier.identity = Symbol('xComponentPixelStretchEffect'); 25313class XComponentLinearGradientBlurModifier extends ModifierWithKey { 25314 constructor(value) { 25315 super(value); 25316 } 25317 applyPeer(node, reset) { 25318 if (reset) { 25319 getUINativeModule().xComponent.resetLinearGradientBlur(node); 25320 } 25321 else { 25322 getUINativeModule().xComponent.setLinearGradientBlur(node, this.value.blurRadius, this.value.fractionStops, this.value.direction); 25323 } 25324 } 25325 checkObjectDiff() { 25326 return !this.value.isEqual(this.stageValue); 25327 } 25328} 25329XComponentLinearGradientBlurModifier.identity = Symbol('xComponentlinearGradientBlur'); 25330class XComponentOnLoadModifier extends ModifierWithKey { 25331 constructor(value) { 25332 super(value); 25333 } 25334 applyPeer(node, reset) { 25335 if (reset) { 25336 getUINativeModule().xComponent.resetOnLoad(node); 25337 } 25338 else { 25339 getUINativeModule().xComponent.setOnLoad(node, this.value); 25340 } 25341 } 25342} 25343XComponentOnLoadModifier.identity = Symbol('xComponentOnLoad'); 25344class XComponentOnDestroyModifier extends ModifierWithKey { 25345 constructor(value) { 25346 super(value); 25347 } 25348 applyPeer(node, reset) { 25349 if (reset) { 25350 getUINativeModule().xComponent.resetOnDestroy(node); 25351 } 25352 else { 25353 getUINativeModule().xComponent.setOnDestroy(node, this.value); 25354 } 25355 } 25356} 25357XComponentOnDestroyModifier.identity = Symbol('xComponentOnDestroy'); 25358class XComponentEnableAnalyzerModifier extends ModifierWithKey { 25359 constructor(value) { 25360 super(value); 25361 } 25362 applyPeer(node, reset) { 25363 if (reset) { 25364 getUINativeModule().xComponent.resetEnableAnalyzer(node); 25365 } 25366 else { 25367 getUINativeModule().xComponent.setEnableAnalyzer(node, this.value); 25368 } 25369 } 25370 checkObjectDiff() { 25371 return !isBaseOrResourceEqual(this.stageValue, this.value); 25372 } 25373} 25374XComponentEnableAnalyzerModifier.identity = Symbol('xComponentEnableAnalyzer'); 25375class XComponentEnableSecureModifier extends ModifierWithKey { 25376 constructor(value) { 25377 super(value); 25378 } 25379 applyPeer(node, reset) { 25380 if (reset) { 25381 getUINativeModule().xComponent.resetEnableSecure(node); 25382 } 25383 else { 25384 getUINativeModule().xComponent.setEnableSecure(node, this.value); 25385 } 25386 } 25387 checkObjectDiff() { 25388 return !isBaseOrResourceEqual(this.stageValue, this.value); 25389 } 25390} 25391XComponentEnableSecureModifier.identity = Symbol('xComponentEnableSecure'); 25392/// <reference path='./import.ts' /> 25393class ArkBadgeComponent extends ArkComponent { 25394 constructor(nativePtr, classType) { 25395 super(nativePtr, classType); 25396 } 25397} 25398// @ts-ignore 25399if (globalThis.Badge !== undefined) { 25400 globalThis.Badge.attributeModifier = function (modifier) { 25401 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25402 return new ArkBadgeComponent(nativePtr); 25403 }, (nativePtr, classType, modifierJS) => { 25404 return new modifierJS.CommonModifier(nativePtr, classType); 25405 }); 25406 }; 25407} 25408 25409/// <reference path='./import.ts' /> 25410class ArkFlowItemComponent extends ArkComponent { 25411 constructor(nativePtr, classType) { 25412 super(nativePtr, classType); 25413 } 25414 initialize(value) { 25415 return this; 25416 } 25417 allowChildCount() { 25418 return 1; 25419 } 25420} 25421// @ts-ignore 25422if (globalThis.FlowItem !== undefined) { 25423 globalThis.FlowItem.attributeModifier = function (modifier) { 25424 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25425 return new ArkFlowItemComponent(nativePtr); 25426 }, (nativePtr, classType, modifierJS) => { 25427 return new modifierJS.CommonModifier(nativePtr, classType); 25428 }); 25429 }; 25430} 25431 25432/// <reference path='./import.ts' /> 25433class ArkFormLinkComponent extends ArkComponent { 25434 constructor(nativePtr, classType) { 25435 super(nativePtr, classType); 25436 } 25437} 25438// @ts-ignore 25439if (globalThis.FormLink !== undefined) { 25440 globalThis.FormLink.attributeModifier = function (modifier) { 25441 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25442 return new ArkFormLinkComponent(nativePtr); 25443 }, (nativePtr, classType, modifierJS) => { 25444 return new modifierJS.CommonModifier(nativePtr, classType); 25445 }); 25446 }; 25447} 25448 25449/// <reference path='./import.ts' /> 25450class GridItemSelectableModifier extends ModifierWithKey { 25451 applyPeer(node, reset) { 25452 if (reset) { 25453 getUINativeModule().gridItem.resetGridItemSelectable(node); 25454 } 25455 else { 25456 getUINativeModule().gridItem.setGridItemSelectable(node, this.value); 25457 } 25458 } 25459} 25460GridItemSelectableModifier.identity = Symbol('gridItemSelectable'); 25461class GridItemSelectedModifier extends ModifierWithKey { 25462 applyPeer(node, reset) { 25463 if (reset) { 25464 getUINativeModule().gridItem.resetGridItemSelected(node); 25465 } 25466 else { 25467 getUINativeModule().gridItem.setGridItemSelected(node, this.value); 25468 } 25469 } 25470} 25471GridItemSelectedModifier.identity = Symbol('gridItemSelected'); 25472class GridItemRowStartModifier extends ModifierWithKey { 25473 applyPeer(node, reset) { 25474 if (reset) { 25475 getUINativeModule().gridItem.resetGridItemRowStart(node); 25476 } 25477 else { 25478 getUINativeModule().gridItem.setGridItemRowStart(node, this.value); 25479 } 25480 } 25481} 25482GridItemRowStartModifier.identity = Symbol('gridItemRowStart'); 25483class GridItemRowEndModifier extends ModifierWithKey { 25484 applyPeer(node, reset) { 25485 if (reset) { 25486 getUINativeModule().gridItem.resetGridItemRowEnd(node); 25487 } 25488 else { 25489 getUINativeModule().gridItem.setGridItemRowEnd(node, this.value); 25490 } 25491 } 25492} 25493GridItemRowEndModifier.identity = Symbol('gridItemRowEnd'); 25494class GridItemColumnStartModifier extends ModifierWithKey { 25495 applyPeer(node, reset) { 25496 if (reset) { 25497 getUINativeModule().gridItem.resetGridItemColumnStart(node); 25498 } 25499 else { 25500 getUINativeModule().gridItem.setGridItemColumnStart(node, this.value); 25501 } 25502 } 25503} 25504GridItemColumnStartModifier.identity = Symbol('gridItemColumnStart'); 25505class GridItemColumnEndModifier extends ModifierWithKey { 25506 applyPeer(node, reset) { 25507 if (reset) { 25508 getUINativeModule().gridItem.resetGridItemColumnEnd(node); 25509 } 25510 else { 25511 getUINativeModule().gridItem.setGridItemColumnEnd(node, this.value); 25512 } 25513 } 25514} 25515GridItemColumnEndModifier.identity = Symbol('gridItemColumnEnd'); 25516class ArkGridItemComponent extends ArkComponent { 25517 constructor(nativePtr, classType) { 25518 super(nativePtr, classType); 25519 } 25520 rowStart(value) { 25521 modifierWithKey(this._modifiersWithKeys, GridItemRowStartModifier.identity, GridItemRowStartModifier, value); 25522 return this; 25523 } 25524 rowEnd(value) { 25525 modifierWithKey(this._modifiersWithKeys, GridItemRowEndModifier.identity, GridItemRowEndModifier, value); 25526 return this; 25527 } 25528 columnStart(value) { 25529 modifierWithKey(this._modifiersWithKeys, GridItemColumnStartModifier.identity, GridItemColumnStartModifier, value); 25530 return this; 25531 } 25532 columnEnd(value) { 25533 modifierWithKey(this._modifiersWithKeys, GridItemColumnEndModifier.identity, GridItemColumnEndModifier, value); 25534 return this; 25535 } 25536 forceRebuild(value) { 25537 throw new Error('Method not implemented.'); 25538 } 25539 selectable(value) { 25540 modifierWithKey(this._modifiersWithKeys, GridItemSelectableModifier.identity, GridItemSelectableModifier, value); 25541 return this; 25542 } 25543 selected(value) { 25544 modifierWithKey(this._modifiersWithKeys, GridItemSelectedModifier.identity, GridItemSelectedModifier, value); 25545 return this; 25546 } 25547 onSelect(event) { 25548 throw new Error('Method not implemented.'); 25549 } 25550} 25551// @ts-ignore 25552if (globalThis.GridItem !== undefined) { 25553 globalThis.GridItem.attributeModifier = function (modifier) { 25554 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25555 return new ArkGridItemComponent(nativePtr); 25556 }, (nativePtr, classType, modifierJS) => { 25557 return new modifierJS.GridItemModifier(nativePtr, classType); 25558 }); 25559 }; 25560} 25561 25562/// <reference path='./import.ts' /> 25563class ArkHyperlinkComponent extends ArkComponent { 25564 constructor(nativePtr, classType) { 25565 super(nativePtr, classType); 25566 } 25567 color(value) { 25568 modifierWithKey(this._modifiersWithKeys, HyperlinkColorModifier.identity, HyperlinkColorModifier, value); 25569 return this; 25570 } 25571 draggable(value) { 25572 modifierWithKey(this._modifiersWithKeys, HyperlinkDraggableModifier.identity, HyperlinkDraggableModifier, value); 25573 return this; 25574 } 25575 responseRegion(value) { 25576 modifierWithKey(this._modifiersWithKeys, HyperlinkResponseRegionModifier.identity, HyperlinkResponseRegionModifier, value); 25577 return this; 25578 } 25579} 25580class HyperlinkColorModifier extends ModifierWithKey { 25581 constructor(value) { 25582 super(value); 25583 } 25584 applyPeer(node, reset) { 25585 if (reset) { 25586 getUINativeModule().hyperlink.resetColor(node); 25587 } 25588 else { 25589 getUINativeModule().hyperlink.setColor(node, this.value); 25590 } 25591 } 25592 checkObjectDiff() { 25593 return !isBaseOrResourceEqual(this.stageValue, this.value); 25594 } 25595} 25596HyperlinkColorModifier.identity = Symbol('hyperlinkColor'); 25597class HyperlinkDraggableModifier extends ModifierWithKey { 25598 constructor(value) { 25599 super(value); 25600 } 25601 applyPeer(node, reset) { 25602 if (reset) { 25603 getUINativeModule().hyperlink.resetDraggable(node); 25604 } 25605 else { 25606 getUINativeModule().hyperlink.setDraggable(node, this.value); 25607 } 25608 } 25609} 25610HyperlinkDraggableModifier.identity = Symbol('hyperlinkDraggable'); 25611class HyperlinkResponseRegionModifier extends ModifierWithKey { 25612 constructor(value) { 25613 super(value); 25614 } 25615 applyPeer(node, reset) { 25616 let _a, _b, _c, _d, _e, _f, _g, _h; 25617 if (reset) { 25618 getUINativeModule().hyperlink.resetResponseRegion(node); 25619 } 25620 else { 25621 let responseRegion = []; 25622 if (Array.isArray(this.value)) { 25623 for (let i = 0; i < this.value.length; i++) { 25624 responseRegion.push((_a = this.value[i].x) !== null && _a !== void 0 ? _a : 'PLACEHOLDER'); 25625 responseRegion.push((_b = this.value[i].y) !== null && _b !== void 0 ? _b : 'PLACEHOLDER'); 25626 responseRegion.push((_c = this.value[i].width) !== null && _c !== void 0 ? _c : 'PLACEHOLDER'); 25627 responseRegion.push((_d = this.value[i].height) !== null && _d !== void 0 ? _d : 'PLACEHOLDER'); 25628 } 25629 } 25630 else { 25631 responseRegion.push((_e = this.value.x) !== null && _e !== void 0 ? _e : 'PLACEHOLDER'); 25632 responseRegion.push((_f = this.value.y) !== null && _f !== void 0 ? _f : 'PLACEHOLDER'); 25633 responseRegion.push((_g = this.value.width) !== null && _g !== void 0 ? _g : 'PLACEHOLDER'); 25634 responseRegion.push((_h = this.value.height) !== null && _h !== void 0 ? _h : 'PLACEHOLDER'); 25635 } 25636 getUINativeModule().hyperlink.setResponseRegion(node, responseRegion, responseRegion.length); 25637 } 25638 } 25639 checkObjectDiff() { 25640 return !isBaseOrResourceEqual(this.stageValue, this.value); 25641 } 25642} 25643HyperlinkResponseRegionModifier.identity = Symbol('hyperlinkResponseRegion'); 25644// @ts-ignore 25645if (globalThis.Hyperlink !== undefined) { 25646 globalThis.Hyperlink.attributeModifier = function (modifier) { 25647 attributeModifierFunc.call(this, modifier, (nativePtr) => { 25648 return new ArkHyperlinkComponent(nativePtr); 25649 }, (nativePtr, classType, modifierJS) => { 25650 return new modifierJS.HyperlinkModifier(nativePtr, classType); 25651 }); 25652 }; 25653} 25654 25655/// <reference path='./import.ts' /> 25656class ListEditModeModifier extends ModifierWithKey { 25657 constructor(value) { 25658 super(value); 25659 } 25660 applyPeer(node, reset) { 25661 if (reset) { 25662 getUINativeModule().list.resetEditMode(node); 25663 } 25664 else { 25665 getUINativeModule().list.setEditMode(node, this.value); 25666 } 25667 } 25668} 25669ListEditModeModifier.identity = Symbol('editMode'); 25670class ListMultiSelectableModifier extends ModifierWithKey { 25671 constructor(value) { 25672 super(value); 25673 } 25674 applyPeer(node, reset) { 25675 if (reset) { 25676 getUINativeModule().list.resetMultiSelectable(node); 25677 } 25678 else { 25679 getUINativeModule().list.setMultiSelectable(node, this.value); 25680 } 25681 } 25682} 25683ListMultiSelectableModifier.identity = Symbol('listMultiSelectable'); 25684class ListAlignListItemModifier extends ModifierWithKey { 25685 constructor(value) { 25686 super(value); 25687 } 25688 applyPeer(node, reset) { 25689 if (reset) { 25690 getUINativeModule().list.resetAlignListItem(node); 25691 } 25692 else { 25693 getUINativeModule().list.setAlignListItem(node, this.value); 25694 } 25695 } 25696} 25697ListAlignListItemModifier.identity = Symbol('listAlignListItem'); 25698class ListScrollSnapAlignModifier extends ModifierWithKey { 25699 constructor(value) { 25700 super(value); 25701 } 25702 applyPeer(node, reset) { 25703 if (reset) { 25704 getUINativeModule().list.resetScrollSnapAlign(node); 25705 } 25706 else { 25707 getUINativeModule().list.setScrollSnapAlign(node, this.value); 25708 } 25709 } 25710} 25711ListScrollSnapAlignModifier.identity = Symbol('listScrollSnapAlign'); 25712class ContentStartOffsetModifier extends ModifierWithKey { 25713 constructor(value) { 25714 super(value); 25715 } 25716 applyPeer(node, reset) { 25717 if (reset) { 25718 getUINativeModule().list.resetContentStartOffset(node); 25719 } 25720 else { 25721 getUINativeModule().list.setContentStartOffset(node, this.value); 25722 } 25723 } 25724} 25725ContentStartOffsetModifier.identity = Symbol('contentStartOffset'); 25726class ContentEndOffsetModifier extends ModifierWithKey { 25727 constructor(value) { 25728 super(value); 25729 } 25730 applyPeer(node, reset) { 25731 if (reset) { 25732 getUINativeModule().list.resetContentEndOffset(node); 25733 } 25734 else { 25735 getUINativeModule().list.setContentEndOffset(node, this.value); 25736 } 25737 } 25738} 25739ContentEndOffsetModifier.identity = Symbol('contentEndOffset'); 25740class ListDividerModifier extends ModifierWithKey { 25741 constructor(value) { 25742 super(value); 25743 } 25744 applyPeer(node, reset) { 25745 let _a, _b, _c, _d; 25746 if (reset) { 25747 getUINativeModule().list.resetDivider(node); 25748 } 25749 else { 25750 getUINativeModule().list.setDivider(node, (_a = this.value) === null || 25751 _a === void 0 ? void 0 : _a.strokeWidth, (_b = this.value) === null || 25752 _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || 25753 _c === void 0 ? void 0 : _c.startMargin, (_d = this.value) === null || 25754 _d === void 0 ? void 0 : _d.endMargin); 25755 } 25756 } 25757 checkObjectDiff() { 25758 let _a, _b, _c, _d, _e, _f, _g, _h; 25759 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 25760 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 25761 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 25762 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 25763 } 25764} 25765ListDividerModifier.identity = Symbol('listDivider'); 25766class ChainAnimationOptionsModifier extends ModifierWithKey { 25767 constructor(value) { 25768 super(value); 25769 } 25770 applyPeer(node, reset) { 25771 let _a, _b, _c, _d, _e, _f, _g; 25772 if (reset) { 25773 getUINativeModule().list.resetChainAnimationOptions(node); 25774 } 25775 else { 25776 getUINativeModule().list.setChainAnimationOptions(node, (_a = this.value) === null || 25777 _a === void 0 ? void 0 : _a.minSpace, (_b = this.value) === null || 25778 _b === void 0 ? void 0 : _b.maxSpace, (_c = this.value) === null || 25779 _c === void 0 ? void 0 : _c.conductivity, (_d = this.value) === null || 25780 _d === void 0 ? void 0 : _d.intensity, (_e = this.value) === null || 25781 _e === void 0 ? void 0 : _e.edgeEffect, (_f = this.value) === null || 25782 _f === void 0 ? void 0 : _f.stiffness, (_g = this.value) === null || 25783 _g === void 0 ? void 0 : _g.damping); 25784 } 25785 } 25786 checkObjectDiff() { 25787 return !(this.stageValue.minSpace === this.value.minSpace && this.stageValue.maxSpace === this.value.maxSpace && 25788 this.stageValue.conductivity === this.value.conductivity && this.stageValue.intensity === this.value.intensity && 25789 this.stageValue.edgeEffect === this.value.edgeEffect && this.stageValue.stiffness === this.value.stiffness && 25790 this.stageValue.damping === this.value.damping); 25791 } 25792} 25793ChainAnimationOptionsModifier.identity = Symbol('chainAnimationOptions'); 25794class ListChainAnimationModifier extends ModifierWithKey { 25795 constructor(value) { 25796 super(value); 25797 } 25798 applyPeer(node, reset) { 25799 if (reset) { 25800 getUINativeModule().list.resetChainAnimation(node); 25801 } 25802 else { 25803 getUINativeModule().list.setChainAnimation(node, this.value); 25804 } 25805 } 25806} 25807ListChainAnimationModifier.identity = Symbol('listChainAnimation'); 25808class ListCachedCountModifier extends ModifierWithKey { 25809 constructor(value) { 25810 super(value); 25811 } 25812 applyPeer(node, reset) { 25813 if (reset) { 25814 getUINativeModule().list.resetCachedCount(node); 25815 } 25816 else { 25817 getUINativeModule().list.setCachedCount(node, this.value); 25818 } 25819 } 25820} 25821ListCachedCountModifier.identity = Symbol('listCachedCount'); 25822class ListEnableScrollInteractionModifier extends ModifierWithKey { 25823 constructor(value) { 25824 super(value); 25825 } 25826 applyPeer(node, reset) { 25827 if (reset) { 25828 getUINativeModule().list.resetEnableScrollInteraction(node); 25829 } 25830 else { 25831 getUINativeModule().list.setEnableScrollInteraction(node, this.value); 25832 } 25833 } 25834} 25835ListEnableScrollInteractionModifier.identity = Symbol('listEnableScrollInteraction'); 25836class ListStickyModifier extends ModifierWithKey { 25837 constructor(value) { 25838 super(value); 25839 } 25840 applyPeer(node, reset) { 25841 if (reset) { 25842 getUINativeModule().list.resetSticky(node); 25843 } 25844 else { 25845 getUINativeModule().list.setSticky(node, this.value); 25846 } 25847 } 25848} 25849ListStickyModifier.identity = Symbol('listSticky'); 25850class ListEdgeEffectModifier extends ModifierWithKey { 25851 constructor(value) { 25852 super(value); 25853 } 25854 applyPeer(node, reset) { 25855 let _a; 25856 if (reset) { 25857 getUINativeModule().list.resetListEdgeEffect(node); 25858 } 25859 else { 25860 getUINativeModule().list.setListEdgeEffect(node, this.value.value, (_a = this.value.options) === null || 25861 _a === void 0 ? void 0 : _a.alwaysEnabled); 25862 } 25863 } 25864 checkObjectDiff() { 25865 return !((this.stageValue.value === this.value.value) && 25866 (this.stageValue.options === this.value.options)); 25867 } 25868} 25869ListEdgeEffectModifier.identity = Symbol('listEdgeEffect'); 25870class ListListDirectionModifier extends ModifierWithKey { 25871 constructor(value) { 25872 super(value); 25873 } 25874 applyPeer(node, reset) { 25875 if (reset) { 25876 getUINativeModule().list.resetListDirection(node); 25877 } 25878 else { 25879 getUINativeModule().list.setListDirection(node, this.value); 25880 } 25881 } 25882} 25883ListListDirectionModifier.identity = Symbol('listListDirection'); 25884class ListFrictionModifier extends ModifierWithKey { 25885 constructor(value) { 25886 super(value); 25887 } 25888 applyPeer(node, reset) { 25889 if (reset) { 25890 getUINativeModule().list.resetListFriction(node); 25891 } 25892 else { 25893 if (!isNumber(this.value) && !isResource(this.value)) { 25894 getUINativeModule().list.resetListFriction(node); 25895 } 25896 else { 25897 getUINativeModule().list.setListFriction(node, this.value); 25898 } 25899 } 25900 } 25901 checkObjectDiff() { 25902 return !isBaseOrResourceEqual(this.stageValue, this.value); 25903 } 25904} 25905ListFrictionModifier.identity = Symbol('listFriction'); 25906class ListMaintainVisibleContentPositionModifier extends ModifierWithKey { 25907 constructor(value) { 25908 super(value); 25909 } 25910 applyPeer(node, reset) { 25911 if (reset) { 25912 getUINativeModule().list.resetListMaintainVisibleContentPosition(node); 25913 } else { 25914 getUINativeModule().list.setListMaintainVisibleContentPosition(node, this.value); 25915 } 25916 } 25917} 25918ListMaintainVisibleContentPositionModifier.identity = Symbol('listMaintainVisibleContentPosition'); 25919class ListNestedScrollModifier extends ModifierWithKey { 25920 constructor(value) { 25921 super(value); 25922 } 25923 applyPeer(node, reset) { 25924 let _a, _b; 25925 if (reset) { 25926 getUINativeModule().list.resetListNestedScroll(node); 25927 } 25928 else { 25929 getUINativeModule().list.setListNestedScroll(node, (_a = this.value) === null || 25930 _a === void 0 ? void 0 : _a.scrollForward, (_b = this.value) === null || 25931 _b === void 0 ? void 0 : _b.scrollBackward); 25932 } 25933 } 25934} 25935ListNestedScrollModifier.identity = Symbol('listNestedScroll'); 25936class ListScrollBarModifier extends ModifierWithKey { 25937 constructor(value) { 25938 super(value); 25939 } 25940 applyPeer(node, reset) { 25941 if (reset) { 25942 getUINativeModule().list.resetListScrollBar(node); 25943 } 25944 else { 25945 getUINativeModule().list.setListScrollBar(node, this.value); 25946 } 25947 } 25948} 25949ListScrollBarModifier.identity = Symbol('listScrollBar'); 25950class ListScrollBarWidthModifier extends ModifierWithKey { 25951 constructor(value) { 25952 super(value); 25953 } 25954 applyPeer(node, reset) { 25955 if (reset) { 25956 getUINativeModule().list.resetListScrollBarWidth(node); 25957 } 25958 else { 25959 getUINativeModule().list.setListScrollBarWidth(node, this.value); 25960 } 25961 } 25962} 25963ListScrollBarWidthModifier.identity = Symbol('listScrollBarWidth'); 25964class ListScrollBarColorModifier extends ModifierWithKey { 25965 constructor(value) { 25966 super(value); 25967 } 25968 applyPeer(node, reset) { 25969 if (reset) { 25970 getUINativeModule().list.resetListScrollBarColor(node); 25971 } 25972 else { 25973 getUINativeModule().list.setListScrollBarColor(node, this.value); 25974 } 25975 } 25976} 25977ListScrollBarColorModifier.identity = Symbol('listScrollBarColor'); 25978class ListFlingSpeedLimitModifier extends ModifierWithKey { 25979 constructor(value) { 25980 super(value); 25981 } 25982 applyPeer(node, reset) { 25983 if (reset) { 25984 getUINativeModule().list.resetFlingSpeedLimit(node); 25985 } 25986 else { 25987 getUINativeModule().list.setFlingSpeedLimit(node, this.value); 25988 } 25989 } 25990} 25991ListFlingSpeedLimitModifier.identity = Symbol('listFlingSpeedLimit'); 25992class ListLanesModifier extends ModifierWithKey { 25993 constructor(value) { 25994 super(value); 25995 } 25996 applyPeer(node, reset) { 25997 if (reset) { 25998 getUINativeModule().list.resetListLanes(node); 25999 } 26000 else { 26001 getUINativeModule().list.setListLanes(node, this.value.lanesNum, this.value.minLength, this.value.maxLength, this.value.gutter); 26002 } 26003 } 26004 checkObjectDiff() { 26005 return true; 26006 } 26007} 26008ListLanesModifier.identity = Symbol('listLanes'); 26009class ListClipModifier extends ModifierWithKey { 26010 constructor(value) { 26011 super(value); 26012 } 26013 applyPeer(node, reset) { 26014 if (reset) { 26015 getUINativeModule().common.resetClipWithEdge(node); 26016 } 26017 else { 26018 getUINativeModule().common.setClipWithEdge(node, this.value); 26019 } 26020 } 26021 checkObjectDiff() { 26022 return true; 26023 } 26024} 26025ListClipModifier.identity = Symbol('listClip'); 26026 26027class ListChildrenMainSizeModifier extends ModifierWithKey { 26028 constructor(value) { 26029 super(value); 26030 } 26031 applyPeer(node, reset) { 26032 if (reset) { 26033 getUINativeModule().list.resetListChildrenMainSize(node); 26034 } 26035 else { 26036 getUINativeModule().list.setListChildrenMainSize(node, this.value); 26037 } 26038 } 26039 checkObjectDiff() { 26040 return true; 26041 } 26042} 26043ListChildrenMainSizeModifier.identity = Symbol('listChildrenMainSize'); 26044 26045class ListSpaceModifier extends ModifierWithKey { 26046 constructor(value) { 26047 super(value); 26048 } 26049 applyPeer(node, reset) { 26050 if (reset) { 26051 getUINativeModule().list.resetSpace(node); 26052 } 26053 else { 26054 getUINativeModule().list.setSpace(node, this.value); 26055 } 26056 } 26057} 26058ListSpaceModifier.identity = Symbol('listSpace'); 26059 26060class ListInitialIndexModifier extends ModifierWithKey { 26061 constructor(value) { 26062 super(value); 26063 } 26064 applyPeer(node, reset) { 26065 if (reset) { 26066 getUINativeModule().list.resetInitialIndex(node); 26067 } 26068 else { 26069 getUINativeModule().list.setInitialIndex(node, this.value); 26070 } 26071 } 26072} 26073ListInitialIndexModifier.identity = Symbol('listInitialIndex'); 26074 26075class ListInitialScrollerModifier extends ModifierWithKey { 26076 constructor(value) { 26077 super(value); 26078 } 26079 applyPeer(node, reset) { 26080 if (reset) { 26081 getUINativeModule().list.resetInitialScroller(node); 26082 } 26083 else { 26084 getUINativeModule().list.setInitialScroller(node, this.value); 26085 } 26086 } 26087} 26088ListInitialScrollerModifier.identity = Symbol('listInitialScroller'); 26089 26090class ArkListComponent extends ArkComponent { 26091 constructor(nativePtr, classType) { 26092 super(nativePtr, classType); 26093 } 26094 26095 initialize(value) { 26096 if (value[0] !== undefined) { 26097 if (value[0].initialIndex !== undefined) { 26098 modifierWithKey(this._modifiersWithKeys, ListInitialIndexModifier.identity, ListInitialIndexModifier, value[0].initialIndex); 26099 } 26100 if (value[0].space !== undefined) { 26101 modifierWithKey(this._modifiersWithKeys, ListSpaceModifier.identity, ListSpaceModifier, value[0].space); 26102 } 26103 if (value[0].scroller !== undefined) { 26104 modifierWithKey(this._modifiersWithKeys, ListInitialScrollerModifier.identity, ListInitialScrollerModifier, value[0].scroller); 26105 } 26106 } 26107 return this; 26108 } 26109 allowChildTypes() { 26110 return ["ListItem", "ListItemGroup"]; 26111 } 26112 lanes(value, gutter) { 26113 let opt = new ArkLanesOpt(); 26114 opt.gutter = gutter; 26115 if (isUndefined(value)) { 26116 opt.lanesNum = undefined; 26117 } 26118 else if (isNumber(value)) { 26119 opt.lanesNum = value; 26120 } 26121 else { 26122 const lc = value; 26123 opt.minLength = lc.minLength; 26124 opt.maxLength = lc.maxLength; 26125 } 26126 modifierWithKey(this._modifiersWithKeys, ListLanesModifier.identity, ListLanesModifier, opt); 26127 return this; 26128 } 26129 alignListItem(value) { 26130 modifierWithKey(this._modifiersWithKeys, ListAlignListItemModifier.identity, ListAlignListItemModifier, value); 26131 return this; 26132 } 26133 listDirection(value) { 26134 modifierWithKey(this._modifiersWithKeys, ListListDirectionModifier.identity, ListListDirectionModifier, value); 26135 return this; 26136 } 26137 scrollBar(value) { 26138 modifierWithKey(this._modifiersWithKeys, ListScrollBarModifier.identity, ListScrollBarModifier, value); 26139 return this; 26140 } 26141 scrollBarWidth(value) { 26142 modifierWithKey(this._modifiersWithKeys, ListScrollBarWidthModifier.identity, ListScrollBarWidthModifier, value); 26143 return this; 26144 } 26145 scrollBarColor(value) { 26146 modifierWithKey(this._modifiersWithKeys, ListScrollBarColorModifier.identity, ListScrollBarColorModifier, value); 26147 return this; 26148 } 26149 flingSpeedLimit(value) { 26150 modifierWithKey(this._modifiersWithKeys, ListFlingSpeedLimitModifier.identity, ListFlingSpeedLimitModifier, value); 26151 return this; 26152 } 26153 edgeEffect(value, options) { 26154 let effect = new ArkListEdgeEffect(); 26155 effect.value = value; 26156 effect.options = options; 26157 modifierWithKey(this._modifiersWithKeys, ListEdgeEffectModifier.identity, ListEdgeEffectModifier, effect); 26158 return this; 26159 } 26160 contentStartOffset(value) { 26161 modifierWithKey(this._modifiersWithKeys, ContentStartOffsetModifier.identity, ContentStartOffsetModifier, value); 26162 return this; 26163 } 26164 contentEndOffset(value) { 26165 modifierWithKey(this._modifiersWithKeys, ContentEndOffsetModifier.identity, ContentEndOffsetModifier, value); 26166 return this; 26167 } 26168 divider(value) { 26169 modifierWithKey(this._modifiersWithKeys, ListDividerModifier.identity, ListDividerModifier, value); 26170 return this; 26171 } 26172 editMode(value) { 26173 modifierWithKey(this._modifiersWithKeys, ListEditModeModifier.identity, ListEditModeModifier, value); 26174 return this; 26175 } 26176 multiSelectable(value) { 26177 modifierWithKey(this._modifiersWithKeys, ListMultiSelectableModifier.identity, ListMultiSelectableModifier, value); 26178 return this; 26179 } 26180 cachedCount(value) { 26181 modifierWithKey(this._modifiersWithKeys, ListCachedCountModifier.identity, ListCachedCountModifier, value); 26182 return this; 26183 } 26184 chainAnimation(value) { 26185 modifierWithKey(this._modifiersWithKeys, ListChainAnimationModifier.identity, ListChainAnimationModifier, value); 26186 return this; 26187 } 26188 chainAnimationOptions(value) { 26189 modifierWithKey(this._modifiersWithKeys, ChainAnimationOptionsModifier.identity, ChainAnimationOptionsModifier, value); 26190 return this; 26191 } 26192 sticky(value) { 26193 modifierWithKey(this._modifiersWithKeys, ListStickyModifier.identity, ListStickyModifier, value); 26194 return this; 26195 } 26196 scrollSnapAlign(value) { 26197 modifierWithKey(this._modifiersWithKeys, ListScrollSnapAlignModifier.identity, ListScrollSnapAlignModifier, value); 26198 return this; 26199 } 26200 nestedScroll(value) { 26201 modifierWithKey(this._modifiersWithKeys, ListNestedScrollModifier.identity, ListNestedScrollModifier, value); 26202 return this; 26203 } 26204 enableScrollInteraction(value) { 26205 modifierWithKey(this._modifiersWithKeys, ListEnableScrollInteractionModifier.identity, ListEnableScrollInteractionModifier, value); 26206 return this; 26207 } 26208 friction(value) { 26209 modifierWithKey(this._modifiersWithKeys, ListFrictionModifier.identity, ListFrictionModifier, value); 26210 return this; 26211 } 26212 maintainVisibleContentPosition(value) { 26213 modifierWithKey(this._modifiersWithKeys, ListMaintainVisibleContentPositionModifier.identity, 26214 ListMaintainVisibleContentPositionModifier, value); 26215 return this; 26216 } 26217 clip(value) { 26218 modifierWithKey(this._modifiersWithKeys, ListClipModifier.identity, ListClipModifier, value); 26219 return this; 26220 } 26221 onScroll(event) { 26222 throw new Error('Method not implemented.'); 26223 } 26224 onScrollIndex(event) { 26225 throw new Error('Method not implemented.'); 26226 } 26227 onReachStart(event) { 26228 throw new Error('Method not implemented.'); 26229 } 26230 onReachEnd(event) { 26231 throw new Error('Method not implemented.'); 26232 } 26233 onScrollStart(event) { 26234 throw new Error('Method not implemented.'); 26235 } 26236 onScrollStop(event) { 26237 throw new Error('Method not implemented.'); 26238 } 26239 onItemDelete(event) { 26240 throw new Error('Method not implemented.'); 26241 } 26242 onItemMove(event) { 26243 throw new Error('Method not implemented.'); 26244 } 26245 onItemDragStart(event) { 26246 throw new Error('Method not implemented.'); 26247 } 26248 onItemDragEnter(event) { 26249 throw new Error('Method not implemented.'); 26250 } 26251 onItemDragMove(event) { 26252 throw new Error('Method not implemented.'); 26253 } 26254 onItemDragLeave(event) { 26255 throw new Error('Method not implemented.'); 26256 } 26257 onItemDrop(event) { 26258 throw new Error('Method not implemented.'); 26259 } 26260 onScrollFrameBegin(event) { 26261 throw new Error('Method not implemented.'); 26262 } 26263 childrenMainSize(value) { 26264 modifierWithKey(this._modifiersWithKeys, ListChildrenMainSizeModifier.identity, ListChildrenMainSizeModifier, value); 26265 return this; 26266 } 26267} 26268// @ts-ignore 26269if (globalThis.List !== undefined) { 26270 globalThis.List.attributeModifier = function (modifier) { 26271 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26272 return new ArkListComponent(nativePtr); 26273 }, (nativePtr, classType, modifierJS) => { 26274 return new modifierJS.ListModifier(nativePtr, classType); 26275 }); 26276 }; 26277} 26278 26279/// <reference path='./import.ts' /> 26280class ListItemSelectedModifier extends ModifierWithKey { 26281 applyPeer(node, reset) { 26282 if (reset) { 26283 getUINativeModule().listItem.resetListItemSelected(node); 26284 } 26285 else { 26286 getUINativeModule().listItem.setListItemSelected(node, this.value); 26287 } 26288 } 26289} 26290ListItemSelectedModifier.identity = Symbol('listItemSelected'); 26291class ListItemSelectableModifier extends ModifierWithKey { 26292 applyPeer(node, reset) { 26293 if (reset) { 26294 getUINativeModule().listItem.resetSelectable(node); 26295 } 26296 else { 26297 getUINativeModule().listItem.setSelectable(node, this.value); 26298 } 26299 } 26300} 26301ListItemSelectableModifier.identity = Symbol('listItemSelectable'); 26302class ListItemSwipeActionModifier extends ModifierWithKey { 26303 constructor(value) { 26304 super(value); 26305 } 26306 applyPeer(node, reset) { 26307 if (reset) { 26308 getUINativeModule().listItem.resetSwipeAction(node); 26309 } else { 26310 getUINativeModule().listItem.setSwipeAction(node, this.value); 26311 } 26312 } 26313 checkObjectDiff() { 26314 return true; 26315 } 26316} 26317ListItemSwipeActionModifier.identity = Symbol('listItemSwipeAction'); 26318class ArkListItemComponent extends ArkComponent { 26319 constructor(nativePtr, classType) { 26320 super(nativePtr, classType); 26321 } 26322 initialize(value) { 26323 return this; 26324 } 26325 sticky(value) { 26326 throw new Error('Method not implemented.'); 26327 } 26328 editable(value) { 26329 throw new Error('Method not implemented.'); 26330 } 26331 selectable(value) { 26332 modifierWithKey(this._modifiersWithKeys, ListItemSelectableModifier.identity, ListItemSelectableModifier, value); 26333 return this; 26334 } 26335 selected(value) { 26336 modifierWithKey(this._modifiersWithKeys, ListItemSelectedModifier.identity, ListItemSelectedModifier, value); 26337 return this; 26338 } 26339 swipeAction(value) { 26340 modifierWithKey(this._modifiersWithKeys, ListItemSwipeActionModifier.identity, ListItemSwipeActionModifier, value); 26341 return this; 26342 } 26343 onSelect(event) { 26344 throw new Error('Method not implemented.'); 26345 } 26346} 26347// @ts-ignore 26348if (globalThis.ListItem !== undefined) { 26349 globalThis.ListItem.attributeModifier = function (modifier) { 26350 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26351 return new ArkListItemComponent(nativePtr); 26352 }, (nativePtr, classType, modifierJS) => { 26353 return new modifierJS.ListItemModifier(nativePtr, classType); 26354 }); 26355 }; 26356} 26357 26358/// <reference path='./import.ts' /> 26359class ListItemGroupInitializeModifier extends ModifierWithKey { 26360 constructor(value) { 26361 super(value); 26362 } 26363 applyPeer(node, reset) { 26364 if (reset) { 26365 getUINativeModule().listItemGroup.resetListItemGroupInitialize(node); 26366 } else { 26367 getUINativeModule().listItemGroup.setListItemGroupInitialize(node, this.value?.space, this.value?.style); 26368 } 26369 } 26370} 26371ListItemGroupInitializeModifier.identity = Symbol('listItemGroupinitialize'); 26372class ListItemGroupDividerModifier extends ModifierWithKey { 26373 constructor(value) { 26374 super(value); 26375 } 26376 applyPeer(node, reset) { 26377 let _a, _b, _c, _d; 26378 if (reset) { 26379 getUINativeModule().listItemGroup.resetDivider(node); 26380 } 26381 else { 26382 getUINativeModule().listItemGroup.setDivider(node, (_a = this.value) === null || 26383 _a === void 0 ? void 0 : _a.strokeWidth, (_b = this.value) === null || 26384 _b === void 0 ? void 0 : _b.color, (_c = this.value) === null || 26385 _c === void 0 ? void 0 : _c.startMargin, (_d = this.value) === null || 26386 _d === void 0 ? void 0 : _d.endMargin); 26387 } 26388 } 26389 checkObjectDiff() { 26390 let _a, _b, _c, _d, _e, _f, _g, _h; 26391 return !(((_a = this.stageValue) === null || _a === void 0 ? void 0 : _a.strokeWidth) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.strokeWidth) && 26392 ((_c = this.stageValue) === null || _c === void 0 ? void 0 : _c.color) === ((_d = this.value) === null || _d === void 0 ? void 0 : _d.color) && 26393 ((_e = this.stageValue) === null || _e === void 0 ? void 0 : _e.startMargin) === ((_f = this.value) === null || _f === void 0 ? void 0 : _f.startMargin) && 26394 ((_g = this.stageValue) === null || _g === void 0 ? void 0 : _g.endMargin) === ((_h = this.value) === null || _h === void 0 ? void 0 : _h.endMargin)); 26395 } 26396} 26397ListItemGroupDividerModifier.identity = Symbol('listItemGroupDivider'); 26398class ListItemGroupChildrenMainSizeModifier extends ModifierWithKey { 26399 constructor(value) { 26400 super(value); 26401 } 26402 applyPeer(node, reset) { 26403 if (reset) { 26404 getUINativeModule().listItemGroup.resetListItemGroupChildrenMainSize(node); 26405 } 26406 else { 26407 getUINativeModule().listItemGroup.setListItemGroupChildrenMainSize(node, this.value); 26408 } 26409 } 26410 checkObjectDiff() { 26411 return true; 26412 } 26413} 26414ListItemGroupChildrenMainSizeModifier.identity = Symbol('listItemGroupChildrenMainSize'); 26415class ArkListItemGroupComponent extends ArkComponent { 26416 constructor(nativePtr, classType) { 26417 super(nativePtr, classType); 26418 } 26419 divider(value) { 26420 modifierWithKey(this._modifiersWithKeys, ListItemGroupDividerModifier.identity, ListItemGroupDividerModifier, value); 26421 return this; 26422 } 26423 childrenMainSize(value) { 26424 modifierWithKey(this._modifiersWithKeys, ListItemGroupChildrenMainSizeModifier.identity, ListItemGroupChildrenMainSizeModifier, value); 26425 return this; 26426 } 26427 initialize(value) { 26428 if (value[0] !== undefined) { 26429 modifierWithKey(this._modifiersWithKeys, ListItemGroupInitializeModifier.identity, 26430 ListItemGroupInitializeModifier, value[0]); 26431 } else { 26432 modifierWithKey(this._modifiersWithKeys, ListItemGroupInitializeModifier.identity, 26433 ListItemGroupInitializeModifier, undefined); 26434 } 26435 return this; 26436 } 26437 allowChildTypes() { 26438 return ["ListItem"]; 26439 } 26440} 26441// @ts-ignore 26442if (globalThis.ListItemGroup !== undefined) { 26443 globalThis.ListItemGroup.attributeModifier = function (modifier) { 26444 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26445 return new ArkListItemGroupComponent(nativePtr); 26446 }, (nativePtr, classType, modifierJS) => { 26447 return new modifierJS.ListItemGroupModifier(nativePtr, classType); 26448 }); 26449 }; 26450} 26451 26452class ArkRelativeContainerGuideLine { 26453 constructor() { 26454 this.ids = undefined; 26455 this.directions = undefined; 26456 this.positions = undefined; 26457 } 26458 26459 isEqual(another) { 26460 return ( 26461 this.ids === another.ids && 26462 this.directions === another.directions && 26463 this.positions === another.positions 26464 ); 26465 } 26466} 26467 26468class ArkRelativeContainerBarrier { 26469 constructor() { 26470 this.ids = undefined; 26471 this.directions = undefined; 26472 this.referencedIds = undefined; 26473 } 26474 26475 isEqual(another) { 26476 return ( 26477 this.ids === another.ids && 26478 this.directions === another.directions && 26479 this.referencedIds === another.positions 26480 ); 26481 } 26482} 26483 26484class RelativeContainerGuideLineModifier extends ModifierWithKey { 26485 constructor(value) { 26486 super(value); 26487 } 26488 applyPeer(node, reset) { 26489 if (reset) { 26490 getUINativeModule().relativeContainer.resetGuideLine(node); 26491 } else { 26492 getUINativeModule().relativeContainer.setGuideLine(node, 26493 this.value.ids, this.value.directions, this.value.positions); 26494 } 26495 } 26496 checkObjectDiff() { 26497 return !isBaseOrResourceEqual(this.stageValue.ids, this.value.ids) || 26498 !isBaseOrResourceEqual(this.stageValue.directions, this.value.directions) || 26499 !isBaseOrResourceEqual(this.stageValue.positions, this.value.positions); 26500 } 26501} 26502RelativeContainerGuideLineModifier.identity = Symbol('relativeContainerGuideLine'); 26503class RelativeContainerBarrierModifier extends ModifierWithKey { 26504 constructor(value) { 26505 super(value); 26506 } 26507 applyPeer(node, reset) { 26508 if (reset) { 26509 getUINativeModule().relativeContainer.resetBarrier(node); 26510 } else { 26511 getUINativeModule().relativeContainer.setBarrier(node, 26512 this.value.ids, this.value.directions, this.value.referencedIds); 26513 } 26514 } 26515 checkObjectDiff() { 26516 return !isBaseOrResourceEqual(this.stageValue.ids, this.value.ids) || 26517 !isBaseOrResourceEqual(this.stageValue.directions, this.value.directions) || 26518 !isBaseOrResourceEqual(this.stageValue.referencedIds, this.value.referencedIds); 26519 } 26520} 26521RelativeContainerBarrierModifier.identity = Symbol('relativeContainerBarrier'); 26522/// <reference path='./import.ts' /> 26523class ArkRelativeContainerComponent extends ArkComponent { 26524 constructor(nativePtr, classType) { 26525 super(nativePtr, classType); 26526 } 26527 initialize(value) { 26528 return this; 26529 } 26530 guideLine(value) { 26531 let guideLineInfo = new ArkRelativeContainerGuideLine(); 26532 guideLineInfo.ids = value.map(item => { return item.id; }); 26533 guideLineInfo.directions = value.map(item => { return item.direction; }); 26534 guideLineInfo.positions = new Array(); 26535 for (let i = 0; i < value.length; i++) { 26536 guideLineInfo.positions.push(value[i].position.start); 26537 guideLineInfo.positions.push(value[i].position.end); 26538 } 26539 modifierWithKey(this._modifiersWithKeys, RelativeContainerGuideLineModifier.identity, RelativeContainerGuideLineModifier, guideLineInfo); 26540 return this; 26541 } 26542 barrier(value) { 26543 let barrierInfo = new ArkRelativeContainerBarrier(); 26544 barrierInfo.ids = value.map(item => { return item.id; }); 26545 barrierInfo.directions = value.map(item => { return item.direction; }); 26546 barrierInfo.referencedIds = value.map(item => { return item.referencedId; }); 26547 modifierWithKey(this._modifiersWithKeys, RelativeContainerBarrierModifier.identity, RelativeContainerBarrierModifier, barrierInfo); 26548 return this; 26549 } 26550} 26551// @ts-ignore 26552if (globalThis.RelativeContainer !== undefined) { 26553 globalThis.RelativeContainer.attributeModifier = function (modifier) { 26554 attributeModifierFunc.call(this, modifier, (nativePtr) => { 26555 return new ArkRelativeContainerComponent(nativePtr); 26556 }, (nativePtr, classType, modifierJS) => { 26557 return new modifierJS.RelativeContainerModifier(nativePtr, classType); 26558 }); 26559 }; 26560} 26561 26562/// <reference path='./import.ts' /> 26563class ArkSwiperComponent extends ArkComponent { 26564 constructor(nativePtr, classType) { 26565 super(nativePtr, classType); 26566 } 26567 initialize(value) { 26568 if (value[0] !== undefined) { 26569 modifierWithKey(this._modifiersWithKeys, SwiperInitializeModifier.identity, SwiperInitializeModifier, value[0]); 26570 } 26571 return this; 26572 } 26573 index(value) { 26574 modifierWithKey(this._modifiersWithKeys, SwiperIndexModifier.identity, SwiperIndexModifier, value); 26575 return this; 26576 } 26577 autoPlay(value) { 26578 modifierWithKey(this._modifiersWithKeys, SwiperAutoPlayModifier.identity, SwiperAutoPlayModifier, value); 26579 return this; 26580 } 26581 interval(value) { 26582 modifierWithKey(this._modifiersWithKeys, SwiperIntervalModifier.identity, SwiperIntervalModifier, value); 26583 return this; 26584 } 26585 indicator(value) { 26586 modifierWithKey(this._modifiersWithKeys, SwiperIndicatorModifier.identity, SwiperIndicatorModifier, value); 26587 return this; 26588 } 26589 displayArrow(value, isHoverShow) { 26590 let arkDisplayArrow = new ArkDisplayArrow(); 26591 arkDisplayArrow.value = value; 26592 arkDisplayArrow.isHoverShow = isHoverShow; 26593 modifierWithKey(this._modifiersWithKeys, SwiperDisplayArrowModifier.identity, SwiperDisplayArrowModifier, arkDisplayArrow); 26594 return this; 26595 } 26596 loop(value) { 26597 modifierWithKey(this._modifiersWithKeys, SwiperLoopModifier.identity, SwiperLoopModifier, value); 26598 return this; 26599 } 26600 duration(value) { 26601 modifierWithKey(this._modifiersWithKeys, SwiperDurationModifier.identity, SwiperDurationModifier, value); 26602 return this; 26603 } 26604 vertical(value) { 26605 modifierWithKey(this._modifiersWithKeys, SwiperVerticalModifier.identity, SwiperVerticalModifier, value); 26606 return this; 26607 } 26608 itemSpace(value) { 26609 modifierWithKey(this._modifiersWithKeys, SwiperItemSpaceModifier.identity, SwiperItemSpaceModifier, value); 26610 return this; 26611 } 26612 displayMode(value) { 26613 modifierWithKey(this._modifiersWithKeys, SwiperDisplayModeModifier.identity, SwiperDisplayModeModifier, value); 26614 return this; 26615 } 26616 cachedCount(value) { 26617 modifierWithKey(this._modifiersWithKeys, SwiperCachedCountModifier.identity, SwiperCachedCountModifier, value); 26618 return this; 26619 } 26620 displayCount(value, swipeByGroup) { 26621 let arkDisplayCount = new ArkDisplayCount(); 26622 arkDisplayCount.value = value; 26623 arkDisplayCount.swipeByGroup = swipeByGroup; 26624 modifierWithKey(this._modifiersWithKeys, SwiperDisplayCountModifier.identity, SwiperDisplayCountModifier, arkDisplayCount); 26625 return this; 26626 } 26627 effectMode(value) { 26628 modifierWithKey(this._modifiersWithKeys, SwiperEffectModeModifier.identity, SwiperEffectModeModifier, value); 26629 return this; 26630 } 26631 disableSwipe(value) { 26632 modifierWithKey(this._modifiersWithKeys, SwiperDisableSwipeModifier.identity, SwiperDisableSwipeModifier, value); 26633 return this; 26634 } 26635 curve(value) { 26636 modifierWithKey(this._modifiersWithKeys, SwiperCurveModifier.identity, SwiperCurveModifier, value); 26637 return this; 26638 } 26639 onChange(value) { 26640 modifierWithKey(this._modifiersWithKeys, SwiperOnChangeModifier.identity, SwiperOnChangeModifier, value); 26641 return this; 26642 } 26643 indicatorStyle(value) { 26644 throw new Error('Method not implemented.'); 26645 } 26646 prevMargin(value) { 26647 modifierWithKey(this._modifiersWithKeys, SwiperPrevMarginModifier.identity, SwiperPrevMarginModifier, value); 26648 return this; 26649 } 26650 nextMargin(value) { 26651 modifierWithKey(this._modifiersWithKeys, SwiperNextMarginModifier.identity, SwiperNextMarginModifier, value); 26652 return this; 26653 } 26654 enabled(value) { 26655 modifierWithKey(this._modifiersWithKeys, SwiperEnabledModifier.identity, SwiperEnabledModifier, value); 26656 return this; 26657 } 26658 onAnimationStart(value) { 26659 modifierWithKey(this._modifiersWithKeys, SwiperOnAnimationStartModifier.identity, SwiperOnAnimationStartModifier, value); 26660 return this; 26661 } 26662 onAnimationEnd(value) { 26663 modifierWithKey(this._modifiersWithKeys, SwiperOnAnimationEndModifier.identity, SwiperOnAnimationEndModifier, value); 26664 return this; 26665 } 26666 onGestureSwipe(value) { 26667 modifierWithKey(this._modifiersWithKeys, SwiperOnGestureSwipeModifier.identity, SwiperOnGestureSwipeModifier, value); 26668 return this; 26669 } 26670 nestedScroll(value) { 26671 modifierWithKey(this._modifiersWithKeys, SwiperNestedScrollModifier.identity, SwiperNestedScrollModifier, value); 26672 return this; 26673 } 26674 indicatorInteractive(value) { 26675 modifierWithKey(this._modifiersWithKeys, SwiperIndicatorInteractiveModifier.identity, SwiperIndicatorInteractiveModifier, value); 26676 return this; 26677 } 26678 customContentTransition(value) { 26679 modifierWithKey(this._modifiersWithKeys, SwiperCustomContentTransitionModifier.identity, SwiperCustomContentTransitionModifier, value); 26680 return this; 26681 } 26682 onContentDidScroll(value) { 26683 modifierWithKey(this._modifiersWithKeys, SwiperOnContentDidScrollModifier.identity, SwiperOnContentDidScrollModifier, value); 26684 return this; 26685 } 26686} 26687class SwiperInitializeModifier extends ModifierWithKey { 26688 applyPeer(node, reset) { 26689 if (reset) { 26690 getUINativeModule().swiper.resetSwiperInitialize(node); 26691 } 26692 else { 26693 getUINativeModule().swiper.setSwiperInitialize(node, this.value); 26694 } 26695 } 26696} 26697SwiperInitializeModifier.identity = Symbol('swiperInitialize'); 26698class SwiperNextMarginModifier extends ModifierWithKey { 26699 applyPeer(node, reset) { 26700 if (reset) { 26701 getUINativeModule().swiper.resetSwiperNextMargin(node); 26702 } 26703 else { 26704 getUINativeModule().swiper.setSwiperNextMargin(node, this.value); 26705 } 26706 } 26707 checkObjectDiff() { 26708 return !isBaseOrResourceEqual(this.stageValue, this.value); 26709 } 26710} 26711SwiperNextMarginModifier.identity = Symbol('swiperNextMargin'); 26712class SwiperPrevMarginModifier extends ModifierWithKey { 26713 applyPeer(node, reset) { 26714 if (reset) { 26715 getUINativeModule().swiper.resetSwiperPrevMargin(node); 26716 } 26717 else { 26718 getUINativeModule().swiper.setSwiperPrevMargin(node, this.value); 26719 } 26720 } 26721 checkObjectDiff() { 26722 return !isBaseOrResourceEqual(this.stageValue, this.value); 26723 } 26724} 26725SwiperPrevMarginModifier.identity = Symbol('swiperPrevMargin'); 26726class SwiperDisplayCountModifier extends ModifierWithKey { 26727 applyPeer(node, reset) { 26728 if (reset) { 26729 getUINativeModule().swiper.resetSwiperSwipeByGroup(node); 26730 getUINativeModule().swiper.resetSwiperDisplayCount(node); 26731 } 26732 else { 26733 if (!isNull(this.value) && !isUndefined(this.value)) { 26734 let swipeByGroup; 26735 if (typeof this.value.swipeByGroup === 'boolean') { 26736 swipeByGroup = this.value.swipeByGroup; 26737 } 26738 26739 getUINativeModule().swiper.setSwiperSwipeByGroup(node, swipeByGroup); 26740 26741 if (typeof this.value.value === 'object') { 26742 let minSize = this.value.value.minSize.toString(); 26743 getUINativeModule().swiper.setSwiperDisplayCount(node, minSize, typeof this.value.value); 26744 } else { 26745 getUINativeModule().swiper.setSwiperDisplayCount(node, this.value.value, typeof this.value.value, swipeByGroup); 26746 } 26747 } else { 26748 getUINativeModule().swiper.resetSwiperSwipeByGroup(node); 26749 getUINativeModule().swiper.resetSwiperDisplayCount(node); 26750 } 26751 } 26752 } 26753 checkObjectDiff() { 26754 if (this.stageValue.swipeByGroup !== this.value.swipeByGroup || 26755 typeof this.stageValue.value !== typeof this.value.value) { 26756 return true; 26757 } 26758 else if (typeof this.stageValue.value === 'object' && 26759 typeof this.value.value === 'object') { 26760 return this.stageValue.value.minSize !== this.value.value.minSize; 26761 } 26762 else { 26763 return !isBaseOrResourceEqual(this.stageValue.value, this.value.value); 26764 } 26765 } 26766} 26767SwiperDisplayCountModifier.identity = Symbol('swiperDisplayCount'); 26768class SwiperDisplayArrowModifier extends ModifierWithKey { 26769 applyPeer(node, reset) { 26770 if (reset) { 26771 getUINativeModule().swiper.resetSwiperDisplayArrow(node); 26772 } 26773 else { 26774 if (!isNull(this.value.value) && !isUndefined(this.value.value) && typeof this.value === 'object') { 26775 let displayArrowValue = 3; 26776 let showBackground; 26777 let isSidebarMiddle; 26778 let backgroundSize; 26779 let backgroundColor; 26780 let arrowSize; 26781 let arrowColor; 26782 if (typeof this.value.value === 'boolean') { 26783 if (this.value.value) { 26784 displayArrowValue = 1; 26785 } 26786 else { 26787 displayArrowValue = 0; 26788 } 26789 } 26790 else if (typeof this.value.value === 'object') { 26791 displayArrowValue = 2; 26792 showBackground = this.value.value.showBackground; 26793 isSidebarMiddle = this.value.value.isSidebarMiddle; 26794 backgroundSize = this.value.value.backgroundSize; 26795 backgroundColor = this.value.value.backgroundColor; 26796 arrowSize = this.value.value.arrowSize; 26797 arrowColor = this.value.value.arrowColor; 26798 } 26799 let isHoverShow; 26800 if (typeof this.value.isHoverShow === 'boolean') { 26801 isHoverShow = this.value.isHoverShow; 26802 } 26803 getUINativeModule().swiper.setSwiperDisplayArrow(node, displayArrowValue, showBackground, 26804 isSidebarMiddle, backgroundSize, backgroundColor, arrowSize, arrowColor, isHoverShow); 26805 } 26806 else { 26807 getUINativeModule().swiper.resetSwiperDisplayArrow(node); 26808 } 26809 } 26810 } 26811 checkObjectDiff() { 26812 if (this.stageValue.isHoverShow !== this.value.isHoverShow || 26813 typeof this.stageValue.value !== typeof this.value.value) { 26814 return true; 26815 } 26816 if (typeof this.stageValue.value === 'boolean' && 26817 typeof this.value.value === 'boolean' && 26818 this.stageValue.value !== this.value.value) { 26819 return true; 26820 } 26821 else if (typeof this.stageValue.value === 'object' && typeof this.value.value === 'object') { 26822 return (!isBaseOrResourceEqual(this.stageValue.value.showBackground, this.value.value.showBackground) || 26823 !isBaseOrResourceEqual(this.stageValue.value.isSidebarMiddle, this.value.value.isSidebarMiddle) || 26824 !isBaseOrResourceEqual(this.stageValue.value.backgroundSize, this.value.value.backgroundSize) || 26825 !isBaseOrResourceEqual(this.stageValue.value.backgroundColor, this.value.value.backgroundColor) || 26826 !isBaseOrResourceEqual(this.stageValue.value.arrowSize, this.value.value.arrowSize) || 26827 !isBaseOrResourceEqual(this.stageValue.value.arrowColor, this.value.value.arrowColor)); 26828 } 26829 else { 26830 return true; 26831 } 26832 } 26833} 26834SwiperDisplayArrowModifier.identity = Symbol('swiperDisplayArrow'); 26835class SwiperIndicatorModifier extends ModifierWithKey { 26836 applyPeer(node, reset) { 26837 if (reset) { 26838 getUINativeModule().swiper.resetSwiperIndicator(node); 26839 } 26840 else { 26841 let left; 26842 let top; 26843 let right; 26844 let bottom; 26845 let itemWidth; 26846 let itemHeight; 26847 let selectedItemWidth; 26848 let selectedItemHeight; 26849 let mask; 26850 let color; 26851 let selectedColor; 26852 let fontColor; 26853 let selectedFontColor; 26854 let digitFontSize; 26855 let digitFontWeight; 26856 let selectedDigitFontSize; 26857 let selectedDigitFontWeight; 26858 let maxDisplayCount; 26859 if (typeof this.value === 'boolean') { 26860 getUINativeModule().swiper.setSwiperIndicator(node, 'boolean', this.value); 26861 } 26862 else if (typeof this.value === 'object' && this.value.type === 'DotIndicator') { 26863 left = this.value.leftValue; 26864 top = this.value.topValue; 26865 right = this.value.rightValue; 26866 bottom = this.value.bottomValue; 26867 itemWidth = this.value.itemWidthValue; 26868 itemHeight = this.value.itemHeightValue; 26869 selectedItemWidth = this.value.selectedItemWidthValue; 26870 selectedItemHeight = this.value.selectedItemHeightValue; 26871 mask = this.value.maskValue; 26872 color = this.value.colorValue; 26873 selectedColor = this.value.selectedColorValue; 26874 maxDisplayCount = this.value.maxDisplayCountValue; 26875 getUINativeModule().swiper.setSwiperIndicator(node, 'ArkDotIndicator', itemWidth, itemHeight, selectedItemWidth, 26876 selectedItemHeight, mask, color, selectedColor, left, top, right, bottom, maxDisplayCount); 26877 } 26878 else if (typeof this.value === 'object' && this.value.type === 'DigitIndicator') { 26879 left = this.value.leftValue; 26880 top = this.value.topValue; 26881 right = this.value.rightValue; 26882 bottom = this.value.bottomValue; 26883 fontColor = this.value.fontColorValue; 26884 selectedFontColor = this.value.selectedFontColorValue; 26885 let arkDigitFont = new ArkDigitFont(); 26886 if (typeof this.value.digitFontValue === 'object') { 26887 digitFontSize = this.value.digitFontValue.size; 26888 digitFontWeight = arkDigitFont.parseFontWeight(this.value.digitFontValue.weight); 26889 } 26890 if (typeof this.value.selectedDigitFontValue === 'object') { 26891 selectedDigitFontSize = this.value.selectedDigitFontValue.size; 26892 selectedDigitFontWeight = arkDigitFont.parseFontWeight(this.value.selectedDigitFontValue.weight); 26893 } 26894 getUINativeModule().swiper.setSwiperIndicator(node, 'ArkDigitIndicator', fontColor, selectedFontColor, digitFontSize, 26895 digitFontWeight, selectedDigitFontSize, selectedDigitFontWeight, left, top, right, bottom); 26896 } 26897 else { 26898 getUINativeModule().swiper.setSwiperIndicator(node, 'boolean', true); 26899 } 26900 } 26901 } 26902 checkObjectDiff() { 26903 if (typeof this.stageValue !== typeof this.value) { 26904 return true; 26905 } 26906 if (typeof this.stageValue === 'boolean' && typeof this.value === 'boolean') { 26907 return this.stageValue !== this.value; 26908 } 26909 if (this.stageValue instanceof ArkDotIndicator && this.value instanceof ArkDotIndicator) { 26910 return (!isBaseOrResourceEqual(this.stageValue.itemWidthValue, this.value.itemWidthValue) || 26911 !isBaseOrResourceEqual(this.stageValue.itemHeightValue, this.value.itemHeightValue) || 26912 !isBaseOrResourceEqual(this.stageValue.selectedItemWidthValue, this.value.selectedItemWidthValue) || 26913 !isBaseOrResourceEqual(this.stageValue.selectedItemHeightValue, this.value.selectedItemHeightValue) || 26914 !isBaseOrResourceEqual(this.stageValue.maskValue, this.value.maskValue) || 26915 !isBaseOrResourceEqual(this.stageValue.colorValue, this.value.colorValue) || 26916 !isBaseOrResourceEqual(this.stageValue.selectedColorValue, this.value.selectedColorValue) || 26917 !isBaseOrResourceEqual(this.stageValue.maxDisplayCountValue, this.value.maxDisplayCountValue)); 26918 } 26919 else if (this.stageValue instanceof ArkDigitIndicator && this.value instanceof ArkDigitIndicator) { 26920 return (!isBaseOrResourceEqual(this.stageValue.fontColorValue, this.value.fontColorValue) || 26921 !isBaseOrResourceEqual(this.stageValue.selectedFontColorValue, this.value.selectedFontColorValue) || 26922 !isBaseOrResourceEqual(this.stageValue.digitFontValue.size, this.value.digitFontValue.size) || 26923 !isBaseOrResourceEqual(this.stageValue.digitFontValue.weight, this.value.digitFontValue.weight) || 26924 !isBaseOrResourceEqual(this.stageValue.selectedDigitFontValue.size, this.value.selectedDigitFontValue.size) || 26925 !isBaseOrResourceEqual(this.stageValue.selectedDigitFontValue.weight, this.value.selectedDigitFontValue.weight)); 26926 } 26927 else { 26928 return true; 26929 } 26930 } 26931} 26932SwiperIndicatorModifier.identity = Symbol('swiperIndicator'); 26933class SwiperCurveModifier extends ModifierWithKey { 26934 applyPeer(node, reset) { 26935 if (reset) { 26936 getUINativeModule().swiper.resetSwiperCurve(node); 26937 } 26938 else { 26939 const curveMap = { 26940 [0]: 'linear', 26941 [1]: 'ease', 26942 [2]: 'ease-in', 26943 [3]: 'ease-out', 26944 [4]: 'ease-in-out', 26945 [5]: 'fast-out-slow-in', 26946 [6]: 'linear-out-slow-in', 26947 [7]: 'fast-out-linear-in', 26948 [8]: 'extreme-deceleration', 26949 [9]: 'sharp', 26950 [10]: 'rhythm', 26951 [11]: 'smooth', 26952 [12]: 'friction' 26953 }; 26954 if (typeof this.value === 'number') { 26955 if (this.value in curveMap) { 26956 this.value = curveMap[this.value]; 26957 } 26958 else { 26959 this.value = this.value.toString(); 26960 } 26961 } 26962 getUINativeModule().swiper.setSwiperCurve(node, this.value); 26963 } 26964 } 26965 checkObjectDiff() { 26966 return !isBaseOrResourceEqual(this.stageValue, this.value); 26967 } 26968} 26969SwiperCurveModifier.identity = Symbol('swiperCurve'); 26970class SwiperDisableSwipeModifier extends ModifierWithKey { 26971 applyPeer(node, reset) { 26972 if (reset) { 26973 getUINativeModule().swiper.resetSwiperDisableSwipe(node); 26974 } 26975 else { 26976 getUINativeModule().swiper.setSwiperDisableSwipe(node, this.value); 26977 } 26978 } 26979 checkObjectDiff() { 26980 return !isBaseOrResourceEqual(this.stageValue, this.value); 26981 } 26982} 26983SwiperDisableSwipeModifier.identity = Symbol('swiperDisableSwipe'); 26984class SwiperOnChangeModifier extends ModifierWithKey { 26985 constructor(value) { 26986 super(value); 26987 } 26988 applyPeer(node, reset) { 26989 if (reset) { 26990 getUINativeModule().swiper.resetSwiperOnChange(node); 26991 } else { 26992 getUINativeModule().swiper.setSwiperOnChange(node, this.value); 26993 } 26994 } 26995 checkObjectDiff() { 26996 return !isBaseOrResourceEqual(this.stageValue, this.value); 26997 } 26998} 26999SwiperOnChangeModifier.identity = Symbol('swiperOnChange'); 27000class SwiperEffectModeModifier extends ModifierWithKey { 27001 applyPeer(node, reset) { 27002 if (reset) { 27003 getUINativeModule().swiper.resetSwiperEffectMode(node); 27004 } 27005 else { 27006 getUINativeModule().swiper.setSwiperEffectMode(node, this.value); 27007 } 27008 } 27009 checkObjectDiff() { 27010 return !isBaseOrResourceEqual(this.stageValue, this.value); 27011 } 27012} 27013SwiperEffectModeModifier.identity = Symbol('swiperEffectMode'); 27014class SwiperCachedCountModifier extends ModifierWithKey { 27015 applyPeer(node, reset) { 27016 if (reset) { 27017 getUINativeModule().swiper.resetSwiperCachedCount(node); 27018 } 27019 else { 27020 getUINativeModule().swiper.setSwiperCachedCount(node, this.value); 27021 } 27022 } 27023 checkObjectDiff() { 27024 return !isBaseOrResourceEqual(this.stageValue, this.value); 27025 } 27026} 27027SwiperCachedCountModifier.identity = Symbol('swiperCachedCount'); 27028class SwiperDisplayModeModifier extends ModifierWithKey { 27029 applyPeer(node, reset) { 27030 if (reset) { 27031 getUINativeModule().swiper.resetSwiperDisplayMode(node); 27032 } 27033 else { 27034 getUINativeModule().swiper.setSwiperDisplayMode(node, this.value); 27035 } 27036 } 27037 checkObjectDiff() { 27038 return !isBaseOrResourceEqual(this.stageValue, this.value); 27039 } 27040} 27041SwiperDisplayModeModifier.identity = Symbol('swiperDisplayMode'); 27042class SwiperItemSpaceModifier extends ModifierWithKey { 27043 applyPeer(node, reset) { 27044 if (reset) { 27045 getUINativeModule().swiper.resetSwiperItemSpace(node); 27046 } 27047 else { 27048 getUINativeModule().swiper.setSwiperItemSpace(node, this.value); 27049 } 27050 } 27051 checkObjectDiff() { 27052 return !isBaseOrResourceEqual(this.stageValue, this.value); 27053 } 27054} 27055SwiperItemSpaceModifier.identity = Symbol('swiperItemSpace'); 27056class SwiperVerticalModifier extends ModifierWithKey { 27057 applyPeer(node, reset) { 27058 if (reset) { 27059 getUINativeModule().swiper.resetSwiperVertical(node); 27060 } 27061 else { 27062 getUINativeModule().swiper.setSwiperVertical(node, this.value); 27063 } 27064 } 27065 checkObjectDiff() { 27066 return !isBaseOrResourceEqual(this.stageValue, this.value); 27067 } 27068} 27069SwiperVerticalModifier.identity = Symbol('swiperVertical'); 27070class SwiperLoopModifier extends ModifierWithKey { 27071 applyPeer(node, reset) { 27072 if (reset) { 27073 getUINativeModule().swiper.resetSwiperLoop(node); 27074 } 27075 else { 27076 getUINativeModule().swiper.setSwiperLoop(node, this.value); 27077 } 27078 } 27079 checkObjectDiff() { 27080 return !isBaseOrResourceEqual(this.stageValue, this.value); 27081 } 27082} 27083SwiperLoopModifier.identity = Symbol('swiperLoop'); 27084class SwiperIntervalModifier extends ModifierWithKey { 27085 applyPeer(node, reset) { 27086 if (reset) { 27087 getUINativeModule().swiper.resetSwiperInterval(node); 27088 } 27089 else { 27090 getUINativeModule().swiper.setSwiperInterval(node, this.value); 27091 } 27092 } 27093 checkObjectDiff() { 27094 return !isBaseOrResourceEqual(this.stageValue, this.value); 27095 } 27096} 27097SwiperIntervalModifier.identity = Symbol('swiperInterval'); 27098class SwiperAutoPlayModifier extends ModifierWithKey { 27099 applyPeer(node, reset) { 27100 if (reset) { 27101 getUINativeModule().swiper.resetSwiperAutoPlay(node); 27102 } 27103 else { 27104 getUINativeModule().swiper.setSwiperAutoPlay(node, this.value); 27105 } 27106 } 27107 checkObjectDiff() { 27108 return !isBaseOrResourceEqual(this.stageValue, this.value); 27109 } 27110} 27111SwiperAutoPlayModifier.identity = Symbol('swiperAutoPlay'); 27112class SwiperIndexModifier extends ModifierWithKey { 27113 applyPeer(node, reset) { 27114 if (reset) { 27115 getUINativeModule().swiper.resetSwiperIndex(node); 27116 } 27117 else { 27118 getUINativeModule().swiper.setSwiperIndex(node, this.value); 27119 } 27120 } 27121 checkObjectDiff() { 27122 return !isBaseOrResourceEqual(this.stageValue, this.value); 27123 } 27124} 27125SwiperIndexModifier.identity = Symbol('swiperIndex'); 27126class SwiperDurationModifier extends ModifierWithKey { 27127 applyPeer(node, reset) { 27128 if (reset) { 27129 getUINativeModule().swiper.resetSwiperDuration(node); 27130 } 27131 else { 27132 getUINativeModule().swiper.setSwiperDuration(node, this.value); 27133 } 27134 } 27135 checkObjectDiff() { 27136 return !isBaseOrResourceEqual(this.stageValue, this.value); 27137 } 27138} 27139SwiperDurationModifier.identity = Symbol('swiperDuration'); 27140class SwiperEnabledModifier extends ModifierWithKey { 27141 constructor(value) { 27142 super(value); 27143 } 27144 applyPeer(node, reset) { 27145 if (reset) { 27146 getUINativeModule().swiper.resetSwiperEnabled(node); 27147 } 27148 else { 27149 getUINativeModule().swiper.setSwiperEnabled(node, this.value); 27150 } 27151 } 27152} 27153SwiperEnabledModifier.identity = Symbol('swiperenabled'); 27154class SwiperNestedScrollModifier extends ModifierWithKey { 27155 constructor(value) { 27156 super(value); 27157 } 27158 applyPeer(node, reset) { 27159 if (reset) { 27160 getUINativeModule().swiper.resetNestedScroll(node); 27161 } else { 27162 getUINativeModule().swiper.setNestedScroll(node, this.value); 27163 } 27164 } 27165 checkObjectDiff() { 27166 return !isBaseOrResourceEqual(this.stageValue, this.value); 27167 } 27168} 27169SwiperNestedScrollModifier.identity = Symbol('nestedScroll'); 27170class SwiperOnAnimationStartModifier extends ModifierWithKey { 27171 constructor(value) { 27172 super(value); 27173 } 27174 applyPeer(node, reset) { 27175 if (reset) { 27176 getUINativeModule().swiper.resetSwiperOnAnimationStart(node); 27177 } else { 27178 getUINativeModule().swiper.setSwiperOnAnimationStart(node, this.value); 27179 } 27180 } 27181 checkObjectDiff() { 27182 return !isBaseOrResourceEqual(this.stageValue, this.value); 27183 } 27184} 27185SwiperOnAnimationStartModifier.identity = Symbol('swiperOnAnimationStart'); 27186class SwiperOnAnimationEndModifier extends ModifierWithKey { 27187 constructor(value) { 27188 super(value); 27189 } 27190 applyPeer(node, reset) { 27191 if (reset) { 27192 getUINativeModule().swiper.resetSwiperOnAnimationEnd(node); 27193 } else { 27194 getUINativeModule().swiper.setSwiperOnAnimationEnd(node, this.value); 27195 } 27196 } 27197 checkObjectDiff() { 27198 return !isBaseOrResourceEqual(this.stageValue, this.value); 27199 } 27200} 27201SwiperOnAnimationEndModifier.identity = Symbol('swiperOnAnimationEnd'); 27202class SwiperOnGestureSwipeModifier extends ModifierWithKey { 27203 constructor(value) { 27204 super(value); 27205 } 27206 applyPeer(node, reset) { 27207 if (reset) { 27208 getUINativeModule().swiper.resetSwiperOnGestureSwipe(node); 27209 } else { 27210 getUINativeModule().swiper.setSwiperOnGestureSwipe(node, this.value); 27211 } 27212 } 27213 checkObjectDiff() { 27214 return !isBaseOrResourceEqual(this.stageValue, this.value); 27215 } 27216} 27217SwiperOnGestureSwipeModifier.identity = Symbol('swiperOnGestureSwipe'); 27218class SwiperIndicatorInteractiveModifier extends ModifierWithKey { 27219 constructor(value) { 27220 super(value); 27221 } 27222 applyPeer(node, reset) { 27223 if (reset) { 27224 getUINativeModule().swiper.resetIndicatorInteractive(node); 27225 } else { 27226 getUINativeModule().swiper.setIndicatorInteractive(node, this.value); 27227 } 27228 } 27229} 27230SwiperIndicatorInteractiveModifier.identity = Symbol('indicatorInteractive'); 27231class SwiperCustomContentTransitionModifier extends ModifierWithKey { 27232 constructor(value) { 27233 super(value); 27234 } 27235 applyPeer(node, reset) { 27236 if (reset) { 27237 getUINativeModule().swiper.resetSwiperCustomContentTransition(node); 27238 } else { 27239 getUINativeModule().swiper.setSwiperCustomContentTransition(node, this.value); 27240 } 27241 } 27242 checkObjectDiff() { 27243 return !isBaseOrResourceEqual(this.stageValue, this.value); 27244 } 27245} 27246SwiperCustomContentTransitionModifier.identity = Symbol('swiperCustomContentTransition'); 27247class SwiperOnContentDidScrollModifier extends ModifierWithKey { 27248 constructor(value) { 27249 super(value); 27250 } 27251 applyPeer(node, reset) { 27252 if (reset) { 27253 getUINativeModule().swiper.resetSwiperOnContentDidScroll(node); 27254 } else { 27255 getUINativeModule().swiper.setSwiperOnContentDidScroll(node, this.value); 27256 } 27257 } 27258 checkObjectDiff() { 27259 return !isBaseOrResourceEqual(this.stageValue, this.value); 27260 } 27261} 27262SwiperOnContentDidScrollModifier.identity = Symbol('swiperOnContentDidScroll'); 27263// @ts-ignore 27264if (globalThis.Swiper !== undefined) { 27265 globalThis.Swiper.attributeModifier = function (modifier) { 27266 attributeModifierFunc.call(this, modifier, (nativePtr) => { 27267 return new ArkSwiperComponent(nativePtr); 27268 }, (nativePtr, classType, modifierJS) => { 27269 return new modifierJS.SwiperModifier(nativePtr, classType); 27270 }); 27271 }; 27272} 27273 27274/// <reference path='./import.ts' /> 27275class ArkTabsComponent extends ArkComponent { 27276 constructor(nativePtr, classType) { 27277 super(nativePtr, classType); 27278 } 27279 onAnimationStart(handler) { 27280 throw new Error('Method not implemented.'); 27281 } 27282 onAnimationEnd(handler) { 27283 throw new Error('Method not implemented.'); 27284 } 27285 onGestureSwipe(handler) { 27286 throw new Error('Method not implemented.'); 27287 } 27288 vertical(value) { 27289 modifierWithKey(this._modifiersWithKeys, TabsVerticalModifier.identity, TabsVerticalModifier, value); 27290 return this; 27291 } 27292 barPosition(value) { 27293 modifierWithKey(this._modifiersWithKeys, BarPositionModifier.identity, BarPositionModifier, value); 27294 return this; 27295 } 27296 scrollable(value) { 27297 modifierWithKey(this._modifiersWithKeys, ScrollableModifier.identity, ScrollableModifier, value); 27298 return this; 27299 } 27300 barMode(value, options) { 27301 let arkBarMode = new ArkBarMode(); 27302 arkBarMode.barMode = value; 27303 arkBarMode.options = options; 27304 modifierWithKey(this._modifiersWithKeys, TabBarModeModifier.identity, TabBarModeModifier, arkBarMode); 27305 return this; 27306 } 27307 barWidth(value) { 27308 modifierWithKey(this._modifiersWithKeys, BarWidthModifier.identity, BarWidthModifier, value); 27309 return this; 27310 } 27311 barHeight(value) { 27312 if (isUndefined(value) || isNull(value)) { 27313 modifierWithKey(this._modifiersWithKeys, BarHeightModifier.identity, BarHeightModifier, undefined); 27314 } 27315 else { 27316 modifierWithKey(this._modifiersWithKeys, BarHeightModifier.identity, BarHeightModifier, value); 27317 } 27318 return this; 27319 } 27320 animationDuration(value) { 27321 modifierWithKey(this._modifiersWithKeys, AnimationDurationModifier.identity, AnimationDurationModifier, value); 27322 return this; 27323 } 27324 animationMode(value) { 27325 modifierWithKey(this._modifiersWithKeys, AnimationModeModifier.identity, AnimationModeModifier, value); 27326 return this; 27327 } 27328 onChange(event) { 27329 throw new Error('Method not implemented.'); 27330 } 27331 onTabBarClick(event) { 27332 throw new Error('Method not implemented.'); 27333 } 27334 fadingEdge(value) { 27335 modifierWithKey(this._modifiersWithKeys, FadingEdgeModifier.identity, FadingEdgeModifier, value); 27336 return this; 27337 } 27338 divider(value) { 27339 modifierWithKey(this._modifiersWithKeys, TabsDividerModifier.identity, TabsDividerModifier, value); 27340 return this; 27341 } 27342 barOverlap(value) { 27343 modifierWithKey(this._modifiersWithKeys, BarOverlapModifier.identity, BarOverlapModifier, value); 27344 return this; 27345 } 27346 barBackgroundColor(value) { 27347 modifierWithKey(this._modifiersWithKeys, BarBackgroundColorModifier.identity, BarBackgroundColorModifier, value); 27348 return this; 27349 } 27350 barBackgroundBlurStyle(value) { 27351 modifierWithKey(this._modifiersWithKeys, BarBackgroundBlurStyleModifier.identity, BarBackgroundBlurStyleModifier, value); 27352 return this; 27353 } 27354 barGridAlign(value) { 27355 modifierWithKey(this._modifiersWithKeys, BarGridAlignModifier.identity, BarGridAlignModifier, value); 27356 return this; 27357 } 27358 clip(value) { 27359 modifierWithKey(this._modifiersWithKeys, TabClipModifier.identity, TabClipModifier, value); 27360 return this; 27361 } 27362 width(value) { 27363 modifierWithKey(this._modifiersWithKeys, TabWidthModifier.identity, TabWidthModifier, value); 27364 return this; 27365 } 27366 height(value) { 27367 modifierWithKey(this._modifiersWithKeys, TabHeightModifier.identity, TabHeightModifier, value); 27368 return this; 27369 } 27370} 27371class BarGridAlignModifier extends ModifierWithKey { 27372 constructor(value) { 27373 super(value); 27374 } 27375 applyPeer(node, reset) { 27376 if (reset) { 27377 getUINativeModule().tabs.resetBarGridAlign(node); 27378 } 27379 else { 27380 getUINativeModule().tabs.setBarGridAlign(node, this.value.sm, this.value.md, this.value.lg, this.value.gutter, this.value.margin); 27381 } 27382 } 27383 checkObjectDiff() { 27384 return !(this.stageValue.sm === this.value.sm && 27385 this.stageValue.md === this.value.md && 27386 this.stageValue.lg === this.value.lg && 27387 this.stageValue.gutter === this.value.gutter && 27388 this.stageValue.margin === this.value.margin); 27389 } 27390} 27391BarGridAlignModifier.identity = Symbol('barGridAlign'); 27392class TabsDividerModifier extends ModifierWithKey { 27393 constructor(value) { 27394 super(value); 27395 } 27396 applyPeer(node, reset) { 27397 if (reset) { 27398 getUINativeModule().tabs.resetDivider(node); 27399 } 27400 else { 27401 getUINativeModule().tabs.setDivider(node, this.value.strokeWidth, this.value.color, this.value.startMargin, this.value.endMargin); 27402 } 27403 } 27404 checkObjectDiff() { 27405 return !(this.stageValue.strokeWidth === this.value.strokeWidth && 27406 this.stageValue.color === this.value.color && 27407 this.stageValue.startMargin === this.value.startMargin && 27408 this.stageValue.endMargin === this.value.endMargin); 27409 } 27410} 27411TabsDividerModifier.identity = Symbol('tabsDivider'); 27412class BarWidthModifier extends ModifierWithKey { 27413 constructor(value) { 27414 super(value); 27415 } 27416 applyPeer(node, reset) { 27417 if (reset) { 27418 getUINativeModule().tabs.resetTabBarWidth(node); 27419 } 27420 else { 27421 getUINativeModule().tabs.setTabBarWidth(node, this.value); 27422 } 27423 } 27424 checkObjectDiff() { 27425 return !isBaseOrResourceEqual(this.stageValue, this.value); 27426 } 27427} 27428BarWidthModifier.identity = Symbol('barWidth'); 27429class BarAdaptiveHeightModifier extends ModifierWithKey { 27430 constructor(value) { 27431 super(value); 27432 } 27433 applyPeer(node, reset) { 27434 if (reset) { 27435 getUINativeModule().tabs.resetBarAdaptiveHeight(node); 27436 } 27437 else { 27438 getUINativeModule().tabs.setBarAdaptiveHeight(node, this.value); 27439 } 27440 } 27441} 27442BarAdaptiveHeightModifier.identity = Symbol('barAdaptiveHeight'); 27443class BarHeightModifier extends ModifierWithKey { 27444 constructor(value) { 27445 super(value); 27446 } 27447 applyPeer(node, reset) { 27448 if (reset) { 27449 getUINativeModule().tabs.resetTabBarHeight(node); 27450 } 27451 else { 27452 getUINativeModule().tabs.setTabBarHeight(node, this.value); 27453 } 27454 } 27455 checkObjectDiff() { 27456 return !isBaseOrResourceEqual(this.stageValue, this.value); 27457 } 27458} 27459BarHeightModifier.identity = Symbol('barHeight'); 27460class BarOverlapModifier extends ModifierWithKey { 27461 constructor(value) { 27462 super(value); 27463 } 27464 applyPeer(node, reset) { 27465 if (reset) { 27466 getUINativeModule().tabs.resetBarOverlap(node); 27467 } 27468 else { 27469 getUINativeModule().tabs.setBarOverlap(node, this.value); 27470 } 27471 } 27472} 27473BarOverlapModifier.identity = Symbol('barOverlap'); 27474class TabsVerticalModifier extends ModifierWithKey { 27475 constructor(value) { 27476 super(value); 27477 } 27478 applyPeer(node, reset) { 27479 if (reset) { 27480 getUINativeModule().tabs.resetIsVertical(node); 27481 } 27482 else { 27483 getUINativeModule().tabs.setIsVertical(node, this.value); 27484 } 27485 } 27486} 27487TabsVerticalModifier.identity = Symbol('vertical'); 27488class AnimationDurationModifier extends ModifierWithKey { 27489 constructor(value) { 27490 super(value); 27491 } 27492 applyPeer(node, reset) { 27493 if (reset) { 27494 getUINativeModule().tabs.resetAnimationDuration(node); 27495 } 27496 else { 27497 getUINativeModule().tabs.setAnimationDuration(node, this.value); 27498 } 27499 } 27500} 27501AnimationDurationModifier.identity = Symbol('animationduration'); 27502class AnimationModeModifier extends ModifierWithKey { 27503 constructor(value) { 27504 super(value); 27505 } 27506 applyPeer(node, reset) { 27507 if (reset) { 27508 getUINativeModule().tabs.resetAnimateMode(node); 27509 } 27510 else { 27511 getUINativeModule().tabs.setAnimateMode(node, this.value); 27512 } 27513 } 27514 checkObjectDiff() { 27515 return !isBaseOrResourceEqual(this.stageValue, this.value); 27516 } 27517} 27518AnimationModeModifier.identity = Symbol('animationMode'); 27519class ScrollableModifier extends ModifierWithKey { 27520 constructor(value) { 27521 super(value); 27522 } 27523 applyPeer(node, reset) { 27524 if (reset) { 27525 getUINativeModule().tabs.resetScrollable(node); 27526 } 27527 else { 27528 getUINativeModule().tabs.setScrollable(node, this.value); 27529 } 27530 } 27531} 27532ScrollableModifier.identity = Symbol('scrollable'); 27533class TabBarModeModifier extends ModifierWithKey { 27534 constructor(value) { 27535 super(value); 27536 } 27537 applyPeer(node, reset) { 27538 let _a, _b; 27539 if (reset) { 27540 getUINativeModule().tabs.resetTabBarMode(node); 27541 } 27542 else { 27543 getUINativeModule().tabs.setTabBarMode(node, this.value.barMode, 27544 (_a = this.value.options) === null || _a === void 0 ? void 0 : _a.margin, 27545 (_b = this.value.options) === null || _b === void 0 ? void 0 : _b.nonScrollableLayoutStyle); 27546 } 27547 } 27548 checkObjectDiff() { 27549 let _a, _b, _c, _d; 27550 if (isResource(this.stageValue) && isResource(this.value)) { 27551 return !isResourceEqual(this.stageValue, this.value); 27552 } 27553 else if (!isResource(this.stageValue) && !isResource(this.value)) { 27554 return !(this.value.barMode === this.stageValue.barMode && 27555 ((_a = this.value.options) === null || _a === void 0 ? void 0 : _a.margin) === ((_b = this.stageValue.options) === null || 27556 _b === void 0 ? void 0 : _b.margin) && 27557 ((_c = this.value.options) === null || _c === void 0 ? void 0 : _c.nonScrollableLayoutStyle) === ((_d = this.stageValue.options) === null || 27558 _d === void 0 ? void 0 : _d.nonScrollableLayoutStyle)); 27559 } 27560 else { 27561 return true; 27562 } 27563 } 27564} 27565TabBarModeModifier.identity = Symbol('tabsbarMode'); 27566class BarPositionModifier extends ModifierWithKey { 27567 constructor(value) { 27568 super(value); 27569 } 27570 applyPeer(node, reset) { 27571 if (reset) { 27572 getUINativeModule().tabs.resetTabBarPosition(node); 27573 } 27574 else { 27575 getUINativeModule().tabs.setTabBarPosition(node, this.value); 27576 } 27577 } 27578} 27579BarPositionModifier.identity = Symbol('barPosition'); 27580class TabsHideTitleBarModifier extends ModifierWithKey { 27581 constructor(value) { 27582 super(value); 27583 } 27584 applyPeer(node, reset) { 27585 if (reset) { 27586 getUINativeModule().tabs.resetHideTitleBar(node); 27587 } 27588 else { 27589 getUINativeModule().tabs.setHideTitleBar(node, this.value); 27590 } 27591 } 27592} 27593TabsHideTitleBarModifier.identity = Symbol('hideTitleBar'); 27594class BarBackgroundColorModifier extends ModifierWithKey { 27595 constructor(value) { 27596 super(value); 27597 } 27598 applyPeer(node, reset) { 27599 if (reset) { 27600 getUINativeModule().tabs.resetBarBackgroundColor(node); 27601 } 27602 else { 27603 getUINativeModule().tabs.setBarBackgroundColor(node, this.value); 27604 } 27605 } 27606 checkObjectDiff() { 27607 return !isBaseOrResourceEqual(this.stageValue, this.value); 27608 } 27609} 27610BarBackgroundColorModifier.identity = Symbol('barbackgroundcolor'); 27611class BarBackgroundBlurStyleModifier extends ModifierWithKey { 27612 constructor(value) { 27613 super(value); 27614 } 27615 applyPeer(node, reset) { 27616 if (reset) { 27617 getUINativeModule().tabs.resetBarBackgroundBlurStyle(node); 27618 } 27619 else { 27620 getUINativeModule().tabs.setBarBackgroundBlurStyle(node, this.value); 27621 } 27622 } 27623 checkObjectDiff() { 27624 return !isBaseOrResourceEqual(this.stageValue, this.value); 27625 } 27626} 27627BarBackgroundBlurStyleModifier.identity = Symbol('barbackgroundblurstyle'); 27628class FadingEdgeModifier extends ModifierWithKey { 27629 constructor(value) { 27630 super(value); 27631 } 27632 applyPeer(node, reset) { 27633 if (reset) { 27634 getUINativeModule().tabs.resetFadingEdge(node); 27635 } 27636 else { 27637 getUINativeModule().tabs.setFadingEdge(node, this.value); 27638 } 27639 } 27640} 27641FadingEdgeModifier.identity = Symbol('fadingedge'); 27642class TabClipModifier extends ModifierWithKey { 27643 constructor(value) { 27644 super(value); 27645 } 27646 applyPeer(node, reset) { 27647 if (reset) { 27648 getUINativeModule().tabs.resetTabClip(node); 27649 } 27650 else { 27651 getUINativeModule().tabs.setTabClip(node, this.value); 27652 } 27653 } 27654 checkObjectDiff() { 27655 return true; 27656 } 27657} 27658TabClipModifier.identity = Symbol('tabclip'); 27659class TabEdgeEffectModifier extends ModifierWithKey { 27660 applyPeer(node, reset) { 27661 if (reset) { 27662 getUINativeModule().tabs.resetTabEdgeEffect(node); 27663 } else { 27664 getUINativeModule().tabs.setTabEdgeEffect(node, this.value); 27665 } 27666 } 27667 checkObjectDiff() { 27668 return !isBaseOrResourceEqual(this.stageValue, this.value); 27669 } 27670} 27671TabClipModifier.identity = Symbol('tabedgeEffect'); 27672class TabWidthModifier extends ModifierWithKey { 27673 constructor(value) { 27674 super(value); 27675 } 27676 applyPeer(node, reset) { 27677 if (reset) { 27678 getUINativeModule().tabs.resetTabWidth(node); 27679 } 27680 else { 27681 getUINativeModule().tabs.setTabWidth(node, this.value); 27682 } 27683 } 27684} 27685TabWidthModifier.identity = Symbol('tabWidth'); 27686class TabHeightModifier extends ModifierWithKey { 27687 constructor(value) { 27688 super(value); 27689 } 27690 applyPeer(node, reset) { 27691 if (reset) { 27692 getUINativeModule().tabs.resetTabHeight(node); 27693 } 27694 else { 27695 getUINativeModule().tabs.setTabHeight(node, this.value); 27696 } 27697 } 27698} 27699TabHeightModifier.identity = Symbol('tabHeight'); 27700// @ts-ignore 27701if (globalThis.Tabs !== undefined) { 27702 globalThis.Tabs.attributeModifier = function (modifier) { 27703 attributeModifierFunc.call(this, modifier, (nativePtr) => { 27704 return new ArkTabsComponent(nativePtr); 27705 }, (nativePtr, classType, modifierJS) => { 27706 return new modifierJS.TabsModifier(nativePtr, classType); 27707 }); 27708 }; 27709} 27710 27711/// <reference path='./import.ts' /> 27712class ArkTabContentComponent extends ArkComponent { 27713 constructor(nativePtr, classType) { 27714 super(nativePtr, classType); 27715 } 27716 tabBar(value) { 27717 modifierWithKey(this._modifiersWithKeys, TabContentTabBarModifier.identity, TabContentTabBarModifier, value); 27718 return this; 27719 } 27720 size(value) { 27721 modifierWithKey(this._modifiersWithKeys, TabContentSizeModifier.identity, TabContentSizeModifier, value); 27722 return this; 27723 } 27724 width(value) { 27725 modifierWithKey(this._modifiersWithKeys, TabContentWidthModifier.identity, TabContentWidthModifier, value); 27726 return this; 27727 } 27728 height(value) { 27729 modifierWithKey(this._modifiersWithKeys, TabContentHeightModifier.identity, TabContentHeightModifier, value); 27730 return this; 27731 } 27732} 27733class TabContentTabBarModifier extends ModifierWithKey { 27734 constructor(value) { 27735 super(value); 27736 } 27737 applyPeer(node, reset) { 27738 if (reset) { 27739 getUINativeModule().tabContent.resetTabBar(node); 27740 } else { 27741 getUINativeModule().tabContent.setTabBar(this.value); 27742 } 27743 } 27744 checkObjectDiff() { 27745 return !isBaseOrResourceEqual(this.stageValue, this.value); 27746 } 27747} 27748TabContentTabBarModifier.identity = Symbol('tabContentTabBar'); 27749class TabContentWidthModifier extends ModifierWithKey { 27750 constructor(value) { 27751 super(value); 27752 } 27753 applyPeer(node, reset) { 27754 if (reset) { 27755 getUINativeModule().tabContent.resetTabContentWidth(node); 27756 } 27757 else { 27758 getUINativeModule().tabContent.setTabContentWidth(node, this.value); 27759 } 27760 } 27761 checkObjectDiff() { 27762 return !isBaseOrResourceEqual(this.stageValue, this.value); 27763 } 27764} 27765TabContentWidthModifier.identity = Symbol('tabcontentwidth'); 27766class TabContentHeightModifier extends ModifierWithKey { 27767 constructor(value) { 27768 super(value); 27769 } 27770 applyPeer(node, reset) { 27771 if (reset) { 27772 getUINativeModule().tabContent.resetTabContentHeight(node); 27773 } 27774 else { 27775 getUINativeModule().tabContent.setTabContentHeight(node, this.value); 27776 } 27777 } 27778 checkObjectDiff() { 27779 return !isBaseOrResourceEqual(this.stageValue, this.value); 27780 } 27781} 27782TabContentHeightModifier.identity = Symbol('tabcontentheight'); 27783class TabContentSizeModifier extends ModifierWithKey { 27784 constructor(value) { 27785 super(value); 27786 } 27787 applyPeer(node, reset) { 27788 if (reset) { 27789 getUINativeModule().tabContent.resetTabContentSize(node); 27790 } 27791 else { 27792 getUINativeModule().tabContent.setTabContentSize(node, this.value.width, this.value.height); 27793 } 27794 } 27795 checkObjectDiff() { 27796 return !isBaseOrResourceEqual(this.stageValue.width, this.value.width) || 27797 !isBaseOrResourceEqual(this.stageValue.height, this.value.height); 27798 } 27799} 27800TabContentSizeModifier.identity = Symbol('tabcontentsize'); 27801// @ts-ignore 27802if (globalThis.TabContent !== undefined) { 27803 globalThis.TabContent.attributeModifier = function (modifier) { 27804 attributeModifierFunc.call(this, modifier, (nativePtr) => { 27805 return new ArkTabContentComponent(nativePtr); 27806 }, (nativePtr, classType, modifierJS) => { 27807 return new modifierJS.TabContentModifier(nativePtr, classType); 27808 }); 27809 }; 27810} 27811 27812/// <reference path='./import.ts' /> 27813class ArkUIExtensionComponentComponent extends ArkComponent { 27814 constructor(nativePtr, classType) { 27815 super(nativePtr, classType); 27816 } 27817 onRemoteReady(callback) { 27818 throw new Error('Method not implemented.'); 27819 } 27820 onReceive(callback) { 27821 throw new Error('Method not implemented.'); 27822 } 27823 onResult(callback) { 27824 throw new Error('Method not implemented.'); 27825 } 27826 onRelease(callback) { 27827 throw new Error('Method not implemented.'); 27828 } 27829 onError(callback) { 27830 throw new Error('Method not implemented.'); 27831 } 27832} 27833// @ts-ignore 27834if (globalThis.UIExtensionComponent !== undefined) { 27835 globalThis.UIExtensionComponent.attributeModifier = function (modifier) { 27836 attributeModifierFunc.call(this, modifier, (nativePtr) => { 27837 return new ArkUIExtensionComponentComponent(nativePtr); 27838 }, (nativePtr, classType, modifierJS) => { 27839 return new modifierJS.CommonModifier(nativePtr, classType); 27840 }); 27841 }; 27842} 27843 27844/// <reference path='./import.ts' /> 27845class ItemConstraintSizeModifier extends ModifierWithKey { 27846 constructor(value) { 27847 super(value); 27848 } 27849 applyPeer(node, reset) { 27850 if (reset) { 27851 getUINativeModule().waterFlow.resetItemConstraintSize(node); 27852 } 27853 else { 27854 getUINativeModule().waterFlow.setItemConstraintSize(node, this.value.minWidth, this.value.maxWidth, this.value.minHeight, this.value.maxHeight); 27855 } 27856 } 27857 checkObjectDiff() { 27858 return !isBaseOrResourceEqual(this.stageValue.minWidth, this.value.minWidth) || 27859 !isBaseOrResourceEqual(this.stageValue.maxWidth, this.value.maxWidth) || 27860 !isBaseOrResourceEqual(this.stageValue.minHeight, this.value.minHeight) || 27861 !isBaseOrResourceEqual(this.stageValue.maxHeight, this.value.maxHeight); 27862 } 27863} 27864ItemConstraintSizeModifier.identity = Symbol('itemConstraintSize'); 27865class ColumnsTemplateModifier extends ModifierWithKey { 27866 constructor(value) { 27867 super(value); 27868 } 27869 applyPeer(node, reset) { 27870 if (reset) { 27871 getUINativeModule().waterFlow.resetColumnsTemplate(node); 27872 } 27873 else { 27874 getUINativeModule().waterFlow.setColumnsTemplate(node, this.value); 27875 } 27876 } 27877} 27878ColumnsTemplateModifier.identity = Symbol('columnsTemplate'); 27879class RowsTemplateModifier extends ModifierWithKey { 27880 constructor(value) { 27881 super(value); 27882 } 27883 applyPeer(node, reset) { 27884 if (reset) { 27885 getUINativeModule().waterFlow.resetRowsTemplate(node); 27886 } 27887 else { 27888 getUINativeModule().waterFlow.setRowsTemplate(node, this.value); 27889 } 27890 } 27891} 27892RowsTemplateModifier.identity = Symbol('rowsTemplate'); 27893class EnableScrollInteractionModifier extends ModifierWithKey { 27894 constructor(value) { 27895 super(value); 27896 } 27897 applyPeer(node, reset) { 27898 if (reset) { 27899 getUINativeModule().waterFlow.resetEnableScrollInteraction(node); 27900 } 27901 else { 27902 getUINativeModule().waterFlow.setEnableScrollInteraction(node, this.value); 27903 } 27904 } 27905} 27906EnableScrollInteractionModifier.identity = Symbol('enableScrollInteraction'); 27907class RowsGapModifier extends ModifierWithKey { 27908 constructor(value) { 27909 super(value); 27910 } 27911 applyPeer(node, reset) { 27912 if (reset) { 27913 getUINativeModule().waterFlow.resetRowsGap(node); 27914 } 27915 else { 27916 getUINativeModule().waterFlow.setRowsGap(node, this.value); 27917 } 27918 } 27919 checkObjectDiff() { 27920 return !isBaseOrResourceEqual(this.stageValue, this.value); 27921 } 27922} 27923RowsGapModifier.identity = Symbol('rowsGap'); 27924class WaterFlowClipModifier extends ModifierWithKey { 27925 constructor(value) { 27926 super(value); 27927 } 27928 applyPeer(node, reset) { 27929 if (reset) { 27930 getUINativeModule().common.resetClipWithEdge(node); 27931 } 27932 else { 27933 getUINativeModule().common.setClipWithEdge(node, this.value); 27934 } 27935 } 27936 checkObjectDiff() { 27937 return true; 27938 } 27939} 27940WaterFlowClipModifier.identity = Symbol('waterFlowclip'); 27941class ColumnsGapModifier extends ModifierWithKey { 27942 constructor(value) { 27943 super(value); 27944 } 27945 applyPeer(node, reset) { 27946 if (reset) { 27947 getUINativeModule().waterFlow.resetColumnsGap(node); 27948 } 27949 else { 27950 getUINativeModule().waterFlow.setColumnsGap(node, this.value); 27951 } 27952 } 27953 checkObjectDiff() { 27954 return !isBaseOrResourceEqual(this.stageValue, this.value); 27955 } 27956} 27957ColumnsGapModifier.identity = Symbol('columnsGap'); 27958class LayoutDirectionModifier extends ModifierWithKey { 27959 constructor(value) { 27960 super(value); 27961 } 27962 applyPeer(node, reset) { 27963 if (reset) { 27964 getUINativeModule().waterFlow.resetLayoutDirection(node); 27965 } 27966 else { 27967 getUINativeModule().waterFlow.setLayoutDirection(node, this.value); 27968 } 27969 } 27970} 27971LayoutDirectionModifier.identity = Symbol('layoutDirection'); 27972class NestedScrollModifier extends ModifierWithKey { 27973 constructor(value) { 27974 super(value); 27975 } 27976 applyPeer(node, reset) { 27977 if (reset) { 27978 getUINativeModule().waterFlow.resetNestedScroll(node); 27979 } 27980 else { 27981 getUINativeModule().waterFlow.setNestedScroll(node, this.value.scrollForward, this.value.scrollBackward); 27982 } 27983 } 27984} 27985NestedScrollModifier.identity = Symbol('nestedScroll'); 27986class FrictionModifier extends ModifierWithKey { 27987 constructor(value) { 27988 super(value); 27989 } 27990 applyPeer(node, reset) { 27991 if (reset) { 27992 getUINativeModule().waterFlow.resetFriction(node); 27993 } 27994 else { 27995 getUINativeModule().waterFlow.setFriction(node, this.value); 27996 } 27997 } 27998 checkObjectDiff() { 27999 return !isBaseOrResourceEqual(this.stageValue, this.value); 28000 } 28001} 28002FrictionModifier.identity = Symbol('friction'); 28003 28004class WaterFlowEdgeEffectModifier extends ModifierWithKey { 28005 constructor(value) { 28006 super(value); 28007 } 28008 applyPeer(node, reset) { 28009 let _a, _b; 28010 if (reset) { 28011 getUINativeModule().waterFlow.resetEdgeEffect(node); 28012 } 28013 else { 28014 getUINativeModule().waterFlow.setEdgeEffect(node, (_a = this.value) === null || 28015 _a === void 0 ? void 0 : _a.value, (_b = this.value.options) === null || 28016 _b === void 0 ? void 0 : _b.alwaysEnabled); 28017 } 28018 } 28019 checkObjectDiff() { 28020 return !((this.stageValue.value === this.value.value) && 28021 (this.stageValue.options === this.value.options)); 28022 } 28023} 28024WaterFlowEdgeEffectModifier.identity = Symbol('waterFlowEdgeEffect'); 28025 28026class WaterFlowScrollBarWidthModifier extends ModifierWithKey { 28027 constructor(value) { 28028 super(value); 28029 } 28030 applyPeer(node, reset) { 28031 if (reset) { 28032 getUINativeModule().waterFlow.resetScrollBarWidth(node); 28033 } 28034 else { 28035 getUINativeModule().waterFlow.setScrollBarWidth(node, this.value); 28036 } 28037 } 28038} 28039WaterFlowScrollBarWidthModifier.identity = Symbol('waterFlowScrollBarWidth'); 28040class WaterFlowScrollBarModifier extends ModifierWithKey { 28041 constructor(value) { 28042 super(value); 28043 } 28044 applyPeer(node, reset) { 28045 if (reset) { 28046 getUINativeModule().waterFlow.resetScrollBar(node); 28047 } 28048 else { 28049 getUINativeModule().waterFlow.setScrollBar(node, this.value); 28050 } 28051 } 28052} 28053WaterFlowScrollBarModifier.identity = Symbol('waterFlowScrollBar'); 28054class WaterFlowScrollBarColorModifier extends ModifierWithKey { 28055 constructor(value) { 28056 super(value); 28057 } 28058 applyPeer(node, reset) { 28059 if (reset) { 28060 getUINativeModule().waterFlow.resetScrollBarColor(node); 28061 } 28062 else { 28063 getUINativeModule().waterFlow.setScrollBarColor(node, this.value); 28064 } 28065 } 28066} 28067WaterFlowScrollBarColorModifier.identity = Symbol('waterFlowScrollBarColor'); 28068 28069class WaterFlowCachedCountModifier extends ModifierWithKey { 28070 constructor(value) { 28071 super(value); 28072 } 28073 applyPeer(node, reset) { 28074 if (reset) { 28075 getUINativeModule().waterFlow.resetCachedCount(node); 28076 } 28077 else { 28078 getUINativeModule().waterFlow.setCachedCount(node, this.value); 28079 } 28080 } 28081} 28082WaterFlowCachedCountModifier.identity = Symbol('waterFlowCachedCount'); 28083 28084class WaterFlowFlingSpeedLimitModifier extends ModifierWithKey { 28085 constructor(value) { 28086 super(value); 28087 } 28088 applyPeer(node, reset) { 28089 if (reset) { 28090 getUINativeModule().waterFlow.resetFlingSpeedLimit(node); 28091 } 28092 else { 28093 getUINativeModule().waterFlow.setFlingSpeedLimit(node, this.value); 28094 } 28095 } 28096} 28097WaterFlowFlingSpeedLimitModifier.identity = Symbol('waterFlowFlingSpeedLimit'); 28098 28099class WaterFlowInitializeModifier extends ModifierWithKey { 28100 constructor(value) { 28101 super(value); 28102 } 28103 applyPeer(node, reset) { 28104 if (reset) { 28105 getUINativeModule().waterFlow.resetWaterFlowInitialize(node); 28106 } else { 28107 getUINativeModule().waterFlow.setWaterFlowInitialize(node, 28108 this.value?.scroller, this.value?.sections, this.value?.layoutMode); 28109 } 28110 } 28111} 28112WaterFlowInitializeModifier.identity = Symbol('waterFlowInitialize'); 28113 28114class ArkWaterFlowComponent extends ArkComponent { 28115 constructor(nativePtr, classType) { 28116 super(nativePtr, classType); 28117 } 28118 columnsTemplate(value) { 28119 modifierWithKey(this._modifiersWithKeys, ColumnsTemplateModifier.identity, ColumnsTemplateModifier, value); 28120 return this; 28121 } 28122 rowsTemplate(value) { 28123 modifierWithKey(this._modifiersWithKeys, RowsTemplateModifier.identity, RowsTemplateModifier, value); 28124 return this; 28125 } 28126 itemConstraintSize(value) { 28127 if (!value) { 28128 modifierWithKey(this._modifiersWithKeys, ItemConstraintSizeModifier.identity, ItemConstraintSizeModifier, undefined); 28129 return this; 28130 } 28131 let arkValue = new ArkConstraintSizeOptions(); 28132 arkValue.minWidth = value.minWidth; 28133 arkValue.maxWidth = value.maxWidth; 28134 arkValue.minHeight = value.minHeight; 28135 arkValue.maxHeight = value.maxHeight; 28136 modifierWithKey(this._modifiersWithKeys, ItemConstraintSizeModifier.identity, ItemConstraintSizeModifier, arkValue); 28137 return this; 28138 } 28139 columnsGap(value) { 28140 modifierWithKey(this._modifiersWithKeys, ColumnsGapModifier.identity, ColumnsGapModifier, value); 28141 return this; 28142 } 28143 rowsGap(value) { 28144 modifierWithKey(this._modifiersWithKeys, RowsGapModifier.identity, RowsGapModifier, value); 28145 return this; 28146 } 28147 layoutDirection(value) { 28148 modifierWithKey(this._modifiersWithKeys, LayoutDirectionModifier.identity, LayoutDirectionModifier, value); 28149 return this; 28150 } 28151 nestedScroll(value) { 28152 let options = new ArkNestedScrollOptions(); 28153 if (value) { 28154 if (value.scrollForward) { 28155 options.scrollForward = value.scrollForward; 28156 } 28157 if (value.scrollBackward) { 28158 options.scrollBackward = value.scrollBackward; 28159 } 28160 modifierWithKey(this._modifiersWithKeys, NestedScrollModifier.identity, NestedScrollModifier, options); 28161 } 28162 return this; 28163 } 28164 enableScrollInteraction(value) { 28165 modifierWithKey(this._modifiersWithKeys, EnableScrollInteractionModifier.identity, EnableScrollInteractionModifier, value); 28166 return this; 28167 } 28168 friction(value) { 28169 modifierWithKey(this._modifiersWithKeys, FrictionModifier.identity, FrictionModifier, value); 28170 return this; 28171 } 28172 cachedCount(value) { 28173 modifierWithKey(this._modifiersWithKeys, WaterFlowCachedCountModifier.identity, WaterFlowCachedCountModifier, value); 28174 return this; 28175 } 28176 onReachStart(event) { 28177 throw new Error('Method not implemented.'); 28178 } 28179 onReachEnd(event) { 28180 throw new Error('Method not implemented.'); 28181 } 28182 onScrollFrameBegin(event) { 28183 throw new Error('Method not implemented.'); 28184 } 28185 clip(value) { 28186 modifierWithKey(this._modifiersWithKeys, WaterFlowClipModifier.identity, WaterFlowClipModifier, value); 28187 return this; 28188 } 28189 edgeEffect(value, options) { 28190 let effect = new ArkWaterFlowEdgeEffect(); 28191 effect.value = value; 28192 effect.options = options; 28193 modifierWithKey(this._modifiersWithKeys, WaterFlowEdgeEffectModifier.identity, WaterFlowEdgeEffectModifier, effect); 28194 return this; 28195 } 28196 scrollBarWidth(value) { 28197 modifierWithKey(this._modifiersWithKeys, WaterFlowScrollBarWidthModifier.identity, WaterFlowScrollBarWidthModifier, value); 28198 return this; 28199 } 28200 scrollBarColor(value) { 28201 modifierWithKey(this._modifiersWithKeys, WaterFlowScrollBarColorModifier.identity, WaterFlowScrollBarColorModifier, value); 28202 return this; 28203 } 28204 scrollBar(value) { 28205 modifierWithKey(this._modifiersWithKeys, WaterFlowScrollBarModifier.identity, WaterFlowScrollBarModifier, value); 28206 return this; 28207 } 28208 flingSpeedLimit(value) { 28209 modifierWithKey(this._modifiersWithKeys, WaterFlowFlingSpeedLimitModifier.identity, WaterFlowFlingSpeedLimitModifier, value); 28210 return this; 28211 } 28212 initialize(value) { 28213 if (value[0] !== undefined) { 28214 modifierWithKey(this._modifiersWithKeys, WaterFlowInitializeModifier.identity, 28215 WaterFlowInitializeModifier, value[0]); 28216 } else { 28217 modifierWithKey(this._modifiersWithKeys, WaterFlowInitializeModifier.identity, 28218 WaterFlowInitializeModifier, undefined); 28219 } 28220 return this; 28221 } 28222 allowChildTypes() { 28223 return ["FlowItem"]; 28224 } 28225} 28226 28227// @ts-ignore 28228if (globalThis.WaterFlow !== undefined) { 28229 globalThis.WaterFlow.attributeModifier = function (modifier) { 28230 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28231 return new ArkWaterFlowComponent(nativePtr); 28232 }, (nativePtr, classType, modifierJS) => { 28233 return new modifierJS.WaterFlowModifier(nativePtr, classType); 28234 }); 28235 }; 28236} 28237 28238/// <reference path='./import.ts' /> 28239class ArkCommonShapeComponent extends ArkComponent { 28240 constructor(nativePtr, classType) { 28241 super(nativePtr, classType); 28242 } 28243 viewPort(value) { 28244 throw new Error('Method not implemented.'); 28245 } 28246 stroke(value) { 28247 modifierWithKey(this._modifiersWithKeys, StrokeModifier.identity, StrokeModifier, value); 28248 return this; 28249 } 28250 fill(value) { 28251 modifierWithKey(this._modifiersWithKeys, FillModifier.identity, FillModifier, value); 28252 return this; 28253 } 28254 strokeDashOffset(value) { 28255 modifierWithKey(this._modifiersWithKeys, StrokeDashOffsetModifier.identity, StrokeDashOffsetModifier, value); 28256 return this; 28257 } 28258 strokeLineCap(value) { 28259 modifierWithKey(this._modifiersWithKeys, StrokeLineCapModifier.identity, StrokeLineCapModifier, value); 28260 return this; 28261 } 28262 strokeLineJoin(value) { 28263 modifierWithKey(this._modifiersWithKeys, StrokeLineJoinModifier.identity, StrokeLineJoinModifier, value); 28264 return this; 28265 } 28266 strokeMiterLimit(value) { 28267 modifierWithKey(this._modifiersWithKeys, StrokeMiterLimitModifier.identity, StrokeMiterLimitModifier, value); 28268 return this; 28269 } 28270 strokeOpacity(value) { 28271 modifierWithKey(this._modifiersWithKeys, StrokeOpacityModifier.identity, StrokeOpacityModifier, value); 28272 return this; 28273 } 28274 fillOpacity(value) { 28275 modifierWithKey(this._modifiersWithKeys, FillOpacityModifier.identity, FillOpacityModifier, value); 28276 return this; 28277 } 28278 strokeWidth(value) { 28279 modifierWithKey(this._modifiersWithKeys, StrokeWidthModifier.identity, StrokeWidthModifier, value); 28280 return this; 28281 } 28282 antiAlias(value) { 28283 modifierWithKey(this._modifiersWithKeys, AntiAliasModifier.identity, AntiAliasModifier, value); 28284 return this; 28285 } 28286 strokeDashArray(value) { 28287 modifierWithKey(this._modifiersWithKeys, StrokeDashArrayModifier.identity, StrokeDashArrayModifier, value); 28288 return this; 28289 } 28290 mesh(value, column, row) { 28291 throw new Error('Method not implemented.'); 28292 } 28293 height(value) { 28294 modifierWithKey(this._modifiersWithKeys, CommonShapeHeightModifier.identity, CommonShapeHeightModifier, value); 28295 return this; 28296 } 28297 width(value) { 28298 modifierWithKey(this._modifiersWithKeys, CommonShapeWidthModifier.identity, CommonShapeWidthModifier, value); 28299 return this; 28300 } 28301 foregroundColor(value) { 28302 modifierWithKey( 28303 this._modifiersWithKeys, CommonShapeForegroundColorModifier.identity, CommonShapeForegroundColorModifier, value); 28304 return this; 28305 } 28306} 28307class StrokeDashArrayModifier extends ModifierWithKey { 28308 constructor(value) { 28309 super(value); 28310 } 28311 applyPeer(node, reset) { 28312 if (reset) { 28313 getUINativeModule().commonShape.resetStrokeDashArray(node); 28314 } 28315 else { 28316 getUINativeModule().commonShape.setStrokeDashArray(node, this.value); 28317 } 28318 } 28319 checkObjectDiff() { 28320 return !isBaseOrResourceEqual(this.stageValue, this.value); 28321 } 28322} 28323StrokeDashArrayModifier.identity = Symbol('strokeDashArray'); 28324class StrokeModifier extends ModifierWithKey { 28325 constructor(value) { 28326 super(value); 28327 } 28328 applyPeer(node, reset) { 28329 if (reset) { 28330 getUINativeModule().commonShape.resetStroke(node); 28331 } 28332 else { 28333 getUINativeModule().commonShape.setStroke(node, this.value); 28334 } 28335 } 28336 checkObjectDiff() { 28337 return !isBaseOrResourceEqual(this.stageValue, this.value); 28338 } 28339} 28340StrokeModifier.identity = Symbol('stroke'); 28341class FillModifier extends ModifierWithKey { 28342 constructor(value) { 28343 super(value); 28344 } 28345 applyPeer(node, reset) { 28346 if (reset) { 28347 getUINativeModule().commonShape.resetFill(node); 28348 } 28349 else { 28350 getUINativeModule().commonShape.setFill(node, this.value); 28351 } 28352 } 28353 checkObjectDiff() { 28354 return !isBaseOrResourceEqual(this.stageValue, this.value); 28355 } 28356} 28357FillModifier.identity = Symbol('fill'); 28358class StrokeDashOffsetModifier extends ModifierWithKey { 28359 constructor(value) { 28360 super(value); 28361 } 28362 applyPeer(node, reset) { 28363 if (reset) { 28364 getUINativeModule().commonShape.resetStrokeDashOffset(node); 28365 } 28366 else { 28367 getUINativeModule().commonShape.setStrokeDashOffset(node, this.value); 28368 } 28369 } 28370 checkObjectDiff() { 28371 return !isBaseOrResourceEqual(this.stageValue, this.value); 28372 } 28373} 28374StrokeDashOffsetModifier.identity = Symbol('strokeDashOffset'); 28375class StrokeLineCapModifier extends ModifierWithKey { 28376 constructor(value) { 28377 super(value); 28378 } 28379 applyPeer(node, reset) { 28380 if (reset) { 28381 getUINativeModule().commonShape.resetStrokeLineCap(node); 28382 } 28383 else { 28384 getUINativeModule().commonShape.setStrokeLineCap(node, this.value); 28385 } 28386 } 28387} 28388StrokeLineCapModifier.identity = Symbol('strokeLineCap'); 28389class StrokeLineJoinModifier extends ModifierWithKey { 28390 constructor(value) { 28391 super(value); 28392 } 28393 applyPeer(node, reset) { 28394 if (reset) { 28395 getUINativeModule().commonShape.resetStrokeLineJoin(node); 28396 } 28397 else { 28398 getUINativeModule().commonShape.setStrokeLineJoin(node, this.value); 28399 } 28400 } 28401} 28402StrokeLineJoinModifier.identity = Symbol('strokeLineJoin'); 28403class StrokeMiterLimitModifier extends ModifierWithKey { 28404 constructor(value) { 28405 super(value); 28406 } 28407 applyPeer(node, reset) { 28408 if (reset) { 28409 getUINativeModule().commonShape.resetStrokeMiterLimit(node); 28410 } 28411 else { 28412 getUINativeModule().commonShape.setStrokeMiterLimit(node, this.value); 28413 } 28414 } 28415} 28416StrokeMiterLimitModifier.identity = Symbol('strokeMiterLimit'); 28417class FillOpacityModifier extends ModifierWithKey { 28418 constructor(value) { 28419 super(value); 28420 } 28421 applyPeer(node, reset) { 28422 if (reset) { 28423 getUINativeModule().commonShape.resetFillOpacity(node); 28424 } 28425 else { 28426 getUINativeModule().commonShape.setFillOpacity(node, this.value); 28427 } 28428 } 28429 checkObjectDiff() { 28430 return !isBaseOrResourceEqual(this.stageValue, this.value); 28431 } 28432} 28433FillOpacityModifier.identity = Symbol('FillOpacity'); 28434class StrokeOpacityModifier extends ModifierWithKey { 28435 constructor(value) { 28436 super(value); 28437 } 28438 applyPeer(node, reset) { 28439 if (reset) { 28440 getUINativeModule().commonShape.resetStrokeOpacity(node); 28441 } 28442 else { 28443 getUINativeModule().commonShape.setStrokeOpacity(node, this.value); 28444 } 28445 } 28446 checkObjectDiff() { 28447 return !isBaseOrResourceEqual(this.stageValue, this.value); 28448 } 28449} 28450StrokeOpacityModifier.identity = Symbol('StrokeOpacity'); 28451class StrokeWidthModifier extends ModifierWithKey { 28452 constructor(value) { 28453 super(value); 28454 } 28455 applyPeer(node, reset) { 28456 if (reset) { 28457 getUINativeModule().commonShape.resetStrokeWidth(node); 28458 } 28459 else { 28460 getUINativeModule().commonShape.setStrokeWidth(node, this.value); 28461 } 28462 } 28463} 28464StrokeWidthModifier.identity = Symbol('strokeWidth'); 28465class AntiAliasModifier extends ModifierWithKey { 28466 constructor(value) { 28467 super(value); 28468 } 28469 applyPeer(node, reset) { 28470 if (reset) { 28471 getUINativeModule().commonShape.resetAntiAlias(node); 28472 } 28473 else { 28474 getUINativeModule().commonShape.setAntiAlias(node, this.value); 28475 } 28476 } 28477} 28478AntiAliasModifier.identity = Symbol('antiAlias'); 28479class CommonShapeHeightModifier extends ModifierWithKey { 28480 constructor(value) { 28481 super(value); 28482 } 28483 applyPeer(node, reset) { 28484 if (reset) { 28485 getUINativeModule().commonShape.resetHeight(node); 28486 } 28487 else { 28488 getUINativeModule().commonShape.setHeight(node, this.value); 28489 } 28490 } 28491 checkObjectDiff() { 28492 return !isBaseOrResourceEqual(this.stageValue, this.value); 28493 } 28494} 28495CommonShapeHeightModifier.identity = Symbol('commonShapeHeight'); 28496class CommonShapeWidthModifier extends ModifierWithKey { 28497 constructor(value) { 28498 super(value); 28499 } 28500 applyPeer(node, reset) { 28501 if (reset) { 28502 getUINativeModule().commonShape.resetWidth(node); 28503 } 28504 else { 28505 getUINativeModule().commonShape.setWidth(node, this.value); 28506 } 28507 } 28508 checkObjectDiff() { 28509 return !isBaseOrResourceEqual(this.stageValue, this.value); 28510 } 28511} 28512CommonShapeWidthModifier.identity = Symbol('commonShapeWidth'); 28513class CommonShapeForegroundColorModifier extends ModifierWithKey { 28514 constructor(value) { 28515 super(value); 28516 } 28517 applyPeer(node, reset) { 28518 if (reset) { 28519 getUINativeModule().commonShape.resetForegroundColor(node); 28520 } 28521 else { 28522 getUINativeModule().commonShape.setForegroundColor(node, this.value); 28523 } 28524 } 28525 checkObjectDiff() { 28526 return !isBaseOrResourceEqual(this.stageValue, this.value); 28527 } 28528} 28529CommonShapeForegroundColorModifier.identity = Symbol('commonShapeForegroundColor'); 28530 28531/// <reference path='./import.ts' /> 28532class ArkCircleComponent extends ArkCommonShapeComponent { 28533} 28534// @ts-ignore 28535if (globalThis.Circle !== undefined) { 28536 globalThis.Circle.attributeModifier = function (modifier) { 28537 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28538 return new ArkCircleComponent(nativePtr); 28539 }, (nativePtr, classType, modifierJS) => { 28540 return new modifierJS.CircleModifier(nativePtr, classType); 28541 }); 28542 }; 28543} 28544 28545/// <reference path='./import.ts' /> 28546class ArkEllipseComponent extends ArkCommonShapeComponent { 28547 constructor(nativePtr, classType) { 28548 super(nativePtr, classType); 28549 } 28550} 28551// @ts-ignore 28552if (globalThis.Ellipse !== undefined) { 28553 globalThis.Ellipse.attributeModifier = function (modifier) { 28554 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28555 return new ArkEllipseComponent(nativePtr); 28556 }, (nativePtr, classType, modifierJS) => { 28557 return new modifierJS.CommonModifier(nativePtr, classType); 28558 }); 28559 }; 28560} 28561 28562/// <reference path='./import.ts' /> 28563/// <reference path='./ArkCommonShape.ts' /> 28564class ArkLineComponent extends ArkCommonShapeComponent { 28565 constructor(nativePtr, classType) { 28566 super(nativePtr, classType); 28567 } 28568 startPoint(value) { 28569 modifierWithKey(this._modifiersWithKeys, LineStartPointModifier.identity, LineStartPointModifier, value); 28570 return this; 28571 } 28572 endPoint(value) { 28573 modifierWithKey(this._modifiersWithKeys, LineEndPointModifier.identity, LineEndPointModifier, value); 28574 return this; 28575 } 28576} 28577class LineStartPointModifier extends ModifierWithKey { 28578 constructor(value) { 28579 super(value); 28580 } 28581 applyPeer(node, reset) { 28582 if (reset) { 28583 getUINativeModule().line.resetStartPoint(node); 28584 } 28585 else { 28586 getUINativeModule().line.setStartPoint(node, this.value); 28587 } 28588 } 28589 checkObjectDiff() { 28590 return this.stageValue !== this.value; 28591 } 28592} 28593LineStartPointModifier.identity = Symbol('startPoint'); 28594class LineEndPointModifier extends ModifierWithKey { 28595 constructor(value) { 28596 super(value); 28597 } 28598 applyPeer(node, reset) { 28599 if (reset) { 28600 getUINativeModule().line.resetEndPoint(node); 28601 } 28602 else { 28603 getUINativeModule().line.setEndPoint(node, this.value); 28604 } 28605 } 28606 checkObjectDiff() { 28607 return this.stageValue !== this.value; 28608 } 28609} 28610LineEndPointModifier.identity = Symbol('endPoint'); 28611// @ts-ignore 28612if (globalThis.Line !== undefined) { 28613 globalThis.Line.attributeModifier = function (modifier) { 28614 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28615 return new ArkLineComponent(nativePtr); 28616 }, (nativePtr, classType, modifierJS) => { 28617 return new modifierJS.LineModifier(nativePtr, classType); 28618 }); 28619 }; 28620} 28621 28622/// <reference path='./import.ts' /> 28623/// <reference path='./ArkCommonShape.ts' /> 28624const ARRAY_LENGTH = 2; 28625class ArkPolylineComponent extends ArkCommonShapeComponent { 28626 constructor(nativePtr, classType) { 28627 super(nativePtr, classType); 28628 } 28629 points(value) { 28630 modifierWithKey(this._modifiersWithKeys, PolylinePointsModifier.identity, PolylinePointsModifier, value); 28631 return this; 28632 } 28633} 28634class PolylinePointsModifier extends ModifierWithKey { 28635 constructor(value) { 28636 super(value); 28637 } 28638 applyPeer(node, reset) { 28639 let xPoint = []; 28640 let yPoint = []; 28641 if (Array.isArray(this.value)) { 28642 for (let i = 0; i <= this.value.length; i++) { 28643 let item = this.value[i]; 28644 if (!Array.isArray(item)) { 28645 continue; 28646 } 28647 if (item.length < ARRAY_LENGTH || isUndefined(item[0]) || isUndefined(item[1])) { 28648 reset = true; 28649 break; 28650 } 28651 xPoint.push(item[0]); 28652 yPoint.push(item[1]); 28653 } 28654 } 28655 else { 28656 reset = true; 28657 } 28658 if (reset) { 28659 getUINativeModule().polyline.resetPoints(node); 28660 } 28661 else { 28662 getUINativeModule().polyline.setPoints(node, xPoint, yPoint); 28663 } 28664 } 28665 checkObjectDiff() { 28666 return this.stageValue !== this.value; 28667 } 28668} 28669PolylinePointsModifier.identity = Symbol('points'); 28670// @ts-ignore 28671if (globalThis.Polyline !== undefined) { 28672 globalThis.Polyline.attributeModifier = function (modifier) { 28673 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28674 return new ArkPolylineComponent(nativePtr); 28675 }, (nativePtr, classType, modifierJS) => { 28676 return new modifierJS.PolylineModifier(nativePtr, classType); 28677 }); 28678 }; 28679} 28680 28681/// <reference path='./import.ts' /> 28682class ArkPolygonComponent extends ArkCommonShapeComponent { 28683 constructor(nativePtr, classType) { 28684 super(nativePtr, classType); 28685 } 28686 points(value) { 28687 modifierWithKey(this._modifiersWithKeys, PolygonPointsModifier.identity, PolygonPointsModifier, value); 28688 return this; 28689 } 28690} 28691class PolygonPointsModifier extends ModifierWithKey { 28692 constructor(value) { 28693 super(value); 28694 } 28695 applyPeer(node, reset) { 28696 let xPoint = []; 28697 let yPoint = []; 28698 if (Array.isArray(this.value)) { 28699 for (let i = 0; i <= this.value.length; i++) { 28700 let item = this.value[i]; 28701 if (!Array.isArray(item)) { 28702 continue; 28703 } 28704 if (item.length < ARRAY_LENGTH || isUndefined(item[0]) || isUndefined(item[1])) { 28705 reset = true; 28706 break; 28707 } 28708 xPoint.push(item[0]); 28709 yPoint.push(item[1]); 28710 } 28711 } 28712 else { 28713 reset = true; 28714 } 28715 if (reset) { 28716 getUINativeModule().polygon.resetPolygonPoints(node); 28717 } 28718 else { 28719 getUINativeModule().polygon.setPolygonPoints(node, xPoint, yPoint); 28720 } 28721 } 28722 checkObjectDiff() { 28723 return this.stageValue !== this.value; 28724 } 28725} 28726PolygonPointsModifier.identity = Symbol('polygonPoints'); 28727// @ts-ignore 28728if (globalThis.Polygon !== undefined) { 28729 globalThis.Polygon.attributeModifier = function (modifier) { 28730 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28731 return new ArkPolygonComponent(nativePtr); 28732 }, (nativePtr, classType, modifierJS) => { 28733 return new modifierJS.PolygonModifier(nativePtr, classType); 28734 }); 28735 }; 28736} 28737 28738/// <reference path='./import.ts' /> 28739class ArkPathComponent extends ArkCommonShapeComponent { 28740 constructor(nativePtr, classType) { 28741 super(nativePtr, classType); 28742 } 28743 commands(value) { 28744 modifierWithKey(this._modifiersWithKeys, CommandsModifier.identity, CommandsModifier, value); 28745 return this; 28746 } 28747} 28748class CommandsModifier extends ModifierWithKey { 28749 constructor(value) { 28750 super(value); 28751 } 28752 applyPeer(node, reset) { 28753 if (reset) { 28754 getUINativeModule().path.resetPathCommands(node); 28755 } 28756 else { 28757 getUINativeModule().path.setPathCommands(node, this.value); 28758 } 28759 } 28760 checkObjectDiff() { 28761 if (isString(this.stageValue) && isString(this.value)) { 28762 return this.stageValue !== this.value; 28763 } 28764 else { 28765 return true; 28766 } 28767 } 28768} 28769CommandsModifier.identity = Symbol('commands'); 28770// @ts-ignore 28771if (globalThis.Path !== undefined) { 28772 globalThis.Path.attributeModifier = function (modifier) { 28773 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28774 return new ArkPathComponent(nativePtr); 28775 }, (nativePtr, classType, modifierJS) => { 28776 return new modifierJS.PathModifier(nativePtr, classType); 28777 }); 28778 }; 28779} 28780 28781/// <reference path='./import.ts' /> 28782/// <reference path='./ArkCommonShape.ts' /> 28783class RectRadiusWidthModifier extends ModifierWithKey { 28784 constructor(value) { 28785 super(value); 28786 } 28787 applyPeer(node, reset) { 28788 if (reset) { 28789 getUINativeModule().rect.resetRectRadiusWidth(node); 28790 } 28791 else { 28792 getUINativeModule().rect.setRectRadiusWidth(node, this.value); 28793 } 28794 } 28795} 28796RectRadiusWidthModifier.identity = Symbol('rectRadiusWidth'); 28797class RectRadiusHeightModifier extends ModifierWithKey { 28798 constructor(value) { 28799 super(value); 28800 } 28801 applyPeer(node, reset) { 28802 if (reset) { 28803 getUINativeModule().rect.resetRectRadiusHeight(node); 28804 } 28805 else { 28806 getUINativeModule().rect.setRectRadiusHeight(node, this.value); 28807 } 28808 } 28809} 28810RectRadiusHeightModifier.identity = Symbol('rectRadiusHeight'); 28811class RectRadiusModifier extends ModifierWithKey { 28812 constructor(value) { 28813 super(value); 28814 } 28815 applyPeer(node, reset) { 28816 if (reset) { 28817 getUINativeModule().rect.resetRectRadius(node); 28818 } 28819 else { 28820 getUINativeModule().rect.setRectRadius(node, this.value); 28821 } 28822 } 28823 checkObjectDiff() { 28824 return !(this.stageValue === this.value); 28825 } 28826} 28827RectRadiusModifier.identity = Symbol('rectRadius'); 28828class ArkRectComponent extends ArkCommonShapeComponent { 28829 constructor(nativePtr, classType) { 28830 super(nativePtr, classType); 28831 } 28832 radiusWidth(value) { 28833 modifierWithKey(this._modifiersWithKeys, RectRadiusWidthModifier.identity, RectRadiusWidthModifier, value); 28834 return this; 28835 } 28836 radiusHeight(value) { 28837 modifierWithKey(this._modifiersWithKeys, RectRadiusHeightModifier.identity, RectRadiusHeightModifier, value); 28838 return this; 28839 } 28840 radius(value) { 28841 modifierWithKey(this._modifiersWithKeys, RectRadiusModifier.identity, RectRadiusModifier, value); 28842 return this; 28843 } 28844} 28845// @ts-ignore 28846if (globalThis.Rect !== undefined) { 28847 globalThis.Rect.attributeModifier = function (modifier) { 28848 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28849 return new ArkRectComponent(nativePtr); 28850 }, (nativePtr, classType, modifierJS) => { 28851 return new modifierJS.RectModifier(nativePtr, classType); 28852 }); 28853 }; 28854} 28855 28856/// <reference path='./import.ts' /> 28857/// <reference path='./ArkCommonShape.ts' /> 28858class ShapeViewPortModifier extends ModifierWithKey { 28859 constructor(value) { 28860 super(value); 28861 } 28862 applyPeer(node, reset) { 28863 if (reset) { 28864 getUINativeModule().shape.resetShapeViewPort(node); 28865 } 28866 else { 28867 getUINativeModule().shape.setShapeViewPort(node, this.value.x, this.value.y, this.value.width, this.value.height); 28868 } 28869 } 28870 checkObjectDiff() { 28871 return !(this.stageValue.x === this.value.x && this.stageValue.y === this.value.y && 28872 this.stageValue.width === this.value.width && this.stageValue.height === this.value.height); 28873 } 28874} 28875ShapeViewPortModifier.identity = Symbol('shapeViewPort'); 28876class ShapeMeshModifier extends ModifierWithKey { 28877 constructor(value) { 28878 super(value); 28879 } 28880 applyPeer(node, reset) { 28881 if (reset) { 28882 getUINativeModule().shape.resetShapeMesh(node); 28883 } 28884 else { 28885 getUINativeModule().shape.setShapeMesh(node, this.value.value, this.value.column, this.value.row); 28886 } 28887 } 28888 checkObjectDiff() { 28889 return !this.stageValue.isEqual(this.value); 28890 } 28891} 28892ShapeMeshModifier.identity = Symbol('shapeMesh'); 28893class ShapeHeightModifier extends ModifierWithKey { 28894 constructor(value) { 28895 super(value); 28896 } 28897 applyPeer(node, reset) { 28898 if (reset) { 28899 getUINativeModule().common.resetHeight(node); 28900 } 28901 else { 28902 getUINativeModule().common.setHeight(node, this.value); 28903 } 28904 } 28905 checkObjectDiff() { 28906 return !isBaseOrResourceEqual(this.stageValue, this.value); 28907 } 28908} 28909ShapeHeightModifier.identity = Symbol('shapeHeight'); 28910class ShapeWidthModifier extends ModifierWithKey { 28911 constructor(value) { 28912 super(value); 28913 } 28914 applyPeer(node, reset) { 28915 if (reset) { 28916 getUINativeModule().common.resetWidth(node); 28917 } 28918 else { 28919 getUINativeModule().common.setWidth(node, this.value); 28920 } 28921 } 28922 checkObjectDiff() { 28923 return !isBaseOrResourceEqual(this.stageValue, this.value); 28924 } 28925} 28926ShapeWidthModifier.identity = Symbol('shapeWidth'); 28927class ArkShapeComponent extends ArkCommonShapeComponent { 28928 constructor(nativePtr, classType) { 28929 super(nativePtr, classType); 28930 } 28931 viewPort(value) { 28932 if (value === null) { 28933 value = undefined; 28934 } 28935 modifierWithKey(this._modifiersWithKeys, ShapeViewPortModifier.identity, ShapeViewPortModifier, value); 28936 return this; 28937 } 28938 mesh(value, column, row) { 28939 let arkMesh = new ArkMesh(); 28940 if (value !== null && column !== null && row !== null) { 28941 arkMesh.value = value; 28942 arkMesh.column = column; 28943 arkMesh.row = row; 28944 } 28945 modifierWithKey(this._modifiersWithKeys, ShapeMeshModifier.identity, ShapeMeshModifier, arkMesh); 28946 return this; 28947 } 28948 height(value) { 28949 modifierWithKey(this._modifiersWithKeys, ShapeHeightModifier.identity, ShapeHeightModifier, value); 28950 return this; 28951 } 28952 width(value) { 28953 modifierWithKey(this._modifiersWithKeys, ShapeWidthModifier.identity, ShapeWidthModifier, value); 28954 return this; 28955 } 28956} 28957// @ts-ignore 28958if (globalThis.Shape !== undefined) { 28959 globalThis.Shape.attributeModifier = function (modifier) { 28960 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28961 return new ArkShapeComponent(nativePtr); 28962 }, (nativePtr, classType, modifierJS) => { 28963 return new modifierJS.ShapeModifier(nativePtr, classType); 28964 }); 28965 }; 28966} 28967 28968/// <reference path='./import.ts' /> 28969class ArkCanvasComponent extends ArkComponent { 28970 constructor(nativePtr, classType) { 28971 super(nativePtr, classType); 28972 } 28973 onReady(event) { 28974 throw new Error('Method not implemented.'); 28975 } 28976} 28977// @ts-ignore 28978if (globalThis.Canvas !== undefined) { 28979 globalThis.Canvas.attributeModifier = function (modifier) { 28980 attributeModifierFunc.call(this, modifier, (nativePtr) => { 28981 return new ArkCanvasComponent(nativePtr); 28982 }, (nativePtr, classType, modifierJS) => { 28983 return new modifierJS.CommonModifier(nativePtr, classType); 28984 }); 28985 }; 28986} 28987 28988/// <reference path='./import.ts' /> 28989class ArkGridContainerComponent extends ArkComponent { 28990 constructor(nativePtr, classType) { 28991 super(nativePtr, classType); 28992 } 28993 alignItems(value) { 28994 throw new Error('Method not implemented.'); 28995 } 28996 justifyContent(value) { 28997 throw new Error('Method not implemented.'); 28998 } 28999 pointLight(value) { 29000 throw new Error('Method not implemented.'); 29001 } 29002} 29003// @ts-ignore 29004if (globalThis.GridContainer !== undefined) { 29005 globalThis.GridContainer.attributeModifier = function (modifier) { 29006 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29007 return new ArkGridContainerComponent(nativePtr); 29008 }, (nativePtr, classType, modifierJS) => { 29009 return new modifierJS.CommonModifier(nativePtr, classType); 29010 }); 29011 }; 29012} 29013 29014/// <reference path='./import.ts' /> 29015class ArkEffectComponentComponent extends ArkComponent { 29016} 29017// @ts-ignore 29018if (globalThis.EffectComponent !== undefined) { 29019 // @ts-ignore 29020 globalThis.EffectComponent.attributeModifier = function (modifier) { 29021 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29022 return new ArkEffectComponentComponent(nativePtr); 29023 }, (nativePtr, classType, modifierJS) => { 29024 return new modifierJS.CommonModifier(nativePtr, classType); 29025 }); 29026 }; 29027} 29028 29029/// <reference path='./import.ts' /> 29030class ArkRemoteWindowComponent extends ArkComponent { 29031} 29032// @ts-ignore 29033if (globalThis.RemoteWindow !== undefined) { 29034 // @ts-ignore 29035 globalThis.RemoteWindow.attributeModifier = function (modifier) { 29036 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29037 return new ArkRemoteWindowComponent(nativePtr); 29038 }, (nativePtr, classType, modifierJS) => { 29039 return new modifierJS.CommonModifier(nativePtr, classType); 29040 }); 29041 }; 29042} 29043 29044class ParticleDisturbanceFieldModifier extends ModifierWithKey { 29045 constructor(value) { 29046 super(value); 29047 } 29048 29049 applyPeer(node, reset) { 29050 if (reset) { 29051 getUINativeModule().particle.resetDisturbanceField(node); 29052 } 29053 else { 29054 let dataArray = []; 29055 if (!Array.isArray(this.value)) { 29056 return; 29057 } 29058 for (let i = 0; i < this.value.length; i++) { 29059 let data = this.value[i]; 29060 dataArray.push(parseWithDefaultNumber(data.strength, 0)); 29061 dataArray.push(parseWithDefaultNumber(data.shape, 0)); 29062 if (isObject(data.size)) { 29063 dataArray.push(parseWithDefaultNumber(data.size.width, 0)); 29064 dataArray.push(parseWithDefaultNumber(data.size.height, 0)); 29065 } 29066 else { 29067 dataArray.push(0); 29068 dataArray.push(0); 29069 } 29070 if (isObject(data.position)) { 29071 dataArray.push(parseWithDefaultNumber(data.position.x, 0)); 29072 dataArray.push(parseWithDefaultNumber(data.position.y, 0)); 29073 } 29074 else { 29075 dataArray.push(0); 29076 dataArray.push(0); 29077 } 29078 dataArray.push(parseWithDefaultNumber(data.feather, 0)); 29079 dataArray.push(parseWithDefaultNumber(data.noiseScale, 1)); 29080 dataArray.push(parseWithDefaultNumber(data.noiseFrequency, 1)); 29081 dataArray.push(parseWithDefaultNumber(data.noiseAmplitude, 1)); 29082 } 29083 getUINativeModule().particle.setDisturbanceField(node, dataArray); 29084 } 29085 } 29086 checkObjectDiff() { 29087 return !isBaseOrResourceEqual(this.stageValue, this.value); 29088 } 29089} 29090 29091ParticleDisturbanceFieldModifier.identity = Symbol('disturbanceFields'); 29092 29093class ParticleEmitterModifier extends ModifierWithKey { 29094 constructor(value) { 29095 super(value); 29096 } 29097 29098 applyPeer(node, reset) { 29099 let _a, _b, _c, _d, _e; 29100 if (reset) { 29101 getUINativeModule().particle.resetEmitter(node); 29102 } 29103 else { 29104 let dataArray = []; 29105 if (!Array.isArray(this.value)) { 29106 return; 29107 } 29108 for (let i = 0; i < this.value.length; i++) { 29109 let data = this.value[i]; 29110 let indexValue = 0; 29111 if (data.index > 0) { 29112 indexValue = data.index; 29113 } 29114 dataArray.push(indexValue); 29115 29116 let emitRateValue = 5; 29117 if (isNumber(data.emitRate)) { 29118 dataArray.push(1); 29119 if (data.emitRate >= 0) { 29120 emitRateValue = data.emitRate; 29121 } 29122 dataArray.push(emitRateValue); 29123 } else { 29124 dataArray.push(0); 29125 dataArray.push(_a); 29126 } 29127 29128 if (isObject(data.position)) { 29129 if (isNumber(data.position.x) && isNumber(data.position.y)) { 29130 dataArray.push(1); 29131 dataArray.push(data.position.x); 29132 dataArray.push(data.position.y); 29133 } else { 29134 dataArray.push(0); 29135 dataArray.push(_b); 29136 dataArray.push(_c); 29137 } 29138 } else { 29139 dataArray.push(0); 29140 dataArray.push(_b); 29141 dataArray.push(_c); 29142 } 29143 29144 if (isObject(data.size)) { 29145 if (data.size.width > 0 && data.size.height > 0) { 29146 dataArray.push(1); 29147 dataArray.push(data.size.width); 29148 dataArray.push(data.size.height); 29149 } else { 29150 dataArray.push(0); 29151 dataArray.push(_d); 29152 dataArray.push(_e); 29153 } 29154 } 29155 else { 29156 dataArray.push(0); 29157 dataArray.push(_d); 29158 dataArray.push(_e); 29159 } 29160 } 29161 getUINativeModule().particle.setEmitter(node, dataArray); 29162 } 29163 } 29164 29165 checkObjectDiff() { 29166 return !isBaseOrResourceEqual(this.stageValue, this.value); 29167 } 29168} 29169 29170ParticleEmitterModifier.identity = Symbol('emitter'); 29171 29172/// <reference path='./import.ts' /> 29173class ArkParticleComponent extends ArkComponent { 29174 constructor(nativePtr, classType) { 29175 super(nativePtr, classType); 29176 } 29177 disturbanceFields(value) { 29178 modifierWithKey(this._modifiersWithKeys, ParticleDisturbanceFieldModifier.identity, ParticleDisturbanceFieldModifier, value); 29179 return this; 29180 } 29181 29182 emitter(value) { 29183 modifierWithKey(this._modifiersWithKeys, ParticleEmitterModifier.identity, ParticleEmitterModifier, value); 29184 return this; 29185 } 29186} 29187// @ts-ignore 29188if (globalThis.Particle !== undefined) { 29189 29190 // @ts-ignore 29191 globalThis.Particle.attributeModifier = function (modifier) { 29192 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29193 return new ArkParticleComponent(nativePtr); 29194 }, (nativePtr, classType, modifierJS) => { 29195 return new modifierJS.ParticleModifier(nativePtr, classType); 29196 }); 29197 }; 29198} 29199 29200let arkUINativeAdvancedModule = undefined; 29201function getUINativeAdvancedModule() { 29202 if (arkUINativeAdvancedModule) { 29203 return arkUINativeAdvancedModule; 29204 } else if (globalThis.getArkUIAdvancedModule !== undefined) { 29205 arkUINativeAdvancedModule = globalThis.getArkUIAdvancedModule(); 29206 } 29207 return arkUINativeAdvancedModule; 29208} 29209 29210class MediaCachedImageSrcModifier extends ModifierWithKey { 29211 constructor(value) { 29212 super(value); 29213 } 29214 applyPeer(node, reset) { 29215 if (getUINativeAdvancedModule() === undefined) { 29216 return; 29217 } 29218 if (reset) { 29219 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc(node, ''); 29220 } else { 29221 if (isResource(this.value) || isString(this.value)) { 29222 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc(node, 0, this.value); 29223 } else if (Array.isArray(this.value.sources)) { 29224 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc( 29225 node, 1, this.value.sources, this.value.sources.length, this.value.column); 29226 } else { 29227 getUINativeAdvancedModule().mediaCachedImage.setMediaCachedImageSrc(node, 0, this.value); 29228 } 29229 } 29230 } 29231} 29232MediaCachedImageSrcModifier.identity = Symbol('mediaCachedImageSrc'); 29233class MediaCachedImageAltModifier extends ModifierWithKey { 29234 constructor(value) { 29235 super(value); 29236 } 29237 applyPeer(node, reset) { 29238 if (getUINativeAdvancedModule() === undefined) { 29239 return; 29240 } 29241 if (reset) { 29242 getUINativeAdvancedModule().mediaCachedImage.resetAlt(node); 29243 } else { 29244 getUINativeAdvancedModule().mediaCachedImage.setAlt(node, this.value); 29245 } 29246 } 29247 checkObjectDiff() { 29248 return true; 29249 } 29250} 29251MediaCachedImageAltModifier.identity = Symbol('mediaCachedImageAlt'); 29252class ArkMediaCachedImageComponent extends ArkImageComponent { 29253 constructor(nativePtr, classType) { 29254 super(nativePtr, classType); 29255 } 29256 initialize(value) { 29257 if (value[0] !== undefined) { 29258 modifierWithKey(this._modifiersWithKeys, MediaCachedImageSrcModifier.identity, MediaCachedImageSrcModifier, value[0]); 29259 } 29260 return this; 29261 } 29262 alt(value) { 29263 modifierWithKey(this._modifiersWithKeys, MediaCachedImageAltModifier.identity, MediaCachedImageAltModifier, value); 29264 return this; 29265 } 29266} 29267// @ts-ignore 29268if (globalThis.MediaCachedImage !== undefined) { 29269 globalThis.MediaCachedImage.attributeModifier = function (modifier) { 29270 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29271 return new ArkMediaCachedImageComponent(nativePtr); 29272 }, (nativePtr, classType, modifierJS) => { 29273 return new modifierJS.MediaCachedImageModifier(nativePtr, classType); 29274 }); 29275 }; 29276} 29277 29278class SymbolFontColorModifier extends ModifierWithKey { 29279 constructor(value) { 29280 super(value); 29281 } 29282 applyPeer(node, reset) { 29283 if (reset) { 29284 getUINativeModule().symbolGlyph.resetFontColor(node); 29285 } 29286 else { 29287 getUINativeModule().symbolGlyph.setFontColor(node, this.value); 29288 } 29289 } 29290 checkObjectDiff() { 29291 return !isBaseOrResourceEqual(this.stageValue, this.value); 29292 } 29293} 29294SymbolFontColorModifier.identity = Symbol('symbolGlyphFontColor'); 29295 29296class SymbolFontSizeModifier extends ModifierWithKey { 29297 constructor(value) { 29298 super(value); 29299 } 29300 applyPeer(node, reset) { 29301 if (reset) { 29302 getUINativeModule().symbolGlyph.resetFontSize(node); 29303 } 29304 else { 29305 getUINativeModule().symbolGlyph.setFontSize(node, this.value); 29306 } 29307 } 29308 checkObjectDiff() { 29309 return !isBaseOrResourceEqual(this.stageValue, this.value); 29310 } 29311} 29312SymbolFontSizeModifier.identity = Symbol('symbolGlyphFontSize'); 29313 29314class SymbolFontWeightModifier extends ModifierWithKey { 29315 constructor(value) { 29316 super(value); 29317 } 29318 applyPeer(node, reset) { 29319 if (reset) { 29320 getUINativeModule().symbolGlyph.resetFontWeight(node); 29321 } 29322 else { 29323 getUINativeModule().symbolGlyph.setFontWeight(node, this.value); 29324 } 29325 } 29326} 29327SymbolFontWeightModifier.identity = Symbol('symbolGlyphFontWeight'); 29328 29329class RenderingStrategyModifier extends ModifierWithKey { 29330 constructor(value) { 29331 super(value); 29332 } 29333 applyPeer(node, reset) { 29334 if (reset) { 29335 getUINativeModule().symbolGlyph.resetRenderingStrategy(node); 29336 } 29337 else { 29338 getUINativeModule().symbolGlyph.setRenderingStrategy(node, this.value); 29339 } 29340 } 29341} 29342RenderingStrategyModifier.identity = Symbol('symbolGlyphRenderingStrategy'); 29343 29344class EffectStrategyModifier extends ModifierWithKey { 29345 constructor(value) { 29346 super(value); 29347 } 29348 applyPeer(node, reset) { 29349 if (reset) { 29350 getUINativeModule().symbolGlyph.resetEffectStrategy(node); 29351 } 29352 else { 29353 getUINativeModule().symbolGlyph.setEffectStrategy(node, this.value); 29354 } 29355 } 29356} 29357EffectStrategyModifier.identity = Symbol('symbolGlyphEffectStrategy'); 29358 29359class SymbolContentModifier extends ModifierWithKey { 29360 constructor(value) { 29361 super(value); 29362 } 29363 applyPeer(node, reset) { 29364 if (reset) { 29365 getUINativeModule().symbolGlyph.setSymbolId(node, ''); 29366 } 29367 else { 29368 getUINativeModule().symbolGlyph.setSymbolId(node, this.value); 29369 } 29370 } 29371} 29372SymbolContentModifier.identity = Symbol('symbolContent'); 29373 29374class SymbolEffectModifier extends ModifierWithKey { 29375 constructor(value) { 29376 super(value); 29377 } 29378 applyPeer(node, reset) { 29379 if (reset) { 29380 getUINativeModule().symbolGlyph.resetSymbolEffectOptions(node); 29381 } else { 29382 getUINativeModule().symbolGlyph.setSymbolEffectOptions(node, this.value.symbolEffect, this.value.action); 29383 } 29384 } 29385} 29386SymbolEffectModifier.identity = Symbol('symbolEffect'); 29387 29388/// <reference path='./import.ts' /> 29389class ArkSymbolGlyphComponent extends ArkComponent { 29390 constructor(nativePtr, classType) { 29391 super(nativePtr, classType); 29392 } 29393 initialize(value) { 29394 if (value[0] !== undefined) { 29395 modifierWithKey(this._modifiersWithKeys, SymbolContentModifier.identity, SymbolContentModifier, value[0]); 29396 } 29397 return this; 29398 } 29399 fontColor(value) { 29400 modifierWithKey(this._modifiersWithKeys, SymbolFontColorModifier.identity, SymbolFontColorModifier, value); 29401 return this; 29402 } 29403 fontSize(value) { 29404 modifierWithKey(this._modifiersWithKeys, SymbolFontSizeModifier.identity, SymbolFontSizeModifier, value); 29405 return this; 29406 } 29407 fontWeight(value) { 29408 modifierWithKey(this._modifiersWithKeys, SymbolFontWeightModifier.identity, SymbolFontWeightModifier, value); 29409 return this; 29410 } 29411 renderingStrategy(value) { 29412 modifierWithKey(this._modifiersWithKeys, RenderingStrategyModifier.identity, RenderingStrategyModifier, value); 29413 return this; 29414 } 29415 effectStrategy(value) { 29416 modifierWithKey(this._modifiersWithKeys, EffectStrategyModifier.identity, EffectStrategyModifier, value); 29417 return this; 29418 } 29419 symbolEffect(effect, action) { 29420 let symbolEffect = new ArkSymbolEffect(); 29421 symbolEffect.symbolEffect = effect; 29422 symbolEffect.action = action; 29423 modifierWithKey(this._modifiersWithKeys, SymbolEffectModifier.identity, SymbolEffectModifier, symbolEffect); 29424 return this; 29425 } 29426} 29427 29428class SystemBarEffectModifier extends ModifierWithKey { 29429 constructor(value) { 29430 super(value); 29431 } 29432 applyPeer(node, reset) { 29433 getUINativeModule().common.setSystemBarEffect(node, true); 29434 } 29435} 29436SystemBarEffectModifier.identity = Symbol('systemBarEffect'); 29437 29438// @ts-ignore 29439if (globalThis.SymbolGlyph !== undefined) { 29440 globalThis.SymbolGlyph.attributeModifier = function (modifier) { 29441 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29442 return new ArkSymbolGlyphComponent(nativePtr); 29443 }, (nativePtr, classType, modifierJS) => { 29444 return new modifierJS.SymbolGlyphModifier(undefined, nativePtr, classType); 29445 }); 29446 }; 29447} 29448 29449class SymbolSpanFontColorModifier extends ModifierWithKey { 29450 constructor(value) { 29451 super(value); 29452 } 29453 applyPeer(node, reset) { 29454 if (reset) { 29455 getUINativeModule().symbolSpan.resetFontColor(node); 29456 } else { 29457 getUINativeModule().symbolSpan.setFontColor(node, this.value); 29458 } 29459 } 29460 checkObjectDiff() { 29461 if (isResource(this.stageValue) && isResource(this.value)) { 29462 return !isResourceEqual(this.stageValue, this.value); 29463 } else { 29464 return true; 29465 } 29466 } 29467} 29468SymbolSpanFontColorModifier.identity = Symbol('symbolSpanFontColor'); 29469class SymbolSpanFontSizeModifier extends ModifierWithKey { 29470 constructor(value) { 29471 super(value); 29472 } 29473 applyPeer(node, reset) { 29474 if (reset) { 29475 getUINativeModule().symbolSpan.resetFontSize(node); 29476 } else { 29477 getUINativeModule().symbolSpan.setFontSize(node, this.value); 29478 } 29479 } 29480 checkObjectDiff() { 29481 if (isResource(this.stageValue) && isResource(this.value)) { 29482 return !isResourceEqual(this.stageValue, this.value); 29483 } else { 29484 return true; 29485 } 29486 } 29487} 29488SymbolSpanFontSizeModifier.identity = Symbol('symbolSpanFontSize'); 29489class SymbolSpanFontWeightModifier extends ModifierWithKey { 29490 constructor(value) { 29491 super(value); 29492 } 29493 applyPeer(node, reset) { 29494 if (reset) { 29495 getUINativeModule().symbolSpan.resetFontWeight(node); 29496 } else { 29497 getUINativeModule().symbolSpan.setFontWeight(node, this.value); 29498 } 29499 } 29500 checkObjectDiff() { 29501 if (isResource(this.stageValue) && isResource(this.value)) { 29502 return !isResourceEqual(this.stageValue, this.value); 29503 } else { 29504 return true; 29505 } 29506 } 29507} 29508SymbolSpanFontWeightModifier.identity = Symbol('symbolSpanFontWeight'); 29509class SymbolSpanEffectStrategyModifier extends ModifierWithKey { 29510 constructor(value) { 29511 super(value); 29512 } 29513 applyPeer(node, reset) { 29514 if (reset) { 29515 getUINativeModule().symbolSpan.resetEffectStrategy(node); 29516 } else { 29517 getUINativeModule().symbolSpan.setEffectStrategy(node, this.value); 29518 } 29519 } 29520 checkObjectDiff() { 29521 if (isResource(this.stageValue) && isResource(this.value)) { 29522 return !isResourceEqual(this.stageValue, this.value); 29523 } else { 29524 return true; 29525 } 29526 } 29527} 29528SymbolSpanEffectStrategyModifier.identity = Symbol('symbolSpanEffectStrategy'); 29529class SymbolSpanRenderingStrategyModifier extends ModifierWithKey { 29530 constructor(value) { 29531 super(value); 29532 } 29533 applyPeer(node, reset) { 29534 if (reset) { 29535 getUINativeModule().symbolSpan.resetRenderingStrategy(node); 29536 } else { 29537 getUINativeModule().symbolSpan.setRenderingStrategy(node, this.value); 29538 } 29539 } 29540 checkObjectDiff() { 29541 if (isResource(this.stageValue) && isResource(this.value)) { 29542 return !isResourceEqual(this.stageValue, this.value); 29543 } else { 29544 return true; 29545 } 29546 } 29547} 29548SymbolSpanRenderingStrategyModifier.identity = Symbol('symbolSpanRenderingStrategy'); 29549class SymbolSpanIdModifier extends ModifierWithKey { 29550 constructor(value) { 29551 super(value); 29552 } 29553 applyPeer(node, reset) { 29554 if (reset) { 29555 getUINativeModule().symbolSpan.setId(node, ''); 29556 } 29557 else { 29558 getUINativeModule().symbolSpan.setId(node, this.value); 29559 } 29560 } 29561} 29562SymbolSpanIdModifier.identity = Symbol('symbolSpanId'); 29563/// <reference path='./import.ts' /> 29564class ArkSymbolSpanComponent extends ArkComponent { 29565 constructor(nativePtr, classType) { 29566 super(nativePtr, classType); 29567 } 29568 initialize(value) { 29569 if (value[0] !== undefined) { 29570 modifierWithKey(this._modifiersWithKeys, SymbolSpanIdModifier.identity, SymbolSpanIdModifier, value[0]); 29571 } 29572 return this; 29573 } 29574 fontSize(value) { 29575 modifierWithKey(this._modifiersWithKeys, SymbolSpanFontSizeModifier.identity, 29576 SymbolSpanFontSizeModifier, value); 29577 return this; 29578 } 29579 fontColor(value) { 29580 modifierWithKey(this._modifiersWithKeys, SymbolSpanFontColorModifier.identity, 29581 SymbolSpanFontColorModifier, value); 29582 return this; 29583 } 29584 fontWeight(value) { 29585 let fontWeightStr = '400'; 29586 if (isNumber(value)) { 29587 fontWeightStr = value.toString(); 29588 } else if (isString(value)) { 29589 fontWeightStr = String(value); 29590 } 29591 modifierWithKey(this._modifiersWithKeys, SymbolSpanFontWeightModifier.identity, 29592 SymbolSpanFontWeightModifier, fontWeightStr); 29593 return this; 29594 } 29595 effectStrategy(value) { 29596 modifierWithKey(this._modifiersWithKeys, SymbolSpanEffectStrategyModifier.identity, 29597 SymbolSpanEffectStrategyModifier, value); 29598 return this; 29599 } 29600 renderingStrategy(value) { 29601 modifierWithKey(this._modifiersWithKeys, SymbolSpanRenderingStrategyModifier.identity, 29602 SymbolSpanRenderingStrategyModifier, value); 29603 return this; 29604 } 29605} 29606 29607// @ts-ignore 29608if (globalThis.SymbolSpan !== undefined) { 29609 globalThis.SymbolSpan.attributeModifier = function (modifier) { 29610 attributeModifierFuncWithoutStateStyles.call(this, modifier, (nativePtr) => { 29611 return new ArkSymbolSpanComponent(nativePtr); 29612 }, (nativePtr, classType, modifierJS) => { 29613 return new modifierJS.SymbolSpanModifier(undefined, nativePtr, classType); 29614 }); 29615 }; 29616} 29617 29618class ShaderInputBufferModifier extends ModifierWithKey { 29619 constructor(value) { 29620 super(value); 29621 } 29622 applyPeer(node, reset) { 29623 if (reset) { 29624 getUINativeModule().component3D.resetShaderInputBuffer(node); 29625 } else { 29626 getUINativeModule().component3D.setShaderInputBuffer(node, this.value); 29627 } 29628 } 29629 checkObjectDiff() { 29630 return !isBaseOrResourceEqual(this.stageValue, this.value); 29631 } 29632} 29633ShaderInputBufferModifier.identity = Symbol('shaderInputBuffer'); 29634 29635/// <reference path='./import.ts' /> 29636class ArkComponent3DComponent extends ArkComponent { 29637 constructor(nativePtr, classType) { 29638 super(nativePtr, classType); 29639 } 29640 environment(uri) { 29641 throw new Error('Method not implemented.'); 29642 }; 29643 customRender(uri, selfRenderUpdate) { 29644 throw new Error('Method not implemented.'); 29645 }; 29646 shader(uri) { 29647 throw new Error('Method not implemented.'); 29648 }; 29649 shaderImageTexture(uri) { 29650 throw new Error('Method not implemented.'); 29651 }; 29652 shaderInputBuffer(buffer) { 29653 modifierWithKey(this._modifiersWithKeys, ShaderInputBufferModifier.identity, ShaderInputBufferModifier, buffer); 29654 return this; 29655 }; 29656 renderWidth(value) { 29657 throw new Error('Method not implemented.'); 29658 }; 29659 renderHeight(value) { 29660 throw new Error('Method not implemented.'); 29661 }; 29662} 29663// @ts-ignore 29664if (globalThis.Component3D !== undefined) { 29665 globalThis.Component3D.attributeModifier = function (modifier) { 29666 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29667 return new ArkComponent3DComponent(nativePtr); 29668 }, (nativePtr, classType, modifierJS) => { 29669 return new modifierJS.Component3DModifier(nativePtr, classType); 29670 }); 29671 }; 29672} 29673 29674class ContainerSpanTextBackgroundStyleModifier extends ModifierWithKey { 29675 constructor(value) { 29676 super(value); 29677 } 29678 applyPeer(node, reset) { 29679 if (reset) { 29680 getUINativeModule().containerSpan.resetTextBackgroundStyle(node); 29681 } else { 29682 let textBackgroundStyle = new ArkTextBackGroundStyle(); 29683 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value)) { 29684 getUINativeModule().containerSpan.resetTextBackgroundStyle(node); 29685 } else { 29686 getUINativeModule().containerSpan.setTextBackgroundStyle(node, 29687 textBackgroundStyle.color, 29688 textBackgroundStyle.radius.topLeft, 29689 textBackgroundStyle.radius.topRight, 29690 textBackgroundStyle.radius.bottomLeft, 29691 textBackgroundStyle.radius.bottomRight); 29692 } 29693 } 29694 } 29695 checkObjectDiff() { 29696 let textBackgroundStyle = new ArkTextBackGroundStyle(); 29697 let stageTextBackGroundStyle = new ArkTextBackGroundStyle(); 29698 if (!textBackgroundStyle.convertTextBackGroundStyleOptions(this.value) || !stageTextBackGroundStyle.convertTextBackGroundStyleOptions(this.stageValue)) { 29699 return false; 29700 } else { 29701 return textBackgroundStyle.checkObjectDiff(stageTextBackGroundStyle); 29702 } 29703 } 29704} 29705ContainerSpanTextBackgroundStyleModifier.identity = Symbol('containerSpanTextBackgroundStyle'); 29706/// <reference path='./import.ts' /> 29707class ArkContainerSpanComponent extends ArkComponent { 29708 constructor(nativePtr, classType) { 29709 super(nativePtr, classType); 29710 } 29711 textBackgroundStyle(value) { 29712 modifierWithKey(this._modifiersWithKeys, ContainerSpanTextBackgroundStyleModifier.identity, ContainerSpanTextBackgroundStyleModifier, value); 29713 return this; 29714 } 29715} 29716// @ts-ignore 29717if (globalThis.ContainerSpan !== undefined) { 29718 globalThis.ContainerSpan.attributeModifier = function (modifier) { 29719 attributeModifierFunc.call(this, modifier, (nativePtr) => { 29720 return new ArkContainerSpanComponent(nativePtr); 29721 }, (nativePtr, classType, modifierJS) => { 29722 return new modifierJS.ContainerSpanModifier(nativePtr, classType); 29723 }); 29724 }; 29725} 29726 29727function getArkUINodeFromNapi() { 29728 if (globalThis.__XNode__ === undefined) { 29729 globalThis.__XNode__ = globalThis.requireNapi('arkui.node'); 29730 } 29731 return globalThis.__XNode__; 29732} 29733 29734globalThis.__getArkUINode__ = getArkUINodeFromNapi; 29735