• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 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' />
17
18class ArkBorderStyle {
19  type: boolean | undefined;
20  style: BorderStyle | undefined;
21  top: BorderStyle | undefined;
22  right: BorderStyle | undefined;
23  bottom: BorderStyle | undefined;
24  left: BorderStyle | undefined;
25
26  constructor() {
27    this.type = undefined;
28    this.style = undefined;
29    this.top = undefined;
30    this.right = undefined;
31    this.bottom = undefined;
32    this.left = undefined;
33  }
34  isEqual(another: ArkBorderStyle): boolean {
35    return (
36      this.type === another.type &&
37      this.style === another.style &&
38      this.top === another.top &&
39      this.right === another.right &&
40      this.bottom === another.bottom &&
41      this.left === another.left
42    );
43  }
44  parseBorderStyle(value: BorderStyle | EdgeStyles): boolean {
45    if (typeof value === 'number') {
46      this.style = value;
47      this.type = true;
48      return true;
49    } else if (typeof value === 'object') {
50      return this.parseEdgeStyles(value as EdgeStyles);
51    }
52    return false;
53  }
54  parseEdgeStyles(options: EdgeStyles): boolean {
55    this.top = options.top;
56    this.right = options.right;
57    this.bottom = options.bottom;
58    this.left = options.left;
59    this.type = true;
60    return true;
61  }
62}
63
64class ArkOnVisibleAreaChange {
65  ratios: Array<number>;
66  event: (isVisible: boolean, currentRatio: number) => void;
67
68  constructor(ratios: Array<number> | undefined, event: (isVisible: boolean, currentRatio: number) => void | undefined) {
69    this.ratios = ratios;
70    this.event = event;
71  }
72
73  isEqual(another: ArkOnVisibleAreaChange): boolean {
74    return this.ratios === another.ratios && this.event === another.event;
75  }
76}
77
78class ArkBorderColor {
79  startColor: LocalizedEdgeColors;
80  endColor: LocalizedEdgeColors;
81  leftColor: EdgeColors | ResourceColor;
82  rightColor: EdgeColors | ResourceColor;
83  topColor: EdgeColors | ResourceColor | LocalizedEdgeColors;
84  bottomColor: EdgeColors | ResourceColor | LocalizedEdgeColors;
85
86  constructor() {
87    this.startColor = undefined;
88    this.endColor = undefined;
89    this.leftColor = undefined;
90    this.rightColor = undefined;
91    this.topColor = undefined;
92    this.bottomColor = undefined;
93  }
94
95  isEqual(another: ArkBorderColor): boolean {
96    return (
97      this.startColor === another.startColor &&
98      this.endColor === another.endColor &&
99      this.leftColor === another.leftColor &&
100      this.rightColor === another.rightColor &&
101      this.topColor === another.topColor &&
102      this.bottomColor === another.bottomColor
103    );
104  }
105}
106
107class ArkBorderWidth {
108  left: EdgeWidths | Length;
109  right: EdgeWidths | Length;
110  top: EdgeWidths | Length | LocalizedEdgeWidths;
111  bottom: EdgeWidths | Length | LocalizedEdgeWidths;
112  start: LocalizedEdgeWidths;
113  end: LocalizedEdgeWidths;
114
115  constructor() {
116    this.left = undefined;
117    this.right = undefined;
118    this.top = undefined;
119    this.bottom = undefined;
120    this.start = undefined;
121    this.end = undefined;
122  }
123
124  isEqual(another: ArkBorderWidth): boolean {
125    return (
126      this.left === another.left &&
127      this.right === another.right &&
128      this.top === another.top &&
129      this.bottom === another.bottom &&
130      this.start === another.start &&
131      this.end === another.end
132    );
133  }
134}
135
136class ArkBorderRadius {
137  topLeft: BorderRadiuses | Length;
138  topRight: BorderRadiuses | Length;
139  bottomLeft: BorderRadiuses | Length;
140  bottomRight: BorderRadiuses | Length;
141  topStart: LocalizedBorderRadius;
142  topEnd: LocalizedBorderRadius;
143  bottomStart: LocalizedBorderRadius;
144  bottomEnd: LocalizedBorderRadius;
145
146  constructor() {
147    this.topLeft = undefined;
148    this.topRight = undefined;
149    this.bottomLeft = undefined;
150    this.bottomRight = undefined;
151    this.topStart = undefined;
152    this.topEnd = undefined;
153    this.bottomStart = undefined;
154    this.bottomEnd = undefined;
155  }
156
157  isEqual(another: ArkBorderRadius): boolean {
158    if (this == undefined && another == undefined) {
159      return true;
160    }
161    if ((this == undefined && another != undefined) || (this != undefined && another == undefined)) {
162      return false
163    }
164    return (
165      (this.topLeft === another.topLeft &&
166        this.topRight === another.topRight &&
167        this.bottomLeft === another.bottomLeft &&
168        this.bottomRight === another.bottomRight) ||
169      (this.topStart === another.topStart &&
170        this.topEnd === another.topEnd &&
171        this.bottomStart === another.bottomStart &&
172        this.bottomEnd === another.bottomEnd)
173    );
174  }
175}
176
177class ArkLabelFont {
178  size: number | string | undefined | Resource;
179  weight: FontWeight | number | string | undefined;
180  family: string | undefined | Resource;
181  style: FontStyle | number | undefined;
182  constructor() {
183    this.size = undefined;
184    this.weight = undefined;
185    this.family = undefined;
186    this.style = undefined;
187  }
188
189  isEqual(another: ArkLabelFont): boolean {
190    return (
191      this.size === another.size &&
192      this.weight === another.weight &&
193      this.family === another.family &&
194      this.style === another.style
195    );
196  }
197}
198
199function deepCompareArrays(arr1: Array<any>, arr2: Array<any>): boolean {
200  return (
201    Array.isArray(arr1) &&
202    Array.isArray(arr2) &&
203    arr1.length === arr2.length &&
204    arr1.every((value, index) => {
205      if (Array.isArray(value) && Array.isArray(arr2[index])) {
206        return deepCompareArrays(value, arr2[index]);
207      } else {
208        return value === arr2[index];
209      }
210    })
211  );
212}
213
214class ArkLinearGradient {
215  angle: number | string | undefined;
216  direction: number | undefined;
217  colors: Array<any>;
218  repeating: boolean | undefined;
219
220  constructor(angle: number | string | undefined,
221    direction: number | undefined,
222    colors: Array<any>,
223    repeating: boolean | undefined) {
224    this.angle = angle;
225    this.direction = direction;
226    this.colors = colors;
227    this.repeating = repeating;
228  }
229
230  isEqual(another: ArkLinearGradient): boolean {
231    return (
232      this.angle === another.angle &&
233      this.direction === another.direction &&
234      deepCompareArrays(this.colors, another.colors) &&
235      this.repeating === another.repeating
236    );
237  }
238}
239
240class ArkSweepGradient {
241  center: Array<any>;
242  start: number | string | undefined;
243  end: number | string | undefined;
244  rotation: number | string | undefined;
245  colors: Array<any>;
246  metricsColors: Array<any>;
247  repeating: boolean | undefined;
248
249  constructor(center: Array<any>,
250    start: number | string | undefined,
251    end: number | string | undefined,
252    rotation: number | string | undefined,
253    colors: Array<any>,
254    metricsColors: Array<any>,
255    repeating: boolean | undefined) {
256    this.center = center;
257    this.start = start;
258    this.end = end;
259    this.rotation = rotation;
260    this.colors = colors;
261    this.metricsColors = metricsColors;
262    this.repeating = repeating;
263  }
264
265  isEqual(another: ArkSweepGradient): boolean {
266    return (
267      deepCompareArrays(this.center, another.center) &&
268      this.start === another.start &&
269      this.end === another.end &&
270      this.rotation === another.rotation &&
271      deepCompareArrays(this.colors, another.colors) &&
272      deepCompareArrays(this.metricsColors, another.metricsColors) &&
273      this.repeating === another.repeating
274    );
275  }
276}
277
278class ArkForegroundBlurStyle {
279  blurStyle: number | undefined;
280  colorMode: number | undefined;
281  adaptiveColor: number | undefined;
282  scale: number | undefined;
283  blurOptions: BlurOptions | undefined;
284
285  constructor() {
286    this.blurStyle = undefined;
287    this.colorMode = undefined;
288    this.adaptiveColor = undefined;
289    this.scale = undefined;
290    this.blurOptions = undefined;
291  }
292
293  isEqual(another: ArkForegroundBlurStyle): boolean {
294    return (
295      this.blurStyle === another.blurStyle &&
296      this.colorMode === another.colorMode &&
297      this.adaptiveColor === another.adaptiveColor &&
298      this.scale === another.scale &&
299      this.blurOptions === another.blurOptions
300    );
301  }
302}
303
304class ArkLinearGradientBlur {
305  blurRadius: number | undefined;
306  fractionStops: FractionStop[] | undefined;
307  direction: number | undefined;
308
309  constructor() {
310    this.blurRadius = undefined;
311    this.fractionStops = undefined;
312    this.direction = undefined;
313  }
314
315  isEqual(another: ArkLinearGradientBlur): boolean {
316    return (
317      this.blurRadius === another.blurRadius &&
318      deepCompareArrays(this.fractionStops, another.fractionStops) &&
319      this.direction === another.direction
320    );
321  }
322}
323
324class ArkOverlay {
325  value: string | CustomBuilder | undefined;
326  align: number | undefined;
327  offsetX: number | undefined;
328  offsetY: number | undefined;
329  hasOptions: boolean | undefined;
330  hasOffset: boolean | undefined;
331
332  constructor() {
333    this.value = undefined;
334    this.align = undefined;
335    this.offsetX = undefined;
336    this.offsetY = undefined;
337    this.hasOptions = undefined;
338    this.hasOffset = undefined;
339  }
340
341  private splitOption(options?: { align?: Alignment; offset?: { x?: number; y?: number } }): boolean {
342    if (isUndefined(options)) {
343      return true;
344    }
345    this.hasOptions = true;
346    this.align = options.align;
347    if (isUndefined(options.offset)) {
348      return true;
349    }
350    this.hasOffset = true;
351    this.offsetX = options.offset.x;
352    this.offsetY = options.offset.y;
353    return true;
354  }
355
356  splitOverlayValue(value: string | CustomBuilder,
357    options?: { align?: Alignment; offset?: { x?: number; y?: number } }): boolean {
358    if (typeof value === 'string') {
359      this.value = value;
360      return this.splitOption(options);
361    }
362    return false;
363  }
364
365  private isEqual(another: ArkOverlay): boolean {
366    return ((this.value === another.value) && (this.align === another.align) &&
367      (this.offsetX === another.offsetX) && (this.offsetY === another.offsetY) &&
368      (this.hasOptions === another.hasOptions) && (this.hasOffset === another.hasOffset));
369  }
370
371  checkObjectDiff(another: ArkOverlay): boolean {
372    return !this.isEqual(another);
373  }
374}
375
376class ArkSharedTransition {
377  id: string | undefined;
378  options: sharedTransitionOptions | undefined;
379  constructor() {
380    this.id = undefined;
381    this.options = undefined;
382  }
383  isEqual(another: ArkSharedTransition): boolean {
384    return (this.id === another.id) && (this.options === another.options);
385  }
386}
387
388class ArkBindTipsOptions {
389  message: ResourceStr | StyledString | undefined;
390  options: TipsOptions | undefined;
391  constructor() {
392    this.message = undefined;
393    this.options = undefined;
394  }
395  isEqual(another: ArkBindTipsOptions): boolean {
396    return (this.options === another.options) && (this.options === another.options);
397  }
398}
399
400class ArkChainMode {
401  direction: Axis | undefined;
402  style: ChainStyle | undefined;
403  constructor() {
404    this.direction = undefined;
405    this.style = undefined;
406  }
407  isEqual(another: ArkChainMode): boolean {
408    return (this.direction === another.direction) && (this.style === another.style);
409  }
410}
411
412class ArkEdgeEffect {
413  value: EdgeEffect;
414  options?: EdgeEffectOptions | undefined;
415  constructor() {
416    this.value = undefined;
417    this.options = undefined;
418  }
419  isEqual(another: ArkEdgeEffect): boolean {
420    return (this.value === another.value) &&
421      (this.options === another.options);
422  }
423}
424
425class ArkFadingEdge {
426  value: boolean;
427  options?: FadingEdgeOptions | undefined;
428  constructor() {
429    this.value = undefined;
430    this.options = undefined;
431  }
432  isEqual(another: ArkFadingEdge): boolean {
433    return (this.value === another.value) &&
434      (this.options === another.options);
435  }
436}
437
438class ArkBlurOptions {
439  value: number;
440  options?: BlurOptions | undefined;
441  constructor() {
442    this.value = undefined;
443    this.options = undefined;
444  }
445}
446
447class InvertOptions {
448  high: number;
449  low: number;
450  threshold: number;
451  thresholdRange: number;
452  constructor() {
453    this.high = undefined;
454    this.low = undefined;
455    this.threshold = undefined;
456    this.thresholdRange = undefined;
457  }
458}
459
460class ArkMenuAlignType {
461  alignType: number | MenuAlignType;
462  dx: Length;
463  dy: Length;
464
465  constructor(alignType: MenuAlignType, offset?: Offset) {
466    this.alignType = alignType;
467    if (!isUndefined(offset) && isObject(offset)) {
468      this.dx = offset.dx;
469      this.dy = offset.dy;
470    }
471  }
472
473  isEqual(another: ArkMenuAlignType): boolean {
474    return this.alignType === another.alignType && this.dx === another.dx && this.dy === another.dy;
475  }
476}
477
478class ArkPrefixOrSuffix {
479  value: CustomBuilder;
480  options: SliderCustomContentOptions;
481
482  constructor(value: CustomBuilder, options?:SliderCustomContentOptions) {
483    this.value = value;
484    this.options = options;
485  }
486
487  isEqual(another: ArkPrefixOrSuffix): boolean {
488    return this.value === another.value && this.options === another.options;
489  }
490}
491
492class ArkSliderStepOptions {
493  showSteps: boolean;
494  stepOptions?: SliderShowStepOptions;
495
496  constructor(value: boolean, options?: SliderShowStepOptions) {
497    this.showSteps = value;
498    this.stepOptions = options;
499  }
500
501  isEqual(another: ArkSliderStepOptions): boolean {
502    let isShowStepsEqual = this.showSteps === another.showSteps;
503    let isStepOptionsEqual = true;
504    if ((this.stepOptions === null) || (this.stepOptions === undefined)) {
505      isStepOptionsEqual = (another.stepOptions === null) || (another.stepOptions === undefined);
506    } else if ((another.stepOptions === null) || (another.stepOptions === undefined)) {
507      isStepOptionsEqual = false;
508    } else if (this.stepOptions.stepsAccessibility.size !== another.stepOptions.stepsAccessibility.size) {
509      isStepOptionsEqual = false;
510    } else {
511      for (const [key, val] of this.stepOptions.stepsAccessibility) {
512        if (!another.stepOptions.stepsAccessibility.has(key)) {
513          isStepOptionsEqual = false;
514        } else if (!isBaseOrResourceEqual(another.stepOptions.stepsAccessibility.get(key), val)) {
515          isStepOptionsEqual = false;
516        }
517      }
518    }
519    return isShowStepsEqual && isStepOptionsEqual;
520  }
521}
522
523class ArkSliderTips {
524  showTip: boolean;
525  tipText: string | ResourceStr;
526
527  constructor(value: boolean, content?: string | ResourceStr) {
528    this.showTip = value;
529    this.tipText = content;
530  }
531
532  isEqual(another: ArkSliderTips): boolean {
533    return this.showTip === another.showTip && this.tipText === another.tipText;
534  }
535}
536
537class ArkStarStyle {
538  backgroundUri: string | undefined;
539  foregroundUri: string | undefined;
540  secondaryUri: string | undefined;
541
542  constructor() {
543    this.backgroundUri = undefined;
544    this.foregroundUri = undefined;
545    this.secondaryUri = undefined;
546  }
547
548  isEqual(another: ArkStarStyle): boolean {
549    return (
550      this.backgroundUri === another.backgroundUri &&
551      this.foregroundUri === another.foregroundUri &&
552      this.secondaryUri === another.secondaryUri
553    );
554  }
555}
556
557class ArkRegisterNativeEmbedRule {
558  tag: string | undefined;
559  type: string | undefined;
560
561  constructor() {
562    this.tag = undefined;
563    this.type = undefined;
564  }
565
566  isEqual(another: ArkRegisterNativeEmbedRule): boolean {
567    return (this.tag === another.tag && this.type === another.type);
568  }
569}
570
571class ArkBackground {
572  content: ResourceColor | undefined;
573  align?: Alignment | undefined;
574  ignoresLayoutSafeAreaEdges?: Array<LayoutSafeAreaEdge> | undefined;
575
576  constructor() {
577    this.content = undefined;
578    this.align = undefined;
579    this.ignoresLayoutSafeAreaEdges = undefined;
580  }
581
582  isEqual(another: ArkBackground): boolean {
583    return (
584      this.content === another.content &&
585      this.align === another.align &&
586      deepCompareArrays(this.ignoresLayoutSafeAreaEdges, another.ignoresLayoutSafeAreaEdges)
587    );
588  }
589}
590
591class ArkBackgroundBlurStyle {
592  blurStyle: number | undefined;
593  colorMode: number | undefined;
594  adaptiveColor: number | undefined;
595  scale: number | undefined;
596  blurOptions: BlurOptions | undefined;
597  policy?: number;
598  inactiveColor?: ResourceColor;
599  type?: number;
600
601  constructor() {
602    this.blurStyle = undefined;
603    this.colorMode = undefined;
604    this.adaptiveColor = undefined;
605    this.scale = undefined;
606    this.blurOptions = undefined;
607    this.policy = undefined;
608    this.inactiveColor = undefined;
609    this.type = undefined;
610  }
611
612  isEqual(another: ArkBackgroundBlurStyle): boolean {
613    return (
614      this.blurStyle === another.blurStyle &&
615      this.colorMode === another.colorMode &&
616      this.adaptiveColor === another.adaptiveColor &&
617      this.scale === another.scale &&
618      this.blurOptions === another.blurOptions &&
619      this.policy === another.policy &&
620      this.inactiveColor === another.inactiveColor &&
621      this.type === another.type
622    );
623  }
624}
625
626class ArkBorderDashGap {
627  left: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
628  right: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
629  top: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
630  bottom: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
631  start: LocalizedEdgeWidths;
632  end: LocalizedEdgeWidths;
633
634  constructor() {
635    this.left = undefined;
636    this.right = undefined;
637    this.top = undefined;
638    this.bottom = undefined;
639    this.start = undefined;
640    this.end = undefined;
641  }
642
643  isEqual(another: ArkBorderDashGap): boolean {
644    return (
645      this.left === another.left &&
646      this.right === another.right &&
647      this.top === another.top &&
648      this.bottom === another.bottom &&
649      this.start === another.start &&
650      this.end === another.end
651    );
652  }
653}
654
655class ArkBorderDashWidth {
656  left: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
657  right: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
658  top: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
659  bottom: EdgeWidths | LengthMetrics | LocalizedEdgeWidths;
660  start: LocalizedEdgeWidths;
661  end: LocalizedEdgeWidths;
662
663  constructor() {
664    this.left = undefined;
665    this.right = undefined;
666    this.top = undefined;
667    this.bottom = undefined;
668    this.start = undefined;
669    this.end = undefined;
670  }
671
672  isEqual(another: ArkBorderDashWidth): boolean {
673    return (
674      this.left === another.left &&
675      this.right === another.right &&
676      this.top === another.top &&
677      this.bottom === another.bottom &&
678      this.start === another.start &&
679      this.end === another.end
680    );
681  }
682}
683
684class ArkBorder {
685  arkWidth: ArkBorderWidth;
686  arkColor: ArkBorderColor;
687  arkRadius: ArkBorderRadius;
688  arkStyle: ArkBorderStyle;
689  arkDashGap: ArkBorderDashGap;
690  arkDashWidth: ArkBorderDashWidth;
691
692  constructor() {
693    this.arkWidth = new ArkBorderWidth();
694    this.arkColor = new ArkBorderColor();
695    this.arkRadius = new ArkBorderRadius();
696    this.arkStyle = new ArkBorderStyle();
697    this.arkDashGap = new ArkBorderDashGap();
698    this.arkDashWidth = new ArkBorderDashWidth();
699  }
700  isEqual(another: ArkBorder): boolean {
701    return (
702      this.arkWidth.isEqual(another.arkWidth) &&
703      this.arkColor.isEqual(another.arkColor) &&
704      this.arkRadius.isEqual(another.arkRadius) &&
705      this.arkStyle.isEqual(another.arkStyle) &&
706      this.arkDashGap.isEqual(another.arkDashGap) &&
707      this.arkDashWidth.isEqual(another.arkDashWidth)
708    );
709  }
710
711  checkObjectDiff(another: ArkBorder): boolean {
712    return !this.isEqual(another);
713  }
714}
715
716class ArkBackgroundImageSize {
717  imageSize: ImageSize | undefined | SizeOptions;
718  width: number | string | undefined | Resource;
719  height: number | string | undefined | Resource;
720  constructor() {
721    this.imageSize = undefined;
722    this.width = undefined;
723    this.height = undefined;
724  }
725  isEqual(another: ArkBackgroundImageSize): boolean {
726    return this.imageSize === another.imageSize && this.width === another.width && this.height === another.height;
727  }
728}
729
730class ArkBackgroundImage {
731  src: string | undefined | Resource | PixelMap;
732  repeat: number | undefined | object;
733  constructor() {
734    this.src = undefined;
735    this.repeat = undefined;
736  }
737  isEqual(another: ArkBackgroundImage): boolean {
738    return this.src === another.src && this.repeat === another.repeat;
739  }
740}
741
742class ArkGridColColumnOption implements Equable {
743  xs?: number;
744  sm?: number;
745  md?: number;
746  lg?: number;
747  xl?: number;
748  xxl?: number;
749  constructor() {
750    this.xs = undefined;
751    this.sm = undefined;
752    this.md = undefined;
753    this.lg = undefined;
754    this.xl = undefined;
755    this.xxl = undefined;
756  }
757  isEqual(another: ArkGridColColumnOption): boolean {
758    return (this.xs === another.xs &&
759      this.sm === another.sm &&
760      this.md === another.md &&
761      this.lg === another.lg &&
762      this.xl === another.xl &&
763      this.xxl === another.xxl);
764  }
765}
766
767class ArkPadding {
768  top: Length | undefined;
769  right: Length | undefined;
770  bottom: Length | undefined;
771  left: Length | undefined;
772  constructor() {
773    this.top = undefined;
774    this.right = undefined;
775    this.bottom = undefined;
776    this.left = undefined;
777  }
778  isEqual(another: ArkPadding) {
779    return (
780      this.top === another.top &&
781      this.right === another.right &&
782      this.bottom === another.bottom &&
783      this.left === another.left
784    );
785  }
786}
787
788class ArkBarMode {
789  barMode: number;
790  options?: ScrollableBarModeOptions | undefined;
791
792  isEqual(another: ArkBarMode): boolean {
793    return (this.barMode === another.barMode) && (this.options === another.options);
794  }
795}
796
797class ArkDivider {
798  divider: DividerStyle;
799
800  isEqual(another: ArkDivider): boolean {
801    return (this.divider === another.divider);
802  }
803}
804
805class ArkBarGridAlign {
806  barGridAlign: BarGridColumnOptions;
807
808  isEqual(another: ArkBarGridAlign): boolean {
809    return (this.barGridAlign === another.barGridAlign);
810  }
811}
812
813
814class ArkScrollableBarModeOptions {
815  value: ScrollableBarModeOptions;
816
817  isEqual(another: ArkScrollableBarModeOptions): boolean {
818    return (this.value === another.value);
819  }
820}
821
822class ArkTabsCachedMaxCount {
823  count: number;
824  mode: TabsCacheMode;
825
826  isEqual(another: ArkTabsCachedMaxCount): boolean {
827    return (this.count === another.count && this.mode === another.mode);
828  }
829}
830
831class ArkAlignRules {
832  left: string | undefined;
833  middle: string | undefined;
834  right: string | undefined;
835  top: string | undefined;
836  center: string | undefined;
837  bottom: string | undefined;
838  constructor() {
839    this.left = undefined;
840    this.middle = undefined;
841    this.right = undefined;
842    this.top = undefined;
843    this.center = undefined;
844    this.bottom = undefined;
845  }
846  isEqual(another: ArkAlignRules) {
847    return (
848      this.left === another.left &&
849      this.middle === another.middle &&
850      this.right === another.right &&
851      this.top === another.top &&
852      this.center === another.center &&
853      this.bottom === another.bottom
854    );
855  }
856}
857
858class ArkSafeAreaExpandOpts {
859  type: string | number | undefined = undefined;
860  edges: string | number | undefined = undefined;
861  isEqual(another: ArkSafeAreaExpandOpts): boolean {
862    return (this.type === another.type) && (this.edges === another.edges);
863  }
864}
865
866class ArkEnableStatusBar {
867  enable: boolean | undefined = undefined;
868  animated?: boolean | undefined = undefined;
869
870  constructor() {
871    this.enable = undefined;
872    this.animated = undefined;
873  }
874
875  isEqual(another: ArkEnableStatusBar): boolean {
876    return (this.enable === another.enable) && (this.animated === another.animated);
877  }
878}
879
880class ArkButtonStyle {
881  left?: number;
882  top?: number;
883  width?: number;
884  height?: number;
885  icons?: {
886    shown?: string;
887    hidden?: string;
888    switching?: string;
889  };
890  constructor() {
891    this.left = 16;
892    this.top = 48;
893    this.width = 24;
894    this.height = 24;
895    this.icons = {
896      shown: undefined,
897      hidden: undefined,
898      switching: undefined
899    };
900  }
901  isEqual(another: ArkButtonStyle): boolean {
902    return (
903      this.left === another.left &&
904      this.top === another.top &&
905      this.width === another.width &&
906      this.height === another.height &&
907      this.icons === another.icons
908    );
909  }
910}
911
912class ArkShadowInfoToArray {
913  radius: (number | string)[];
914  type: ShadowType[];
915  color: (Color | string | Resource | ColoringStrategy)[];
916  offsetX: (number | string)[];
917  offsetY: (number | string)[];
918  fill: boolean[];
919  constructor() {
920    this.radius = [];
921    this.type = [];
922    this.color = [];
923    this.offsetX = [];
924    this.offsetX = [];
925    this.offsetY = [];
926    this.fill = [];
927  }
928  isEqual(another: ArkShadowInfoToArray): boolean {
929    return (this.radius === another.radius) &&
930      (this.color === another.color) &&
931      (this.offsetX === another.offsetX) &&
932      (this.offsetY === another.offsetY) &&
933      (this.fill === another.fill);
934  }
935
936  convertShadowOptions(value: ShadowOptions | Array<ShadowOptions>): boolean {
937    if (Object.getPrototypeOf(value).constructor === Object) {
938      if ((<ShadowOptions>value).radius === null || (<ShadowOptions>value).radius === undefined) {
939        return false;
940      } else {
941        this.radius.push(<number | string>(<ShadowOptions>value).radius);
942        this.type.push((<ShadowOptions>value).type);
943        this.color.push((<ShadowOptions>value).color);
944        this.offsetX.push(((<ShadowOptions>value).offsetX === undefined ||
945          (<ShadowOptions>value).offsetX === null) ? 0 : <number | string>(<ShadowOptions>value).offsetX);
946        this.offsetY.push(((<ShadowOptions>value).offsetY === undefined ||
947          (<ShadowOptions>value).offsetY === null) ? 0 : <number | string>(<ShadowOptions>value).offsetY);
948        this.fill.push(((<ShadowOptions>value).fill === undefined ||
949          (<ShadowOptions>value).fill === null) ? false : (<ShadowOptions>value).fill);
950        return true;
951      }
952    } else if (Object.getPrototypeOf(value).constructor === Array) {
953      let isFlag: boolean = true;
954      for (let item of (value as Array<ShadowOptions>)) {
955        if (item.radius === undefined || item.radius === null) {
956          isFlag = false;
957          break;
958        }
959      }
960      if (isFlag) {
961        for (let objValue of (value as Array<ShadowOptions>)) {
962          this.radius.push(<number | string>objValue.radius);
963          this.type.push(objValue.type);
964          this.color.push(objValue.color);
965          this.offsetX.push((objValue.offsetX === undefined || objValue.offsetX === null) ? 0 : <number | string>objValue.offsetX);
966          this.offsetY.push((objValue.offsetY === undefined || objValue.offsetY === null) ? 0 : <number | string>objValue.offsetY);
967          this.fill.push((objValue.fill === undefined || objValue.fill === null) ? false : objValue.fill);
968        }
969        return true;
970      } else {
971        return false;
972      }
973    }
974  }
975
976  checkDiff(value: ShadowOptions, stageValue: ShadowOptions): boolean {
977    if (!value || !stageValue || !value.radius || !stageValue.radius) {
978      return true;
979    }
980    if (!(isNumber(stageValue.radius) && isNumber(value.radius) &&
981      stageValue.radius === value.radius)) {
982      return true;
983    }
984    if (!(isNumber(stageValue.type) && isNumber(value.type) &&
985      stageValue.type === value.type)) {
986      return true;
987    }
988    if (!(!isResource(stageValue.color) && !isResource(value.color) &&
989      stageValue.color === value.color)) {
990      return true;
991    }
992    if (!(isNumber(stageValue.offsetX) && isNumber(value.offsetX) &&
993      stageValue.offsetX === value.offsetX)) {
994      return true;
995    }
996    if (!(isNumber(stageValue.offsetY) && isNumber(value.offsetY) &&
997      stageValue.offsetY === value.offsetY)) {
998      return true;
999    }
1000    if (!(isBoolean(stageValue.fill) && isBoolean(value.fill) &&
1001      stageValue.fill === value.fill)) {
1002      return true;
1003    }
1004    return false;
1005  }
1006}
1007
1008class ArkSearchButton {
1009  value: string | undefined;
1010  fontSize: Length | undefined;
1011  fontColor: ResourceColor | undefined;
1012  autoDisable: boolean | undefined;
1013  constructor() {
1014    this.value = undefined;
1015    this.fontSize = undefined;
1016    this.fontColor = undefined;
1017    this.autoDisable = undefined;
1018  }
1019  isEqual(another: ArkSearchButton): boolean {
1020    return (this.value === another.value) &&
1021      (this.fontSize === another.fontSize) &&
1022      (this.fontColor === another.fontColor) &&
1023      (this.autoDisable === another.autoDisable);
1024  }
1025}
1026
1027class ArkSearchInputFilter {
1028  value: ResourceStr | undefined;
1029  error?: (value: string) => void;
1030  constructor() {
1031    this.value = undefined;
1032    this.error = undefined;
1033  }
1034  isEqual(another: ArkSearchInputFilter): boolean {
1035    return (this.value === another.value);
1036  }
1037}
1038class ArkImageFrameInfoToArray {
1039  arrSrc: Array<string> | undefined;
1040  arrWidth: Array<number | string> | undefined;
1041  arrHeight: Array<number | string> | undefined;
1042  arrTop: Array<number | string> | undefined;
1043  arrLeft: Array<number | string> | undefined;
1044  arrDuration: Array<number> | undefined;
1045  constructor() {
1046    this.arrSrc = [];
1047    this.arrWidth = [];
1048    this.arrHeight = [];
1049    this.arrTop = [];
1050    this.arrLeft = [];
1051    this.arrDuration = [];
1052  }
1053  isEqual(another: ArkImageFrameInfoToArray): boolean {
1054    return (this.arrSrc.toString() === another.arrSrc.toString()) &&
1055      (this.arrWidth.toString() === another.arrWidth.toString()) &&
1056      (this.arrHeight.toString() === another.arrHeight.toString()) &&
1057      (this.arrTop.toString() === another.arrTop.toString()) &&
1058      (this.arrLeft.toString() === another.arrLeft.toString()) &&
1059      (this.arrDuration.toString() === another.arrDuration.toString());
1060  }
1061}
1062
1063class ArkEdgeAlign {
1064  alignType: number;
1065  offset?: Offset | undefined;
1066
1067  constructor() {
1068    this.alignType = undefined;
1069    this.offset = undefined;
1070  }
1071
1072  isEqual(another: ArkEdgeAlign): boolean {
1073    return (this.alignType === another.alignType && this.offset === another.offset);
1074  }
1075}
1076
1077class ArkKeyBoardShortCut {
1078  value: string | number;
1079  keys: Array<ModifierKey>;
1080  action: () => void | undefined;
1081
1082  constructor() {
1083    this.value = undefined;
1084    this.keys = undefined;
1085    this.action = undefined;
1086  }
1087
1088  isEqual(another: ArkKeyBoardShortCut): boolean {
1089    return (this.value === another.value) && (this.keys === another.keys) &&
1090      (this.action === another.action);
1091  }
1092}
1093
1094class ArkCustomProperty {
1095  key: string;
1096  value: object;
1097
1098  constructor() {
1099    this.key = undefined;
1100    this.value = undefined;
1101  }
1102}
1103
1104class ArkUseEffect {
1105  useEffect: boolean;
1106  effectType: EffectType;
1107  constructor() {
1108    this.useEffect = undefined;
1109    this.effectType = undefined;
1110  }
1111  isEqual(another: ArkUseEffect): boolean {
1112    return (this.useEffect === another.useEffect) && (this.effectType === another.effectType);
1113  }
1114}
1115
1116class ArkBlendMode {
1117  blendMode: number | Blender;
1118  blendApplyType: number;
1119  constructor() {
1120    this.blendMode = undefined;
1121    this.blendApplyType = undefined;
1122  }
1123  isEqual(another: ArkBlendMode): boolean {
1124    return (this.blendMode === another.blendMode) && (this.blendApplyType === another.blendApplyType);
1125  }
1126}
1127
1128class ArkAlignStyle {
1129  indexerAlign: number;
1130  offset?: number | string | undefined | Resource;
1131
1132  constructor() {
1133    this.indexerAlign = undefined;
1134    this.offset = undefined;
1135  }
1136
1137  isEqual(another: ArkAlignStyle): boolean {
1138    return (this.indexerAlign === another.indexerAlign && this.offset === another.offset);
1139  }
1140}
1141
1142class ArkNestedScrollOptions {
1143  scrollForward: NestedScrollMode | undefined;
1144  scrollBackward: NestedScrollMode | undefined;
1145  constructor() {
1146    this.scrollForward = undefined;
1147    this.scrollBackward = undefined;
1148  }
1149  isEqual(another: ArkNestedScrollOptions): boolean {
1150    return ((this.scrollForward === another.scrollForward) && (this.scrollBackward === another.scrollBackward));
1151  }
1152}
1153
1154class ArkNestedScrollOptionsExt {
1155  scrollUp: NestedScrollMode | undefined;
1156  scrollDown: NestedScrollMode | undefined;
1157  scrollLeft: NestedScrollMode | undefined;
1158  scrollRight: NestedScrollMode | undefined;
1159  constructor() {
1160      this.scrollUp = undefined;
1161      this.scrollDown = undefined;
1162      this.scrollLeft = undefined;
1163      this.scrollRight = undefined;
1164  }
1165  isEqual(another: ArkNestedScrollOptionsExt): boolean {
1166    return (
1167      (this.scrollUp === another.scrollUp) &&
1168      (this.scrollDown === another.scrollDown) &&
1169      (this.scrollLeft === another.scrollLeft) &&
1170      (this.scrollRight === another.scrollRight)
1171      );
1172  }
1173}
1174
1175class ArkWebScriptItem {
1176  scripts: Array<string> | undefined;
1177  scriptRules: Array<Array<string>> | undefined;
1178
1179  constructor() {
1180    this.scripts = undefined;
1181    this.scriptRules = undefined;
1182  }
1183
1184  isEqual(another: ArkWebScriptItem): boolean {
1185    return (
1186      this.scripts === another.scripts &&
1187      this.scriptRules === another.scriptRules
1188    );
1189  }
1190}
1191
1192class ArkConstraintSizeOptions {
1193  minWidth?: Length | undefined;
1194  maxWidth?: Length | undefined;
1195  minHeight?: Length | undefined;
1196  maxHeight?: Length | undefined;
1197
1198  constructor() {
1199    this.minWidth = undefined;
1200    this.maxWidth = undefined;
1201    this.minHeight = undefined;
1202    this.maxHeight = undefined;
1203  }
1204
1205  isEqual(another: ArkConstraintSizeOptions): boolean {
1206    return (
1207      this.minWidth === another.minWidth &&
1208      this.maxWidth === another.maxWidth &&
1209      this.minHeight === another.minHeight &&
1210      this.maxHeight === another.maxHeight
1211    );
1212  }
1213}
1214
1215class ArkTextFieldShowCounter {
1216  value: boolean;
1217  highlightBorder?: boolean;
1218  thresholdPercentage?: number;
1219  constructor() {
1220    this.value = undefined;
1221    this.highlightBorder = undefined;
1222    this.thresholdPercentage = undefined;
1223  }
1224  isEqual(another: ArkTextFieldShowCounter): boolean {
1225    return (this.value === another.value) &&
1226      (this.highlightBorder === another.highlightBorder) &&
1227      (this.thresholdPercentage === another.thresholdPercentage);
1228  }
1229}
1230
1231class ArkTextFieldMaxLines {
1232  value: number | undefined;
1233  overflowMode?: MaxLinesMode;
1234  constructor() {
1235    this.value = undefined;
1236    this.overflowMode = undefined;
1237  }
1238  isEqual(another: ArkTextFieldMaxLines): boolean {
1239    return (this.value === another.value) &&
1240      (this.overflowMode === another.overflowMode);
1241  }
1242}
1243
1244class ArkTextInputFilter {
1245  value: ResourceStr | undefined;
1246  error?: (value: string) => void;
1247  constructor() {
1248    this.value = undefined;
1249    this.error = undefined;
1250  }
1251  isEqual(another: ArkSearchInputFilter): boolean {
1252    return (this.value === another.value);
1253  }
1254}
1255
1256class ArkDotIndicator extends DotIndicator {
1257  type: string | undefined;
1258  leftValue: Length | undefined;
1259  topValue: Length | undefined;
1260  rightValue: Length | undefined;
1261  bottomValue: Length | LengthMetrics | undefined;
1262  itemWidthValue: Length | undefined;
1263  itemHeightValue: Length | undefined;
1264  selectedItemWidthValue: Length | undefined;
1265  selectedItemHeightValue: Length | undefined;
1266  maskValue: boolean | undefined;
1267  colorValue: ResourceColor | undefined;
1268  selectedColorValue: ResourceColor | undefined;
1269  maxDisplayCountValue: ResourceColor | undefined;
1270  spaceValue: LengthMetrics | undefined;
1271  ignoreSizeValue: boolean | undefined;
1272  setIgnoreSizeValue : boolean;
1273
1274  constructor() {
1275    super();
1276    this.type = undefined;
1277    this.leftValue = undefined;
1278    this.topValue = undefined;
1279    this.rightValue = undefined;
1280    this.bottomValue = undefined;
1281    this.itemWidthValue = undefined;
1282    this.itemHeightValue = undefined;
1283    this.selectedItemWidthValue = undefined;
1284    this.selectedItemHeightValue = undefined;
1285    this.maskValue = undefined;
1286    this.colorValue = undefined;
1287    this.selectedColorValue = undefined;
1288    this.maxDisplayCountValue = undefined;
1289    this.spaceValue = undefined;
1290    this.ignoreSizeValue = undefined;
1291    this.setIgnoreSizeValue = undefined;
1292  }
1293
1294  isEqual(another: ArkDotIndicator): boolean {
1295    return (
1296      this.type === another.type &&
1297      this.leftValue === another.leftValue &&
1298      this.topValue === another.topValue &&
1299      this.rightValue === another.rightValue &&
1300      this.bottomValue === another.bottomValue &&
1301      this.itemWidthValue === another.itemWidthValue &&
1302      this.itemHeightValue === another.itemHeightValue &&
1303      this.selectedItemWidthValue === another.selectedItemWidthValue &&
1304      this.selectedItemHeightValue === another.selectedItemHeightValue &&
1305      this.maskValue === another.maskValue &&
1306      this.colorValue === another.colorValue &&
1307      this.selectedColorValue === another.selectedColorValue &&
1308      this.maxDisplayCountValue === another.maxDisplayCountValue &&
1309      this.spaceValue === another.spaceValue &&
1310      this.ignoreSizeValue === another.ignoreSizeValue &&
1311      this.setIgnoreSizeValue === another.setIgnoreSizeValue
1312    );
1313  }
1314}
1315
1316class ArkDigitIndicator extends DigitIndicator {
1317  type: string | undefined;
1318  leftValue: Length | undefined;
1319  topValue: Length | undefined;
1320  rightValue: Length | undefined;
1321  bottomValue: Length | LengthMetrics | undefined;
1322  fontColorValue: ResourceColor | undefined;
1323  selectedFontColorValue: ResourceColor | undefined;
1324  digitFontValue: ArkDigitFont | undefined;
1325  selectedDigitFontValue: ArkDigitFont | undefined;
1326  ignoreSizeValue: boolean | undefined;
1327  setIgnoreSizeValue : boolean;
1328
1329  constructor() {
1330    super();
1331    this.type = undefined;
1332    this.leftValue = undefined;
1333    this.topValue = undefined;
1334    this.rightValue = undefined;
1335    this.bottomValue = undefined;
1336    this.fontColorValue = undefined;
1337    this.selectedFontColorValue = undefined;
1338    this.digitFontValue = undefined;
1339    this.selectedDigitFontValue = undefined;
1340    this.ignoreSizeValue = undefined;
1341    this.setIgnoreSizeValue = undefined;
1342  }
1343
1344  isEqual(another: ArkDigitIndicator): boolean {
1345    return (
1346      this.type === another.type &&
1347      this.leftValue === another.leftValue &&
1348      this.topValue === another.topValue &&
1349      this.rightValue === another.rightValue &&
1350      this.bottomValue === another.bottomValue &&
1351      this.digitFontValue === another.digitFontValue &&
1352      this.selectedDigitFontValue === another.selectedDigitFontValue &&
1353      this.ignoreSizeValue === another.ignoreSizeValue &&
1354      this.setIgnoreSizeValue === another.setIgnoreSizeValue
1355    );
1356  }
1357}
1358
1359class ArkDigitFont {
1360  size: Length | undefined;
1361  weight: number | FontWeight | string | undefined;
1362
1363  constructor() {
1364    this.size = undefined;
1365    this.weight = undefined;
1366  }
1367
1368  isEqual(another: ArkDigitFont): boolean {
1369    return this.size === another.size && this.weight === another.weight;
1370  }
1371
1372  parseFontWeight(value: string | number | undefined) {
1373    const valueWeightMap = {
1374      [0]: 'lighter',
1375      [1]: 'normal',
1376      [2]: 'regular',
1377      [3]: 'medium',
1378      [4]: 'bold',
1379      [5]: 'bolder'
1380    };
1381    if (isUndefined(value)) {
1382      this.weight = '-';
1383    } else if (value in valueWeightMap) {
1384      this.weight = valueWeightMap[value];
1385    } else {
1386      this.weight = value.toString();
1387    }
1388    return this.weight;
1389  }
1390}
1391
1392class ArkDisplayArrow {
1393  value: boolean | ArrowStyle;
1394  isHoverShow: boolean | undefined;
1395
1396  constructor() {
1397    this.value = undefined;
1398    this.isHoverShow = undefined;
1399  }
1400
1401  isEqual(another: ArkDisplayArrow): boolean {
1402    return this.value === another.value && this.isHoverShow === another.isHoverShow;
1403  }
1404}
1405
1406class ArkDisplayCount {
1407  value: string | number | SwiperAutoFill;
1408  swipeByGroup: boolean | undefined;
1409
1410  constructor() {
1411    this.value = undefined;
1412    this.swipeByGroup = undefined;
1413  }
1414
1415  isEqual(another: ArkDisplayCount): boolean {
1416    return this.value === another.value && this.swipeByGroup === another.swipeByGroup;
1417  }
1418}
1419
1420class ArkSwiperCachedCount {
1421  value: number;
1422  isShown: boolean;
1423
1424  constructor() {
1425    this.value = undefined;
1426    this.isShown = undefined;
1427  }
1428
1429  isEqual(another: ArkSwiperCachedCount): boolean {
1430    return this.value === another.value && this.isShown === another.isShown;
1431  }
1432}
1433
1434class ArkPlaceholder {
1435  value: ResourceStr | undefined;
1436  style?: PlaceholderStyle | undefined;
1437  constructor() {
1438    this.value = undefined;
1439    this.style = undefined;
1440  }
1441  isEqual(another: ArkPlaceholder): boolean {
1442    return (this.value === another.value) &&
1443      (this.style === another.style);
1444  }
1445}
1446
1447class ArkMesh {
1448  value: Array<any> | undefined;
1449  column: number | undefined;
1450  row: number | undefined;
1451
1452  constructor() {
1453    this.value = undefined;
1454    this.column = undefined;
1455    this.row = undefined;
1456  }
1457  isEqual(another: ArkMesh): boolean {
1458    return (
1459      deepCompareArrays(this.value, another.value) &&
1460      this.column === another.column &&
1461      this.row === another.row
1462    );
1463  }
1464}
1465
1466class ArkLanesOpt {
1467  lanesNum: number | undefined;
1468  minLength: Length | undefined;
1469  maxLength: Length | undefined;
1470  gutter?: undefined;
1471  constructor() {
1472    this.lanesNum = undefined;
1473    this.minLength = undefined;
1474    this.maxLength = undefined;
1475    this.gutter = undefined;
1476  }
1477
1478  isEqual(another: ArkLanesOpt): boolean {
1479    return (this.lanesNum === another.lanesNum && this.minLength === another.minLength
1480      && this.maxLength === another.maxLength && this.gutter === another.gutter);
1481  }
1482}
1483
1484class ArkScrollSnapOptions {
1485  snapAlign: ScrollSnapAlign;
1486  snapPagination: Dimension | Array<Dimension>;
1487  enableSnapToStart: boolean;
1488  enableSnapToEnd: boolean;
1489  constructor() {
1490    this.snapAlign = undefined;
1491    this.snapPagination = undefined;
1492    this.enableSnapToStart = undefined;
1493    this.enableSnapToEnd = undefined;
1494  }
1495  isEqual(another: ArkScrollSnapOptions): boolean {
1496    return ((this.snapAlign === another.snapAlign) &&
1497      (this.snapPagination === another.snapPagination) &&
1498      (this.enableSnapToStart === another.enableSnapToStart) &&
1499      (this.enableSnapToEnd === another.enableSnapToEnd));
1500  }
1501}
1502
1503class ArkGeometryTransition {
1504  id: string | undefined;
1505  options: GeometryTransitionOptions | undefined;
1506
1507  constructor() {
1508    this.id = undefined;
1509    this.options = undefined;
1510  }
1511
1512  isEqual(another: ArkGeometryTransition): boolean {
1513    return (this.id === another.id && this.options === another.options);
1514  }
1515}
1516
1517class ArkSymbolEffect {
1518  symbolEffect: SymbolEffect;
1519  action: boolean | number | undefined;
1520
1521  constructor() {
1522    this.symbolEffect = undefined;
1523    this.action = undefined;
1524  }
1525  isEqual(another: ArkSymbolEffect): boolean {
1526    return (this.symbolEffect === another.symbolEffect) && (this.action === another.action);
1527  }
1528}
1529
1530class ArkBindMenu{
1531  content: Array<MenuElement> | CustomBuilder | undefined;
1532  options: MenuOptions | undefined;
1533
1534  constructor() {
1535    this.content = undefined;
1536    this.options = undefined;
1537  }
1538
1539  isEqual(another: ArkBindMenu): boolean {
1540    return (this.content === another.content && this.options === another.options);
1541  }
1542}
1543
1544class ArkSearchAutoCapitalization{
1545  autoCapitalizationMode: AutoCapitalizationMode;
1546  constructor() {
1547    this.autoCapitalizationMode = undefined;
1548  }
1549
1550  isEqual(another: ArkSearchAutoCapitalization): boolean {
1551    return (this.autoCapitalizationMode === another.autoCapitalizationMode);
1552  }
1553}
1554
1555class ArkTextAreaAutoCapitalization{
1556  autoCapitalizationMode: AutoCapitalizationMode;
1557  constructor() {
1558    this.autoCapitalizationMode = undefined;
1559  }
1560
1561  isEqual(another: ArkTextAreaAutoCapitalization): boolean {
1562    return (this.autoCapitalizationMode === another.autoCapitalizationMode);
1563  }
1564}
1565
1566class ArkTextInputAutoCapitalization{
1567  autoCapitalizationMode: AutoCapitalizationMode;
1568  constructor() {
1569    this.autoCapitalizationMode = undefined;
1570  }
1571
1572  isEqual(another: ArkTextAreaAutoCapitalization): boolean {
1573    return (this.autoCapitalizationMode === another.autoCapitalizationMode);
1574  }
1575}
1576
1577class ArkTextBackGroundStyle {
1578  color: ResourceColor;
1579  radius: Dimension | BorderRadiuses;
1580  constructor() {
1581    this.color = undefined;
1582    this.radius = new ArkBorderRadius();
1583  }
1584  isEqual(another: ArkTextBackGroundStyle): boolean {
1585    return (this.color === another.color &&
1586      this.radius.isEqual(another.radius));
1587  }
1588  checkObjectDiff(another: ArkTextBackGroundStyle): boolean {
1589    return !this.isEqual(another);
1590  }
1591  convertTextBackGroundStyleOptions(value: TextBackgroundStyle): boolean {
1592    if (isUndefined(value)) {
1593      return false;
1594    }
1595    if (!isUndefined(value?.color) && value?.color !== null) {
1596      if (isNumber(value.color) || isString(value.color) || isResource(value.color)) {
1597        this.color = value.color;
1598      }
1599    }
1600
1601    if (!isUndefined(value?.radius) && value?.radius !== null) {
1602      if (isNumber(value.radius) || isString(value.radius) || isResource(value.radius)) {
1603        this.radius.topLeft = value.radius;
1604        this.radius.topRight = value.radius;
1605        this.radius.bottomLeft = value.radius;
1606        this.radius.bottomRight = value.radius;
1607      }
1608      else {
1609        this.radius.topLeft = (value.radius as BorderRadiuses)?.topLeft;
1610        this.radius.topRight = (value.radius as BorderRadiuses)?.topRight;
1611        this.radius.bottomLeft = (value.radius as BorderRadiuses)?.bottomLeft;
1612        this.radius.bottomRight = (value.radius as BorderRadiuses)?.bottomRight;
1613      }
1614    }
1615    return true;
1616  }
1617}
1618
1619class ArkScrollOffsetOptions {
1620  xOffset: Dimension;
1621  yOffset: Dimension;
1622  constructor() {
1623    this.xOffset = undefined;
1624    this.yOffset = undefined;
1625  }
1626  isEqual(another: ArkScrollOffsetOptions): boolean {
1627    return this.xOffset === another.xOffset && this.yOffset === another.yOffset;
1628  }
1629}
1630
1631class ArkScrollableCacheOptions {
1632  count: number;
1633  show: boolean;
1634  constructor(count: number, show: boolean) {
1635    this.count = count;
1636    this.show = show;
1637  }
1638  isEqual(other: ArkScrollableCacheOptions): boolean {
1639    return (this.count === other.count) &&
1640      (this.show === other.show);
1641  }
1642}
1643
1644class ArkSelection {
1645  selectionStart: number;
1646  selectionEnd: number;
1647  constructor() {
1648    this.selectionStart = undefined;
1649    this.selectionEnd = undefined;
1650  }
1651  isEqual(another: ArkSelection): boolean {
1652    return this.selectionStart === another.selectionStart &&
1653      this.selectionEnd === another.selectionEnd;
1654  }
1655}
1656
1657class TextDataDetectorConfig {
1658  types: TextDataDetectorType;
1659  onDetectResultUpdate: (result: string) => void;
1660  constructor() {
1661    this.types = undefined;
1662    this.onDetectResultUpdate = undefined;
1663  }
1664  isEqual(another: TextDataDetectorConfig): boolean {
1665    return (this.types === another.types) &&
1666      (this.onDetectResultUpdate === another.onDetectResultUpdate);
1667  }
1668}
1669
1670class ArkDragPreviewOptions {
1671  mode: DragPreviewMode | Array<DragPreviewMode> | undefined;
1672  sizeChangeEffect: DraggingSizeChangeEffect | undefined;
1673  numberBadge: boolean | number | undefined;
1674  isMultiSelectionEnabled: boolean | undefined;
1675  defaultAnimationBeforeLifting: boolean | undefined;
1676  enableEdgeAutoScroll: boolean | undefined;
1677  enableHapticFeedback: boolean | undefined;
1678  isLiftingDisabled: boolean | undefined;
1679
1680  constructor() {
1681    this.mode = undefined;
1682    this.numberBadge = undefined;
1683    this.sizeChangeEffect = undefined;
1684    this.isMultiSelectionEnabled = undefined;
1685    this.defaultAnimationBeforeLifting = undefined;
1686    this.enableEdgeAutoScroll = undefined;
1687    this.enableHapticFeedback = undefined;
1688    this.isLiftingDisabled = undefined;
1689  }
1690
1691  isEqual(another: ArkDragPreviewOptions): boolean {
1692    return (
1693      this.mode === another.mode &&
1694      this.numberBadge === another.numberBadge &&
1695      this.sizeChangeEffect === another.sizeChangeEffect &&
1696      this.isMultiSelectionEnabled === another.isMultiSelectionEnabled &&
1697      this.defaultAnimationBeforeLifting === another.defaultAnimationBeforeLifting &&
1698      this.enableEdgeAutoScroll === another.enableEdgeAutoScroll &&
1699      this.enableHapticFeedback === another.enableHapticFeedback &&
1700      this.isLiftingDisabled === another.isLiftingDisabled
1701    );
1702  }
1703}
1704
1705class ArkDragPreview {
1706  inspetorId: string;
1707  onlyForLifting: boolean | undefined;
1708  pixelMap: PixelMap | undefined;
1709  extraInfo: string;
1710  constructor() {
1711    this.inspetorId = undefined;
1712    this.onlyForLifting = undefined;
1713    this.pixelMap = undefined;
1714    this.extraInfo = undefined;
1715  }
1716
1717  isEqual(another: ArkDragPreview): boolean {
1718    return (
1719      this.inspetorId === another.inspetorId &&
1720      this.onlyForLifting === another.onlyForLifting &&
1721      this.pixelMap === another.pixelMap &&
1722      this.extraInfo === another.extraInfo
1723    );
1724  }
1725}
1726
1727class ArkShadowStyle {
1728  shadowStyle: number;
1729  constructor() {
1730    this.shadowStyle = undefined;
1731  }
1732}
1733
1734class ArkOnDrop {
1735  event: (event?: DragEvent, extraParams?: string) => void;
1736  disableDataPrefetch: boolean | undefined;
1737  constructor() {
1738    this.event = undefined;
1739    this.disableDataPrefetch = false;
1740  }
1741
1742  isEqual(another: ArkOnDrop): boolean {
1743    return (
1744      this.event === another.event &&
1745      this.disableDataPrefetch === another.disableDataPrefetch
1746    );
1747  }
1748}
1749
1750class ArkDragSpringLoading {
1751  callback: (context: ArkSpringLoadingContext) => void;
1752  configuration: ArkDragSpringLoadingConfiguration | undefined;
1753  constructor() {
1754    this.configuration = undefined;
1755    this.callback = undefined;
1756  }
1757
1758  isEqual(another: ArkDragSpringLoading): boolean {
1759    return (
1760      this.callback === another.callback &&
1761      this.configuration.isEqual(another.configuration)
1762    );
1763  }
1764}
1765
1766class ArkSpringLoadingContext {
1767  state: DragSpringLoadingState | undefined;
1768  currentNotifySequence: number | undefined;
1769  dragInfos: SpringLoadingDragInfos | undefined;
1770  currentConfig: ArkDragSpringLoadingConfiguration | undefined;
1771  abort: () => void;
1772  updateConfiguration: (config: ArkDragSpringLoadingConfiguration) => void;
1773  constructor() {
1774    this.state = undefined;
1775    this.currentNotifySequence = undefined;
1776    this.dragInfos = undefined;
1777    this.currentConfig = undefined;
1778    this.abort = undefined;
1779    this.updateConfiguration = undefined;
1780  }
1781
1782  isEqual(another: ArkSpringLoadingContext): boolean {
1783    return (
1784      this.state === another.state &&
1785      this.currentNotifySequence === another.currentNotifySequence &&
1786      this.dragInfos === another.dragInfos &&
1787      this.currentConfig.isEqual(another.currentConfig) &&
1788      this.abort === another.abort &&
1789      this.updateConfiguration === another.updateConfiguration
1790    );
1791  }
1792}
1793
1794class ArkDragSpringLoadingConfiguration {
1795  stillTimeLimit: number | undefined;
1796  updateInterval: number | undefined;
1797  updateNotifyCount: number | undefined;
1798  updateToFinishInterval: number | undefined;
1799  constructor() {
1800    this.stillTimeLimit = undefined;
1801    this.updateInterval = undefined;
1802    this.updateNotifyCount = undefined;
1803    this.updateToFinishInterval = undefined;
1804  }
1805
1806  isEqual(another: ArkDragSpringLoadingConfiguration): boolean {
1807    return (
1808      this.stillTimeLimit === another.stillTimeLimit &&
1809      this.updateInterval === another.updateInterval &&
1810      this.updateNotifyCount === another.updateNotifyCount &&
1811      this.updateToFinishInterval === another.updateToFinishInterval
1812    );
1813  }
1814}
1815
1816class ArkRelativeContainerGuideLine {
1817  ids: Array<string> | undefined;
1818  directions: Array<Axis> | undefined;
1819  positions: Array<GuideLinePosition> | undefined;
1820
1821  constructor() {
1822    this.ids = undefined;
1823    this.directions = undefined;
1824    this.positions = undefined;
1825  }
1826
1827  isEqual(another: ArkRelativeContainerGuideLine): boolean {
1828    return (
1829      this.ids === another.ids &&
1830      this.directions === another.directions &&
1831      this.positions === another.positions
1832    );
1833  }
1834}
1835
1836class ArkRelativeContainerBarrier {
1837  ids: Array<string> | undefined;
1838  directions: Array<BarrierDirection> | undefined;
1839  referencedIds: Array<Array<string>> | undefined;
1840
1841  constructor() {
1842    this.ids = undefined;
1843    this.directions = undefined;
1844    this.referencedIds = undefined;
1845  }
1846
1847  isEqual(another: ArkRelativeContainerGuideLine): boolean {
1848    return (
1849      this.ids === another.ids &&
1850      this.directions === another.directions &&
1851      this.referencedIds === another.positions
1852    );
1853  }
1854}
1855
1856class ArkFocusScopeId {
1857  id: string | undefined;
1858  isGroup: boolean | undefined;
1859  arrowStepOut: boolean | undefined;
1860  constructor() {
1861    this.id = undefined;
1862    this.isGroup = undefined;
1863    this.arrowStepOut = undefined;
1864  }
1865  isEqual(another: ArkFocusScopeId): boolean {
1866    return ((this.id === another.id) && (this.isGroup === another.isGroup) &&
1867      (this.arrowStepOut === another.arrowStepOut));
1868  }
1869}
1870
1871class ArkFocusScopePriority {
1872  scopeId: string | undefined;
1873  priority: number | undefined;
1874  constructor() {
1875    this.scopeId = undefined;
1876    this.priority = undefined;
1877  }
1878  isEqual(another: ArkFocusScopePriority): boolean {
1879    return (this.scopeId === another.scopeId) && (this.priority === another.priority);
1880  }
1881}
1882
1883class ArkTextFont {
1884  value: Font;
1885  enableVariableFontWeight: boolean;
1886
1887  constructor() {
1888    this.value = undefined;
1889    this.enableVariableFontWeight = undefined;
1890  }
1891
1892  isEqual(another: ArkTextFont): boolean {
1893    return (this.value === another.value && this.enableVariableFontWeight === another.enableVariableFontWeight);
1894  }
1895
1896  checkObjectDiff(another: ArkTextFont): boolean {
1897    return !this.isEqual(another);
1898  }
1899}
1900
1901class ArkLineSpacing {
1902  value: LengthMetrics;
1903  onlyBetweenLines: boolean;
1904  constructor() {
1905    this.value = undefined;
1906    this.onlyBetweenLines = undefined;
1907  }
1908  isEqual(another: ArkLineSpacing): boolean {
1909    return this.value === another.value &&
1910      this.onlyBetweenLines === another.onlyBetweenLines;
1911  }
1912}
1913
1914class ArkFontWeight {
1915  value: number | FontWeight | string;
1916  enableVariableFontWeight: boolean;
1917
1918  constructor() {
1919    this.value = undefined;
1920    this.enableVariableFontWeight = undefined;
1921  }
1922
1923  isEqual(another: ArkTextFont): boolean {
1924    return (this.value === another.value && this.enableVariableFontWeight === another.enableVariableFontWeight);
1925  }
1926
1927  checkObjectDiff(another: ArkTextFont): boolean {
1928    return !this.isEqual(another);
1929  }
1930}
1931
1932class ArkNavigationTitle {
1933  value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle | undefined;
1934  navigationTitleOptions?: NavigationTitleOptions | undefined;
1935
1936  constructor() {
1937    this.value = undefined;
1938    this.navigationTitleOptions = undefined;
1939  }
1940  isEqual(another: ArkNavigationTitle): boolean {
1941    return (this.value === another.value) && (this.navigationTitleOptions === another.navigationTitleOptions);
1942  }
1943}
1944
1945class ArkNavigationToolBarConfiguration {
1946  value: Array<ToolbarItem> | undefined;
1947  options?: NavigationToolbarOptions | undefined;
1948
1949  constructor() {
1950    this.value = undefined;
1951    this.options = undefined;
1952  }
1953  isEqual(another: ArkNavigationToolBarConfiguration): boolean {
1954    return (this.value === another.value) && (this.options.backgroundColor === another.options.backgroundColor) &&
1955      (this.options.backgroundBlurStyle === another.options.backgroundBlurStyle) &&
1956      (this.options.barStyle === another.options.barStyle);
1957  }
1958}
1959class ArkNavHideTitleBarOrToolBar {
1960  isHide: boolean;
1961  animated: boolean;
1962
1963  constructor() {
1964    this.isHide = undefined;
1965    this.animated = undefined;
1966  }
1967  isEqual(another: ArkNavHideTitleBarOrToolBar): boolean {
1968    return (this.isHide === another.isHide) && (this.animated === another.animated);
1969  }
1970}
1971
1972class ArkEmitterPropertyOptions {
1973  index: number | undefined;
1974  isSetEmitRate: number;
1975  emitRate: number | undefined;
1976  isSetPosition: number;
1977  positionX: number | undefined;
1978  positionY: number | undefined;
1979  isSetSize: number;
1980  sizeWidth: number | undefined;
1981  sizeHeight: number | undefined;
1982  isSetAnnulusRegion: number;
1983  isSetCenter: number;
1984  centerXValue: number | undefined;
1985  centerXUnit: number | undefined;
1986  centerYValue: number | undefined;
1987  centerYUnit: number | undefined;
1988  isSetInnerRadius: number;
1989  innerRadiusValue: number | undefined;
1990  innerRadiusUnit: number | undefined;
1991  isSetOuterRadius: number;
1992  outerRadiusValue: number | undefined;
1993  outerRadiusUnit: number | undefined;
1994  isSetStartAngle: number;
1995  startAngle: number | undefined;
1996  isSetEndAngle: number;
1997  endAngle: number | undefined;
1998
1999  constructor() {
2000    this.index = undefined;
2001    this.isSetEmitRate = 0;
2002    this.emitRate = undefined;
2003    this.isSetPosition = 0;
2004    this.positionX = undefined;
2005    this.positionY = undefined;
2006    this.isSetSize = 0;
2007    this.sizeWidth = undefined;
2008    this.sizeHeight = undefined;
2009    this.isSetAnnulusRegion = 0;
2010    this.isSetCenter = 0;
2011    this.centerXValue = undefined;
2012    this.centerXUnit = undefined;
2013    this.centerYValue = undefined;
2014    this.centerYUnit = undefined;
2015    this.isSetInnerRadius = 0;
2016    this.innerRadiusValue = undefined;
2017    this.innerRadiusUnit = undefined;
2018    this.isSetOuterRadius = 0;
2019    this.outerRadiusValue = undefined;
2020    this.outerRadiusUnit = undefined;
2021    this.isSetStartAngle = 0;
2022    this.startAngle = undefined;
2023    this.isSetEndAngle = 0;
2024    this.endAngle = undefined;
2025  }
2026}
2027
2028class ArkAutoPlay {
2029  autoPlay: boolean;
2030  needStopWhenTouched: boolean;
2031
2032  constructor() {
2033    this.autoPlay = undefined;
2034    this.needStopWhenTouched = undefined;
2035  }
2036
2037  isEqual(another: ArkAutoPlay): boolean {
2038    return this.autoPlay === another.autoPlay && this.needStopWhenTouched === another.needStopWhenTouched;
2039  }
2040}
2041
2042class ArkWebScriptItem {
2043  scripts: Array<string> | undefined;
2044  scriptRules: Array<Array<string>> | undefined;
2045
2046  constructor() {
2047    this.scripts = undefined;
2048    this.scriptRules = undefined;
2049  }
2050
2051  isEqual(another: ArkWebScriptItem): boolean {
2052    return (
2053      this.scripts === another.scripts &&
2054      this.scriptRules === another.scriptRules
2055    );
2056  }
2057}