cmat 0.0.82 → 0.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +19 -13
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/cmat-components-card.mjs.map +1 -1
  5. package/fesm2022/cmat-components-carousel.mjs +20 -20
  6. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  7. package/fesm2022/cmat-components-cascade.mjs +7 -5
  8. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  9. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  10. package/fesm2022/cmat-components-code-editor.mjs +3 -2
  11. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  12. package/fesm2022/cmat-components-custom-formly.mjs +228 -108
  13. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  14. package/fesm2022/cmat-components-date-range.mjs +20 -11
  15. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  16. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  17. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  18. package/fesm2022/cmat-components-fullscreen.mjs +1 -1
  19. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  20. package/fesm2022/cmat-components-highlight.mjs +1 -1
  21. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  22. package/fesm2022/cmat-components-image-viewer.mjs +29 -11
  23. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  24. package/fesm2022/cmat-components-json-editor.mjs +16 -26
  25. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  26. package/fesm2022/cmat-components-knob-input.mjs +8 -7
  27. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  28. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  29. package/fesm2022/cmat-components-material-color-picker.mjs +3 -3
  30. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  31. package/fesm2022/cmat-components-material-datetimepicker.mjs +28 -16
  32. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  33. package/fesm2022/cmat-components-navigation.mjs +1 -0
  34. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  35. package/fesm2022/cmat-components-opt-input.mjs +2 -2
  36. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  37. package/fesm2022/cmat-components-password-strength.mjs +8 -5
  38. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  39. package/fesm2022/cmat-components-popover.mjs +2 -2
  40. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  41. package/fesm2022/cmat-components-qrcode.mjs +9 -2
  42. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  43. package/fesm2022/cmat-components-rating.mjs +1 -1
  44. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  45. package/fesm2022/cmat-components-select-search.mjs +25 -24
  46. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  47. package/fesm2022/cmat-components-select-table.mjs +42 -15
  48. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  49. package/fesm2022/cmat-components-select-tree.mjs +3 -1
  50. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  51. package/fesm2022/cmat-components-speed-dial.mjs +24 -5
  52. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  53. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  54. package/fesm2022/cmat-components-toast.mjs +20 -13
  55. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  56. package/fesm2022/cmat-components-transfer-picker.mjs +11 -6
  57. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  58. package/fesm2022/cmat-components-treetable.mjs +4 -3
  59. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  60. package/fesm2022/cmat-components-upload.mjs +29 -15
  61. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  62. package/fesm2022/cmat-components-x6-angular-shape.mjs +2 -2
  63. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  64. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  65. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  66. package/fesm2022/cmat-directives-data-exporter.mjs +1 -1
  67. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  68. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  69. package/fesm2022/cmat-directives-digit-only.mjs +12 -18
  70. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  71. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -2
  72. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  73. package/fesm2022/cmat-lib-mock-api.mjs +7 -7
  74. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  75. package/fesm2022/cmat-pipes-find-by-key.mjs +1 -1
  76. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  77. package/fesm2022/cmat-pipes-group-by.mjs +9 -5
  78. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  79. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  80. package/fesm2022/cmat-pipes-secure.mjs +9 -1
  81. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  82. package/fesm2022/cmat-services-alert.mjs +16 -7
  83. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  84. package/fesm2022/cmat-services-data.mjs.map +1 -1
  85. package/fesm2022/cmat-services-export-as.mjs +11 -10
  86. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  87. package/fesm2022/cmat-services-local-storage.mjs +42 -4
  88. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  89. package/fesm2022/cmat-services-title.mjs +2 -2
  90. package/fesm2022/cmat-services-title.mjs.map +1 -1
  91. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  92. package/fesm2022/cmat-services-utils.mjs +78 -57
  93. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  94. package/fesm2022/cmat-validators.mjs +4 -1
  95. package/fesm2022/cmat-validators.mjs.map +1 -1
  96. package/fesm2022/cmat.mjs +746 -424
  97. package/fesm2022/cmat.mjs.map +1 -1
  98. package/package.json +1 -1
  99. package/types/cmat-components-adapter.d.ts +24 -24
  100. package/types/cmat-components-breadcrumb.d.ts +1 -1
  101. package/types/cmat-components-card.d.ts +1 -1
  102. package/types/cmat-components-carousel.d.ts +23 -23
  103. package/types/cmat-components-cascade.d.ts +12 -12
  104. package/types/cmat-components-chip-input.d.ts +8 -8
  105. package/types/cmat-components-code-editor.d.ts +2 -2
  106. package/types/cmat-components-custom-formly.d.ts +121 -44
  107. package/types/cmat-components-date-range.d.ts +30 -16
  108. package/types/cmat-components-drawer.d.ts +2 -2
  109. package/types/cmat-components-file-preview.d.ts +1 -1
  110. package/types/cmat-components-image-viewer.d.ts +5 -3
  111. package/types/cmat-components-json-editor.d.ts +7 -9
  112. package/types/cmat-components-knob-input.d.ts +3 -3
  113. package/types/cmat-components-masonry.d.ts +3 -3
  114. package/types/cmat-components-material-color-picker.d.ts +13 -9
  115. package/types/cmat-components-material-datetimepicker.d.ts +26 -10
  116. package/types/cmat-components-navigation.d.ts +1 -1
  117. package/types/cmat-components-opt-input.d.ts +8 -8
  118. package/types/cmat-components-popover.d.ts +1 -1
  119. package/types/cmat-components-qrcode.d.ts +2 -1
  120. package/types/cmat-components-rating.d.ts +13 -13
  121. package/types/cmat-components-select-search.d.ts +5 -5
  122. package/types/cmat-components-select-table.d.ts +12 -8
  123. package/types/cmat-components-select-tree.d.ts +1 -1
  124. package/types/cmat-components-speed-dial.d.ts +3 -0
  125. package/types/cmat-components-timeline.d.ts +2 -2
  126. package/types/cmat-components-toast.d.ts +2 -2
  127. package/types/cmat-components-transfer-picker.d.ts +5 -4
  128. package/types/cmat-components-treetable.d.ts +2 -2
  129. package/types/cmat-components-upload.d.ts +35 -28
  130. package/types/cmat-components-x6-angular-shape.d.ts +1 -1
  131. package/types/cmat-directives-autofocus.d.ts +1 -1
  132. package/types/cmat-directives-data-exporter.d.ts +2 -1
  133. package/types/cmat-directives-debounce.d.ts +5 -5
  134. package/types/cmat-directives-digit-only.d.ts +7 -7
  135. package/types/cmat-directives-seamless-auto-scroll.d.ts +2 -2
  136. package/types/cmat-lib-mock-api.d.ts +1 -1
  137. package/types/cmat-pipes-find-by-key.d.ts +2 -1
  138. package/types/cmat-pipes-group-by.d.ts +6 -1
  139. package/types/cmat-pipes-keys.d.ts +4 -1
  140. package/types/cmat-pipes-secure.d.ts +1 -0
  141. package/types/cmat-services-alert.d.ts +14 -13
  142. package/types/cmat-services-data.d.ts +3 -3
  143. package/types/cmat-services-export-as.d.ts +4 -3
  144. package/types/cmat-services-local-storage.d.ts +10 -2
  145. package/types/cmat-services-translation.d.ts +3 -3
  146. package/types/cmat-services-utils.d.ts +31 -15
  147. package/types/cmat-validators.d.ts +1 -1
  148. package/types/cmat.d.ts +461 -302
package/fesm2022/cmat.mjs CHANGED
@@ -34,7 +34,7 @@ import { PortalModule, TemplatePortal, ComponentPortal } from '@angular/cdk/port
34
34
  import { MatFormFieldControl, MatFormFieldModule, MatFormField } from '@angular/material/form-field';
35
35
  import * as i1$3 from '@angular/material/input';
36
36
  import { MatInputModule, MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
37
- import { Subject, startWith, debounceTime, map as map$1, ReplaySubject, of, take, Subscription, merge, combineLatest, fromEvent, forkJoin, Observable, catchError, tap as tap$1, EMPTY, finalize, throwError } from 'rxjs';
37
+ import { Subject, startWith, debounceTime, map as map$1, ReplaySubject, of, take, Subscription, Observable, merge, combineLatest, fromEvent, forkJoin, catchError, tap as tap$1, EMPTY, finalize, throwError } from 'rxjs';
38
38
  import { ENTER, COMMA as COMMA$1, hasModifierKey } from '@angular/cdk/keycodes';
39
39
  import * as i3 from '@angular/material/autocomplete';
40
40
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
@@ -84,7 +84,7 @@ import { CmatUploadQueueComponent as CmatUploadQueueComponent$1, CmatFilesUtilSe
84
84
  import BlotFormatter from '@enzedonline/quill-blot-formatter2';
85
85
  import { CmatUrlStateConfigService as CmatUrlStateConfigService$1, CmatConfigService as CmatConfigService$1 } from 'cmat/services/config';
86
86
  import { CmatUtilsService as CmatUtilsService$1 } from 'cmat/services/utils';
87
- import { Document, Packer, Paragraph, AlignmentType, TextRun, BorderStyle, HeadingLevel, ImageRun } from 'docx';
87
+ import { Document, Packer, Paragraph, AlignmentType, TextRun, BorderStyle, HeadingLevel, ImageRun, HighlightColor } from 'docx';
88
88
  import * as FileSaver from 'file-saver-es';
89
89
  import { saveAs } from 'file-saver-es';
90
90
  import * as i2$5 from 'ngx-quill';
@@ -262,7 +262,7 @@ const CMAT_DATETIME_FORMATS = new InjectionToken('cmat-datetime-formats');
262
262
  const DEFAULT_HOUR_NAMES = range$2(24, i => String(i));
263
263
  const DEFAULT_MINUTE_NAMES = range$2(60, i => String(i));
264
264
  function range$2(length, valueFunction) {
265
- const valuesArray = Array(length);
265
+ const valuesArray = new Array(length);
266
266
  for (let i = 0; i < length; i++) {
267
267
  valuesArray[i] = valueFunction(i);
268
268
  }
@@ -374,13 +374,13 @@ const CMAT_NATIVE_DATETIME_FORMATS = {
374
374
  yearInput: { year: 'numeric' },
375
375
  monthYearLabel: { year: 'numeric', month: 'short' },
376
376
  dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
377
- monthYearA11yLabel: { year: 'numeric', month: 'long' },
378
- popupHeaderDateLabel: { weekday: 'short', month: 'short', day: '2-digit' }
377
+ monthYearA11yLabel: 'MMMM yyyy',
378
+ popupHeaderDateLabel: 'EEE, MMM dd'
379
379
  }
380
380
  };
381
381
 
382
382
  function range$1(length, valueFunction) {
383
- const valuesArray = Array(length);
383
+ const valuesArray = new Array(length);
384
384
  for (let i = 0; i < length; i++) {
385
385
  valuesArray[i] = valueFunction(i);
386
386
  }
@@ -390,8 +390,9 @@ class DayjsDatetimeAdapter extends DatetimeAdapter {
390
390
  constructor() {
391
391
  const matDateLocale = inject(MAT_DATE_LOCALE, { optional: true });
392
392
  const _delegate = inject(DateAdapter);
393
+ const locale = typeof matDateLocale === 'string' ? matDateLocale : dayjs.locale();
393
394
  super(_delegate);
394
- this.setLocale(matDateLocale || dayjs.locale());
395
+ this.setLocale(locale);
395
396
  dayjs.extend(localeData);
396
397
  }
397
398
  setLocale(locale) {
@@ -498,7 +499,7 @@ function CMAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY() {
498
499
  };
499
500
  }
500
501
  function range(length, valueFunction) {
501
- const valuesArray = Array(length);
502
+ const valuesArray = new Array(length);
502
503
  for (let i = 0; i < length; i++) {
503
504
  valuesArray[i] = valueFunction(i);
504
505
  }
@@ -509,7 +510,7 @@ class DayjsDateAdapter extends DateAdapter {
509
510
  super();
510
511
  this._options = inject(CMAT_DAYJS_DATE_ADAPTER_OPTIONS, { optional: true });
511
512
  const dateLocale = inject(MAT_DATE_LOCALE, { optional: true });
512
- this._initializeParser(dateLocale);
513
+ this._initializeParser(dateLocale ?? undefined);
513
514
  }
514
515
  get _shouldUseUtc() {
515
516
  const { useUtc } = this._options ?? {};
@@ -578,10 +579,14 @@ class DayjsDateAdapter extends DateAdapter {
578
579
  return this._dayJs();
579
580
  }
580
581
  parse(value, parseFormat) {
582
+ const locale = this.locale;
581
583
  if (value && typeof value === 'string') {
582
- return this._dayJs(value, parseFormat, this.locale);
584
+ return this._dayJs(value, parseFormat, locale);
583
585
  }
584
- return value ? this._dayJs(value).locale(this.locale) : null;
586
+ if (value instanceof Date || dayjs.isDayjs(value)) {
587
+ return this._dayJs(value).locale(locale);
588
+ }
589
+ return null;
585
590
  }
586
591
  format(date, displayFormat) {
587
592
  if (!this.isValid(date)) {
@@ -613,7 +618,7 @@ class DayjsDateAdapter extends DateAdapter {
613
618
  if (!value) {
614
619
  return null;
615
620
  }
616
- date = this._dayJs(value).toISOString();
621
+ date = this._dayJs(value);
617
622
  }
618
623
  if (date && this.isValid(date)) {
619
624
  return this._dayJs(date); // NOTE: Is this necessary since Dayjs is immutable and Moment was not?
@@ -631,9 +636,10 @@ class DayjsDateAdapter extends DateAdapter {
631
636
  }
632
637
  _dayJs(input, format, locale) {
633
638
  if (!this._shouldUseUtc) {
634
- return dayjs(input, { format, locale }, locale);
639
+ return dayjs(input, format, locale);
635
640
  }
636
- return dayjs(input, { format, locale, utc: this._shouldUseUtc }, locale).utc();
641
+ const utcDate = format ? dayjs.utc(input, format) : dayjs.utc(input);
642
+ return locale ? utcDate.locale(locale) : utcDate;
637
643
  }
638
644
  _initializeParser(dateLocale) {
639
645
  if (this._shouldUseUtc) {
@@ -642,7 +648,7 @@ class DayjsDateAdapter extends DateAdapter {
642
648
  dayjs.extend(LocalizedFormat);
643
649
  dayjs.extend(customParseFormat);
644
650
  dayjs.extend(localeData);
645
- this.setLocale(dateLocale);
651
+ this.setLocale(dateLocale ?? dayjs.locale());
646
652
  }
647
653
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DayjsDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
648
654
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DayjsDateAdapter }); }
@@ -1103,7 +1109,7 @@ class CmatCarouselComponent {
1103
1109
  this._numVisible = val;
1104
1110
  }
1105
1111
  get numScroll() {
1106
- return this._numVisible;
1112
+ return this._numScroll;
1107
1113
  }
1108
1114
  set numScroll(val) {
1109
1115
  this._numScroll = val;
@@ -1239,7 +1245,7 @@ class CmatCarouselComponent {
1239
1245
  let page = this._page;
1240
1246
  if (this.totalDots() !== 0 && page >= this.totalDots()) {
1241
1247
  page = this.totalDots() - 1;
1242
- this._page = page;
1248
+ this._page = page ?? 0;
1243
1249
  this.pageEvent.emit({
1244
1250
  page: this.page
1245
1251
  });
@@ -1464,7 +1470,7 @@ class CmatCarouselComponent {
1464
1470
  }
1465
1471
  }
1466
1472
  _onRightKey() {
1467
- const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]'))];
1473
+ const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]') ?? [])];
1468
1474
  const activeIndex = this._findFocusedIndicatorIndex();
1469
1475
  this._changedFocusedIndicator(activeIndex, activeIndex + 1 === indicators.length ? indicators.length - 1 : activeIndex + 1);
1470
1476
  }
@@ -1477,23 +1483,23 @@ class CmatCarouselComponent {
1477
1483
  this._changedFocusedIndicator(activeIndex, 0);
1478
1484
  }
1479
1485
  _onEndKey() {
1480
- const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]'))];
1486
+ const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]') ?? [])];
1481
1487
  const activeIndex = this._findFocusedIndicatorIndex();
1482
1488
  this._changedFocusedIndicator(activeIndex, indicators.length - 1);
1483
1489
  }
1484
1490
  _onTabKey() {
1485
- const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]'))];
1486
- const highlightedIndex = indicators.findIndex(ind => ind.getAttribute('cmat-carousel-highlight') != undefined);
1491
+ const indicators = Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]') ?? []);
1492
+ const highlightedIndex = indicators.findIndex((ind) => ind.getAttribute('cmat-carousel-highlight') !== undefined);
1487
1493
  const activeIndicator = this.indicatorContent?.nativeElement ? this.indicatorContent?.nativeElement.querySelector('[data-pc-section="indicator"] > button[tabindex="0"]') : null;
1488
- const activeIndex = indicators.findIndex(ind => ind === activeIndicator.parentElement);
1489
- indicators[activeIndex].children[0].tabIndex = '-1';
1490
- indicators[highlightedIndex].children[0].tabIndex = '0';
1494
+ const activeIndex = indicators.findIndex((ind) => ind === activeIndicator?.parentElement);
1495
+ indicators[activeIndex]?.children[0] && (indicators[activeIndex].children[0].tabIndex = -1);
1496
+ indicators[highlightedIndex]?.children[0] && (indicators[highlightedIndex].children[0].tabIndex = 0);
1491
1497
  }
1492
1498
  _changedFocusedIndicator(prevInd, nextInd) {
1493
- const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]'))];
1494
- indicators[prevInd].children[0].tabIndex = '-1';
1495
- indicators[nextInd].children[0].tabIndex = '0';
1496
- indicators[nextInd].children[0].focus();
1499
+ const indicators = Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]') ?? []);
1500
+ indicators[prevInd]?.children[0] && (indicators[prevInd].children[0].tabIndex = -1);
1501
+ indicators[nextInd]?.children[0] && (indicators[nextInd].children[0].tabIndex = 0);
1502
+ indicators[nextInd]?.children[0]?.focus();
1497
1503
  }
1498
1504
  _step(dir, page) {
1499
1505
  let totalShiftedItems = this.totalShiftedItems;
@@ -1531,7 +1537,7 @@ class CmatCarouselComponent {
1531
1537
  this.itemsContainer.nativeElement.style.transition = 'transform 500ms ease 0s';
1532
1538
  }
1533
1539
  this.totalShiftedItems = totalShiftedItems;
1534
- this._page = page;
1540
+ this._page = page ?? 0;
1535
1541
  this.pageEvent.emit({
1536
1542
  page: this.page
1537
1543
  });
@@ -1566,9 +1572,9 @@ class CmatCarouselComponent {
1566
1572
  this.refreshVersion.update(value => value + 1);
1567
1573
  }
1568
1574
  _findFocusedIndicatorIndex() {
1569
- const indicators = [...Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]'))];
1575
+ const indicators = Array.from(this.indicatorContent?.nativeElement.querySelectorAll('[data-pc-section="indicator"]') ?? []);
1570
1576
  const activeIndicator = this.indicatorContent?.nativeElement ? this.indicatorContent?.nativeElement.querySelector('[data-pc-section="indicator"] > button[tabindex="0"]') : null;
1571
- return indicators.findIndex(ind => ind === activeIndicator.parentElement);
1577
+ return indicators.findIndex((ind) => ind === activeIndicator?.parentElement);
1572
1578
  }
1573
1579
  _createStyle() {
1574
1580
  if (!this.carouselStyle) {
@@ -1585,11 +1591,11 @@ class CmatCarouselComponent {
1585
1591
  const value1 = data1.breakpoint;
1586
1592
  const value2 = data2.breakpoint;
1587
1593
  let result;
1588
- if (value1 == null && value2 != null)
1594
+ if (value1 === null && value2 !== null)
1589
1595
  result = -1;
1590
- else if (value1 != null && value2 == null)
1596
+ else if (value1 !== null && value2 === null)
1591
1597
  result = 1;
1592
- else if (value1 == null && value2 == null)
1598
+ else if (value1 === null && value2 === null)
1593
1599
  result = 0;
1594
1600
  else if (typeof value1 === 'string' && typeof value2 === 'string')
1595
1601
  result = value1.localeCompare(value2, undefined, { numeric: true });
@@ -1608,7 +1614,7 @@ class CmatCarouselComponent {
1608
1614
  }
1609
1615
  }
1610
1616
  if (this.carouselStyle) {
1611
- this.carouselStyle.innerHTML = innerHTML;
1617
+ this.renderer.setProperty(this.carouselStyle, 'textContent', innerHTML);
1612
1618
  }
1613
1619
  }
1614
1620
  _calculatePosition() {
@@ -1765,11 +1771,11 @@ class CmatCascadeBottomSheetComponent {
1765
1771
  }
1766
1772
  }
1767
1773
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatCascadeBottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1768
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatCascadeBottomSheetComponent, isStandalone: true, selector: "cmat-cascade-bottom-sheet", exportAs: ["cmatCascadeBottomSheet"], ngImport: i0, template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{root.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"root.bottomSheetRef.dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selected.value\" (selectedIndexChange)=\"selected.setValue($event);\">\r\n @for (menuItem of root.steps; track step; let step = $index) {\r\n <mat-tab\r\n [label]=\"labels[step] || '\u9009\u62E9'\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track i; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i); select(listItem.disabled,listItem.label);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>", styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i2$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1774
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatCascadeBottomSheetComponent, isStandalone: true, selector: "cmat-cascade-bottom-sheet", exportAs: ["cmatCascadeBottomSheet"], ngImport: i0, template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{root.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"root.bottomSheetRef.dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selected.value\" (selectedIndexChange)=\"selected.setValue($event);\">\r\n @for (menuItem of root.steps; track step; let step = $index) {\r\n <mat-tab\r\n [label]=\"labels[step] || '\u9009\u62E9'\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track i; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i); select(listItem.disabled ?? false, listItem.label ?? '');\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>", styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i2$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1769
1775
  }
1770
1776
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatCascadeBottomSheetComponent, decorators: [{
1771
1777
  type: Component,
1772
- args: [{ selector: 'cmat-cascade-bottom-sheet', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatCascadeBottomSheet', imports: [MatButtonModule, MatTabsModule, MatListModule, MatIconModule], template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{root.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"root.bottomSheetRef.dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selected.value\" (selectedIndexChange)=\"selected.setValue($event);\">\r\n @for (menuItem of root.steps; track step; let step = $index) {\r\n <mat-tab\r\n [label]=\"labels[step] || '\u9009\u62E9'\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track i; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i); select(listItem.disabled,listItem.label);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>", styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"] }]
1778
+ args: [{ selector: 'cmat-cascade-bottom-sheet', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatCascadeBottomSheet', imports: [MatButtonModule, MatTabsModule, MatListModule, MatIconModule], template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{root.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"root.bottomSheetRef.dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selected.value\" (selectedIndexChange)=\"selected.setValue($event);\">\r\n @for (menuItem of root.steps; track step; let step = $index) {\r\n <mat-tab\r\n [label]=\"labels[step] || '\u9009\u62E9'\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track i; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i); select(listItem.disabled ?? false, listItem.label ?? '');\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>", styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"] }]
1773
1779
  }], ctorParameters: () => [] });
1774
1780
 
1775
1781
  class CmatCascadeMenuComponent {
@@ -2000,7 +2006,8 @@ class CmatCascadeListComponent {
2000
2006
  ...item,
2001
2007
  active: false
2002
2008
  }));
2003
- return this.steps.push(nativeNext);
2009
+ this.steps.push(nativeNext);
2010
+ return;
2004
2011
  }
2005
2012
  this._changeLabels();
2006
2013
  if (this.overlayRef?.hasAttached()) {
@@ -2027,7 +2034,8 @@ class CmatCascadeListComponent {
2027
2034
  _initSteps(index, options) {
2028
2035
  const step = [];
2029
2036
  options.map((item) => {
2030
- if (this.value[index].value === item.value || (this.allowLabelValue && this.value[index].label === item.label)) {
2037
+ if (this.value?.[index] &&
2038
+ (this.value[index].value === item.value || (this.allowLabelValue && this.value[index].label === item.label))) {
2031
2039
  if (!isUndefined(item.children))
2032
2040
  options = item.children;
2033
2041
  step.push(({
@@ -2041,7 +2049,7 @@ class CmatCascadeListComponent {
2041
2049
  });
2042
2050
  this.steps.push(step);
2043
2051
  index += 1;
2044
- if (index < this.value.length) {
2052
+ if (this.value && index < this.value.length) {
2045
2053
  this._initSteps(index, options);
2046
2054
  }
2047
2055
  }
@@ -2386,6 +2394,7 @@ class CmatCodeEditorComponent {
2386
2394
  get editorOptions() {
2387
2395
  return {
2388
2396
  ...this.options,
2397
+ readOnly: this.readOnly,
2389
2398
  theme: this.options?.theme ?? (this._isDarkTheme ? 'vs-dark' : 'vs')
2390
2399
  };
2391
2400
  }
@@ -2393,11 +2402,11 @@ class CmatCodeEditorComponent {
2393
2402
  return this._document.documentElement.classList.contains('dark') || this._document.body.classList.contains('dark');
2394
2403
  }
2395
2404
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatCodeEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2396
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatCodeEditorComponent, isStandalone: true, selector: "cmat-code-editor", inputs: { value: "value", language: "language", height: "height", readOnly: "readOnly", options: "options" }, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card p-2 shadow-sm\">\r\n <ngx-monaco-editor class=\"block\" [style.height]=\"height\" [options]=\"editorOptions\" [model]=\"model\"></ngx-monaco-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"height\">\r\n \u4EE3\u7801\u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n", styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [EditorComponent]] }); }
2405
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatCodeEditorComponent, isStandalone: true, selector: "cmat-code-editor", inputs: { value: "value", language: "language", height: "height", readOnly: "readOnly", options: "options" }, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card p-2 shadow-sm\">\r\n <ngx-monaco-editor class=\"block\" [style.height]=\"height\" [options]=\"editorOptions\" [model]=\"model\"></ngx-monaco-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"height\">\r\n \u4EE3\u7801\u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n\r\n", styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [EditorComponent]] }); }
2397
2406
  }
2398
2407
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatCodeEditorComponent, decorators: [{
2399
2408
  type: Component,
2400
- args: [{ selector: 'cmat-code-editor', changeDetection: ChangeDetectionStrategy.OnPush, imports: [EditorComponent], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card p-2 shadow-sm\">\r\n <ngx-monaco-editor class=\"block\" [style.height]=\"height\" [options]=\"editorOptions\" [model]=\"model\"></ngx-monaco-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"height\">\r\n \u4EE3\u7801\u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n", styles: [":host{display:block}\n"] }]
2409
+ args: [{ selector: 'cmat-code-editor', changeDetection: ChangeDetectionStrategy.OnPush, imports: [EditorComponent], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@defer (on viewport) {\r\n <div class=\"rounded-2xl border border-default bg-card p-2 shadow-sm\">\r\n <ngx-monaco-editor class=\"block\" [style.height]=\"height\" [options]=\"editorOptions\" [model]=\"model\"></ngx-monaco-editor>\r\n </div>\r\n} @placeholder {\r\n <div class=\"flex items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\" [style.minHeight]=\"height\">\r\n \u4EE3\u7801\u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n\r\n", styles: [":host{display:block}\n"] }]
2401
2410
  }], propDecorators: { value: [{
2402
2411
  type: Input
2403
2412
  }], language: [{
@@ -2411,13 +2420,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
2411
2420
  }] } });
2412
2421
 
2413
2422
  function addonsExtension(field) {
2414
- if (!field.props || (field.wrappers?.includes('addons'))) {
2423
+ const props = field.props;
2424
+ if (!props || (field.wrappers?.includes('addons'))) {
2415
2425
  return;
2416
2426
  }
2417
- if ((field.props.addonLeft && ((!isNil(field.props.addonLeft.icon) && field.props.addonLeft.icon !== '')
2418
- || (!isNil(field.props.addonLeft.text)) && field.props.addonLeft.text !== ''))
2419
- || (field.props.addonRight && ((!isNil(field.props.addonRight.icon) && field.props.addonRight.icon !== '')
2420
- || (!isNil(field.props.addonRight.text)) && field.props.addonRight.text !== ''))) {
2427
+ if ((props.addonLeft && ((!isNil(props.addonLeft.icon) && props.addonLeft.icon !== '')
2428
+ || (!isNil(props.addonLeft.text)) && props.addonLeft.text !== ''))
2429
+ || (props.addonRight && ((!isNil(props.addonRight.icon) && props.addonRight.icon !== '')
2430
+ || (!isNil(props.addonRight.text)) && props.addonRight.text !== ''))) {
2421
2431
  field.wrappers = [...(field.wrappers ?? []), 'addons'];
2422
2432
  }
2423
2433
  }
@@ -2551,8 +2561,11 @@ class CmatFormFieldWrapperComponent extends FieldWrapper {
2551
2561
  }
2552
2562
  ngAfterViewInit() {
2553
2563
  if (this.formField.appearance !== 'outline' && this.props.hideFieldUnderline === true) {
2554
- const underlineElement = this.formField._elementRef.nativeElement.querySelector('.mat-form-field-underline');
2555
- underlineElement && this._renderer.removeChild(underlineElement.parentNode, underlineElement);
2564
+ const formFieldElement = this._elementRef.nativeElement;
2565
+ const underlineElement = formFieldElement.querySelector('.mat-form-field-underline');
2566
+ if (underlineElement?.parentNode) {
2567
+ this._renderer.removeChild(underlineElement.parentNode, underlineElement);
2568
+ }
2556
2569
  }
2557
2570
  }
2558
2571
  ngOnDestroy() {
@@ -2570,9 +2583,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
2570
2583
  args: [MatFormField, { static: true }]
2571
2584
  }] } });
2572
2585
 
2586
+ const DANGEROUS_PATTERNS = [
2587
+ /\bdocument\s*\./i,
2588
+ /\bwindow\s*\./i,
2589
+ /\beval\s*\(/i,
2590
+ /\bfetch\s*\(/i,
2591
+ /\bXMLHttpRequest\b/i,
2592
+ /\bimport\s*\(/i,
2593
+ /\b__proto__\b/i,
2594
+ /\bconstructor\s*\(/i,
2595
+ /\bprototype\b/i
2596
+ ];
2573
2597
  class CmatButtonTypeComponent extends FieldType {
2574
2598
  constructor() {
2575
- super();
2599
+ super(...arguments);
2576
2600
  this.defaultOptions = {
2577
2601
  props: {
2578
2602
  color: 'primary'
@@ -2583,14 +2607,21 @@ class CmatButtonTypeComponent extends FieldType {
2583
2607
  $event.preventDefault();
2584
2608
  if (this.props.onClick) {
2585
2609
  if (isString(this.props.onClick)) {
2586
- this._executeFunctionFromString(this.props.onClick, $event, this);
2610
+ this._executeFunctionFromString(this.props.onClick, $event, { props: this.props });
2587
2611
  }
2588
2612
  else {
2589
2613
  this.props.onClick($event);
2590
2614
  }
2591
2615
  }
2592
2616
  }
2617
+ _isDangerousCode(code) {
2618
+ return DANGEROUS_PATTERNS.some((pattern) => pattern.test(code));
2619
+ }
2593
2620
  _executeFunctionFromString(funcString, event, context) {
2621
+ if (this._isDangerousCode(funcString)) {
2622
+ console.error('Button onClick contains potentially dangerous code and was blocked:', funcString);
2623
+ return;
2624
+ }
2594
2625
  try {
2595
2626
  // eslint-disable-next-line @typescript-eslint/no-implied-eval
2596
2627
  const func = new Function('event', 'context', `with (context) { ${funcString} }`);
@@ -2600,13 +2631,13 @@ class CmatButtonTypeComponent extends FieldType {
2600
2631
  console.error('Error executing function from string:', error);
2601
2632
  }
2602
2633
  }
2603
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatButtonTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2634
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatButtonTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2604
2635
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatButtonTypeComponent, isStandalone: true, selector: "cmat-button-type", usesInheritance: true, ngImport: i0, template: "<button class=\"print:hidden\" matButton=\"filled\" [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ props.label }}\r\n</button>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2605
2636
  }
2606
2637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatButtonTypeComponent, decorators: [{
2607
2638
  type: Component,
2608
2639
  args: [{ selector: 'cmat-button-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule], template: "<button class=\"print:hidden\" matButton=\"filled\" [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ props.label }}\r\n</button>" }]
2609
- }], ctorParameters: () => [] });
2640
+ }] });
2610
2641
 
2611
2642
  class CmatCascadeTypeComponent extends FieldType {
2612
2643
  constructor() {
@@ -2630,9 +2661,11 @@ class CmatCascadeTypeComponent extends FieldType {
2630
2661
  if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
2631
2662
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
2632
2663
  if (data) {
2664
+ const key = this.field.props?.domain?.key;
2665
+ const code = this.field.props?.domain?.code;
2633
2666
  const datas = data.filter((i) => {
2634
- if (this.field.props?.domain?.key)
2635
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
2667
+ if (key)
2668
+ return i[key] === code;
2636
2669
  return false;
2637
2670
  });
2638
2671
  if (datas && this.field.props?.domain?.value) {
@@ -2672,6 +2705,8 @@ class CmatCheckListTypeComponent extends FieldType {
2672
2705
  super();
2673
2706
  this.isIndeterminate = false;
2674
2707
  this.isChecked = false;
2708
+ this.urlData = [];
2709
+ this.optionsData = [];
2675
2710
  this.checklist = [];
2676
2711
  this.filteredData = [];
2677
2712
  this._http = inject(HttpClient);
@@ -2700,13 +2735,15 @@ class CmatCheckListTypeComponent extends FieldType {
2700
2735
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
2701
2736
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
2702
2737
  if (data) {
2738
+ const key = this.field.props?.domain?.key;
2739
+ const code = this.field.props?.domain?.code;
2703
2740
  const datas = data.filter((i) => {
2704
- if (this.field.props?.domain?.key)
2705
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
2741
+ if (key)
2742
+ return i[key] === code;
2706
2743
  return false;
2707
2744
  });
2708
2745
  if (datas && this.field.props?.domain?.value) {
2709
- this.urlData = datas[0][this.field.props?.domain?.value];
2746
+ this.urlData = datas[0][this.field.props?.domain?.value] ?? [];
2710
2747
  }
2711
2748
  else {
2712
2749
  this.urlData = [];
@@ -2725,7 +2762,7 @@ class CmatCheckListTypeComponent extends FieldType {
2725
2762
  this._filteredItems.set(this.filteredData);
2726
2763
  }
2727
2764
  this.formControl.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
2728
- this.checklist = value ?? [];
2765
+ this.checklist = (value ?? []);
2729
2766
  this._getAllCheckCountState();
2730
2767
  });
2731
2768
  }
@@ -2733,7 +2770,9 @@ class CmatCheckListTypeComponent extends FieldType {
2733
2770
  return item.id ?? index;
2734
2771
  }
2735
2772
  filterByQuery(event) {
2736
- this.filteredData = this.datas.filter(data => data.value.toString().toLowerCase().includes(event) ?? data.label.toLowerCase().includes(event));
2773
+ const query = typeof event === 'string' ? event : event.target?.value ?? '';
2774
+ const normalizedQuery = query.toLowerCase();
2775
+ this.filteredData = this.datas.filter((data) => this._toSearchText(data.value).toLowerCase().includes(normalizedQuery) || this._toSearchText(data.label).toLowerCase().includes(normalizedQuery));
2737
2776
  this._filteredItems.set(this.filteredData);
2738
2777
  this._getAllCheckCountState();
2739
2778
  }
@@ -2768,7 +2807,8 @@ class CmatCheckListTypeComponent extends FieldType {
2768
2807
  this.formControl.setValue(this.checklist);
2769
2808
  }
2770
2809
  isCheck(data) {
2771
- return this.formControl.value?.filter((i) => i.value === data.value).length > 0;
2810
+ const selected = (this.formControl.value ?? []);
2811
+ return selected.filter((i) => i.value === data.value).length > 0;
2772
2812
  }
2773
2813
  _getAllCheckCountState() {
2774
2814
  if (this.props.showAllCheck && !this.props.disabled) {
@@ -2800,35 +2840,47 @@ class CmatCheckListTypeComponent extends FieldType {
2800
2840
  }
2801
2841
  }
2802
2842
  }
2843
+ _toSearchText(value) {
2844
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' ? String(value) : '';
2845
+ }
2803
2846
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatCheckListTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2804
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatCheckListTypeComponent, isStandalone: true, selector: "cmat-checklist-type", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-sm border shadow-sm bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\"\r\n placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\" (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [value]=\"data\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i3$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2847
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatCheckListTypeComponent, isStandalone: true, selector: "cmat-checklist-type", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-sm border shadow-sm bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\"\r\n placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\" (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i3$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2805
2848
  }
2806
2849
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatCheckListTypeComponent, decorators: [{
2807
2850
  type: Component,
2808
- args: [{ selector: 'cmat-checklist-type', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, MatIconModule, NgClass, MatRippleModule, AsyncPipe], template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-sm border shadow-sm bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\"\r\n placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\" (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [value]=\"data\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"] }]
2851
+ args: [{ selector: 'cmat-checklist-type', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, MatIconModule, NgClass, MatRippleModule, AsyncPipe], template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded-sm border shadow-sm bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input #query class=\"w-full min-w-0 py-1 border-none\" type=\"text\"\r\n placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\" (input)=\"filterByQuery(query.value)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" disableRipple [color]=\"'primary'\"\r\n [checked]=\"isCheck(data)\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{width:100%}\n"] }]
2809
2852
  }], ctorParameters: () => [] });
2810
2853
 
2811
2854
  class CmatChipsInputTypeComponent extends FieldType {
2812
2855
  constructor() {
2813
2856
  super();
2857
+ this.autocompleteUrlData = [];
2814
2858
  this._http = inject(HttpClient);
2815
2859
  this._destroyRef = inject(DestroyRef);
2816
2860
  }
2817
2861
  get autocompleteText() {
2818
- return this.autocompleteUrlData?.length > 0 ? this.autocompleteUrlData : this.props?.autocompleteText?.split(',') ?? [];
2862
+ if (this.autocompleteUrlData?.length > 0) {
2863
+ // Ensure all elements are strings, filter out non-strings
2864
+ return this.autocompleteUrlData.filter((item) => typeof item === 'string');
2865
+ }
2866
+ return this.props?.autocompleteText?.split(',') ?? [];
2819
2867
  }
2820
2868
  ngOnInit() {
2821
2869
  const url = this.props?.domain?.url;
2822
2870
  if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
2823
2871
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
2824
2872
  if (data) {
2825
- const datas = data.filter((i) => {
2826
- if (this.field.props?.domain?.key)
2827
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
2873
+ const key = this.field.props?.domain?.key;
2874
+ const code = this.field.props?.domain?.code;
2875
+ const datas = data
2876
+ .filter((i) => typeof i === 'object' && i !== null)
2877
+ .filter((i) => {
2878
+ if (key)
2879
+ return i[key] === code;
2828
2880
  return false;
2829
2881
  });
2830
2882
  if (datas && this.field.props?.domain?.value) {
2831
- this.autocompleteUrlData = datas[0][this.field.props?.domain?.value];
2883
+ this.autocompleteUrlData = [datas[0][this.field.props?.domain?.value]];
2832
2884
  }
2833
2885
  else {
2834
2886
  this.autocompleteUrlData = [];
@@ -2933,15 +2985,17 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
2933
2985
  get urlData$() {
2934
2986
  return this._urlData$;
2935
2987
  }
2936
- onChange(value, checked) {
2988
+ onChange(optionValue, checked) {
2989
+ const value = optionValue ?? '';
2937
2990
  this.formControl.markAsDirty();
2938
2991
  if (this.props.type === 'array') {
2992
+ const currentValue = (this.formControl.value ?? []);
2939
2993
  this.formControl.patchValue(checked
2940
- ? [...(this.formControl.value ?? []), value]
2941
- : [...(this.formControl.value ?? [])].filter(o => o !== value));
2994
+ ? [...currentValue, value]
2995
+ : currentValue.filter(o => o !== value));
2942
2996
  }
2943
2997
  else {
2944
- this.formControl.patchValue({ ...this.formControl.value, [value]: checked });
2998
+ this.formControl.patchValue({ ...(this.formControl.value ?? {}), [value]: checked });
2945
2999
  }
2946
3000
  this.formControl.markAsTouched();
2947
3001
  }
@@ -2950,13 +3004,15 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
2950
3004
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
2951
3005
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
2952
3006
  if (data) {
3007
+ const key = this.field.props?.domain?.key;
3008
+ const code = this.field.props?.domain?.code;
2953
3009
  const datas = data.filter((i) => {
2954
- if (this.field.props?.domain?.key)
2955
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
3010
+ if (key)
3011
+ return i[key] === code;
2956
3012
  return false;
2957
3013
  });
2958
3014
  if (datas && this.field.props?.domain?.value) {
2959
- this._urlData.set(datas[0][this.field.props?.domain?.value]);
3015
+ this._urlData.set(datas[0][this.field.props?.domain?.value] ?? []);
2960
3016
  }
2961
3017
  else {
2962
3018
  this._urlData.set([]);
@@ -2972,18 +3028,19 @@ class CmatMultiCheckboxTypeComponent extends FieldType {
2972
3028
  }
2973
3029
  }
2974
3030
  isChecked(option) {
2975
- const value = this.formControl.value;
2976
- return value && (this.props.type === 'array' ? value.includes(option.value) : value[option.value]);
3031
+ const formValue = this.formControl.value;
3032
+ const optionValue = option.value ?? '';
3033
+ return !!formValue && (this.props.type === 'array' ? formValue.includes(optionValue) : !!formValue[optionValue]);
2977
3034
  }
2978
3035
  trackByFn(index) {
2979
3036
  return index;
2980
3037
  }
2981
3038
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatMultiCheckboxTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2982
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatMultiCheckboxTypeComponent, isStandalone: true, selector: "cmat-multicheckbox-type", viewQueries: [{ propertyName: "checkboxes", predicate: MatCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value, $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3039
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatMultiCheckboxTypeComponent, isStandalone: true, selector: "cmat-multicheckbox-type", viewQueries: [{ propertyName: "checkboxes", predicate: MatCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value?.toString(), $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2983
3040
  }
2984
3041
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatMultiCheckboxTypeComponent, decorators: [{
2985
3042
  type: Component,
2986
- args: [{ selector: 'cmat-multicheckbox-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, AsyncPipe, FormlySelectModule], template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value, $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"] }]
3043
+ args: [{ selector: 'cmat-multicheckbox-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule, AsyncPipe, FormlySelectModule], template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value?.toString(), $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"] }]
2987
3044
  }], ctorParameters: () => [], propDecorators: { checkboxes: [{
2988
3045
  type: ViewChildren,
2989
3046
  args: [MatCheckbox]
@@ -3052,13 +3109,15 @@ class CmatRadioTypeComponent extends FieldType {
3052
3109
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
3053
3110
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
3054
3111
  if (data) {
3112
+ const key = this.field.props?.domain?.key;
3113
+ const code = this.field.props?.domain?.code;
3055
3114
  const datas = data.filter((i) => {
3056
- if (this.field.props?.domain?.key)
3057
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
3115
+ if (key)
3116
+ return i[key] === code;
3058
3117
  return false;
3059
3118
  });
3060
3119
  if (datas && this.field.props?.domain?.value) {
3061
- this._urlData.set(datas[0][this.field.props?.domain?.value]);
3120
+ this._urlData.set(datas[0][this.field.props?.domain?.value] ?? []);
3062
3121
  }
3063
3122
  else {
3064
3123
  this._urlData.set([]);
@@ -3128,6 +3187,7 @@ class CmatSelectTypeComponent extends FieldType {
3128
3187
  showToggleAllCheckbox: false
3129
3188
  },
3130
3189
  };
3190
+ this.optionsData = [];
3131
3191
  this.filteredCustomDetails = new ReplaySubject(1);
3132
3192
  this.filteredCache = [];
3133
3193
  this.isIndeterminate = false;
@@ -3139,7 +3199,7 @@ class CmatSelectTypeComponent extends FieldType {
3139
3199
  }
3140
3200
  get datas() {
3141
3201
  if (isArray(this.field.props?.options)) {
3142
- return this._urlData?.length > 0 ? this._urlData : this.field.props?.options || [];
3202
+ return this._urlData?.length > 0 ? this._urlData : this.field.props?.options ?? [];
3143
3203
  }
3144
3204
  else {
3145
3205
  return this._urlData?.length > 0 ? this._urlData : this.optionsData || [];
@@ -3155,13 +3215,15 @@ class CmatSelectTypeComponent extends FieldType {
3155
3215
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
3156
3216
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
3157
3217
  if (data) {
3218
+ const key = this.field.props?.domain?.key;
3219
+ const code = this.field.props?.domain?.code;
3158
3220
  const datas = data.filter((i) => {
3159
- if (this.field.props?.domain?.key)
3160
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
3221
+ if (key)
3222
+ return i[key] === code;
3161
3223
  return false;
3162
3224
  });
3163
3225
  if (datas && this.field.props?.domain?.value) {
3164
- this._urlData = datas[0][this.field.props?.domain?.value];
3226
+ this._urlData = datas[0][this.field.props?.domain?.value] ?? [];
3165
3227
  }
3166
3228
  else {
3167
3229
  this._urlData = [];
@@ -3213,7 +3275,7 @@ class CmatSelectTypeComponent extends FieldType {
3213
3275
  this.filteredCustomDetails.pipe(take(1), takeUntilDestroyed(this._destroyRef))
3214
3276
  .subscribe((val) => {
3215
3277
  if (selectAllValue) {
3216
- this.formControl.setValue(val.filter(o => !o.disabled));
3278
+ this.formControl.setValue(val.filter((o) => !o.disabled));
3217
3279
  }
3218
3280
  else {
3219
3281
  this.formControl.setValue([]);
@@ -3225,26 +3287,24 @@ class CmatSelectTypeComponent extends FieldType {
3225
3287
  if (!this.datas) {
3226
3288
  return;
3227
3289
  }
3228
- let search = this.multiFilterCtrl.value;
3290
+ const search = (this.multiFilterCtrl.value ?? '').toLowerCase();
3229
3291
  if (!search) {
3230
3292
  this.filteredCache = this.datas.slice();
3231
3293
  this.filteredCustomDetails.next(this.filteredCache);
3232
3294
  return;
3233
3295
  }
3234
- else {
3235
- search = search.toLowerCase();
3236
- }
3237
- this.filteredCache = this.datas.filter(items => isString(items) ? items.toString().toLowerCase().includes(search) : (items?.value.toString().toLowerCase().includes(search) ?? items?.label.toString().toLowerCase().includes(search)));
3296
+ this.filteredCache = this.datas.filter((items) => this._toSearchText(items.value).toLowerCase().includes(search) || this._toSearchText(items.label).toLowerCase().includes(search));
3238
3297
  this.filteredCustomDetails.next(this.filteredCache);
3239
3298
  }
3240
3299
  setToggleAllCheckboxState() {
3241
3300
  let filteredLength = 0;
3242
3301
  if (this.formControl.value && this.props.search) {
3243
- const cache = this.filteredCache.filter(o => !o.disabled);
3244
- const v = isArray(this.formControl.value) || isUndefined(this.formControl.value) ? this.formControl.value : [this.formControl.value];
3302
+ const cache = this.filteredCache.filter((o) => !o.disabled);
3303
+ const currentValue = this.formControl.value;
3304
+ const v = isArray(currentValue) || isUndefined(currentValue) ? currentValue : [currentValue];
3245
3305
  if (v)
3246
3306
  cache.forEach((el) => {
3247
- if (v.findIndex((t) => isString(t) ? el === t : (t?.value === el.value && t?.label === el.label)) > -1) {
3307
+ if (v.findIndex(t => t != null && this._isSameSelectValue(t, el)) > -1) {
3248
3308
  filteredLength++;
3249
3309
  }
3250
3310
  });
@@ -3257,7 +3317,16 @@ class CmatSelectTypeComponent extends FieldType {
3257
3317
  }
3258
3318
  }
3259
3319
  compareWithFn(o1, o2) {
3260
- return o1 && o2 ? o1?.label === o2?.label && o1?.value === o2?.value : o1 === o2;
3320
+ if (!o1 || !o2) {
3321
+ return o1 === o2;
3322
+ }
3323
+ return o1.label === o2.label && o1.value === o2.value;
3324
+ }
3325
+ _isSameSelectValue(left, right) {
3326
+ return left.value === right.value && left.label === right.label;
3327
+ }
3328
+ _toSearchText(value) {
3329
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' ? String(value) : '';
3261
3330
  }
3262
3331
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatSelectTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3263
3332
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatSelectTypeComponent, isStandalone: true, selector: "cmat-select-search-type", usesInheritance: true, ngImport: i0, template: "@if(props.multiple){\r\n<mat-select #multiSelect multiple [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (customDetails?.length!==0&&props.canNull&&!props.multiple) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track $index) {\r\n @if(i.label){\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track $index) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }@else {\r\n <mat-option [value]=\"i\">{{i}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}@else {\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (customDetails?.length!==0&&props.canNull&&!props.multiple) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track $index) {\r\n @if(i.label){\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track $index) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }@else {\r\n <mat-option [value]=\"i\">{{i}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: CmatSelectSearchComponent$1, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -3290,9 +3359,11 @@ class CmatSelectTreeTypeComponent extends FieldType$1 {
3290
3359
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
3291
3360
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
3292
3361
  if (data) {
3362
+ const key = this.field.props?.domain?.key;
3363
+ const code = this.field.props?.domain?.code;
3293
3364
  const datas = data.filter((i) => {
3294
- if (this.field.props?.domain?.key)
3295
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
3365
+ if (key)
3366
+ return i[key] === code;
3296
3367
  return false;
3297
3368
  });
3298
3369
  if (datas && this.field.props?.domain?.value) {
@@ -3342,9 +3413,11 @@ class CmatSelectTableTypeComponent extends FieldType$1 {
3342
3413
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
3343
3414
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
3344
3415
  if (data) {
3416
+ const key = this.field.props?.domain?.key;
3417
+ const code = this.field.props?.domain?.code;
3345
3418
  const datas = data.filter((i) => {
3346
- if (this.field.props?.domain?.key)
3347
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
3419
+ if (key)
3420
+ return i[key] === code;
3348
3421
  return false;
3349
3422
  });
3350
3423
  if (datas && this.field.props?.domain?.value) {
@@ -3424,18 +3497,24 @@ class CmatTableTypeComponent extends FieldArrayType {
3424
3497
  this._viewContainerRef = inject(ViewContainerRef);
3425
3498
  }
3426
3499
  get fieldArray() {
3427
- return this.field.fieldArray.fieldGroup;
3500
+ return this._fieldModel.fieldArray?.fieldGroup ?? [];
3428
3501
  }
3429
3502
  get key() {
3430
- return this.field.fieldArray.fieldGroup[0].id;
3503
+ return this._fieldModel.fieldArray?.fieldGroup?.[0]?.id ?? '';
3504
+ }
3505
+ get _tableProps() {
3506
+ return this.props;
3507
+ }
3508
+ get _fieldModel() {
3509
+ return this.field;
3431
3510
  }
3432
3511
  ngOnInit() {
3433
- this.columns = this.field.fieldArray.fieldGroup[0].fieldGroup.
3434
- filter(field => field.props?.showColumn).map(field => ({
3435
- key: field.key,
3512
+ this.columns = (this._fieldModel.fieldArray?.fieldGroup?.[0]?.fieldGroup ?? [])
3513
+ .filter(field => field.props?.showColumn).map(field => ({
3514
+ key: String(field.key ?? ''),
3436
3515
  label: field.props?.label ?? '',
3437
3516
  }));
3438
- if (this.props.disabled) {
3517
+ if (this._tableProps.disabled) {
3439
3518
  this.displayedColumns = [...this.columns.map(column => column.key)];
3440
3519
  }
3441
3520
  else {
@@ -3477,11 +3556,13 @@ class CmatTableTypeComponent extends FieldArrayType {
3477
3556
  this.inlineform.markAllAsTouched();
3478
3557
  return;
3479
3558
  }
3480
- if (this.dialogType == 'add' && this.currentMode[this.key]) {
3481
- this.add(this.model?.length ?? 0, this.currentMode[this.key]);
3559
+ const model = this.model;
3560
+ const currentValue = this.currentMode[this.key];
3561
+ if (this.dialogType === 'add' && currentValue) {
3562
+ this.add(model?.length ?? 0, currentValue);
3482
3563
  }
3483
- else if (this.dialogType == 'edit' && this.currentMode[this.key]) {
3484
- this.model[this.currentIndex] = this.currentMode[this.key];
3564
+ else if (this.dialogType === 'edit' && currentValue && model) {
3565
+ model[this.currentIndex] = currentValue;
3485
3566
  }
3486
3567
  this.table.renderRows();
3487
3568
  this.refreshVersion.update(value => value + 1);
@@ -3514,6 +3595,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
3514
3595
  class CmatTagsTypeComponent extends FieldType {
3515
3596
  constructor() {
3516
3597
  super();
3598
+ this.urlData = [];
3599
+ this.optionsData = [];
3517
3600
  this.refreshVersion = signal(0, ...(ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []));
3518
3601
  this._http = inject(HttpClient);
3519
3602
  this._overlay = inject(Overlay);
@@ -3543,13 +3626,15 @@ class CmatTagsTypeComponent extends FieldType {
3543
3626
  if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
3544
3627
  this._http.get(url).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((data) => {
3545
3628
  if (data) {
3629
+ const key = this.field.props?.domain?.key;
3630
+ const code = this.field.props?.domain?.code;
3546
3631
  const datas = data.filter((i) => {
3547
- if (this.field.props?.domain?.key)
3548
- return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
3632
+ if (key)
3633
+ return i[key] === code;
3549
3634
  return false;
3550
3635
  });
3551
3636
  if (datas && this.field.props?.domain?.value) {
3552
- this.urlData = datas[0][this.field.props?.domain?.value];
3637
+ this.urlData = datas[0][this.field.props?.domain?.value] ?? [];
3553
3638
  }
3554
3639
  else {
3555
3640
  this.urlData = [];
@@ -3604,8 +3689,8 @@ class CmatTagsTypeComponent extends FieldType {
3604
3689
  });
3605
3690
  }
3606
3691
  filterTags(event) {
3607
- const value = event.target.value.toLowerCase();
3608
- this._filteredItems.set(this.tags.filter(tag => tag.label.toString().toLowerCase().includes(value) ?? tag.value.toString().toLowerCase().includes(value)));
3692
+ const value = (event.target?.value ?? '').toLowerCase();
3693
+ this._filteredItems.set(this.tags.filter((tag) => this._toSearchText(tag.label).toLowerCase().includes(value) || this._toSearchText(tag.value).toLowerCase().includes(value)));
3609
3694
  }
3610
3695
  toggleTag(tag) {
3611
3696
  if (tag.disabled)
@@ -3622,7 +3707,10 @@ class CmatTagsTypeComponent extends FieldType {
3622
3707
  this.refreshVersion.update(value => value + 1);
3623
3708
  }
3624
3709
  isCheck(tag) {
3625
- return this.formControl.value?.filter((i) => i.value === tag.value).length > 0;
3710
+ return (this.formControl.value?.filter((i) => i.value === tag.value).length ?? 0) > 0;
3711
+ }
3712
+ _toSearchText(value) {
3713
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' ? String(value) : '';
3626
3714
  }
3627
3715
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatTagsTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3628
3716
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatTagsTypeComponent, isStandalone: true, selector: "cmat-tags-type", viewQueries: [{ propertyName: "_tagsPanelOrigin", first: true, predicate: ["tagsPanelOrigin"], descendants: true }, { propertyName: "_tagsPanel", first: true, predicate: ["tagsPanel"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"text-lg mb-2\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n</div>\r\n<div class=\"flex flex-wrap items-center -m-2\" [attr.data-refresh]=\"refreshVersion()\" [tabIndex]=\"props.tabindex\">\r\n <ng-container>\r\n @for (selectedItem of formControl.value; track $index) {\r\n <div\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700\">\r\n <span class=\"text-md font-medium whitespace-nowrap\">{{selectedItem.label}}</span>\r\n </div>\r\n }\r\n\r\n <div #tagsPanelOrigin\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 cursor-pointer text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700 print:hidden\" role=\"presentation\" (click)=\"openTagsPanel()\">\r\n\r\n @if(formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:pencil-square'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u7F16\u8F91</span>\r\n }\r\n\r\n @if(!formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:plus-circle'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u65B0\u589E</span>\r\n }\r\n\r\n <ng-template #tagsPanel>\r\n <div class=\"w-60 rounded-sm border shadow-md bg-card\">\r\n <div class=\"flex items-center m-3 mr-2\">\r\n <div class=\"flex items-center\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\">\r\n </mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-none\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n [maxLength]=\"30\" (input)=\"filterTags($event)\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col max-h-64 py-2 border-t overflow-y-auto scrollbar-custom\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track $index) {\r\n <div role=\"presentation\"\r\n class=\"flex items-center h-10 min-h-10 pl-1 pr-4 cursor-pointer hover:bg-hover\"\r\n matRipple (click)=\"toggleTag(tag)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10\" [color]=\"'primary'\"\r\n [disabled]=\"tag.disabled\" [checked]=\"isCheck(tag)\">\r\n {{tag.label}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }@else {\r\n <div class=\"flex flex-auto flex-col justify-center px-4 h-10 min-h-10\">\r\n \u65E0\u7ED3\u679C\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -3680,13 +3768,13 @@ class CmatUploadTypeComponent extends FieldType {
3680
3768
  }
3681
3769
  }
3682
3770
  upload(id) {
3683
- var rootValue = this.baseGroup.get('uploadId')?.value;
3771
+ const rootValue = this.baseGroup.get('uploadId')?.value;
3684
3772
  if (rootValue && !isNil(id)) {
3685
3773
  this.baseGroup.get('uploadId')?.setValue([id, ...rootValue]);
3686
3774
  }
3687
3775
  }
3688
3776
  remove(id) {
3689
- var rootValue = this.baseGroup.get('removeId')?.value;
3777
+ const rootValue = this.baseGroup.get('removeId')?.value;
3690
3778
  if (rootValue && !isNil(id)) {
3691
3779
  this.baseGroup.get('removeId')?.setValue([id, ...rootValue]);
3692
3780
  }
@@ -3694,12 +3782,12 @@ class CmatUploadTypeComponent extends FieldType {
3694
3782
  updateData(i) {
3695
3783
  const data = Array.isArray(i) ? i : [i];
3696
3784
  this.formControl.setValue(data.map((j) => {
3697
- if (j.id)
3785
+ if (typeof j === 'object' && j !== null && 'id' in j && typeof j.id === 'string')
3698
3786
  return {
3699
- id: j.id,
3700
- name: j.name,
3701
- type: j.type,
3702
- size: j.size
3787
+ id: String((j).id),
3788
+ name: typeof j.name === 'string' ? j.name : '',
3789
+ type: typeof j.type === 'string' ? j.type : '',
3790
+ size: Number(j.size ?? 0)
3703
3791
  };
3704
3792
  else
3705
3793
  return j;
@@ -3739,7 +3827,7 @@ class CmatQuillTypeComponent extends FieldType {
3739
3827
  image: this._imgFileHandler.bind(this),
3740
3828
  video: this._videoFileHandler.bind(this),
3741
3829
  word: () => {
3742
- this._wordFileHandler().catch(err => console.error('Word 导出失败:', err));
3830
+ this._wordFileHandler().catch((err) => console.error('Word 导出失败:', err));
3743
3831
  },
3744
3832
  },
3745
3833
  },
@@ -3781,6 +3869,9 @@ class CmatQuillTypeComponent extends FieldType {
3781
3869
  }
3782
3870
  }
3783
3871
  fileChangeEvent(file) {
3872
+ if (!file) {
3873
+ return;
3874
+ }
3784
3875
  const fileModel = {
3785
3876
  id: null,
3786
3877
  fileName: file.name,
@@ -3797,12 +3888,16 @@ class CmatQuillTypeComponent extends FieldType {
3797
3888
  formData.append('fileInfo', JSON.stringify(fileModel));
3798
3889
  this._fileService.uploadFile(formData).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((event) => {
3799
3890
  if (event.type === HttpEventType.Response) {
3800
- this._editorInstance.insertEmbed(this._editorInstance.getSelection(true).index, this._getMediaType(file.type), `${this._config.fileUrl}/download/quill/${event.body.id}`);
3891
+ const fileId = typeof event.body?.id === 'string' ? event.body.id : undefined;
3892
+ if (typeof fileId !== 'string') {
3893
+ return;
3894
+ }
3895
+ this._editorInstance.insertEmbed(this._editorInstance.getSelection(true).index, this._getMediaType(file.type), `${this._config.fileUrl}/download/quill/${fileId}`);
3801
3896
  this._editorInstance.setSelection(this._editorInstance.getSelection(true).index + 1);
3802
3897
  this.formControl.setValue(this._editorInstance.container.innerHTML);
3803
- this._upload(event.body.id);
3898
+ this._upload(fileId);
3804
3899
  }
3805
- this.refreshVersion.update(value => value + 1);
3900
+ this.refreshVersion.update((value) => value + 1);
3806
3901
  });
3807
3902
  }
3808
3903
  editorCreated(editorInstance) {
@@ -3816,20 +3911,20 @@ class CmatQuillTypeComponent extends FieldType {
3816
3911
  }
3817
3912
  });
3818
3913
  }
3819
- contentChanged(editorInstance) {
3914
+ contentChanged(contentChange) {
3820
3915
  const dom = document.createElement('DIV');
3821
- dom.innerHTML = editorInstance.editor.container.innerHTML;
3916
+ dom.innerHTML = contentChange.editor.container.innerHTML;
3822
3917
  const fileDom = dom.querySelectorAll('img, video');
3823
3918
  const arr = [];
3824
3919
  fileDom.forEach((i) => {
3825
3920
  if (i.src.includes(this._config.fileUrl)) {
3826
3921
  const id = i.src.substring(`${this._config.fileUrl}/download/quill/`.length, i.src.length);
3827
- this._imgIds.splice(this._imgIds.findIndex(k => k === id), 1);
3922
+ this._imgIds.splice(this._imgIds.findIndex((k) => k === id), 1);
3828
3923
  arr.push(id);
3829
3924
  }
3830
3925
  });
3831
3926
  this._imgIds.forEach((i) => {
3832
- var rootValue = this.baseGroup.get('removeId')?.value;
3927
+ const rootValue = this.baseGroup.get('removeId')?.value;
3833
3928
  if (rootValue && !isNil(i)) {
3834
3929
  this.baseGroup.get('removeId')?.setValue([i, ...rootValue]);
3835
3930
  }
@@ -3865,7 +3960,7 @@ class CmatQuillTypeComponent extends FieldType {
3865
3960
  let currentListLevel = 0;
3866
3961
  let isList = false;
3867
3962
  for (const op of delta.ops) {
3868
- if (op.insert?.image) {
3963
+ if (typeof op.insert !== 'string' && op.insert?.image) {
3869
3964
  if (currentRun.length > 0) {
3870
3965
  children.push(new Paragraph({ children: currentRun }));
3871
3966
  currentRun = [];
@@ -3903,7 +3998,7 @@ class CmatQuillTypeComponent extends FieldType {
3903
3998
  }
3904
3999
  }
3905
4000
  if (currentRun.length > 0) {
3906
- children.push(this._createParagraph(currentRun, null, isList, currentListLevel));
4001
+ children.push(this._createParagraph(currentRun, undefined, isList, currentListLevel));
3907
4002
  }
3908
4003
  return children;
3909
4004
  }
@@ -3916,25 +4011,23 @@ class CmatQuillTypeComponent extends FieldType {
3916
4011
  size: this._mapFontSize(attributes?.size),
3917
4012
  font: attributes?.font ?? undefined,
3918
4013
  color: attributes?.color ? this._parseColor(attributes.color) : undefined,
3919
- highlight: attributes?.background ? this._parseColor(attributes.background) : undefined
4014
+ highlight: attributes?.background ? this._mapHighlightColor(attributes.background) : undefined
3920
4015
  });
3921
4016
  }
3922
4017
  _createParagraph(runs, attributes, isList, listLevel) {
4018
+ const headerLevel = attributes?.header ? (typeof attributes.header === 'number' ? attributes.header : parseInt(attributes.header)) : undefined;
3923
4019
  const paragraphOptions = {
3924
4020
  children: runs,
3925
4021
  alignment: this._mapAlignment(attributes?.align),
4022
+ ...(headerLevel && headerLevel >= 1 && headerLevel <= 6 ? {
4023
+ heading: HeadingLevel[`HEADING_${headerLevel}`]
4024
+ } : {}),
4025
+ ...(isList && attributes?.list ? {
4026
+ bullet: {
4027
+ level: listLevel ?? 0
4028
+ }
4029
+ } : {})
3926
4030
  };
3927
- if (attributes?.header) {
3928
- const headerLevel = parseInt(attributes.header);
3929
- if (headerLevel >= 1 && headerLevel <= 6) {
3930
- paragraphOptions.heading = HeadingLevel[`HEADING_${headerLevel}`];
3931
- }
3932
- }
3933
- if (isList && attributes?.list) {
3934
- paragraphOptions.bullet = {
3935
- level: listLevel ?? 0
3936
- };
3937
- }
3938
4031
  return new Paragraph(paragraphOptions);
3939
4032
  }
3940
4033
  async _createImageRun(imageUrl) {
@@ -4046,11 +4139,47 @@ class CmatQuillTypeComponent extends FieldType {
4046
4139
  }
4047
4140
  return undefined;
4048
4141
  }
4049
- _dropFileHandler(dataUrl, type, fileData) {
4142
+ _mapHighlightColor(color) {
4143
+ const hex = this._parseColor(color);
4144
+ if (!hex)
4145
+ return HighlightColor.NONE;
4146
+ const r = parseInt(hex.substring(0, 2), 16);
4147
+ const g = parseInt(hex.substring(2, 4), 16);
4148
+ const b = parseInt(hex.substring(4, 6), 16);
4149
+ const colorMap = {
4150
+ [HighlightColor.YELLOW]: [255, 255, 0],
4151
+ [HighlightColor.GREEN]: [0, 128, 0],
4152
+ [HighlightColor.CYAN]: [0, 255, 255],
4153
+ [HighlightColor.RED]: [255, 0, 0],
4154
+ [HighlightColor.BLUE]: [0, 0, 255],
4155
+ [HighlightColor.MAGENTA]: [255, 0, 255],
4156
+ [HighlightColor.DARK_BLUE]: [0, 0, 139],
4157
+ [HighlightColor.DARK_CYAN]: [0, 139, 139],
4158
+ [HighlightColor.DARK_GREEN]: [0, 100, 0],
4159
+ [HighlightColor.DARK_MAGENTA]: [139, 0, 139],
4160
+ [HighlightColor.DARK_RED]: [139, 0, 0],
4161
+ [HighlightColor.DARK_YELLOW]: [128, 128, 0],
4162
+ [HighlightColor.DARK_GRAY]: [169, 169, 169],
4163
+ [HighlightColor.LIGHT_GRAY]: [211, 211, 211],
4164
+ [HighlightColor.BLACK]: [0, 0, 0],
4165
+ [HighlightColor.WHITE]: [255, 255, 255],
4166
+ };
4167
+ let closestColor = HighlightColor.NONE;
4168
+ let minDistance = Infinity;
4169
+ for (const [name, [cr, cg, cb]] of Object.entries(colorMap)) {
4170
+ const distance = (r - cr) ** 2 + (g - cg) ** 2 + (b - cb) ** 2;
4171
+ if (distance < minDistance) {
4172
+ minDistance = distance;
4173
+ closestColor = name;
4174
+ }
4175
+ }
4176
+ return closestColor;
4177
+ }
4178
+ _dropFileHandler(_dataUrl, _type, fileData) {
4050
4179
  this.fileChangeEvent(fileData.toFile());
4051
4180
  }
4052
4181
  _upload(id) {
4053
- var rootValue = this.baseGroup.get('uploadId')?.value;
4182
+ const rootValue = this.baseGroup.get('uploadId')?.value;
4054
4183
  if (rootValue && !isNil(id)) {
4055
4184
  this.baseGroup.get('uploadId')?.setValue([id, ...rootValue]);
4056
4185
  }
@@ -4079,11 +4208,11 @@ class CmatQuillTypeComponent extends FieldType {
4079
4208
  return baseControl;
4080
4209
  }
4081
4210
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatQuillTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4082
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatQuillTypeComponent, isStandalone: true, selector: "cmat-quill-type", viewQueries: [{ propertyName: "imgInput", first: true, predicate: ["imgInput"], descendants: true }, { propertyName: "videoInput", first: true, predicate: ["videoInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<quill-editor class=\"w-full\" defaultEmptyValue=\"\" [formControl]=\"formControl\" [required]=\"required\" [placeholder]=\"placeholder\" [tabindex]=\"props.tabindex\"\r\n [readOnly]=\"disabled\" [modules]=\"quillModules\" (onEditorCreated)=\"editorCreated($event)\"\r\n (onContentChanged)=\"contentChanged($event)\">\r\n \r\n <input #imgInput type=\"file\" accept=\"image/png,image/jpeg,image/jpg,image/gif\" class=\"hidden\" (change)=\"fileChangeEvent(imgInput.files?.[0])\" />\r\n <input #videoInput type=\"file\" accept=\"video/mpeg,video/mp4,audio/mp4\" class=\"hidden\" (change)=\"fileChangeEvent(videoInput.files?.[0])\" />\r\n</quill-editor>\r\n<div class=\"cmat-quill-type\" [attr.data-refresh]=\"refreshVersion()\">\r\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: QuillModule }, { kind: "component", type: i2$5.QuillEditorComponent, selector: "quill-editor" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4211
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatQuillTypeComponent, isStandalone: true, selector: "cmat-quill-type", viewQueries: [{ propertyName: "imgInput", first: true, predicate: ["imgInput"], descendants: true }, { propertyName: "videoInput", first: true, predicate: ["videoInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<quill-editor class=\"w-full\" defaultEmptyValue=\"\" [formControl]=\"formControl\" [required]=\"required\" [placeholder]=\"placeholder\" [tabindex]=\"props.tabindex\"\r\n [readOnly]=\"disabled\" [modules]=\"quillModules\" (onEditorCreated)=\"editorCreated($event)\"\r\n (onContentChanged)=\"contentChanged($event)\">\r\n \r\n <input #imgInput type=\"file\" accept=\"image/png,image/jpeg,image/jpg,image/gif\" class=\"hidden\" (change)=\"fileChangeEvent(imgInput.files?.[0] ?? undefined)\" />\r\n <input #videoInput type=\"file\" accept=\"video/mpeg,video/mp4,audio/mp4\" class=\"hidden\" (change)=\"fileChangeEvent(videoInput.files?.[0] ?? undefined)\" />\r\n</quill-editor>\r\n<div class=\"cmat-quill-type\" [attr.data-refresh]=\"refreshVersion()\">\r\n", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: QuillModule }, { kind: "component", type: i2$5.QuillEditorComponent, selector: "quill-editor" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4083
4212
  }
4084
4213
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatQuillTypeComponent, decorators: [{
4085
4214
  type: Component,
4086
- args: [{ selector: 'cmat-quill-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, QuillModule], template: "<quill-editor class=\"w-full\" defaultEmptyValue=\"\" [formControl]=\"formControl\" [required]=\"required\" [placeholder]=\"placeholder\" [tabindex]=\"props.tabindex\"\r\n [readOnly]=\"disabled\" [modules]=\"quillModules\" (onEditorCreated)=\"editorCreated($event)\"\r\n (onContentChanged)=\"contentChanged($event)\">\r\n \r\n <input #imgInput type=\"file\" accept=\"image/png,image/jpeg,image/jpg,image/gif\" class=\"hidden\" (change)=\"fileChangeEvent(imgInput.files?.[0])\" />\r\n <input #videoInput type=\"file\" accept=\"video/mpeg,video/mp4,audio/mp4\" class=\"hidden\" (change)=\"fileChangeEvent(videoInput.files?.[0])\" />\r\n</quill-editor>\r\n<div class=\"cmat-quill-type\" [attr.data-refresh]=\"refreshVersion()\">\r\n", styles: [":host{display:block;width:100%}\n"] }]
4215
+ args: [{ selector: 'cmat-quill-type', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, QuillModule], template: "<quill-editor class=\"w-full\" defaultEmptyValue=\"\" [formControl]=\"formControl\" [required]=\"required\" [placeholder]=\"placeholder\" [tabindex]=\"props.tabindex\"\r\n [readOnly]=\"disabled\" [modules]=\"quillModules\" (onEditorCreated)=\"editorCreated($event)\"\r\n (onContentChanged)=\"contentChanged($event)\">\r\n \r\n <input #imgInput type=\"file\" accept=\"image/png,image/jpeg,image/jpg,image/gif\" class=\"hidden\" (change)=\"fileChangeEvent(imgInput.files?.[0] ?? undefined)\" />\r\n <input #videoInput type=\"file\" accept=\"video/mpeg,video/mp4,audio/mp4\" class=\"hidden\" (change)=\"fileChangeEvent(videoInput.files?.[0] ?? undefined)\" />\r\n</quill-editor>\r\n<div class=\"cmat-quill-type\" [attr.data-refresh]=\"refreshVersion()\">\r\n", styles: [":host{display:block;width:100%}\n"] }]
4087
4216
  }], ctorParameters: () => [], propDecorators: { imgInput: [{
4088
4217
  type: ViewChild,
4089
4218
  args: ['imgInput']
@@ -4143,13 +4272,14 @@ class CmatDateRangeComponent {
4143
4272
  this.initData = true;
4144
4273
  this.rangeChanged = new EventEmitter();
4145
4274
  this.activeDates = {
4146
- month1: null,
4147
- month2: null
4275
+ month1: dayjs(),
4276
+ month2: dayjs().add(1, 'month')
4148
4277
  };
4149
4278
  this.refreshVersion = signal(0, ...(ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []));
4150
4279
  this.setWhichDate = 'start';
4151
4280
  this._overlay = inject(Overlay);
4152
4281
  this._viewContainerRef = inject(ViewContainerRef);
4282
+ this._overlayRef = null;
4153
4283
  this._range = {
4154
4284
  start: null,
4155
4285
  end: null
@@ -4200,8 +4330,8 @@ class CmatDateRangeComponent {
4200
4330
  this._timeRange = value;
4201
4331
  if (!value && this._range?.start && this._range?.end) {
4202
4332
  this.range = {
4203
- start: this._range.start.clone().startOf('day'),
4204
- end: this._range.end.clone().endOf('day')
4333
+ start: this._range.start.clone().startOf('day').toISOString(),
4334
+ end: this._range.end.clone().endOf('day').toISOString()
4205
4335
  };
4206
4336
  }
4207
4337
  }
@@ -4265,7 +4395,7 @@ class CmatDateRangeComponent {
4265
4395
  };
4266
4396
  this.rangeChanged.emit(range);
4267
4397
  if (!this._programmaticChange) {
4268
- this._onTouched(range);
4398
+ this._onTouched();
4269
4399
  this._onChange(range);
4270
4400
  }
4271
4401
  this.activeDates = {
@@ -4296,6 +4426,10 @@ class CmatDateRangeComponent {
4296
4426
  this._init();
4297
4427
  }
4298
4428
  ngOnDestroy() {
4429
+ if (this._overlayRef) {
4430
+ this._overlayRef.dispose();
4431
+ this._overlayRef = null;
4432
+ }
4299
4433
  // eslint-disable-next-line @typescript-eslint/no-empty-function
4300
4434
  this.writeValue = () => { };
4301
4435
  }
@@ -4326,6 +4460,7 @@ class CmatDateRangeComponent {
4326
4460
  }
4327
4461
  ])
4328
4462
  });
4463
+ this._overlayRef = overlayRef;
4329
4464
  const templatePortal = new TemplatePortal(this._pickerPanel, this._viewContainerRef);
4330
4465
  overlayRef.backdropClick().subscribe(() => {
4331
4466
  if (templatePortal?.isAttached) {
@@ -4335,14 +4470,15 @@ class CmatDateRangeComponent {
4335
4470
  overlayRef.detach();
4336
4471
  overlayRef.dispose();
4337
4472
  }
4473
+ this._overlayRef = null;
4338
4474
  });
4339
4475
  overlayRef.attach(templatePortal);
4340
4476
  }
4341
4477
  getMonthLabel(month) {
4342
4478
  if (month === 1) {
4343
- return this.activeDates.month1?.clone().format('YYYY MMMM');
4479
+ return this.activeDates.month1?.clone().format('YYYY MMMM') ?? '';
4344
4480
  }
4345
- return this.activeDates.month2?.clone().format('YYYY MMMM');
4481
+ return this.activeDates.month2?.clone().format('YYYY MMMM') ?? '';
4346
4482
  }
4347
4483
  dateClass() {
4348
4484
  return (date) => {
@@ -4360,13 +4496,15 @@ class CmatDateRangeComponent {
4360
4496
  if (date.isBetween(start, end, 'day')) {
4361
4497
  return ['cmat-date-range', 'cmat-date-range-mid'];
4362
4498
  }
4363
- return void 0;
4499
+ return [];
4364
4500
  };
4365
4501
  }
4366
4502
  dateFilter() {
4367
4503
  return (date) => !(this.setWhichDate === 'end' && date.isBefore(this._range.start, 'day'));
4368
4504
  }
4369
4505
  onSelectedDateChange(date) {
4506
+ if (!date)
4507
+ return;
4370
4508
  const newRange = {
4371
4509
  start: dayjs().toISOString(),
4372
4510
  end: dayjs().toISOString(),
@@ -4392,7 +4530,7 @@ class CmatDateRangeComponent {
4392
4530
  this.activeDates.month2 = dayjs(this.activeDates.month2).add(1, 'month');
4393
4531
  }
4394
4532
  updateStartTime(event) {
4395
- const parsedTime = this._parseTime(event.target.value);
4533
+ const parsedTime = this._parseTime(event.target?.value ?? '');
4396
4534
  if (this.startTimeFormControl.invalid) {
4397
4535
  if (this._range.start) {
4398
4536
  const time = this._range.start.clone().format(this._timeFormat);
@@ -4416,7 +4554,7 @@ class CmatDateRangeComponent {
4416
4554
  }
4417
4555
  }
4418
4556
  updateEndTime(event) {
4419
- const parsedTime = this._parseTime(event.target.value);
4557
+ const parsedTime = this._parseTime(event.target?.value ?? '');
4420
4558
  if (this.endTimeFormControl.invalid) {
4421
4559
  if (this._range.end) {
4422
4560
  const time = this._range.end.clone().format(this._timeFormat);
@@ -4450,7 +4588,7 @@ class CmatDateRangeComponent {
4450
4588
  };
4451
4589
  }
4452
4590
  else {
4453
- this.range = {};
4591
+ this.range = null;
4454
4592
  }
4455
4593
  this._programmaticChange = true;
4456
4594
  this.timeRange = this.timeRange ?? true;
@@ -4951,7 +5089,7 @@ class CmatFullscreenComponent {
4951
5089
  }
4952
5090
  toggleFullscreen() {
4953
5091
  if (!this._document.fullscreenEnabled) {
4954
- console.log('Fullscreen is not available in this browser.');
5092
+ console.warn('Fullscreen is not available in this browser.');
4955
5093
  return;
4956
5094
  }
4957
5095
  const fullScreen = this._document.fullscreenElement;
@@ -5031,7 +5169,7 @@ class CmatHighlightComponent {
5031
5169
  return;
5032
5170
  }
5033
5171
  if (!this.code) {
5034
- this.code = this._elementRef.nativeElement.value;
5172
+ this.code = this._elementRef.nativeElement.value ?? '';
5035
5173
  }
5036
5174
  this._highlightAndInsert();
5037
5175
  }
@@ -5080,8 +5218,10 @@ class CmatImageComponent {
5080
5218
  this.previewVisible = signal(false, ...(ngDevMode ? [{ debugName: "previewVisible" }] : /* istanbul ignore next */ []));
5081
5219
  this.rotate = 0;
5082
5220
  this.scale = 1;
5221
+ this._animationDuration = 150;
5083
5222
  this._loadingPreview = false;
5084
5223
  this._closePreviewByEscape = false;
5224
+ this._closePreviewTimeoutId = null;
5085
5225
  this._document = inject(DOCUMENT);
5086
5226
  this._originalOverflow = null;
5087
5227
  this._zoomSettings = {
@@ -5136,9 +5276,11 @@ class CmatImageComponent {
5136
5276
  if (this.preview) {
5137
5277
  this._disableBackgroundScroll();
5138
5278
  this.maskVisible.set(true);
5139
- this.previewVisible.set(true);
5140
5279
  this._loadingPreview = true;
5141
- this.previewShowChange.emit(true);
5280
+ requestAnimationFrame(() => {
5281
+ this.previewVisible.set(true);
5282
+ this.previewShowChange.emit(true);
5283
+ });
5142
5284
  }
5143
5285
  }
5144
5286
  onMaskKeydown(event) {
@@ -5175,10 +5317,19 @@ class CmatImageComponent {
5175
5317
  if (this.appendTo === 'body')
5176
5318
  this._document.body.appendChild(this._mask);
5177
5319
  else {
5178
- if (typeof HTMLElement === 'object' ? this.appendTo instanceof HTMLElement : this.appendTo && typeof this.appendTo === 'object' && this.appendTo !== null)
5320
+ if (this.appendTo instanceof HTMLElement) {
5179
5321
  this.appendTo.appendChild(this._mask);
5180
- else if (this.appendTo?.el?.nativeElement)
5181
- this.appendTo.el.nativeElement.appendChild(this.mask?.nativeElement);
5322
+ }
5323
+ else if (this.appendTo instanceof ElementRef) {
5324
+ this.appendTo.nativeElement.appendChild(this._mask);
5325
+ }
5326
+ else if (typeof this.appendTo === 'object' && this.appendTo !== null && 'el' in this.appendTo) {
5327
+ const target = this.appendTo;
5328
+ const nativeElement = target.el?.nativeElement;
5329
+ if (nativeElement) {
5330
+ nativeElement.appendChild(this._mask);
5331
+ }
5332
+ }
5182
5333
  }
5183
5334
  }
5184
5335
  }
@@ -5186,14 +5337,19 @@ class CmatImageComponent {
5186
5337
  return { transform: 'rotate(' + this.rotate + 'deg) scale(' + this.scale + ')' };
5187
5338
  }
5188
5339
  closePreview() {
5340
+ if (this._closePreviewTimeoutId !== null) {
5341
+ clearTimeout(this._closePreviewTimeoutId);
5342
+ this._closePreviewTimeoutId = null;
5343
+ }
5189
5344
  this._enableBackgroundScroll();
5190
5345
  this.previewVisible.set(false);
5191
- this.rotate = 0;
5192
- this.scale = this._zoomSettings.default;
5193
- setTimeout(() => {
5346
+ this._closePreviewTimeoutId = window.setTimeout(() => {
5194
5347
  this.maskVisible.set(false);
5348
+ this.rotate = 0;
5349
+ this.scale = this._zoomSettings.default;
5195
5350
  this.previewShowChange.emit(false);
5196
- }, 25);
5351
+ this._closePreviewTimeoutId = null;
5352
+ }, this._animationDuration);
5197
5353
  }
5198
5354
  imageError(event) {
5199
5355
  this.imageErrorEvent.emit(event);
@@ -5208,11 +5364,11 @@ class CmatImageComponent {
5208
5364
  body.style.overflow = this._originalOverflow ?? '';
5209
5365
  }
5210
5366
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5211
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatImageComponent, isStandalone: true, selector: "cmat-image", inputs: { imageClass: "imageClass", imageStyle: "imageStyle", src: "src", srcSet: "srcSet", previewImageSrc: "previewImageSrc", previewImageSrcSet: "previewImageSrcSet", alt: "alt", width: "width", height: "height", loading: "loading", appendTo: "appendTo", preview: ["preview", "preview", booleanAttribute] }, outputs: { previewShowChange: "previewShowChange", imageErrorEvent: "imageErrorEvent" }, host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)" } }, viewQueries: [{ propertyName: "mask", first: true, predicate: ["mask"], descendants: true }, { propertyName: "previewButton", first: true, predicate: ["previewButton"], descendants: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true }], ngImport: i0, template: "<span [ngClass]=\"{ 'cmat-image-preview-container ': preview }\">\r\n <img [attr.src]=\"src\" [attr.srcset]=\"srcSet\" [attr.alt]=\"alt\" [attr.width]=\"width\" [attr.height]=\"height\"\r\n [attr.loading]=\"loading\" [ngStyle]=\"imageStyle\" [class]=\"imageClass\" (error)=\"imageError($event)\" />\r\n @if(preview){\r\n <div class=\"cmat-image-preview-indicator\" role=\"presentation\" (click)=\"onImageClick()\">\r\n <button #previewButton matIconButton>\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'heroicons_solid:eye'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @if(maskVisible()){\r\n <div #mask class=\"cmat-image-mask cmat-image-overlay cmat-image-overlay-enter\" animate.leave=\"cmat-image-overlay-leave\"\r\n role=\"dialog\" [attr.aria-modal]=\"maskVisible()\" (click)=\"closePreview()\" (keydown)=\"onMaskKeydown($event)\">\r\n <div class=\"cmat-image-toolbar\" role=\"presentation\" (click)=\"handleToolbarClick($event)\">\r\n <button matIconButton (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_right'\"></mat-icon>\r\n </button>\r\n <button matIconButton (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_left'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomOutDisabled\" (click)=\"zoomOut()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_out'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomInDisabled\" (click)=\"zoomIn()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_in'\"></mat-icon>\r\n </button>\r\n <button #closeButton matIconButton (click)=\"closePreview()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:close'\"></mat-icon>\r\n </button>\r\n </div>\r\n @if(previewVisible()){\r\n <div role=\"presentation\" class=\"cmat-image-preview-enter\" animate.leave=\"cmat-image-preview-leave\"\r\n (click)=\"onPreviewImageClick($event)\">\r\n <img class=\"cmat-image-preview\" alt=\"image\" [attr.src]=\"previewImageSrc ? previewImageSrc : src\"\r\n [attr.srcset]=\"previewImageSrcSet\" [ngStyle]=\"imagePreviewStyle()\" />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n</span>\r\n", styles: [".cmat-image-mask{display:flex;align-items:center;justify-content:center}.cmat-image-preview-container{position:relative;display:inline-block;line-height:0}.cmat-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;outline:none;border:none;padding:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .3s}.cmat-image-preview-container:hover>.cmat-image-preview-indicator{opacity:1;cursor:pointer;background-color:#00000080}.cmat-image-preview-container>img{cursor:pointer}.cmat-image-toolbar{position:absolute;top:0;right:0;display:flex;z-index:1;padding:.5rem}.cmat-image-preview{transition:transform .15s;max-width:100vw;max-height:100vh}.cmat-image-preview-enter{animation:preview-enter-animation .15s cubic-bezier(0,0,.2,1)}.cmat-image-preview-leave{animation:preview-leave-animation .15s cubic-bezier(0,0,.2,1)}.cmat-image-overlay{background-color:#0006;transition-duration:.2s;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:99}.cmat-image-overlay-enter{animation:image-overlay-enter-animation .15s}.cmat-image-overlay-leave{z-index:0;animation:image-overlay-leave-animation .15s}@keyframes preview-enter-animation{0%{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}@keyframes preview-leave-animation{0%{transform:scale(1);opacity:1}to{transform:scale(.7);opacity:0}}@keyframes image-overlay-enter-animation{0%{background-color:transparent}to{background-color:#000000e6}}@keyframes image-overlay-leave-animation{0%{background-color:#000000e6}to{background-color:transparent}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5367
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatImageComponent, isStandalone: true, selector: "cmat-image", inputs: { imageClass: "imageClass", imageStyle: "imageStyle", src: "src", srcSet: "srcSet", previewImageSrc: "previewImageSrc", previewImageSrcSet: "previewImageSrcSet", alt: "alt", width: "width", height: "height", loading: "loading", appendTo: "appendTo", preview: ["preview", "preview", booleanAttribute] }, outputs: { previewShowChange: "previewShowChange", imageErrorEvent: "imageErrorEvent" }, host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)" } }, viewQueries: [{ propertyName: "mask", first: true, predicate: ["mask"], descendants: true }, { propertyName: "previewButton", first: true, predicate: ["previewButton"], descendants: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true }], ngImport: i0, template: "<span [ngClass]=\"{ 'cmat-image-preview-container ': preview }\">\r\n <img [attr.src]=\"src\" [attr.srcset]=\"srcSet\" [attr.alt]=\"alt\" [attr.width]=\"width\" [attr.height]=\"height\"\r\n [attr.loading]=\"loading\" [ngStyle]=\"imageStyle\" [class]=\"imageClass\" (error)=\"imageError($event)\" />\r\n @if(preview){\r\n <div class=\"cmat-image-preview-indicator\" role=\"presentation\" (click)=\"onImageClick()\">\r\n <button #previewButton matIconButton>\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'heroicons_solid:eye'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @if(maskVisible()){\r\n <div #mask class=\"cmat-image-mask cmat-image-overlay cmat-image-overlay-enter\" animate.leave=\"cmat-image-overlay-leave\"\r\n role=\"dialog\" [attr.aria-modal]=\"maskVisible()\" (click)=\"closePreview()\" (keydown)=\"onMaskKeydown($event)\">\r\n <div class=\"cmat-image-toolbar\" role=\"presentation\" (click)=\"handleToolbarClick($event)\">\r\n <button matIconButton (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_right'\"></mat-icon>\r\n </button>\r\n <button matIconButton (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_left'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomOutDisabled\" (click)=\"zoomOut()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_out'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomInDisabled\" (click)=\"zoomIn()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_in'\"></mat-icon>\r\n </button>\r\n <button #closeButton matIconButton (click)=\"closePreview()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:close'\"></mat-icon>\r\n </button>\r\n </div>\r\n @if(previewVisible()){\r\n <div role=\"presentation\" class=\"cmat-image-preview-enter\" animate.leave=\"cmat-image-preview-leave\"\r\n (click)=\"onPreviewImageClick($event)\">\r\n <img class=\"cmat-image-preview\" alt=\"image\" [attr.src]=\"previewImageSrc ? previewImageSrc : src\"\r\n [attr.srcset]=\"previewImageSrcSet\" [ngStyle]=\"imagePreviewStyle()\" />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n</span>\r\n", styles: [".cmat-image-mask{display:flex;align-items:center;justify-content:center}.cmat-image-preview-container{position:relative;display:inline-block;line-height:0}.cmat-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;outline:none;border:none;padding:0;display:flex;align-items:center;justify-content:center;opacity:0;will-change:opacity,background-color;pointer-events:none;transition:opacity .3s ease}.cmat-image-preview-container:hover>.cmat-image-preview-indicator{opacity:1;cursor:pointer;background-color:#00000080;pointer-events:auto}.cmat-image-preview-container>img{cursor:pointer}.cmat-image-toolbar{position:absolute;top:0;right:0;display:flex;z-index:1;padding:.5rem}.cmat-image-preview{transition:transform .18s cubic-bezier(.2,0,0,1),opacity .18s cubic-bezier(.2,0,0,1);max-width:100vw;max-height:100vh;will-change:transform,opacity;transform-origin:center center;backface-visibility:hidden;transform:translateZ(0)}.cmat-image-preview-enter{animation:preview-enter-animation .18s cubic-bezier(.2,0,0,1)}.cmat-image-preview-leave{animation:preview-leave-animation .18s cubic-bezier(.2,0,0,1)}.cmat-image-overlay{background-color:#0006;transition:background-color .18s cubic-bezier(.2,0,0,1),opacity .18s cubic-bezier(.2,0,0,1);will-change:background-color,opacity;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:99}.cmat-image-overlay-enter{animation:image-overlay-enter-animation .18s cubic-bezier(.2,0,0,1)}.cmat-image-overlay-leave{z-index:0;animation:image-overlay-leave-animation .18s cubic-bezier(.2,0,0,1)}@keyframes preview-enter-animation{0%{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}@keyframes preview-leave-animation{0%{transform:scale(1);opacity:1}to{transform:scale(.7);opacity:0}}@keyframes image-overlay-enter-animation{0%{background-color:transparent}to{background-color:#000000e6}}@keyframes image-overlay-leave-animation{0%{background-color:#000000e6}to{background-color:transparent}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5212
5368
  }
5213
5369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatImageComponent, decorators: [{
5214
5370
  type: Component,
5215
- args: [{ selector: 'cmat-image', imports: [CommonModule, MatButtonModule, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<span [ngClass]=\"{ 'cmat-image-preview-container ': preview }\">\r\n <img [attr.src]=\"src\" [attr.srcset]=\"srcSet\" [attr.alt]=\"alt\" [attr.width]=\"width\" [attr.height]=\"height\"\r\n [attr.loading]=\"loading\" [ngStyle]=\"imageStyle\" [class]=\"imageClass\" (error)=\"imageError($event)\" />\r\n @if(preview){\r\n <div class=\"cmat-image-preview-indicator\" role=\"presentation\" (click)=\"onImageClick()\">\r\n <button #previewButton matIconButton>\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'heroicons_solid:eye'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @if(maskVisible()){\r\n <div #mask class=\"cmat-image-mask cmat-image-overlay cmat-image-overlay-enter\" animate.leave=\"cmat-image-overlay-leave\"\r\n role=\"dialog\" [attr.aria-modal]=\"maskVisible()\" (click)=\"closePreview()\" (keydown)=\"onMaskKeydown($event)\">\r\n <div class=\"cmat-image-toolbar\" role=\"presentation\" (click)=\"handleToolbarClick($event)\">\r\n <button matIconButton (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_right'\"></mat-icon>\r\n </button>\r\n <button matIconButton (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_left'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomOutDisabled\" (click)=\"zoomOut()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_out'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomInDisabled\" (click)=\"zoomIn()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_in'\"></mat-icon>\r\n </button>\r\n <button #closeButton matIconButton (click)=\"closePreview()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:close'\"></mat-icon>\r\n </button>\r\n </div>\r\n @if(previewVisible()){\r\n <div role=\"presentation\" class=\"cmat-image-preview-enter\" animate.leave=\"cmat-image-preview-leave\"\r\n (click)=\"onPreviewImageClick($event)\">\r\n <img class=\"cmat-image-preview\" alt=\"image\" [attr.src]=\"previewImageSrc ? previewImageSrc : src\"\r\n [attr.srcset]=\"previewImageSrcSet\" [ngStyle]=\"imagePreviewStyle()\" />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n</span>\r\n", styles: [".cmat-image-mask{display:flex;align-items:center;justify-content:center}.cmat-image-preview-container{position:relative;display:inline-block;line-height:0}.cmat-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;outline:none;border:none;padding:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .3s}.cmat-image-preview-container:hover>.cmat-image-preview-indicator{opacity:1;cursor:pointer;background-color:#00000080}.cmat-image-preview-container>img{cursor:pointer}.cmat-image-toolbar{position:absolute;top:0;right:0;display:flex;z-index:1;padding:.5rem}.cmat-image-preview{transition:transform .15s;max-width:100vw;max-height:100vh}.cmat-image-preview-enter{animation:preview-enter-animation .15s cubic-bezier(0,0,.2,1)}.cmat-image-preview-leave{animation:preview-leave-animation .15s cubic-bezier(0,0,.2,1)}.cmat-image-overlay{background-color:#0006;transition-duration:.2s;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:99}.cmat-image-overlay-enter{animation:image-overlay-enter-animation .15s}.cmat-image-overlay-leave{z-index:0;animation:image-overlay-leave-animation .15s}@keyframes preview-enter-animation{0%{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}@keyframes preview-leave-animation{0%{transform:scale(1);opacity:1}to{transform:scale(.7);opacity:0}}@keyframes image-overlay-enter-animation{0%{background-color:transparent}to{background-color:#000000e6}}@keyframes image-overlay-leave-animation{0%{background-color:#000000e6}to{background-color:transparent}}\n"] }]
5371
+ args: [{ selector: 'cmat-image', imports: [CommonModule, MatButtonModule, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<span [ngClass]=\"{ 'cmat-image-preview-container ': preview }\">\r\n <img [attr.src]=\"src\" [attr.srcset]=\"srcSet\" [attr.alt]=\"alt\" [attr.width]=\"width\" [attr.height]=\"height\"\r\n [attr.loading]=\"loading\" [ngStyle]=\"imageStyle\" [class]=\"imageClass\" (error)=\"imageError($event)\" />\r\n @if(preview){\r\n <div class=\"cmat-image-preview-indicator\" role=\"presentation\" (click)=\"onImageClick()\">\r\n <button #previewButton matIconButton>\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'heroicons_solid:eye'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @if(maskVisible()){\r\n <div #mask class=\"cmat-image-mask cmat-image-overlay cmat-image-overlay-enter\" animate.leave=\"cmat-image-overlay-leave\"\r\n role=\"dialog\" [attr.aria-modal]=\"maskVisible()\" (click)=\"closePreview()\" (keydown)=\"onMaskKeydown($event)\">\r\n <div class=\"cmat-image-toolbar\" role=\"presentation\" (click)=\"handleToolbarClick($event)\">\r\n <button matIconButton (click)=\"rotateRight()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_right'\"></mat-icon>\r\n </button>\r\n <button matIconButton (click)=\"rotateLeft()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:rotate_left'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomOutDisabled\" (click)=\"zoomOut()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_out'\"></mat-icon>\r\n </button>\r\n <button matIconButton [disabled]=\"isZoomInDisabled\" (click)=\"zoomIn()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:zoom_in'\"></mat-icon>\r\n </button>\r\n <button #closeButton matIconButton (click)=\"closePreview()\">\r\n <mat-icon class=\"text-white\" [svgIcon]=\"'mat_solid:close'\"></mat-icon>\r\n </button>\r\n </div>\r\n @if(previewVisible()){\r\n <div role=\"presentation\" class=\"cmat-image-preview-enter\" animate.leave=\"cmat-image-preview-leave\"\r\n (click)=\"onPreviewImageClick($event)\">\r\n <img class=\"cmat-image-preview\" alt=\"image\" [attr.src]=\"previewImageSrc ? previewImageSrc : src\"\r\n [attr.srcset]=\"previewImageSrcSet\" [ngStyle]=\"imagePreviewStyle()\" />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n</span>\r\n", styles: [".cmat-image-mask{display:flex;align-items:center;justify-content:center}.cmat-image-preview-container{position:relative;display:inline-block;line-height:0}.cmat-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;outline:none;border:none;padding:0;display:flex;align-items:center;justify-content:center;opacity:0;will-change:opacity,background-color;pointer-events:none;transition:opacity .3s ease}.cmat-image-preview-container:hover>.cmat-image-preview-indicator{opacity:1;cursor:pointer;background-color:#00000080;pointer-events:auto}.cmat-image-preview-container>img{cursor:pointer}.cmat-image-toolbar{position:absolute;top:0;right:0;display:flex;z-index:1;padding:.5rem}.cmat-image-preview{transition:transform .18s cubic-bezier(.2,0,0,1),opacity .18s cubic-bezier(.2,0,0,1);max-width:100vw;max-height:100vh;will-change:transform,opacity;transform-origin:center center;backface-visibility:hidden;transform:translateZ(0)}.cmat-image-preview-enter{animation:preview-enter-animation .18s cubic-bezier(.2,0,0,1)}.cmat-image-preview-leave{animation:preview-leave-animation .18s cubic-bezier(.2,0,0,1)}.cmat-image-overlay{background-color:#0006;transition:background-color .18s cubic-bezier(.2,0,0,1),opacity .18s cubic-bezier(.2,0,0,1);will-change:background-color,opacity;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:99}.cmat-image-overlay-enter{animation:image-overlay-enter-animation .18s cubic-bezier(.2,0,0,1)}.cmat-image-overlay-leave{z-index:0;animation:image-overlay-leave-animation .18s cubic-bezier(.2,0,0,1)}@keyframes preview-enter-animation{0%{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}@keyframes preview-leave-animation{0%{transform:scale(1);opacity:1}to{transform:scale(.7);opacity:0}}@keyframes image-overlay-enter-animation{0%{background-color:transparent}to{background-color:#000000e6}}@keyframes image-overlay-leave-animation{0%{background-color:#000000e6}to{background-color:transparent}}\n"] }]
5216
5372
  }], propDecorators: { imageClass: [{
5217
5373
  type: Input
5218
5374
  }], imageStyle: [{
@@ -5278,9 +5434,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
5278
5434
 
5279
5435
  class CmatJsonEditorComponent {
5280
5436
  constructor() {
5437
+ this.options = {};
5281
5438
  this.contentChanged = new EventEmitter();
5282
5439
  this.pathChanged = new EventEmitter();
5283
- this.id = 'cmatjsoneditor' + Math.floor(Math.random() * 1000000);
5440
+ this.id = 'cmatjsoneditor-' + crypto.randomUUID().slice(0, 8);
5284
5441
  this.content = {
5285
5442
  text: undefined,
5286
5443
  json: {}
@@ -5288,12 +5445,6 @@ class CmatJsonEditorComponent {
5288
5445
  this._destroyed = false;
5289
5446
  this._document = inject(DOCUMENT$1);
5290
5447
  }
5291
- get darkTheme() {
5292
- return this._isDarkTheme;
5293
- }
5294
- get _isDarkTheme() {
5295
- return this._document.documentElement.classList.contains('dark') || this._document.body.classList.contains('dark');
5296
- }
5297
5448
  set jsonEditorContainer(value) {
5298
5449
  this._jsonEditorContainer = value;
5299
5450
  this._initializeEditor();
@@ -5322,7 +5473,7 @@ class CmatJsonEditorComponent {
5322
5473
  void this._editor?.destroy();
5323
5474
  }
5324
5475
  setSchema(schema) {
5325
- const validator = createAjvValidator({ schema });
5476
+ const validator = createAjvValidator({ schema: schema });
5326
5477
  void this._editor?.updateProps({ validator: validator });
5327
5478
  }
5328
5479
  setSelectionToPath(pathString) {
@@ -5340,11 +5491,12 @@ class CmatJsonEditorComponent {
5340
5491
  if (this._editor) {
5341
5492
  const content = this._editor.get();
5342
5493
  if (isJSONContent(content)) {
5343
- const j = this._editor.get().json;
5494
+ const j = content.json;
5344
5495
  return j;
5345
5496
  }
5346
5497
  else {
5347
- const t = this._editor.get().text;
5498
+ const textContent = content;
5499
+ const t = String(textContent.text ?? '');
5348
5500
  const j = JSON.parse(t);
5349
5501
  return j;
5350
5502
  }
@@ -5374,13 +5526,10 @@ class CmatJsonEditorComponent {
5374
5526
  props: {
5375
5527
  ...this.options,
5376
5528
  content: this.content,
5377
- onChange: (updatedContent, previousContent, { contentErrors, patchResult }) => {
5378
- console.log('onChange', {
5379
- updatedContent,
5380
- previousContent,
5381
- contentErrors,
5382
- patchResult,
5383
- });
5529
+ onChange: (updatedContent, _previousContent, { contentErrors }) => {
5530
+ if (contentErrors) {
5531
+ console.error('JSON Editor content errors:', contentErrors);
5532
+ }
5384
5533
  this.content = updatedContent;
5385
5534
  this.contentChanged.emit(updatedContent);
5386
5535
  },
@@ -5388,9 +5537,9 @@ class CmatJsonEditorComponent {
5388
5537
  onRenderMenu(items,
5389
5538
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5390
5539
  context) {
5391
- items.splice(items.findIndex(i => i['text'] === 'table'), 1);
5392
- items.splice(items.findIndex(i => i['className'] === 'jse-sort'), 1);
5393
- items.splice(items.findIndex(i => i['className'] === 'jse-transform'), 1);
5540
+ items.splice(items.findIndex((i) => i['text'] === 'table'), 1);
5541
+ items.splice(items.findIndex((i) => i['className'] === 'jse-sort'), 1);
5542
+ items.splice(items.findIndex((i) => i['className'] === 'jse-transform'), 1);
5394
5543
  items.forEach((item) => {
5395
5544
  const button = item;
5396
5545
  switch (button['title']) {
@@ -5442,11 +5591,11 @@ class CmatJsonEditorComponent {
5442
5591
  });
5443
5592
  }
5444
5593
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatJsonEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5445
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatJsonEditorComponent, isStandalone: true, selector: "cmat-json-editor", inputs: { options: "options", data: "data" }, outputs: { contentChanged: "contentChanged", pathChanged: "pathChanged" }, host: { properties: { "class.jse-theme-dark": "this.darkTheme" } }, viewQueries: [{ propertyName: "jsonEditorContainer", first: true, predicate: ["jsonEditorContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@defer (on viewport) {\r\n <div #jsonEditorContainer class=\"cmat-jsoneditor\" [id]=\"id\"></div>\r\n} @placeholder {\r\n <div class=\"flex min-h-64 items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\">\r\n JSON \u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n", styles: [".cmat-jsoneditor .jse-main.svelte-sxaskb{min-height:24rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5594
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatJsonEditorComponent, isStandalone: true, selector: "cmat-json-editor", inputs: { options: "options", data: "data" }, outputs: { contentChanged: "contentChanged", pathChanged: "pathChanged" }, viewQueries: [{ propertyName: "jsonEditorContainer", first: true, predicate: ["jsonEditorContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@defer (on viewport) {\r\n <div #jsonEditorContainer class=\"cmat-jsoneditor\" [id]=\"id\"></div>\r\n} @placeholder {\r\n <div class=\"flex min-h-64 items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\">\r\n JSON \u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n", styles: [".cmat-jsoneditor .jse-main.svelte-sxaskb{min-height:24rem}.cmat-jsoneditor{--jse-background-color: rgba(var(--cmat-bg-card-rgb), 1);--jse-text-color: var(--cmat-text-default);--jse-key-color: var(--cmat-text-default);--jse-delimiter-color: var(--cmat-text-hint);--jse-hover-background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5446
5595
  }
5447
5596
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatJsonEditorComponent, decorators: [{
5448
5597
  type: Component,
5449
- args: [{ selector: 'cmat-json-editor', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [], template: "@defer (on viewport) {\r\n <div #jsonEditorContainer class=\"cmat-jsoneditor\" [id]=\"id\"></div>\r\n} @placeholder {\r\n <div class=\"flex min-h-64 items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\">\r\n JSON \u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n", styles: [".cmat-jsoneditor .jse-main.svelte-sxaskb{min-height:24rem}\n"] }]
5598
+ args: [{ selector: 'cmat-json-editor', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [], template: "@defer (on viewport) {\r\n <div #jsonEditorContainer class=\"cmat-jsoneditor\" [id]=\"id\"></div>\r\n} @placeholder {\r\n <div class=\"flex min-h-64 items-center justify-center rounded-2xl border border-dashed border-default bg-card px-4 py-6 text-sm text-secondary shadow-sm\">\r\n JSON \u7F16\u8F91\u5668\u52A0\u8F7D\u4E2D...\r\n </div>\r\n}\r\n", styles: [".cmat-jsoneditor .jse-main.svelte-sxaskb{min-height:24rem}.cmat-jsoneditor{--jse-background-color: rgba(var(--cmat-bg-card-rgb), 1);--jse-text-color: var(--cmat-text-default);--jse-key-color: var(--cmat-text-default);--jse-delimiter-color: var(--cmat-text-hint);--jse-hover-background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}\n"] }]
5450
5599
  }], propDecorators: { options: [{
5451
5600
  type: Input
5452
5601
  }], data: [{
@@ -5455,9 +5604,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
5455
5604
  type: Output
5456
5605
  }], pathChanged: [{
5457
5606
  type: Output
5458
- }], darkTheme: [{
5459
- type: HostBinding,
5460
- args: ['class.jse-theme-dark']
5461
5607
  }], jsonEditorContainer: [{
5462
5608
  type: ViewChild,
5463
5609
  args: ['jsonEditorContainer']
@@ -5495,8 +5641,9 @@ class CmatKnobInputComponent {
5495
5641
  this._placeholder = '';
5496
5642
  this._required = false;
5497
5643
  this._disabled = false;
5498
- // eslint-disable-next-line @typescript-eslint/no-empty-function
5499
- this._onModelChange = () => { };
5644
+ this._onModelChange = () => {
5645
+ // Intentionally left blank
5646
+ };
5500
5647
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5501
5648
  this._onTouchedChange = () => { };
5502
5649
  if (this.ngControl != null) {
@@ -5702,9 +5849,9 @@ class CmatKnobInputComponent {
5702
5849
  }
5703
5850
  onTouchMove(event) {
5704
5851
  if (!this.disabled && event instanceof TouchEvent && event.touches.length === 1) {
5705
- const rect = this._el.nativeElement.children[0].getBoundingClientRect();
5852
+ const rect = this._el.nativeElement.firstElementChild?.getBoundingClientRect();
5706
5853
  const touch = event.targetTouches.item(0);
5707
- if (touch) {
5854
+ if (touch && rect) {
5708
5855
  const offsetX = touch.clientX - rect.left;
5709
5856
  const offsetY = touch.clientY - rect.top;
5710
5857
  this.updateValue(offsetX, offsetY);
@@ -5723,7 +5870,7 @@ class CmatKnobInputComponent {
5723
5870
  this.valueChange.emit(this.value);
5724
5871
  }
5725
5872
  writeValue(value) {
5726
- this.value = value;
5873
+ this.value = value ?? this.min;
5727
5874
  this.refreshVersion.update(value => value + 1);
5728
5875
  }
5729
5876
  registerOnChange(fn) {
@@ -5787,13 +5934,13 @@ class CmatKnobInputComponent {
5787
5934
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatKnobInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5788
5935
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatKnobInputComponent, isStandalone: true, selector: "cmat-knob-input", inputs: { id: "id", valueColor: "valueColor", rangeColor: "rangeColor", textColor: "textColor", valueTemplate: "valueTemplate", name: "name", size: "size", step: "step", min: "min", max: "max", strokeWidth: "strokeWidth", showValue: "showValue", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown": "onKeyDown($event)", "mousedown": "onMouseDown($event)", "mouseup": "onMouseUp($event)", "touchstart": "onTouchStart($event)", "touchend": "onTouchEnd($event)" }, properties: { "attr.id": "this.id" } }, providers: [
5789
5936
  { provide: MatFormFieldControl, useExisting: CmatKnobInputComponent }
5790
- ], viewQueries: [{ propertyName: "_knobElementRef", first: true, predicate: ["knob"], descendants: true }], exportAs: ["cmatKnobInput"], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [attr.data-refresh]=\"refreshVersion()\" [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\" (keydown.enter)=\"onKeyDown($event)\" (keydown.space)=\"onKeyDown($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n", styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5937
+ ], viewQueries: [{ propertyName: "_knobElementRef", first: true, predicate: ["knob"], descendants: true }], exportAs: ["cmatKnobInput"], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [attr.data-refresh]=\"refreshVersion()\" [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\" (keydown.enter)=\"onKeyDown($event)\" (keydown.space)=\"onKeyDown($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>\r\n\r\n", styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5791
5938
  }
5792
5939
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatKnobInputComponent, decorators: [{
5793
5940
  type: Component,
5794
5941
  args: [{ selector: 'cmat-knob-input', providers: [
5795
5942
  { provide: MatFormFieldControl, useExisting: CmatKnobInputComponent }
5796
- ], exportAs: 'cmatKnobInput', imports: [NgStyle], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [attr.data-refresh]=\"refreshVersion()\" [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\" (keydown.enter)=\"onKeyDown($event)\" (keydown.space)=\"onKeyDown($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n", styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"] }]
5943
+ ], exportAs: 'cmatKnobInput', imports: [NgStyle], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [attr.data-refresh]=\"refreshVersion()\" [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\" (keydown.enter)=\"onKeyDown($event)\" (keydown.space)=\"onKeyDown($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>\r\n\r\n", styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"] }]
5797
5944
  }], ctorParameters: () => [], propDecorators: { _knobElementRef: [{
5798
5945
  type: ViewChild,
5799
5946
  args: ['knob', { static: false }]
@@ -5929,8 +6076,8 @@ const CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR = {
5929
6076
  };
5930
6077
  class CmatMaterialColorPickerComponent {
5931
6078
  constructor() {
5932
- this.selectedColor = signal({ palette: 'bg-indigo', hue: '500', color: 'bg-indigo-500' }, ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
5933
6079
  this.colorChanged = new EventEmitter();
6080
+ this.selectedColor = signal({ palette: 'bg-indigo', hue: '500', color: 'bg-indigo-500' }, ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
5934
6081
  this.palettes = baseColors;
5935
6082
  this.hues = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
5936
6083
  this.selectedHue = '500';
@@ -6006,7 +6153,7 @@ class CmatMaterialColorPickerComponent {
6006
6153
  color: this.selectedPalette + '-' + this.selectedHue
6007
6154
  });
6008
6155
  this._color = this.selectedColor().color;
6009
- this.colorChanged.emit(this.selectedColor());
6156
+ this.colorChanged.emit(this.selectedColor().color);
6010
6157
  this._modelTouched(this.selectedColor().color);
6011
6158
  this._modelChange(this.selectedColor().color);
6012
6159
  }
@@ -6736,7 +6883,7 @@ class CmatDatetimepickerTimeInputDirective {
6736
6883
  });
6737
6884
  }
6738
6885
  get hasFocus() {
6739
- return this._element.nativeElement && this._element?.nativeElement === document?.activeElement;
6886
+ return !!this._element.nativeElement && this._element?.nativeElement === document?.activeElement;
6740
6887
  }
6741
6888
  get inputElement() {
6742
6889
  return this._element.nativeElement;
@@ -8058,10 +8205,11 @@ class CmatDatetimepickerComponent {
8058
8205
  this._closeAnimationTimeoutId = null;
8059
8206
  }
8060
8207
  const activeElement = this._document.activeElement;
8208
+ const overlayElement = location.nativeElement;
8061
8209
  if (canRestoreFocus &&
8062
8210
  (!activeElement ||
8063
8211
  activeElement === this._document.activeElement ||
8064
- location.nativeElement.contains(activeElement))) {
8212
+ overlayElement.contains(activeElement))) {
8065
8213
  this._focusedElementBeforeOpen?.focus();
8066
8214
  }
8067
8215
  this._focusedElementBeforeOpen = null;
@@ -8114,12 +8262,7 @@ class CmatDatetimepickerComponent {
8114
8262
  if (isDialog) {
8115
8263
  overlayElement.setAttribute('aria-modal', 'true');
8116
8264
  }
8117
- this._getCloseStream(overlayRef).subscribe((event) => {
8118
- if (event) {
8119
- event.preventDefault();
8120
- }
8121
- this.close();
8122
- });
8265
+ this._getCloseStream(overlayRef).subscribe(() => this.close());
8123
8266
  this._componentRef = overlayRef.attach(portal);
8124
8267
  this._forwardContentValues(this._componentRef.instance);
8125
8268
  if (!isDialog) {
@@ -8180,10 +8323,27 @@ class CmatDatetimepickerComponent {
8180
8323
  ]);
8181
8324
  }
8182
8325
  _getCloseStream(overlayRef) {
8183
- return merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(filter(event => ((event.code === 'Escape' && !hasModifierKey(event)) ||
8184
- (this.datetimepickerInput &&
8185
- hasModifierKey(event, 'altKey') &&
8186
- event.code === 'ArrowUp')))));
8326
+ return new Observable((subscriber) => {
8327
+ const subscriptions = new Subscription();
8328
+ subscriptions.add(overlayRef.backdropClick().subscribe(() => {
8329
+ subscriber.next();
8330
+ subscriber.complete();
8331
+ }));
8332
+ subscriptions.add(overlayRef.detachments().subscribe(() => {
8333
+ subscriber.next();
8334
+ subscriber.complete();
8335
+ }));
8336
+ subscriptions.add(overlayRef.keydownEvents().pipe(filter(event => ((event.code === 'Escape' && !hasModifierKey(event)) ||
8337
+ (this.datetimepickerInput &&
8338
+ hasModifierKey(event, 'altKey') &&
8339
+ event.code === 'ArrowUp')))).subscribe(() => {
8340
+ subscriber.next();
8341
+ subscriber.complete();
8342
+ }));
8343
+ return () => {
8344
+ subscriptions.unsubscribe();
8345
+ };
8346
+ });
8187
8347
  }
8188
8348
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDatetimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8189
8349
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatDatetimepickerComponent, isStandalone: true, selector: "cmat-datetimepicker", inputs: { startView: "startView", mode: "mode", timeInterval: "timeInterval", preventSameDateTimeSelection: "preventSameDateTimeSelection", xPosition: "xPosition", yPosition: "yPosition", multiYearSelector: "multiYearSelector", twelvehour: "twelvehour", panelClass: "panelClass", opened: "opened", color: "color", startAt: "startAt", type: "type", timeInput: "timeInput", touchUi: "touchUi", disabled: "disabled", restoreFocus: "restoreFocus" }, outputs: { selectedChanged: "selectedChanged", openedStream: "openedStream", closedStream: "closedStream", viewChanged: "viewChanged" }, exportAs: ["cmatDatetimepicker"], ngImport: i0, template: '', isInline: true, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation:landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation:portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}.cmat-datetimepicker-transform-panel.enter-dropdown{animation:panel-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.enter-dialog{animation:panel-dialog-enter .15s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.leave{animation:panel-leave .1s linear}@keyframes panel-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panel-dialog-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panel-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
@@ -8390,7 +8550,7 @@ class CmatDatetimepickerInputDirective {
8390
8550
  }
8391
8551
  getOverlayLabelId() {
8392
8552
  if (this._formField) {
8393
- return this._formField.getLabelId();
8553
+ return this._formField.getLabelId() ?? null;
8394
8554
  }
8395
8555
  return this._elementRef.nativeElement.getAttribute('aria-labelledby');
8396
8556
  }
@@ -8454,7 +8614,7 @@ class CmatDatetimepickerInputDirective {
8454
8614
  }
8455
8615
  }
8456
8616
  _getParseFormat() {
8457
- let parseFormat;
8617
+ let parseFormat = this._dateFormats.parse.dateInput;
8458
8618
  switch (this.datetimepicker.type) {
8459
8619
  case 'date':
8460
8620
  parseFormat = this._dateFormats.parse.dateInput;
@@ -8472,7 +8632,6 @@ class CmatDatetimepickerInputDirective {
8472
8632
  parseFormat = this._dateFormats.parse.yearInput;
8473
8633
  break;
8474
8634
  }
8475
- parseFormat ??= this._dateFormats.parse.dateInput;
8476
8635
  return parseFormat;
8477
8636
  }
8478
8637
  _formatValue(value) {
@@ -9244,6 +9403,7 @@ class CmatVerticalNavigationComponent {
9244
9403
  this.inner = false;
9245
9404
  this.mode = 'side';
9246
9405
  this.name = '';
9406
+ this.navigation = [];
9247
9407
  this.opened = true;
9248
9408
  this.position = 'left';
9249
9409
  this.transparentOverlay = false;
@@ -9762,7 +9922,7 @@ class CmatOtpInputComponent {
9762
9922
  this._valueChangesSub = this.otpForm.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
9763
9923
  Object.keys(this.otpForm.controls).forEach((k) => {
9764
9924
  const val = this.otpForm.controls[k].value;
9765
- if (val && val.length > 1) {
9925
+ if (typeof val === 'string' && val.length > 1) {
9766
9926
  if (val.length >= this.config.length) {
9767
9927
  this.setValue(val);
9768
9928
  }
@@ -10071,7 +10231,7 @@ class CmatOtpInputComponent {
10071
10231
  let val = null;
10072
10232
  Object.keys(this.otpForm.controls).forEach((k) => {
10073
10233
  let ctrlVal = this.otpForm.controls[k].value;
10074
- if (ctrlVal) {
10234
+ if (typeof ctrlVal === 'string' && ctrlVal) {
10075
10235
  const isLengthExceed = ctrlVal.length > 1;
10076
10236
  ctrlVal = ctrlVal[0];
10077
10237
  const letterCase = this.config.letterCase?.toLocaleLowerCase();
@@ -10741,17 +10901,19 @@ var Criteria;
10741
10901
 
10742
10902
  class CmatPasswordStrengthValidator {
10743
10903
  isUndefinedOrEmpty(control) {
10744
- if (!control?.value || control.value.length === 0) {
10904
+ const value = typeof control.value === 'string' ? control.value : '';
10905
+ if (!value || value.length === 0) {
10745
10906
  return void 0;
10746
10907
  }
10747
10908
  }
10748
10909
  validate(criteria, regex) {
10749
10910
  return (control) => {
10750
10911
  this.isUndefinedOrEmpty(control);
10751
- if (!regex.test(control.value)) {
10912
+ const value = typeof control.value === 'string' ? control.value : '';
10913
+ if (!regex.test(value)) {
10752
10914
  const failed = {};
10753
10915
  failed[criteria] = {
10754
- actualValue: control.value,
10916
+ actualValue: value,
10755
10917
  requiredPattern: regex
10756
10918
  };
10757
10919
  return failed;
@@ -10762,11 +10924,12 @@ class CmatPasswordStrengthValidator {
10762
10924
  confirm(password) {
10763
10925
  return (control) => {
10764
10926
  this.isUndefinedOrEmpty(control);
10765
- if (control.value !== password) {
10927
+ const value = typeof control.value === 'string' ? control.value : '';
10928
+ if (value !== password) {
10766
10929
  return {
10767
10930
  notConfirmed: {
10768
10931
  password: password,
10769
- passwordConfirmation: control.value
10932
+ passwordConfirmation: value
10770
10933
  }
10771
10934
  };
10772
10935
  }
@@ -11102,8 +11265,8 @@ class CmatPopoverComponent {
11102
11265
  this.closeDisabled = false;
11103
11266
  this.classList = {};
11104
11267
  this._onAnimationStateChange = new EventEmitter();
11268
+ this._hostElementRef = inject(ElementRef);
11105
11269
  this._dir = inject(Directionality, { optional: true });
11106
- this._elementRef = inject(ElementRef);
11107
11270
  this._position = ['below', 'after'];
11108
11271
  this._triggerEvent = 'hover';
11109
11272
  this._scrollStrategy = 'reposition';
@@ -11246,7 +11409,7 @@ class CmatPopoverComponent {
11246
11409
  obj[className] = true;
11247
11410
  return obj;
11248
11411
  }, {});
11249
- this._elementRef.nativeElement.className = '';
11412
+ this._hostElementRef.nativeElement.setAttribute('class', '');
11250
11413
  this.setPositionClasses();
11251
11414
  }
11252
11415
  }
@@ -11821,6 +11984,7 @@ class CmatQRCodeComponent {
11821
11984
  this._renderer = inject(Renderer2);
11822
11985
  this._sanitizer = inject(DomSanitizer);
11823
11986
  this._currentOperationId = 0;
11987
+ this._previousObjectUrl = null;
11824
11988
  }
11825
11989
  ngOnChanges() {
11826
11990
  this._createQRCode();
@@ -11836,11 +12000,16 @@ class CmatQRCodeComponent {
11836
12000
  return new Blob([uInt8Array], { type: imageType });
11837
12001
  }
11838
12002
  emitQRCodeURL(element) {
12003
+ if (this._previousObjectUrl) {
12004
+ URL.revokeObjectURL(this._previousObjectUrl);
12005
+ this._previousObjectUrl = null;
12006
+ }
11839
12007
  const className = element.constructor.name;
11840
12008
  if (className === SVGSVGElement.name) {
11841
12009
  const svgHTML = element.outerHTML;
11842
12010
  const blob = new Blob([svgHTML], { type: 'image/svg+xml' });
11843
12011
  const urlSvg = URL.createObjectURL(blob);
12012
+ this._previousObjectUrl = urlSvg;
11844
12013
  const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlSvg);
11845
12014
  this.qrCodeURL.emit(urlSanitized);
11846
12015
  return;
@@ -11854,6 +12023,7 @@ class CmatQRCodeComponent {
11854
12023
  }
11855
12024
  const blobData = this.convertBase64ImageUrlToBlob(urlImage);
11856
12025
  const urlBlob = URL.createObjectURL(blobData);
12026
+ this._previousObjectUrl = urlBlob;
11857
12027
  const urlSanitized = this._sanitizer.bypassSecurityTrustUrl(urlBlob);
11858
12028
  this.qrCodeURL.emit(urlSanitized);
11859
12029
  }
@@ -11903,7 +12073,7 @@ class CmatQRCodeComponent {
11903
12073
  });
11904
12074
  }
11905
12075
  _renderElement(element) {
11906
- for (const node of this.qrcElement.nativeElement.childNodes) {
12076
+ for (const node of Array.from(this.qrcElement.nativeElement.childNodes)) {
11907
12077
  this._renderer.removeChild(this.qrcElement.nativeElement, node);
11908
12078
  }
11909
12079
  this._renderer.appendChild(this.qrcElement.nativeElement, element);
@@ -12018,7 +12188,7 @@ class CmatQRCodeComponent {
12018
12188
  }
12019
12189
  }
12020
12190
  catch (e) {
12021
- console.error('鐢熸垚QRCode閿欒:', e.message);
12191
+ console.error('生成QRCode错误:', e instanceof Error ? e.message : String(e));
12022
12192
  }
12023
12193
  }
12024
12194
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatQRCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -12155,7 +12325,7 @@ class CmatRatingComponent {
12155
12325
  }
12156
12326
  }
12157
12327
  writeValue(value) {
12158
- if (value) {
12328
+ if (value !== null && value !== undefined) {
12159
12329
  this.value = value;
12160
12330
  this.currentValue.set(value);
12161
12331
  }
@@ -12353,15 +12523,16 @@ class CmatSelectSearchComponent {
12353
12523
  this._options$ = signal(null, ...(ngDevMode ? [{ debugName: "_options$" }] : /* istanbul ignore next */ []));
12354
12524
  this._optionsList$ = toObservable(this._options$).pipe(switchMap((_options) => _options ?
12355
12525
  _options.changes.pipe(map((options) => options.toArray()), startWith$1(_options.toArray())) : of(null)));
12356
- this._optionsLength$ = this._optionsList$.pipe(map(options => options ? options.length : 0));
12526
+ this._optionsLength$ = this._optionsList$.pipe(map((options) => options ? options.length : 0));
12527
+ this._previousSelectedValues = [];
12357
12528
  // eslint-disable-next-line @typescript-eslint/member-ordering
12358
12529
  this.showNoEntriesFound = signal(false, ...(ngDevMode ? [{ debugName: "showNoEntriesFound" }] : /* istanbul ignore next */ []));
12359
12530
  // eslint-disable-next-line @typescript-eslint/member-ordering
12360
12531
  this.showNoEntriesFound$ = combineLatest([
12361
12532
  this.formControl.valueChanges,
12362
12533
  this._optionsLength$
12363
- ]).pipe(map(([value, optionsLength]) => this.noEntriesFoundLabel && value
12364
- && optionsLength === this._getOptionsLengthOffset()), tap(showNoEntriesFound => this.showNoEntriesFound.set(!!showNoEntriesFound)));
12534
+ ]).pipe(map(([value, optionsLength]) => !!this.noEntriesFoundLabel && !!value
12535
+ && optionsLength === this._getOptionsLengthOffset()), tap((showNoEntriesFound) => this.showNoEntriesFound.set(!!showNoEntriesFound)));
12365
12536
  this.onTouched = () => { };
12366
12537
  this._applyDefaultOptions(this._defaultOptions);
12367
12538
  }
@@ -12369,7 +12540,7 @@ class CmatSelectSearchComponent {
12369
12540
  return !!this._matOption;
12370
12541
  }
12371
12542
  get value() {
12372
- return this.formControl.value;
12543
+ return this.formControl.value ?? '';
12373
12544
  }
12374
12545
  get _options() {
12375
12546
  return this._options$();
@@ -12387,7 +12558,7 @@ class CmatSelectSearchComponent {
12387
12558
  this.matSelect.panelClass = [this.matSelect.panelClass, panelClass];
12388
12559
  }
12389
12560
  else if (typeof this.matSelect.panelClass === 'object') {
12390
- this.matSelect.panelClass.entries[panelClass] = true;
12561
+ this.matSelect.panelClass[panelClass] = true;
12391
12562
  }
12392
12563
  }
12393
12564
  else {
@@ -12425,7 +12596,7 @@ class CmatSelectSearchComponent {
12425
12596
  .subscribe(() => this._adjustScrollTopToFitActiveOptionIntoView());
12426
12597
  }
12427
12598
  else {
12428
- console.log('_keyManager was not initialized.');
12599
+ console.warn('_keyManager was not initialized.');
12429
12600
  }
12430
12601
  this._options = this.matSelect.options;
12431
12602
  let previousFirstOption = this._options.toArray()[this._getOptionsLengthOffset()];
@@ -12441,7 +12612,7 @@ class CmatSelectSearchComponent {
12441
12612
  const firstOptionIsChanged = !this.matSelect.compareWith(previousFirstOption, currentFirstOption);
12442
12613
  if (firstOptionIsChanged
12443
12614
  || !keyManager.activeItem
12444
- || !options.find(option => this.matSelect.compareWith(option, keyManager.activeItem))) {
12615
+ || !options.find((option) => this.matSelect.compareWith(option, keyManager.activeItem))) {
12445
12616
  keyManager.setFirstItemActive();
12446
12617
  }
12447
12618
  setTimeout(() => {
@@ -12500,12 +12671,17 @@ class CmatSelectSearchComponent {
12500
12671
  // 方向键切换时同步当前高亮项
12501
12672
  if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {
12502
12673
  const ariaActiveDescendantId = this.matSelect._getAriaActiveDescendant();
12503
- const index = this._options?.toArray().findIndex(item => item.id === ariaActiveDescendantId) ?? -1;
12674
+ const index = this._options?.toArray().findIndex((item) => item.id === ariaActiveDescendantId) ?? -1;
12504
12675
  if (index >= 0) {
12505
12676
  this._unselectActiveDescendant();
12506
12677
  this._activeDescendant = this._options?.toArray()[index]._getHostElement();
12507
12678
  this._activeDescendant?.setAttribute('aria-selected', 'true');
12508
- this.searchSelectInput.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);
12679
+ if (ariaActiveDescendantId) {
12680
+ this.searchSelectInput.nativeElement.setAttribute('aria-activedescendant', ariaActiveDescendantId);
12681
+ }
12682
+ else {
12683
+ this.searchSelectInput.nativeElement.removeAttribute('aria-activedescendant');
12684
+ }
12509
12685
  }
12510
12686
  }
12511
12687
  }
@@ -12520,7 +12696,7 @@ class CmatSelectSearchComponent {
12520
12696
  this.onTouched();
12521
12697
  }
12522
12698
  registerOnChange(fn) {
12523
- this.formControl.valueChanges.pipe(filter(value => value !== this._lastExternalInputValue), tap(() => this._lastExternalInputValue = undefined), takeUntilDestroyed(this._destroyRef)).subscribe(fn);
12699
+ this.formControl.valueChanges.pipe(filter((value) => value !== this._lastExternalInputValue), tap(() => this._lastExternalInputValue = undefined), takeUntilDestroyed(this._destroyRef)).subscribe(fn);
12524
12700
  }
12525
12701
  registerOnTouched(fn) {
12526
12702
  this.onTouched = fn;
@@ -12586,11 +12762,8 @@ class CmatSelectSearchComponent {
12586
12762
  if (!defaultOptions) {
12587
12763
  return;
12588
12764
  }
12589
- for (const key of configurableDefaultOptions) {
12590
- if (Object.prototype.hasOwnProperty.call(defaultOptions, key)) {
12591
- this[key] = defaultOptions[key];
12592
- }
12593
- }
12765
+ const options = defaultOptions;
12766
+ Object.assign(this, options);
12594
12767
  }
12595
12768
  _initMultipleHandling() {
12596
12769
  // 初始化多选场景下的已选值保留逻辑
@@ -12605,25 +12778,23 @@ class CmatSelectSearchComponent {
12605
12778
  this.matSelect.ngControl.valueChanges?.pipe(takeUntilDestroyed(this._destroyRef))
12606
12779
  .subscribe((values) => {
12607
12780
  let restoreSelectedValues = false;
12781
+ let currentValues = Array.isArray(values) ? values : [];
12608
12782
  if (this.matSelect.multiple) {
12609
12783
  if ((this.alwaysRestoreSelectedOptionsMulti || (this.formControl.value?.length))
12610
12784
  && this._previousSelectedValues && Array.isArray(this._previousSelectedValues)) {
12611
- if (!values || !Array.isArray(values)) {
12612
- values = [];
12613
- }
12614
- const optionValues = this.matSelect.options.map(option => option.value);
12785
+ const optionValues = this.matSelect.options.map((option) => option.value);
12615
12786
  this._previousSelectedValues.forEach((previousValue) => {
12616
- if (!values.some((v) => this.matSelect.compareWith(v, previousValue))
12617
- && !optionValues.some(v => this.matSelect.compareWith(v, previousValue))) {
12618
- values.push(previousValue);
12787
+ if (!currentValues.some((v) => this.matSelect.compareWith(v, previousValue))
12788
+ && !optionValues.some((v) => this.matSelect.compareWith(v, previousValue))) {
12789
+ currentValues.push(previousValue);
12619
12790
  restoreSelectedValues = true;
12620
12791
  }
12621
12792
  });
12622
12793
  }
12623
12794
  }
12624
- this._previousSelectedValues = values;
12795
+ this._previousSelectedValues = currentValues;
12625
12796
  if (restoreSelectedValues) {
12626
- this.matSelect._onChange(values);
12797
+ this.matSelect._onChange(currentValues);
12627
12798
  }
12628
12799
  });
12629
12800
  }
@@ -12753,6 +12924,7 @@ class CmatSelectTableComponent {
12753
12924
  this._nullRow = { id: null };
12754
12925
  this._completeValueList = [];
12755
12926
  this._placeholder = '';
12927
+ this._value = null;
12756
12928
  this._required = false;
12757
12929
  this._disabled = false;
12758
12930
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -12789,8 +12961,9 @@ class CmatSelectTableComponent {
12789
12961
  this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
12790
12962
  }
12791
12963
  else if (typeof this._matSelect.panelClass === 'object') {
12964
+ const panelClassObject = this._matSelect.panelClass;
12792
12965
  panelClass.forEach((i) => {
12793
- this._matSelect.panelClass.entries[i] = true;
12966
+ panelClassObject[i] = true;
12794
12967
  });
12795
12968
  }
12796
12969
  }
@@ -12826,7 +12999,10 @@ class CmatSelectTableComponent {
12826
12999
  this._matOptions
12827
13000
  .toArray()
12828
13001
  .filter(option => !isNil(option) && !isNil(option.value) && !option._getHostElement().classList.contains('contains-cmat-select-search'))
12829
- .forEach(option => options[`${option.value.id}`] = option);
13002
+ .forEach((option) => {
13003
+ const row = option.value;
13004
+ options[`${row.id}`] = option;
13005
+ });
12830
13006
  const tableOptions = this._buildTableOptions(options);
12831
13007
  this._matSelect?.options.reset(this._matSelectSearch ? [this._matOptions.first, ...tableOptions] : tableOptions);
12832
13008
  try {
@@ -12930,11 +13106,13 @@ class CmatSelectTableComponent {
12930
13106
  if (!isNil(changes.resetFiltersOnOpen) && changes.resetFiltersOnOpen.currentValue !== false) {
12931
13107
  this._resetFilters();
12932
13108
  }
12933
- if (!isNil(changes.dataSource)
12934
- && !isNil(changes.dataSource.currentValue)
12935
- && isArray(changes.dataSource.currentValue.data)) {
12936
- const columns = changes.dataSource.currentValue.columns;
12937
- const data = changes.dataSource.currentValue.data;
13109
+ if (!isNil(changes.dataSource) && !isNil(changes.dataSource.currentValue)) {
13110
+ const currentDataSource = changes.dataSource.currentValue;
13111
+ if (!isArray(currentDataSource.data)) {
13112
+ return;
13113
+ }
13114
+ const columns = currentDataSource.columns;
13115
+ const data = currentDataSource.data;
12938
13116
  this._rowById.clear();
12939
13117
  this._columnKeys = columns.map((column) => column.key);
12940
13118
  this.tableDataSource.set([...data]);
@@ -12983,8 +13161,9 @@ class CmatSelectTableComponent {
12983
13161
  this.completeRowList.splice(0);
12984
13162
  this._completeValueList.splice(0);
12985
13163
  if (option.value) {
12986
- this.completeRowList.push(option.value);
12987
- this._completeValueList.push(option.value.id);
13164
+ const row = option.value;
13165
+ this.completeRowList.push(row);
13166
+ this._completeValueList.push(row.id);
12988
13167
  }
12989
13168
  }
12990
13169
  }
@@ -13007,7 +13186,8 @@ class CmatSelectTableComponent {
13007
13186
  this.closed.emit(!opened);
13008
13187
  return;
13009
13188
  }
13010
- this._table._headerRowDefChanged = true;
13189
+ const table = this._table;
13190
+ table._headerRowDefChanged = true;
13011
13191
  setTimeout(() => this._expandPanelForTableRows(), 1);
13012
13192
  }
13013
13193
  filterFormControl(key) {
@@ -13128,7 +13308,7 @@ class CmatSelectTableComponent {
13128
13308
  if (isNil(this.overallFilterControl.value)) {
13129
13309
  return;
13130
13310
  }
13131
- const filterValueLC = this.overallFilterControl.value.toLowerCase();
13311
+ const filterValueLC = (this.overallFilterControl.value ?? '').toLowerCase();
13132
13312
  if (filterValueLC.trim().length === 0) {
13133
13313
  return;
13134
13314
  }
@@ -13226,7 +13406,19 @@ class CmatSelectTableComponent {
13226
13406
  const columnFilter = filter.filter;
13227
13407
  const comparator = columnFilter?.comparator;
13228
13408
  const filterValue = filter.value;
13229
- const normalizedFilterValue = columnFilter?.type === 'number' ? Number(filterValue) : filterValue;
13409
+ let normalizedFilterValue;
13410
+ if (columnFilter?.type === 'number') {
13411
+ normalizedFilterValue = Number(filterValue);
13412
+ }
13413
+ else if (filterValue === null || filterValue === undefined) {
13414
+ normalizedFilterValue = '';
13415
+ }
13416
+ else if (typeof filterValue === 'object') {
13417
+ normalizedFilterValue = '';
13418
+ }
13419
+ else {
13420
+ normalizedFilterValue = filterValue;
13421
+ }
13230
13422
  if (typeof columnFilter?.comparatorFn === 'function') {
13231
13423
  return columnFilter.comparatorFn.call(null, cellValue, normalizedFilterValue, row);
13232
13424
  }
@@ -13268,6 +13460,12 @@ class CmatSelectTableComponent {
13268
13460
  _getMatOptionById(id) {
13269
13461
  return this._matOptions.find(option => option.id === id);
13270
13462
  }
13463
+ getFilterContext(column) {
13464
+ return { column };
13465
+ }
13466
+ getCellValue(row, key) {
13467
+ return row[key];
13468
+ }
13271
13469
  _expandPanelForTableRows() {
13272
13470
  let tableAdditionalHeight = 0;
13273
13471
  this._table._getRenderedRows(this._table._headerRowOutlet).forEach(row => tableAdditionalHeight += row.getBoundingClientRect().height);
@@ -13302,7 +13500,7 @@ class CmatSelectTableComponent {
13302
13500
  const rowRecord = row;
13303
13501
  let hasMatch = false;
13304
13502
  const substitution = template.replace(/[$]{1}[{]{1}([^}]+)[}]{1}?/g, (_, key) => {
13305
- const value = rowRecord[key];
13503
+ const value = rowRecord[String(key)];
13306
13504
  if (isNil(value)) {
13307
13505
  return '';
13308
13506
  }
@@ -13321,13 +13519,13 @@ class CmatSelectTableComponent {
13321
13519
  return this._sortData([...value], this.triggerLabelSort.active, this.triggerLabelSort.direction);
13322
13520
  }
13323
13521
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatSelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13324
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", isPhone: "isPhone", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", keyParam: "keyParam", compareWith: "compareWith", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { closed: "closed" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], viewQueries: [{ propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent$1, descendants: true }, { propertyName: "_sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "_table", first: true, predicate: MatTable, descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }, { propertyName: "_matOptions", predicate: MatOption$1, descendants: true }], exportAs: ["cmatSelectTable"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{row[columnKey]}}\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : row[columnKey]}}\r\n </div> \r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"], dependencies: [{ kind: "component", type: CmatSelectSearchComponent$1, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: CmatDigitOnlyDirective$1, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
13522
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", isPhone: "isPhone", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", keyParam: "keyParam", compareWith: "compareWith", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { closed: "closed" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], viewQueries: [{ propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent$1, descendants: true }, { propertyName: "_sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "_table", first: true, predicate: MatTable, descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }, { propertyName: "_matOptions", predicate: MatOption$1, descendants: true }], exportAs: ["cmatSelectTable"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{getCellValue(row, columnKey)}}\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : getCellValue(row, columnKey)}}\r\n </div> \r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"], dependencies: [{ kind: "component", type: CmatSelectSearchComponent$1, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: CmatDigitOnlyDirective$1, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
13325
13523
  }
13326
13524
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatSelectTableComponent, decorators: [{
13327
13525
  type: Component,
13328
13526
  args: [{ selector: 'cmat-select-table', exportAs: 'cmatSelectTable', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], imports: [CmatSelectSearchComponent$1, MatFormFieldModule, MatSelectModule, ReactiveFormsModule, CommonModule,
13329
13527
  MatIconModule, MatTableModule, MatInputModule, MatSortModule, CmatDigitOnlyDirective$1
13330
- ], template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{row[columnKey]}}\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : row[columnKey]}}\r\n </div> \r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"] }]
13528
+ ], template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{getCellValue(row, columnKey)}}\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : getCellValue(row, columnKey)}}\r\n </div> \r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"] }]
13331
13529
  }], ctorParameters: () => [], propDecorators: { id: [{
13332
13530
  type: HostBinding,
13333
13531
  args: ['attr.id']
@@ -13606,7 +13804,9 @@ class CmatSelectTreeComponent {
13606
13804
  }
13607
13805
  }
13608
13806
  onFocusOut(event) {
13609
- if (!this._matSelect.panel.nativeElement.contains(event.relatedTarget)) {
13807
+ const relatedTarget = event.relatedTarget;
13808
+ const panelElement = this._matSelect.panel.nativeElement;
13809
+ if (!(relatedTarget instanceof Element) || !panelElement.contains(relatedTarget)) {
13610
13810
  this.touched = true;
13611
13811
  this.focused = false;
13612
13812
  this._onTouchedChange();
@@ -14158,6 +14358,8 @@ class CmatSpeedDialComponent {
14158
14358
  this._animationMode = 'fling';
14159
14359
  this._fixed = false;
14160
14360
  this._documentClickUnlistener = null;
14361
+ this._openChangeTimeoutId = null;
14362
+ this._dialOpened = signal(false, ...(ngDevMode ? [{ debugName: "_dialOpened" }] : /* istanbul ignore next */ []));
14161
14363
  }
14162
14364
  get fixed() {
14163
14365
  return this._fixed;
@@ -14167,14 +14369,25 @@ class CmatSpeedDialComponent {
14167
14369
  this._processOutsideClickState();
14168
14370
  }
14169
14371
  // eslint-disable-next-line @typescript-eslint/member-ordering
14372
+ get dialOpened() {
14373
+ return this._dialOpened();
14374
+ }
14375
+ // eslint-disable-next-line @typescript-eslint/member-ordering
14170
14376
  get open() {
14171
14377
  return this._open;
14172
14378
  }
14173
14379
  set open(open) {
14174
14380
  const previousOpen = this._open;
14175
14381
  this._open = open;
14382
+ this._dialOpened.set(this._open);
14176
14383
  if (previousOpen !== this._open) {
14177
- this.openChange.emit(this._open);
14384
+ if (this._openChangeTimeoutId !== null) {
14385
+ clearTimeout(this._openChangeTimeoutId);
14386
+ }
14387
+ this._openChangeTimeoutId = window.setTimeout(() => {
14388
+ this._openChangeTimeoutId = null;
14389
+ this.openChange.emit(this._open);
14390
+ });
14178
14391
  if (this._isInitialized) {
14179
14392
  this.setActionsVisibility();
14180
14393
  }
@@ -14206,7 +14419,9 @@ class CmatSpeedDialComponent {
14206
14419
  this._setElementClass(previousAnimationMode, false);
14207
14420
  this._setElementClass(this.animationMode, true);
14208
14421
  if (this._isInitialized) {
14209
- void Promise.resolve(null).then(() => (this.open = false));
14422
+ window.setTimeout(() => {
14423
+ this.open = false;
14424
+ });
14210
14425
  }
14211
14426
  }
14212
14427
  }
@@ -14218,6 +14433,10 @@ class CmatSpeedDialComponent {
14218
14433
  }
14219
14434
  ngOnDestroy() {
14220
14435
  this._unsetDocumentClickListener();
14436
+ if (this._openChangeTimeoutId !== null) {
14437
+ clearTimeout(this._openChangeTimeoutId);
14438
+ this._openChangeTimeoutId = null;
14439
+ }
14221
14440
  }
14222
14441
  toggle() {
14223
14442
  this.open = !this.open;
@@ -14269,7 +14488,7 @@ class CmatSpeedDialComponent {
14269
14488
  }
14270
14489
  }
14271
14490
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatSpeedDialComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14272
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatSpeedDialComponent, isStandalone: true, selector: "cmat-speed-dial", inputs: { fixed: "fixed", open: "open", direction: "direction", animationMode: "animationMode" }, outputs: { openChange: "openChange" }, host: { listeners: { "click": "onClick()" }, properties: { "class.dial-opened": "this.open" } }, queries: [{ propertyName: "_childActions", first: true, predicate: CmatSpeedDialActionsComponent, descendants: true }], ngImport: i0, template: `
14491
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatSpeedDialComponent, isStandalone: true, selector: "cmat-speed-dial", inputs: { fixed: "fixed", open: "open", direction: "direction", animationMode: "animationMode" }, outputs: { openChange: "openChange" }, host: { listeners: { "click": "onClick()" }, properties: { "class.dial-opened": "this.dialOpened" } }, queries: [{ propertyName: "_childActions", first: true, predicate: CmatSpeedDialActionsComponent, descendants: true }], ngImport: i0, template: `
14273
14492
  <div class="cmat-speed-dial-container">
14274
14493
  <ng-content select="cmat-speed-dial-trigger" />
14275
14494
  <ng-content select="cmat-speed-dial-actions" />
@@ -14291,10 +14510,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
14291
14510
  args: [CmatSpeedDialActionsComponent]
14292
14511
  }], fixed: [{
14293
14512
  type: Input
14294
- }], open: [{
14513
+ }], dialOpened: [{
14295
14514
  type: HostBinding,
14296
14515
  args: ['class.dial-opened']
14297
- }, {
14516
+ }], open: [{
14298
14517
  type: Input
14299
14518
  }], direction: [{
14300
14519
  type: Input
@@ -14615,7 +14834,7 @@ class CmatToastModalComponent {
14615
14834
  if (this.leaving())
14616
14835
  return;
14617
14836
  this.leaving.set(true);
14618
- const el = this._elementRef.nativeElement?.querySelector('.toast') ?? null;
14837
+ const el = this._elementRef.nativeElement.querySelector('.toast');
14619
14838
  if (el) {
14620
14839
  const onEnd = () => {
14621
14840
  cleanup();
@@ -14738,22 +14957,29 @@ class CmatToastService {
14738
14957
  }
14739
14958
  _setGlobalValues(toast) {
14740
14959
  if (this._globalConfigs) {
14741
- for (const [key, value] of Object.entries(this._globalConfigs)) {
14742
- toast = {
14743
- ...toast,
14744
- [key]: value,
14745
- };
14960
+ const globalConfigs = this._globalConfigs;
14961
+ if (globalConfigs.title) {
14962
+ toast.title = globalConfigs.title;
14746
14963
  }
14747
- if (this._globalConfigs.theme) {
14748
- toast.theme = `toasta-theme-${this._globalConfigs.theme}`;
14964
+ if (globalConfigs.timeout !== undefined) {
14965
+ toast.timeout = globalConfigs.timeout;
14749
14966
  }
14750
- if (this._globalConfigs.position) {
14751
- toast.position = `toasta-position-${this._globalConfigs.position}`;
14967
+ if (globalConfigs.limit !== undefined) {
14968
+ toast.limit = globalConfigs.limit;
14752
14969
  }
14753
- if (this._globalConfigs.showClose === false) {
14970
+ if (globalConfigs.isCountdown !== undefined) {
14971
+ toast.isCountdown = globalConfigs.isCountdown;
14972
+ }
14973
+ if (globalConfigs.theme) {
14974
+ toast.theme = `toasta-theme-${globalConfigs.theme}`;
14975
+ }
14976
+ if (globalConfigs.position) {
14977
+ toast.position = `toasta-position-${globalConfigs.position}`;
14978
+ }
14979
+ if (globalConfigs.showClose === false) {
14754
14980
  toast.showClose = false;
14755
14981
  }
14756
- if (this._globalConfigs.showDuration === false) {
14982
+ if (globalConfigs.showDuration === false) {
14757
14983
  toast.showDuration = false;
14758
14984
  }
14759
14985
  }
@@ -14768,7 +14994,7 @@ class CmatToastService {
14768
14994
  ...toast,
14769
14995
  id: this._counter++,
14770
14996
  };
14771
- if (this.toasts.length >= toast.limit) {
14997
+ if (this.toasts.length >= (toast.limit ?? 0)) {
14772
14998
  this.toasts.shift();
14773
14999
  }
14774
15000
  this.toasts.push(latestToast);
@@ -14828,7 +15054,7 @@ class CmatTransferPickerService {
14828
15054
  ['2', (a, b) => a > b],
14829
15055
  ['3', (a, b) => a < b],
14830
15056
  ['0,2', (a, b) => a >= b],
14831
- ['0,2', (a, b) => a <= b]
15057
+ ['0,3', (a, b) => a <= b]
14832
15058
  ]);
14833
15059
  this._conditionMap = new Map([
14834
15060
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
@@ -14932,7 +15158,7 @@ class CmatTransferPickerService {
14932
15158
  this._filteredDataSource.push(data);
14933
15159
  }
14934
15160
  else {
14935
- compareResultArr.push(compare);
15161
+ compareResultArr.push(compare ?? false);
14936
15162
  }
14937
15163
  }
14938
15164
  });
@@ -15008,12 +15234,12 @@ class CmatTransferPickerFilterComponent {
15008
15234
  }
15009
15235
  onFilterClick(filter) {
15010
15236
  filter.selected = !filter.selected;
15011
- const existFilter = this.filterData.filters.find(item => item.value === filter.value);
15237
+ const existFilter = this.filterData.filters.find((item) => item.value === filter.value);
15012
15238
  if (!existFilter) {
15013
15239
  this.filterData.filters.push(filter);
15014
15240
  }
15015
15241
  else if (!filter.selected) {
15016
- this.filterData.filters.splice(this.filterData.filters.findIndex(j => j === filter), 1);
15242
+ this.filterData.filters.splice(this.filterData.filters.findIndex((j) => j === filter), 1);
15017
15243
  }
15018
15244
  this.changeFilterData();
15019
15245
  }
@@ -15024,6 +15250,11 @@ class CmatTransferPickerFilterComponent {
15024
15250
  changeFilterData() {
15025
15251
  this._service.filterDataSource({ filterData: this.filterData });
15026
15252
  }
15253
+ ngOnDestroy() {
15254
+ if (this.overlayRef) {
15255
+ this.overlayRef.dispose();
15256
+ }
15257
+ }
15027
15258
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatTransferPickerFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15028
15259
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatTransferPickerFilterComponent, isStandalone: true, selector: "cmat-transfer-picker-filter", inputs: { filters: "filters" }, viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }], exportAs: ["cmatTransferPickerFilter"], ngImport: i0, template: "<button type=\"button\" class=\"mr-2 mt-1\" matIconButton cdk-overlay-origin (click)=\"toggleFilter()\">\r\n <mat-icon svgIcon=\"mat_outline:filter_list\"></mat-icon>\r\n</button>\r\n<ng-template #filterTemplate=\"cdkPortal\" cdkPortal>\r\n <div\r\n class=\"transfer-picker-filter-panel bg-card flex flex-col flex-nowrap place-content-start box-border items-start w-full shadow\">\r\n <mat-button-toggle-group name=\"condition\" [hideSingleSelectionIndicator]=\"true\" (change)=\"onConditionChange($event.value)\">\r\n <mat-button-toggle value=\"or\" [checked]=\"filterData.condition === 'or'\">\u6216</mat-button-toggle>\r\n <mat-button-toggle value=\"and\" [checked]=\"filterData.condition === 'and'\">\u4E14</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n\r\n <div class=\"chip-list\">\r\n @for (item of filters; track $index) {\r\n <div class=\"chip-wrapper\" role=\"presentation\"\r\n (click)=\"onFilterClick(item)\">\r\n <span class=\"chip\" [ngClass]=\"{selected: item?.selected}\">{{item.label}}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".transfer-picker-filter-panel{min-width:276px;padding:10px 0;border-width:1px}.transfer-picker-filter-panel .mat-button-toggle-group{font-size:12px;margin-right:15px;margin-bottom:20px;align-self:flex-end}.transfer-picker-filter-panel .mat-button-toggle-group .mat-button-toggle-label-content{line-height:1.8}.transfer-picker-filter-panel .chip-list{width:276px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;box-sizing:border-box}.transfer-picker-filter-panel .chip-list:after{content:\"\";flex:1 1 0%;max-width:33.333333%}.transfer-picker-filter-panel .chip-list .chip-wrapper{flex:1 1 0%;box-sizing:border-box;max-width:33.333333%;text-align:center;margin-bottom:20px}.transfer-picker-filter-panel .chip-list .chip-wrapper .chip{display:inline-block;min-width:50%;cursor:pointer;padding:5px 10px;font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$h.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$h.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i4.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i6.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
15029
15260
  }
@@ -15049,7 +15280,7 @@ class CmatTransferPickerSearchComponent {
15049
15280
  this.keyword
15050
15281
  .valueChanges
15051
15282
  .pipe(debounceTime$1(200), distinctUntilChanged())
15052
- .subscribe((keyword) => this._service.filterDataSource({ keyword }));
15283
+ .subscribe((keyword) => this._service.filterDataSource({ keyword: keyword ?? '' }));
15053
15284
  }
15054
15285
  reset() {
15055
15286
  this.keyword.setValue('');
@@ -15106,7 +15337,7 @@ class CmatTransferPickerSourceComponent {
15106
15337
  : new CmatTransferItemFlatNode();
15107
15338
  flatNode.label = node.label;
15108
15339
  flatNode.value = node.value;
15109
- flatNode.disabled = node.disabled;
15340
+ flatNode.disabled = !!node.disabled;
15110
15341
  flatNode.level = level;
15111
15342
  flatNode.expandable = !!node.children;
15112
15343
  this.nestedNodeMap.set(node, flatNode);
@@ -15414,7 +15645,8 @@ class CmatTreeTableComponent {
15414
15645
  if (this.data) {
15415
15646
  this._treeTable = this._getFlattenNodes(this.data);
15416
15647
  this.dataSource.set(this._generateDataSource());
15417
- this.displayedColumns.set([...Object.keys(this.data[0]).filter(x => typeof this.data[0][x] !== 'object' && this.data[0].showHeader?.includes(x)), 'operate']);
15648
+ const first = this.data[0];
15649
+ this.displayedColumns.set([...Object.keys(first).filter(x => typeof first[x] !== 'object' && first.showHeader?.includes(x)), 'operate']);
15418
15650
  }
15419
15651
  else {
15420
15652
  this._treeTable = [];
@@ -15441,10 +15673,10 @@ class CmatTreeTableComponent {
15441
15673
  _switchNodeVisible(node, visible) {
15442
15674
  if (node.children) {
15443
15675
  node.children.forEach((el) => {
15444
- visible == null ? el.isVisible = !el.isVisible : el.isVisible = visible;
15676
+ el.isVisible = visible ?? !el.isVisible;
15445
15677
  if (visible !== false)
15446
15678
  el.isExpanded = true;
15447
- this._switchNodeVisible(el, el.isVisible);
15679
+ this._switchNodeVisible(el, el.isVisible === undefined ? null : !!el.isVisible);
15448
15680
  });
15449
15681
  }
15450
15682
  }
@@ -15526,7 +15758,7 @@ class CmatFilesUtilService {
15526
15758
  observe: 'events',
15527
15759
  reportProgress: true,
15528
15760
  responseType: 'json'
15529
- }).pipe(tap$1((res) => res), catchError(CmatUtilsService$1.handleError));
15761
+ }).pipe(catchError(CmatUtilsService$1.handleError));
15530
15762
  }
15531
15763
  uploadFileToProcessed(file) {
15532
15764
  return this._http.post(`${this._config.fileUrl}/upload/finish`, file, {
@@ -15534,7 +15766,7 @@ class CmatFilesUtilService {
15534
15766
  observe: 'events',
15535
15767
  reportProgress: true,
15536
15768
  responseType: 'json'
15537
- }).pipe(tap$1((res) => res), catchError(CmatUtilsService$1.handleError));
15769
+ }).pipe(catchError(CmatUtilsService$1.handleError));
15538
15770
  }
15539
15771
  switchPublic(fileId, isPublic) {
15540
15772
  return this._http.patch(`${this._config.fileUrl}/switch-public/${fileId}`, {
@@ -15542,12 +15774,12 @@ class CmatFilesUtilService {
15542
15774
  isPublic
15543
15775
  }, {
15544
15776
  headers: CmatUtilsService$1.getRequestCryptoHeaders('files-switch-public')
15545
- }).pipe(catchError(err => CmatUtilsService$1.handleError(err)));
15777
+ }).pipe(catchError((err) => CmatUtilsService$1.handleError(err)));
15546
15778
  }
15547
15779
  deleteFile(fileId) {
15548
15780
  return this._http.delete(`${this._config.fileUrl}/${fileId}`, {
15549
15781
  headers: CmatUtilsService$1.getRequestCryptoHeaders(fileId)
15550
- }).pipe(catchError(err => CmatUtilsService$1.handleError(err)));
15782
+ }).pipe(catchError((err) => CmatUtilsService$1.handleError(err)));
15551
15783
  }
15552
15784
  getFileList(queryData, pageIndex = -1, pageSize = -1) {
15553
15785
  if (this._config.enableDataProtect) {
@@ -15583,6 +15815,7 @@ class CmatUploadComponent {
15583
15815
  this.isPublic = false;
15584
15816
  this.editMode = false;
15585
15817
  this.autoUpload = true;
15818
+ this.id = null;
15586
15819
  this.removeEvent = new EventEmitter();
15587
15820
  this.uploadEvent = new EventEmitter();
15588
15821
  this.progressPercentage = signal(0, ...(ngDevMode ? [{ debugName: "progressPercentage" }] : /* istanbul ignore next */ []));
@@ -15625,22 +15858,29 @@ class CmatUploadComponent {
15625
15858
  formData.set('fileData', this._file, this._file.name);
15626
15859
  formData.append('fileInfo', JSON.stringify(fileModel));
15627
15860
  this._fileService.uploadFile(formData).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((event) => {
15628
- if (event.type === HttpEventType.UploadProgress) {
15861
+ if (event.type === HttpEventType.UploadProgress && typeof event.total === 'number') {
15629
15862
  this.progressPercentage.set(Math.floor(event.loaded * 100 / event.total));
15630
15863
  this.loaded.set(event.loaded);
15631
15864
  this.total.set(event.total);
15632
15865
  }
15633
15866
  if (event.type === HttpEventType.Response) {
15634
- this.id = event.body.id;
15635
- this.file.id = event.body.id;
15867
+ const fileId = typeof event.body?.id === 'string' ? event.body.id : undefined;
15868
+ if (!fileId) {
15869
+ this.isUploading.set(false);
15870
+ return;
15871
+ }
15872
+ this.id = fileId;
15873
+ this.file.id = fileId;
15636
15874
  this.isUploading.set(false);
15637
15875
  this.uploadEvent.emit(this.file);
15638
15876
  }
15639
15877
  });
15640
15878
  }
15641
15879
  download() {
15880
+ if (!this.id)
15881
+ return;
15642
15882
  this._fileService.downloadFile(this.id).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((file) => {
15643
- saveAs(new Blob([file.body], { type: 'text/plain;charset=utf-8' }), this.file.name);
15883
+ saveAs(new Blob([file.body ?? new Blob()], { type: 'text/plain;charset=utf-8' }), this.file.name);
15644
15884
  });
15645
15885
  }
15646
15886
  remove() {
@@ -15689,7 +15929,7 @@ class CmatUploadQueueComponent {
15689
15929
  this.outputRemoveIdEvent = new EventEmitter();
15690
15930
  this.outputUploadIdEvent = new EventEmitter();
15691
15931
  this.outputFilesDataEvent = new EventEmitter();
15692
- this.id = 'cmatupload-' + Math.floor(Math.random() * 1000000);
15932
+ this.id = 'cmatupload-' + crypto.randomUUID().slice(0, 8);
15693
15933
  this.isHandSet = signal(false, ...(ngDevMode ? [{ debugName: "isHandSet" }] : /* istanbul ignore next */ []));
15694
15934
  this._cmatMediaWatcherService = inject(CmatMediaWatcherService$1);
15695
15935
  this._elementRef = inject(ElementRef);
@@ -15701,7 +15941,9 @@ class CmatUploadQueueComponent {
15701
15941
  });
15702
15942
  }
15703
15943
  onDrop(event) {
15704
- const files = event.dataTransfer.files;
15944
+ const files = event.dataTransfer?.files;
15945
+ if (!files)
15946
+ return;
15705
15947
  for (const file of files) {
15706
15948
  if (this.accept?.includes(file.type))
15707
15949
  this.add(file);
@@ -15713,7 +15955,10 @@ class CmatUploadQueueComponent {
15713
15955
  event.preventDefault();
15714
15956
  }
15715
15957
  ngAfterViewInit() {
15716
- const fileUpload = this._elementRef.nativeElement.querySelector('#' + this.id);
15958
+ const fileUpload = this._elementRef.nativeElement.querySelector(`#${this.id}`);
15959
+ if (!(fileUpload instanceof HTMLInputElement)) {
15960
+ return;
15961
+ }
15717
15962
  fileUpload.onchange = () => {
15718
15963
  for (let index = 0; index < (fileUpload.files?.length ?? 0); index++) {
15719
15964
  const file = fileUpload.files[index];
@@ -15737,12 +15982,13 @@ class CmatUploadQueueComponent {
15737
15982
  }
15738
15983
  }
15739
15984
  upload(event) {
15740
- this.outputUploadIdEvent.emit(event.id);
15985
+ const uploadId = event instanceof CmatUploadComponent ? event.id : event.id;
15986
+ this.outputUploadIdEvent.emit(uploadId ?? '');
15741
15987
  this.outputFilesDataEvent.emit(this.filesData);
15742
15988
  }
15743
15989
  remove(event) {
15744
15990
  if (this.filesData) {
15745
- const index = this.filesData.findIndex(j => j === event.file);
15991
+ const index = this.filesData.findIndex((j) => j === event.file);
15746
15992
  if (index > -1) {
15747
15993
  this.filesData.splice(index, 1);
15748
15994
  if (event.file.id) {
@@ -15763,7 +16009,7 @@ class CmatUploadQueueComponent {
15763
16009
  this.fileUploads.forEach((fileUpload) => { fileUpload.remove(); });
15764
16010
  }
15765
16011
  choose() {
15766
- this._elementRef.nativeElement.querySelector('#' + this.id).click();
16012
+ this._elementRef.nativeElement.querySelector(`#${this.id}`)?.dispatchEvent(new MouseEvent('click'));
15767
16013
  }
15768
16014
  isFileTypeAccepted(fileType) {
15769
16015
  if (!this.accept || this.accept === '') {
@@ -15963,8 +16209,8 @@ class AngularShapeView extends NodeView {
15963
16209
  return container;
15964
16210
  }
15965
16211
  getNgArguments() {
15966
- const input = this.cell.data?.ngArguments || {};
15967
- return input;
16212
+ const cell = this.cell;
16213
+ return cell.data?.ngArguments ?? {};
15968
16214
  }
15969
16215
  setInstanceInput(content, ref) {
15970
16216
  const ngArguments = this.getNgArguments();
@@ -16414,7 +16660,7 @@ class WorksheetExporter extends FileExporter {
16414
16660
  }
16415
16661
  async createContent(rows, options) {
16416
16662
  const workSheet = (await import('xlsx')).utils.json_to_sheet(rows, {
16417
- skipHeader: true // we don't want to see object properties as our headers
16663
+ skipHeader: true
16418
16664
  });
16419
16665
  return await this.workSheetToContent(workSheet, options);
16420
16666
  }
@@ -16774,7 +17020,7 @@ class CmatDigitOnlyDirective {
16774
17020
  }
16775
17021
  onInputChange(event) {
16776
17022
  const reg = /^-?(0|[1-9][0-9]*)(\.[0-9]*)?$/;
16777
- const value = event.target.value;
17023
+ const value = event.target?.value ?? '';
16778
17024
  if ((!isNaN(+value) && reg.test(value)) || value === '' || value === '-') {
16779
17025
  this.value = value;
16780
17026
  }
@@ -16840,8 +17086,9 @@ class CmatDigitOnlyDirective {
16840
17086
  onPaste(event) {
16841
17087
  if (this.allowPaste === true) {
16842
17088
  let pastedInput = '';
16843
- if (window['clipboardData']) {
16844
- pastedInput = window['clipboardData'].getData('text');
17089
+ const legacyWindow = window;
17090
+ if (legacyWindow.clipboardData) {
17091
+ pastedInput = legacyWindow.clipboardData.getData('text');
16845
17092
  }
16846
17093
  else if (event.clipboardData?.getData) {
16847
17094
  pastedInput = event.clipboardData.getData('text/plain');
@@ -16880,20 +17127,13 @@ class CmatDigitOnlyDirective {
16880
17127
  !this._getSelection().includes(this.negativeSign)) {
16881
17128
  return;
16882
17129
  }
16883
- // eslint-disable-next-line @typescript-eslint/no-deprecated
16884
- const pasted = document.execCommand('insertText', false, sanitizedContent);
16885
- if (!pasted) {
16886
- if (this.inputElement.setRangeText) {
16887
- const { selectionStart: start, selectionEnd: end } = this.inputElement;
16888
- this.inputElement.setRangeText(sanitizedContent, start ?? 0, end ?? 0, 'end');
16889
- if (typeof window['InstallTrigger'] !==
16890
- 'undefined') {
16891
- this.inputElement.dispatchEvent(new Event('input', { cancelable: true }));
16892
- }
16893
- }
16894
- else {
16895
- this._insertAtCursor(this.inputElement, sanitizedContent);
16896
- }
17130
+ if (this.inputElement.setRangeText) {
17131
+ const { selectionStart: start, selectionEnd: end } = this.inputElement;
17132
+ this.inputElement.setRangeText(sanitizedContent, start ?? 0, end ?? 0, 'end');
17133
+ this.inputElement.dispatchEvent(new Event('input', { cancelable: true }));
17134
+ }
17135
+ else {
17136
+ this._insertAtCursor(this.inputElement, sanitizedContent);
16897
17137
  }
16898
17138
  if (this.decimal) {
16899
17139
  this._hasDecimalPoint =
@@ -17036,7 +17276,7 @@ class CmatMaskDirective {
17036
17276
  this.inputElement = el.nativeElement;
17037
17277
  }
17038
17278
  onInputChange(event) {
17039
- const value = event.target.value;
17279
+ const value = event.target?.value ?? '';
17040
17280
  if (this.regex.test(value)) {
17041
17281
  this.value = value;
17042
17282
  }
@@ -17171,8 +17411,9 @@ class CmatSeamlessAutoScrollDirective {
17171
17411
  }
17172
17412
  }
17173
17413
  _checkScrollCondition() {
17174
- this._containerElement = this._viewContainer.element.nativeElement.parentElement?.parentElement;
17175
- this._contentElement = this._viewContainer.element.nativeElement.parentElement;
17414
+ const hostElement = this._viewContainer.element.nativeElement;
17415
+ this._containerElement = hostElement.parentElement?.parentElement ?? null;
17416
+ this._contentElement = hostElement.parentElement ?? null;
17176
17417
  if (!this._containerElement || !this._contentElement)
17177
17418
  return;
17178
17419
  const containerSize = this.direction === 'up' || this.direction === 'down'
@@ -17300,7 +17541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
17300
17541
  class CmatFindByKeyPipe {
17301
17542
  transform(value, key, source) {
17302
17543
  if (Array.isArray(value)) {
17303
- return value.map(item => source.find(sourceItem => sourceItem[key] === item));
17544
+ return value.map(item => source.find(sourceItem => sourceItem[key] === item)).filter((item) => !!item);
17304
17545
  }
17305
17546
  return source.find(sourceItem => sourceItem[key] === value);
17306
17547
  }
@@ -17318,18 +17559,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
17318
17559
  class CmatGroupByPipe {
17319
17560
  transform(value, field) {
17320
17561
  if (!value) {
17321
- return value;
17562
+ return [];
17322
17563
  }
17323
17564
  const groupedObj = value.reduce((prev, cur) => {
17324
- if (!prev[cur[field]]) {
17325
- prev[cur[field]] = [cur];
17565
+ const rawValue = cur[field];
17566
+ const groupKey = typeof rawValue === 'string' || typeof rawValue === 'number' || typeof rawValue === 'boolean' || typeof rawValue === 'bigint'
17567
+ ? String(rawValue)
17568
+ : '';
17569
+ if (!prev[groupKey]) {
17570
+ prev[groupKey] = [cur];
17326
17571
  }
17327
17572
  else {
17328
- prev[cur[field]].push(cur);
17573
+ prev[groupKey].push(cur);
17329
17574
  }
17330
17575
  return prev;
17331
17576
  }, {});
17332
- return Object.keys(groupedObj).map(key => ({ key, value: groupedObj[key] }));
17577
+ return Object.keys(groupedObj).map((key) => ({ key, value: groupedObj[key] }));
17333
17578
  }
17334
17579
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatGroupByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
17335
17580
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: CmatGroupByPipe, isStandalone: true, name: "cmatGroupBy" }); }
@@ -17370,6 +17615,7 @@ class CmatSecurePipe {
17370
17615
  this._sanitizer = inject(DomSanitizer);
17371
17616
  this._urlStateConfigService = inject(CmatUrlStateConfigService$1);
17372
17617
  this._destroyRef = inject(DestroyRef);
17618
+ this._previousObjectUrl = null;
17373
17619
  this._urlStateConfigService.config$
17374
17620
  .pipe(takeUntilDestroyed(this._destroyRef))
17375
17621
  .subscribe((config) => {
@@ -17385,7 +17631,14 @@ class CmatSecurePipe {
17385
17631
  isStream: false
17386
17632
  }
17387
17633
  })
17388
- .pipe(map((val) => this._sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(val))));
17634
+ .pipe(map((val) => {
17635
+ if (this._previousObjectUrl) {
17636
+ URL.revokeObjectURL(this._previousObjectUrl);
17637
+ }
17638
+ const objectUrl = URL.createObjectURL(val);
17639
+ this._previousObjectUrl = objectUrl;
17640
+ return this._sanitizer.bypassSecurityTrustUrl(objectUrl);
17641
+ }));
17389
17642
  }
17390
17643
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatSecurePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
17391
17644
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: CmatSecurePipe, isStandalone: true, name: "cmatSecure" }); }
@@ -17453,6 +17706,7 @@ class CmatAlertService {
17453
17706
  this._stickyMessages = new Subject();
17454
17707
  this._dialogs = new Subject();
17455
17708
  this._isLoading = new Subject();
17709
+ this._loadingMessageId = null;
17456
17710
  }
17457
17711
  get dialogEvent$() {
17458
17712
  return this._dialogs.asObservable();
@@ -17527,8 +17781,9 @@ class CmatAlertService {
17527
17781
  if (this.isApiResult(error)) {
17528
17782
  separatorOrDetail += error.msg;
17529
17783
  }
17784
+ const serializedError = CmatUtilsService$1.safeStringify(error);
17530
17785
  const msg = `Message.Severity: "${CmatMessageSeverity[severity]}", Message.Summary: "${data}",
17531
- Message.Detail: "${separatorOrDetail}", Message.Error: "${CmatUtilsService$1.safeStringify(error)}"`;
17786
+ Message.Detail: "${separatorOrDetail}", Message.Error: "${serializedError}"`;
17532
17787
  switch (severity) {
17533
17788
  case CmatMessageSeverity.info:
17534
17789
  this.logInfo(msg);
@@ -17552,14 +17807,14 @@ class CmatAlertService {
17552
17807
  }
17553
17808
  startLoadingMessage(message = '载入中...', caption = '') {
17554
17809
  this._isLoading.next(true);
17555
- clearTimeout(this._loadingMessageId);
17810
+ this._clearLoadingMessageTimer();
17556
17811
  this._loadingMessageId = setTimeout(() => {
17557
17812
  this.showStickyMessage(caption, message, CmatMessageSeverity.wait);
17558
17813
  }, 1000);
17559
17814
  }
17560
17815
  stopLoadingMessage() {
17561
17816
  this._isLoading.next(false);
17562
- clearTimeout(this._loadingMessageId);
17817
+ this._clearLoadingMessageTimer();
17563
17818
  this.resetStickyMessage();
17564
17819
  }
17565
17820
  logDebug(msg) {
@@ -17592,10 +17847,17 @@ class CmatAlertService {
17592
17847
  }
17593
17848
  }
17594
17849
  isApiResult(obj) {
17595
- return (obj &&
17596
- typeof obj.success === 'boolean' &&
17597
- typeof obj.msg === 'string' &&
17598
- typeof obj.type === 'number');
17850
+ const result = obj;
17851
+ return typeof result === 'object' && result !== null
17852
+ && typeof result.success === 'boolean'
17853
+ && typeof result.msg === 'string'
17854
+ && typeof result.type === 'number';
17855
+ }
17856
+ _clearLoadingMessageTimer() {
17857
+ if (this._loadingMessageId !== null) {
17858
+ clearTimeout(this._loadingMessageId);
17859
+ this._loadingMessageId = null;
17860
+ }
17599
17861
  }
17600
17862
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
17601
17863
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatAlertService, providedIn: 'root' }); }
@@ -17916,13 +18178,13 @@ class CmatExportAsService {
17916
18178
  _getCSV(config) {
17917
18179
  return new Observable((observer) => {
17918
18180
  const element = document.getElementById(config.elementIdOrContent);
17919
- let csv = [];
18181
+ const csv = [];
17920
18182
  const rows = element?.querySelectorAll('table tr');
17921
- rows.forEach((rowElement) => {
17922
- let row = [];
18183
+ rows?.forEach((rowElement) => {
18184
+ const row = [];
17923
18185
  const cols = rowElement.querySelectorAll('td, th');
17924
- cols.array.forEach((col) => {
17925
- row.push('"' + col.innerText + '"');
18186
+ Array.from(cols).forEach((col) => {
18187
+ row.push('"' + (col.textContent ?? col.innerText) + '"');
17926
18188
  });
17927
18189
  csv.push(row.join(','));
17928
18190
  });
@@ -17965,17 +18227,17 @@ class CmatExportAsService {
17965
18227
  }
17966
18228
  _getJSON(config) {
17967
18229
  return new Observable((observer) => {
17968
- const data = []; // first row needs fto be headers
18230
+ const data = [];
17969
18231
  const headers = [];
17970
18232
  const table = document.getElementById(config.elementIdOrContent);
17971
18233
  for (let index = 0; index < table.rows[0].cells.length; index++) {
17972
- headers[index] = table.rows[0].cells[index].innerHTML.toLowerCase().replace(/ /gi, '');
18234
+ headers[index] = (table.rows[0].cells[index].textContent ?? '').toLowerCase().replace(/ /gi, '');
17973
18235
  }
17974
18236
  for (let i = 1; i < table.rows.length; i++) {
17975
18237
  const tableRow = table.rows[i];
17976
- let rowData = {};
18238
+ const rowData = {};
17977
18239
  for (let j = 0; j < tableRow.cells.length; j++) {
17978
- rowData[headers[j]] = tableRow.cells[j].innerHTML;
18240
+ rowData[headers[j]] = tableRow.cells[j].textContent ?? '';
17979
18241
  }
17980
18242
  data.push(rowData);
17981
18243
  }
@@ -18020,7 +18282,8 @@ class CmatExportAsService {
18020
18282
  });
18021
18283
  }
18022
18284
  _btoa(content) {
18023
- return Buffer.from(content.toString(), 'utf-8').toString('base64');
18285
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
18286
+ return btoa(unescape(encodeURIComponent(content)));
18024
18287
  }
18025
18288
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatExportAsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
18026
18289
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatExportAsService, providedIn: 'root' }); }
@@ -18135,14 +18398,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
18135
18398
  }] });
18136
18399
 
18137
18400
  class CmatLocalStorageService {
18138
- getItem(key) {
18139
- return localStorage.getItem(key);
18401
+ constructor() {
18402
+ this._encryptionPrefix = '__enc__';
18403
+ }
18404
+ getItem(key, options) {
18405
+ const raw = localStorage.getItem(key);
18406
+ if (raw === null) {
18407
+ return null;
18408
+ }
18409
+ let entry;
18410
+ try {
18411
+ entry = JSON.parse(raw);
18412
+ }
18413
+ catch {
18414
+ return raw;
18415
+ }
18416
+ if (entry.expiry && Date.now() > entry.expiry) {
18417
+ this.removeItem(key);
18418
+ return null;
18419
+ }
18420
+ let data = entry.data ?? raw;
18421
+ if (options?.encrypt || key.startsWith(this._encryptionPrefix)) {
18422
+ data = this._decrypt(data);
18423
+ }
18424
+ return data;
18140
18425
  }
18141
- setItem(key, item) {
18142
- localStorage.setItem(key, item);
18426
+ setItem(key, item, options) {
18427
+ let data = item;
18428
+ const storageKey = options?.encrypt ? this._encryptionPrefix + key : key;
18429
+ if (options?.encrypt) {
18430
+ data = this._encrypt(item);
18431
+ }
18432
+ const entry = {
18433
+ data,
18434
+ ...(options?.ttl ? { expiry: Date.now() + options.ttl } : {})
18435
+ };
18436
+ localStorage.setItem(storageKey, JSON.stringify(entry));
18143
18437
  }
18144
18438
  removeItem(key) {
18145
18439
  localStorage.removeItem(key);
18440
+ localStorage.removeItem(this._encryptionPrefix + key);
18441
+ }
18442
+ _encrypt(value) {
18443
+ return btoa(encodeURIComponent(value));
18444
+ }
18445
+ _decrypt(value) {
18446
+ return decodeURIComponent(atob(value));
18146
18447
  }
18147
18448
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
18148
18449
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatLocalStorageService, providedIn: 'root' }); }
@@ -18273,11 +18574,11 @@ class CmatTitleService {
18273
18574
  return route;
18274
18575
  }), mergeMap(route => route.data))
18275
18576
  .subscribe((data) => {
18276
- let title = data['title'];
18577
+ let title = typeof data['title'] === 'string' ? data['title'] : '';
18277
18578
  if (title) {
18278
18579
  const fragment = this._router.url.split('#')[1];
18279
18580
  if (fragment) {
18280
- title += ' | ' + CmatUtilsService$1.toTitleCase(fragment);
18581
+ title += ` | ${CmatUtilsService$1.toTitleCase(fragment)}`;
18281
18582
  }
18282
18583
  }
18283
18584
  if (title) {
@@ -18353,14 +18654,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
18353
18654
  }]
18354
18655
  }], ctorParameters: () => [] });
18355
18656
 
18657
+ const CMAT_CRYPTO_CONFIG = new InjectionToken('CMAT_CRYPTO_CONFIG', {
18658
+ factory: () => ({
18659
+ key: '14789632236987411478963223698741',
18660
+ iv: '1478963223698741',
18661
+ specialParam: 'partymanageApi'
18662
+ })
18663
+ });
18664
+ function initializeCmatUtilsConfig(config) {
18665
+ CmatUtilsService.setCryptoConfig(config);
18666
+ }
18356
18667
  class CmatUtilsService {
18357
18668
  static { this.captionAndMessageSeparator = ':'; }
18358
18669
  static { this.noNetworkMessageCaption = '无网络'; }
18359
18670
  static { this.noNetworkMessageDetail = '无法连接服务器'; }
18360
18671
  static { this.accessDeniedMessageCaption = '拒绝访问!'; }
18361
18672
  static { this.accessDeniedMessageDetail = ''; }
18362
- static { this.key = UTF8.parse('14789632236987411478963223698741'); } // 32位
18363
- static { this.iv = UTF8.parse('1478963223698741'); } // 16位
18673
+ static { this._key = null; }
18674
+ static { this._iv = null; }
18675
+ static { this._specialParam = null; }
18676
+ static get key() {
18677
+ return this._key;
18678
+ }
18679
+ static get iv() {
18680
+ return this._iv;
18681
+ }
18682
+ static get specialParam() {
18683
+ return this._specialParam;
18684
+ }
18364
18685
  get exactMatchOptions() {
18365
18686
  return {
18366
18687
  paths: 'exact',
@@ -18377,16 +18698,19 @@ class CmatUtilsService {
18377
18698
  queryParams: 'subset'
18378
18699
  };
18379
18700
  }
18701
+ static setCryptoConfig(config) {
18702
+ this._key = UTF8.parse(config.key);
18703
+ this._iv = UTF8.parse(config.iv);
18704
+ this._specialParam = UTF8.parse(config.specialParam);
18705
+ }
18380
18706
  static getRequestHeaders() {
18381
18707
  return new HttpHeaders()
18382
- .append('Access-Control-Allow-Origin', '*')
18383
18708
  .append('Content-Type', 'application/json')
18384
18709
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
18385
18710
  .append('App-Version', CMAT_VERSION);
18386
18711
  }
18387
18712
  static getRequestIdempotentHeaders() {
18388
18713
  return new HttpHeaders()
18389
- .append('Access-Control-Allow-Origin', '*')
18390
18714
  .append('Content-Type', 'application/json')
18391
18715
  .append('X-Request-ID', CmatUtilsService.newGuid())
18392
18716
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
@@ -18394,7 +18718,6 @@ class CmatUtilsService {
18394
18718
  }
18395
18719
  static getRequestBypassHeaders() {
18396
18720
  return new HttpHeaders()
18397
- .append('Access-Control-Allow-Origin', '*')
18398
18721
  .append('Content-Type', 'application/json')
18399
18722
  .append('bypass', 'true')
18400
18723
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
@@ -18402,7 +18725,6 @@ class CmatUtilsService {
18402
18725
  }
18403
18726
  static getRequestIdempotentBypassHeaders() {
18404
18727
  return new HttpHeaders()
18405
- .append('Access-Control-Allow-Origin', '*')
18406
18728
  .append('Content-Type', 'application/json')
18407
18729
  .append('X-Request-ID', CmatUtilsService.newGuid())
18408
18730
  .append('bypass', 'true')
@@ -18411,34 +18733,30 @@ class CmatUtilsService {
18411
18733
  }
18412
18734
  static getRequestCryptoHeaders(params) {
18413
18735
  return new HttpHeaders()
18414
- .append('Access-Control-Allow-Origin', '*')
18415
18736
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
18416
- .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());
18737
+ .append('App-Version', this.getEncryptData(params).toString());
18417
18738
  }
18418
18739
  static getRequestCryptoBypassHeaders(params) {
18419
18740
  return new HttpHeaders()
18420
- .append('Access-Control-Allow-Origin', '*')
18421
18741
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
18422
18742
  .append('bypass', 'true')
18423
- .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());
18743
+ .append('App-Version', this.getEncryptData(params).toString());
18424
18744
  }
18425
18745
  static getRequestCryptoIdempotentHeaders(params) {
18426
18746
  return new HttpHeaders()
18427
- .append('Access-Control-Allow-Origin', '*')
18428
18747
  .append('X-Request-ID', CmatUtilsService.newGuid())
18429
18748
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
18430
- .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());
18749
+ .append('App-Version', this.getEncryptData(params).toString());
18431
18750
  }
18432
18751
  static getRequestCryptoIdempotentBypassHeaders(params) {
18433
18752
  return new HttpHeaders()
18434
- .append('Access-Control-Allow-Origin', '*')
18435
18753
  .append('X-Request-ID', CmatUtilsService.newGuid())
18436
18754
  .append('Accept', `application/vnd.iman.v${CMAT_VERSION}+json, application/json, text/plain, */*`)
18437
18755
  .append('bypass', 'true')
18438
- .append('App-Version', this.getEncryptData('partymanageApi' + params).toString());
18756
+ .append('App-Version', this.getEncryptData(params).toString());
18439
18757
  }
18440
18758
  static getEncryptData(data) {
18441
- const src = UTF8.parse(data);
18759
+ const src = UTF8.parse(this.specialParam.toString() + data);
18442
18760
  return AES.encrypt(src, this.key, {
18443
18761
  iv: this.iv,
18444
18762
  mode: CryptoJSCore.mode.CBC,
@@ -18454,14 +18772,17 @@ class CmatUtilsService {
18454
18772
  }).toString(UTF8).toString();
18455
18773
  }
18456
18774
  static handleError(error) {
18457
- if (error.error instanceof ErrorEvent) {
18775
+ if (error instanceof ErrorEvent) {
18458
18776
  console.error('Client side network error occurred:', error.message);
18459
18777
  }
18460
- else {
18778
+ else if (typeof error === 'object' && error !== null && 'status' in error) {
18779
+ const httpError = error;
18461
18780
  console.error('Backend - ' +
18462
- `status: ${error.status}, ` +
18463
- `statusText: ${error.statusText}, ` +
18464
- `message: ${error.error}`);
18781
+ `status: ${String(httpError.status)}, ` +
18782
+ `message: ${String(httpError.error)}`);
18783
+ }
18784
+ else {
18785
+ console.error('Unknown error occurred:', String(error));
18465
18786
  }
18466
18787
  return throwError(() => error ?? 'server error');
18467
18788
  }
@@ -18473,27 +18794,35 @@ class CmatUtilsService {
18473
18794
  }
18474
18795
  else {
18475
18796
  const responseObject = this.getResponseBody(data);
18476
- if (responseObject && (typeof responseObject === 'object' || responseObject instanceof Object)) {
18797
+ if (responseObject && typeof responseObject === 'object') {
18477
18798
  for (const key in responseObject) {
18478
18799
  if (Object.prototype.hasOwnProperty.call(responseObject, key)) {
18800
+ const value = responseObject[key];
18801
+ const stringValue = typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);
18479
18802
  if (key) {
18480
- responses.push(`${key}${this.captionAndMessageSeparator} ${responseObject[key]}`);
18803
+ responses.push(`${key}${this.captionAndMessageSeparator} ${stringValue}`);
18481
18804
  }
18482
- else if (responseObject[key]) {
18483
- responses.push(responseObject[key].toString());
18805
+ else if (value) {
18806
+ responses.push(stringValue);
18484
18807
  }
18485
18808
  }
18486
18809
  }
18487
18810
  }
18488
18811
  }
18489
- if (!responses.length && this.getResponseBody(data)) {
18490
- responses.push(`${this.getResponseBody(data).toString()}`);
18812
+ const responseBody = this.getResponseBody(data);
18813
+ if (!responses.length && responseBody != null) {
18814
+ if (typeof responseBody === 'object') {
18815
+ responses.push(JSON.stringify(responseBody));
18816
+ }
18817
+ else {
18818
+ responses.push(String(responseBody));
18819
+ }
18491
18820
  }
18492
18821
  }
18493
18822
  if (!responses.length) {
18494
- responses.push(data.toString());
18823
+ responses.push(typeof data === 'object' ? JSON.stringify(data) : String(data));
18495
18824
  }
18496
- if (this.checkAccessDenied(data)) {
18825
+ if (data instanceof HttpResponseBase && this.checkAccessDenied(data)) {
18497
18826
  responses.splice(0, 0, `${this.accessDeniedMessageCaption}${this.captionAndMessageSeparator} ${this.accessDeniedMessageDetail}`);
18498
18827
  }
18499
18828
  return responses;
@@ -18529,7 +18858,7 @@ class CmatUtilsService {
18529
18858
  if (response instanceof HttpErrorResponse) {
18530
18859
  return response.error ?? response.message;
18531
18860
  }
18532
- return response;
18861
+ return null;
18533
18862
  }
18534
18863
  static checkNoNetwork(response) {
18535
18864
  if (response instanceof HttpResponseBase) {
@@ -18568,7 +18897,7 @@ class CmatUtilsService {
18568
18897
  return params;
18569
18898
  }
18570
18899
  static splitInTwo(text, separator) {
18571
- const separatorIndex = separator ? text.indexOf(separator) : -1;
18900
+ const separatorIndex = separator && text.includes(separator) ? text.indexOf(separator) : -1;
18572
18901
  if (separatorIndex === -1) {
18573
18902
  return { firstPart: text, secondPart: null };
18574
18903
  }
@@ -18588,13 +18917,14 @@ class CmatUtilsService {
18588
18917
  if (!Object.prototype.hasOwnProperty.call(object, prop)) {
18589
18918
  continue;
18590
18919
  }
18591
- if (typeof (object[prop]) == 'object') {
18920
+ const value = object[prop];
18921
+ if (typeof value === 'object') {
18592
18922
  continue;
18593
18923
  }
18594
- if (typeof (object[prop]) == 'function') {
18924
+ if (typeof value === 'function') {
18595
18925
  continue;
18596
18926
  }
18597
- simpleObject[prop] = object[prop];
18927
+ simpleObject[prop] = value;
18598
18928
  }
18599
18929
  result = '[***Sanitized Object***]: ' + JSON.stringify(simpleObject);
18600
18930
  return result;
@@ -18619,17 +18949,14 @@ class CmatUtilsService {
18619
18949
  }
18620
18950
  }
18621
18951
  static toTitleCase(text) {
18622
- return text.replace(/\w\S*/g, subString => subString.charAt(0).toUpperCase() + subString.substring(1).toLowerCase());
18952
+ return text.replace(/\w\S*/g, (subString) => subString.charAt(0).toUpperCase() + subString.substring(1).toLowerCase());
18623
18953
  }
18624
18954
  static toLowerCase(items) {
18625
18955
  if (items instanceof Array) {
18626
- const loweredRoles = [];
18627
- for (let i = 0; i < items.length; i++) {
18628
- loweredRoles[i] = items[i].toLowerCase();
18629
- }
18956
+ const loweredRoles = items.map((item) => item.toLowerCase());
18630
18957
  return loweredRoles;
18631
18958
  }
18632
- else if (typeof items === 'string' || items instanceof String) {
18959
+ else if (typeof items === 'string') {
18633
18960
  return items.toLowerCase();
18634
18961
  }
18635
18962
  return void 0;
@@ -18651,11 +18978,7 @@ class CmatUtilsService {
18651
18978
  return base.replace(/\/$/, '');
18652
18979
  }
18653
18980
  static newGuid() {
18654
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
18655
- const r = (Math.random() * 16) | 0;
18656
- const v = c === 'x' ? r : (r & 0x3) | 0x8;
18657
- return v.toString(16);
18658
- });
18981
+ return crypto.randomUUID();
18659
18982
  }
18660
18983
  static testIsAbsoluteUrl(url) {
18661
18984
  const r = new RegExp('^(?:[a-z]+:)?//', 'i');
@@ -18697,8 +19020,8 @@ class CmatUtilsService {
18697
19020
  if (!Object.prototype.hasOwnProperty.call(decoded, 'exp')) {
18698
19021
  return null;
18699
19022
  }
18700
- const date = new Date(0); // The 0 here is the key, which sets the date to the epoch
18701
- date.setUTCSeconds(decoded.exp);
19023
+ const date = new Date(0);
19024
+ date.setUTCSeconds(Number(decoded.exp));
18702
19025
  return date;
18703
19026
  }
18704
19027
  static isTokenExpired(token, offsetSeconds) {
@@ -18715,9 +19038,8 @@ class CmatUtilsService {
18715
19038
  reader.onload = () => {
18716
19039
  resolve(reader.result);
18717
19040
  };
18718
- reader.onerror = (e) => {
18719
- // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
18720
- reject(e);
19041
+ reader.onerror = () => {
19042
+ reject(new Error('Failed to read file as Data URL'));
18721
19043
  };
18722
19044
  reader.readAsDataURL(file);
18723
19045
  });
@@ -18727,8 +19049,8 @@ class CmatUtilsService {
18727
19049
  const byteString = splitDataURI[0].includes('base64') ? atob(splitDataURI[1]) : decodeURI(splitDataURI[1]);
18728
19050
  const mimeString = splitDataURI[0].split(':')[1].split(';')[0];
18729
19051
  const ia = new Uint8Array(byteString.length);
18730
- for (let i = 0; i < byteString.length; i++) {
18731
- ia[i] = byteString.charCodeAt(i);
19052
+ for (const [i, char] of [...byteString].entries()) {
19053
+ ia[i] = char.charCodeAt(0);
18732
19054
  }
18733
19055
  return new Blob([ia], { type: mimeString });
18734
19056
  }
@@ -18754,7 +19076,7 @@ class CmatUtilsService {
18754
19076
  break;
18755
19077
  case 'application/vnd.ms-excel':
18756
19078
  case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
18757
- fileType = 'word';
19079
+ fileType = 'excel';
18758
19080
  break;
18759
19081
  case 'application/pdf':
18760
19082
  fileType = 'pdf';
@@ -18771,7 +19093,7 @@ class CmatUtilsService {
18771
19093
  case 'audio/mp4':
18772
19094
  fileType = 'video';
18773
19095
  break;
18774
- case 'aplication/zip':
19096
+ case 'application/zip':
18775
19097
  fileType = 'zip';
18776
19098
  break;
18777
19099
  }
@@ -18799,14 +19121,14 @@ class CmatUtilsService {
18799
19121
  const lastPart = parts.pop();
18800
19122
  let currentValue = jsonObject;
18801
19123
  parts.forEach((part) => {
18802
- if (Object.prototype.hasOwnProperty.call(currentValue, part)) {
19124
+ if (typeof currentValue === 'object' && currentValue !== null && Object.prototype.hasOwnProperty.call(currentValue, part)) {
18803
19125
  currentValue = currentValue[part];
18804
19126
  }
18805
19127
  else {
18806
19128
  currentValue = undefined;
18807
19129
  }
18808
19130
  });
18809
- result[info.code] = currentValue ? (Object.prototype.hasOwnProperty.call(currentValue, lastPart) ? currentValue[lastPart] : '') : '';
19131
+ result[info.code] = currentValue && typeof currentValue === 'object' && Object.prototype.hasOwnProperty.call(currentValue, lastPart) ? currentValue[lastPart] : '';
18810
19132
  });
18811
19133
  return result;
18812
19134
  });
@@ -18836,5 +19158,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
18836
19158
  * Generated bundle index. Do not edit.
18837
19159
  */
18838
19160
 
18839
- export { AngularShape, AngularShapeView, CLOCK_INNER_RADIUS, CLOCK_OUTER_RADIUS, CLOCK_RADIUS, CLOCK_TICK_RADIUS, CMAT_APP_CONFIG, CMAT_DATETIMEPICKER_SCROLL_STRATEGY, CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY, CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, CMAT_DATETIMEPICKER_VALIDATORS, CMAT_DATETIMEPICKER_VALUE_ACCESSOR, CMAT_DATETIME_FORMATS, CMAT_DAYJS_DATETIME_FORMATS, CMAT_DAYJS_DATE_ADAPTER_OPTIONS, CMAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY, CMAT_DAYJS_DATE_FORMATS, CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR, CMAT_NATIVE_DATETIME_FORMATS, CNativeDatetimeAdapter, ChartNode, CmatAddonsWrapperComponent, CmatAlertDialog, CmatAlertMessage, CmatAlertService, CmatAnimationOnScrollDirective, CmatArrowCursorDirective, CmatAutofocusDirective, CmatBreadcrumbComponent, CmatBreadcrumbItemDirective, CmatBreadcrumbService, CmatButtonTypeComponent, CmatBytesPipe, CmatCardComponent, CmatCardWrapperComponent, CmatCarouselComponent, CmatCarouselFooterComponent, CmatCarouselHeaderComponent, CmatCarouselTemplateDirective, CmatCascadeBottomSheetComponent, CmatCascadeListComponent, CmatCascadeTypeComponent, CmatCheckListTypeComponent, CmatChipInputComponent, CmatChipsInputTypeComponent, CmatCodeEditorComponent, CmatColorPickerTypeComponent, CmatConfigService, CmatConfirmationService, CmatDataExporterDirective, CmatDataService, CmatDateFormatPipe, CmatDateRangeComponent, CmatDateRangeTypeComponent, CmatDateTimeDisplayComponent, CmatDatepickerTypeComponent, CmatDatetimepickerCalendarBodyComponent, CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarComponent, CmatDatetimepickerClockComponent, CmatDatetimepickerComponent, CmatDatetimepickerContentComponent, CmatDatetimepickerFilterType, CmatDatetimepickerInputDirective, CmatDatetimepickerInputEvent, CmatDatetimepickerMonthViewComponent, CmatDatetimepickerToggleComponent, CmatDatetimepickerToggleIconDirective, CmatDatetimepickerYearViewComponent, CmatDebounceClickDirective, CmatDebounceKeyupDirective, CmatDialogType, CmatDigitOnlyDirective, CmatDrawerComponent, CmatDrawerService, CmatEmptyStateComponent, CmatEqualValidatorDirective, CmatExpansionWrapperComponent, CmatExportAsService, CmatFilePreviewComponent, CmatFilesUtilService, CmatFilterToolbarComponent, CmatFindByKeyPipe, CmatFormActionsComponent, CmatFormFieldWrapperComponent, CmatFullscreenComponent, CmatGroupByPipe, CmatHighlightComponent, CmatHighlightService, CmatHorizontalNavigationComponent, CmatImageComponent, CmatInlineLoadingComponent, CmatJsonEditorComponent, CmatKeysPipe, CmatKnobInputComponent, CmatKnobTypeComponent, CmatLoadingInterceptor, CmatLoadingService, CmatLocalStorageService, CmatMaskDirective, CmatMasonryComponent, CmatMaterialColorPickerComponent, CmatMediaWatcherService, CmatMessageSeverity, CmatMultiCheckboxTypeComponent, CmatNavigationItem, CmatNavigationService, CmatNumberTypeComponent, CmatOrgChartComponent, CmatOtpInputComponent, CmatPageHeaderComponent, CmatPaginatePipe, CmatPaginationComponent, CmatPaginationDirective, CmatPaginationService, CmatPanelWrapperComponent, CmatPassToggleVisibilityComponent, CmatPasswordStrengthComponent, CmatPasswordStrengthInfoComponent, CmatPlatformService, CmatPopoverComponent, CmatPopoverTargetDirective, CmatPopoverTriggerDirective, CmatProgressBarComponent, CmatQRCodeComponent, CmatQuillTypeComponent, CmatRadioTypeComponent, CmatRatingComponent, CmatRatingTypeComponent, CmatRepeatTypeComponent, CmatRichTextEditorComponent, CmatSeamlessAutoScrollDirective, CmatSecurePipe, CmatSelectSearchComponent, CmatSelectTableComponent, CmatSelectTableTypeComponent, CmatSelectTreeComponent, CmatSelectTreeFlatNode, CmatSelectTreeNode, CmatSelectTreeTypeComponent, CmatSelectTypeComponent, CmatSelectedColor, CmatSliderTypeComponent, CmatSpeedDialActionsComponent, CmatSpeedDialComponent, CmatSpeedDialTriggerComponent, CmatSplashScreenService, CmatStatusTagComponent, CmatStepperHorizontalTypeComponent, CmatStepperVerticalTypeComponent, CmatTabTypeComponent, CmatTableToolbarComponent, CmatTableTypeComponent, CmatTagsTypeComponent, CmatTextareaTypeComponent, CmatTimelineComponent, CmatTimelineItemComponent, CmatTimelineItemIconDirective, CmatTimelineItemLabelDirective, CmatTitleService, CmatToastComponent, CmatToastModalComponent, CmatToastService, CmatTransferFilterCondition, CmatTransferItemFlatNode, CmatTransferItemNode, CmatTransferPickerComponent, CmatTransferPickerFilterComponent, CmatTransferPickerSearchComponent, CmatTransferPickerService, CmatTransferPickerSourceComponent, CmatTransferPickerTargetComponent, CmatTranslationService, CmatTreeTableColumnDirective, CmatTreeTableComponent, CmatTreeTableNode, CmatUploadComponent, CmatUploadQueueComponent, CmatUploadTypeComponent, CmatUppercasePipe, CmatUrlStateConfigService, CmatUtilsService, CmatVerticalNavigationComponent, DatetimeAdapter, DayjsDateAdapter, DayjsDatetimeAdapter, ExportType, MAT_SELECTSEARCH_DEFAULT_OPTIONS, addonsExtension, configurableDefaultOptions, register, registerInfo };
19161
+ export { AngularShape, AngularShapeView, CLOCK_INNER_RADIUS, CLOCK_OUTER_RADIUS, CLOCK_RADIUS, CLOCK_TICK_RADIUS, CMAT_APP_CONFIG, CMAT_CRYPTO_CONFIG, CMAT_DATETIMEPICKER_SCROLL_STRATEGY, CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY, CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, CMAT_DATETIMEPICKER_VALIDATORS, CMAT_DATETIMEPICKER_VALUE_ACCESSOR, CMAT_DATETIME_FORMATS, CMAT_DAYJS_DATETIME_FORMATS, CMAT_DAYJS_DATE_ADAPTER_OPTIONS, CMAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY, CMAT_DAYJS_DATE_FORMATS, CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR, CMAT_NATIVE_DATETIME_FORMATS, CNativeDatetimeAdapter, ChartNode, CmatAddonsWrapperComponent, CmatAlertDialog, CmatAlertMessage, CmatAlertService, CmatAnimationOnScrollDirective, CmatArrowCursorDirective, CmatAutofocusDirective, CmatBreadcrumbComponent, CmatBreadcrumbItemDirective, CmatBreadcrumbService, CmatButtonTypeComponent, CmatBytesPipe, CmatCardComponent, CmatCardWrapperComponent, CmatCarouselComponent, CmatCarouselFooterComponent, CmatCarouselHeaderComponent, CmatCarouselTemplateDirective, CmatCascadeBottomSheetComponent, CmatCascadeListComponent, CmatCascadeTypeComponent, CmatCheckListTypeComponent, CmatChipInputComponent, CmatChipsInputTypeComponent, CmatCodeEditorComponent, CmatColorPickerTypeComponent, CmatConfigService, CmatConfirmationService, CmatDataExporterDirective, CmatDataService, CmatDateFormatPipe, CmatDateRangeComponent, CmatDateRangeTypeComponent, CmatDateTimeDisplayComponent, CmatDatepickerTypeComponent, CmatDatetimepickerCalendarBodyComponent, CmatDatetimepickerCalendarCellComponent, CmatDatetimepickerCalendarComponent, CmatDatetimepickerClockComponent, CmatDatetimepickerComponent, CmatDatetimepickerContentComponent, CmatDatetimepickerFilterType, CmatDatetimepickerInputDirective, CmatDatetimepickerInputEvent, CmatDatetimepickerMonthViewComponent, CmatDatetimepickerToggleComponent, CmatDatetimepickerToggleIconDirective, CmatDatetimepickerYearViewComponent, CmatDebounceClickDirective, CmatDebounceKeyupDirective, CmatDialogType, CmatDigitOnlyDirective, CmatDrawerComponent, CmatDrawerService, CmatEmptyStateComponent, CmatEqualValidatorDirective, CmatExpansionWrapperComponent, CmatExportAsService, CmatFilePreviewComponent, CmatFilesUtilService, CmatFilterToolbarComponent, CmatFindByKeyPipe, CmatFormActionsComponent, CmatFormFieldWrapperComponent, CmatFullscreenComponent, CmatGroupByPipe, CmatHighlightComponent, CmatHighlightService, CmatHorizontalNavigationComponent, CmatImageComponent, CmatInlineLoadingComponent, CmatJsonEditorComponent, CmatKeysPipe, CmatKnobInputComponent, CmatKnobTypeComponent, CmatLoadingInterceptor, CmatLoadingService, CmatLocalStorageService, CmatMaskDirective, CmatMasonryComponent, CmatMaterialColorPickerComponent, CmatMediaWatcherService, CmatMessageSeverity, CmatMultiCheckboxTypeComponent, CmatNavigationItem, CmatNavigationService, CmatNumberTypeComponent, CmatOrgChartComponent, CmatOtpInputComponent, CmatPageHeaderComponent, CmatPaginatePipe, CmatPaginationComponent, CmatPaginationDirective, CmatPaginationService, CmatPanelWrapperComponent, CmatPassToggleVisibilityComponent, CmatPasswordStrengthComponent, CmatPasswordStrengthInfoComponent, CmatPlatformService, CmatPopoverComponent, CmatPopoverTargetDirective, CmatPopoverTriggerDirective, CmatProgressBarComponent, CmatQRCodeComponent, CmatQuillTypeComponent, CmatRadioTypeComponent, CmatRatingComponent, CmatRatingTypeComponent, CmatRepeatTypeComponent, CmatRichTextEditorComponent, CmatSeamlessAutoScrollDirective, CmatSecurePipe, CmatSelectSearchComponent, CmatSelectTableComponent, CmatSelectTableTypeComponent, CmatSelectTreeComponent, CmatSelectTreeFlatNode, CmatSelectTreeNode, CmatSelectTreeTypeComponent, CmatSelectTypeComponent, CmatSelectedColor, CmatSliderTypeComponent, CmatSpeedDialActionsComponent, CmatSpeedDialComponent, CmatSpeedDialTriggerComponent, CmatSplashScreenService, CmatStatusTagComponent, CmatStepperHorizontalTypeComponent, CmatStepperVerticalTypeComponent, CmatTabTypeComponent, CmatTableToolbarComponent, CmatTableTypeComponent, CmatTagsTypeComponent, CmatTextareaTypeComponent, CmatTimelineComponent, CmatTimelineItemComponent, CmatTimelineItemIconDirective, CmatTimelineItemLabelDirective, CmatTitleService, CmatToastComponent, CmatToastModalComponent, CmatToastService, CmatTransferFilterCondition, CmatTransferItemFlatNode, CmatTransferItemNode, CmatTransferPickerComponent, CmatTransferPickerFilterComponent, CmatTransferPickerSearchComponent, CmatTransferPickerService, CmatTransferPickerSourceComponent, CmatTransferPickerTargetComponent, CmatTranslationService, CmatTreeTableColumnDirective, CmatTreeTableComponent, CmatTreeTableNode, CmatUploadComponent, CmatUploadQueueComponent, CmatUploadTypeComponent, CmatUppercasePipe, CmatUrlStateConfigService, CmatUtilsService, CmatVerticalNavigationComponent, DatetimeAdapter, DayjsDateAdapter, DayjsDatetimeAdapter, ExportType, MAT_SELECTSEARCH_DEFAULT_OPTIONS, addonsExtension, configurableDefaultOptions, initializeCmatUtilsConfig, register, registerInfo };
18840
19162
  //# sourceMappingURL=cmat.mjs.map