cmat 0.0.79 → 0.0.80

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 (133) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -9
  2. package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
  3. package/fesm2022/cmat-components-card.mjs +3 -3
  4. package/fesm2022/cmat-components-carousel.mjs +21 -21
  5. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  6. package/fesm2022/cmat-components-cascade.mjs +14 -14
  7. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  8. package/fesm2022/cmat-components-chip-input.mjs +3 -3
  9. package/fesm2022/cmat-components-code-editor.mjs +3 -3
  10. package/fesm2022/cmat-components-custom-formly.mjs +119 -116
  11. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  12. package/fesm2022/cmat-components-date-range.mjs +12 -12
  13. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  14. package/fesm2022/cmat-components-date-time-display.mjs +3 -3
  15. package/fesm2022/cmat-components-drawer.mjs +10 -10
  16. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  17. package/fesm2022/cmat-components-empty-state.mjs +3 -3
  18. package/fesm2022/cmat-components-file-preview.mjs +3 -3
  19. package/fesm2022/cmat-components-filter-toolbar.mjs +3 -3
  20. package/fesm2022/cmat-components-form-actions.mjs +3 -3
  21. package/fesm2022/cmat-components-fullscreen.mjs +3 -3
  22. package/fesm2022/cmat-components-highlight.mjs +6 -7
  23. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  24. package/fesm2022/cmat-components-image-viewer.mjs +12 -15
  25. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  26. package/fesm2022/cmat-components-inline-loading.mjs +3 -3
  27. package/fesm2022/cmat-components-json-editor.mjs +4 -6
  28. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  29. package/fesm2022/cmat-components-knob-input.mjs +11 -11
  30. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  31. package/fesm2022/cmat-components-masonry.mjs +8 -11
  32. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  33. package/fesm2022/cmat-components-material-color-picker.mjs +13 -14
  34. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  35. package/fesm2022/cmat-components-material-datetimepicker.mjs +73 -81
  36. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  37. package/fesm2022/cmat-components-navigation.mjs +155 -163
  38. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  39. package/fesm2022/cmat-components-opt-input.mjs +3 -3
  40. package/fesm2022/cmat-components-org-chart.mjs +9 -9
  41. package/fesm2022/cmat-components-page-header.mjs +3 -3
  42. package/fesm2022/cmat-components-pagination.mjs +34 -32
  43. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  44. package/fesm2022/cmat-components-password-strength.mjs +13 -15
  45. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  46. package/fesm2022/cmat-components-popover.mjs +10 -12
  47. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  48. package/fesm2022/cmat-components-progress-bar.mjs +11 -14
  49. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  50. package/fesm2022/cmat-components-qrcode.mjs +3 -3
  51. package/fesm2022/cmat-components-rating.mjs +14 -14
  52. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  53. package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
  54. package/fesm2022/cmat-components-select-search.mjs +17 -19
  55. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  56. package/fesm2022/cmat-components-select-table.mjs +19 -20
  57. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  58. package/fesm2022/cmat-components-select-tree.mjs +31 -32
  59. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  60. package/fesm2022/cmat-components-skeleton.mjs +3 -3
  61. package/fesm2022/cmat-components-speed-dial.mjs +14 -17
  62. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  63. package/fesm2022/cmat-components-status-tag.mjs +3 -3
  64. package/fesm2022/cmat-components-table-toolbar.mjs +3 -3
  65. package/fesm2022/cmat-components-timeline.mjs +12 -12
  66. package/fesm2022/cmat-components-toast.mjs +14 -16
  67. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  68. package/fesm2022/cmat-components-transfer-picker.mjs +103 -90
  69. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  70. package/fesm2022/cmat-components-treetable.mjs +17 -19
  71. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  72. package/fesm2022/cmat-components-upload.mjs +24 -31
  73. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  74. package/fesm2022/cmat-components-x6-angular-shape.mjs +0 -3
  75. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  76. package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
  77. package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
  78. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  79. package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
  80. package/fesm2022/cmat-directives-debounce.mjs +9 -9
  81. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  82. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  83. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
  84. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  85. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  86. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  87. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  88. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  89. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  90. package/fesm2022/cmat-pipes-secure.mjs +3 -3
  91. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  92. package/fesm2022/cmat-services-alert.mjs +3 -3
  93. package/fesm2022/cmat-services-config.mjs +6 -6
  94. package/fesm2022/cmat-services-confirmation.mjs +6 -6
  95. package/fesm2022/cmat-services-data.mjs +3 -3
  96. package/fesm2022/cmat-services-export-as.mjs +3 -3
  97. package/fesm2022/cmat-services-loading.mjs +6 -6
  98. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  99. package/fesm2022/cmat-services-media-watcher.mjs +3 -3
  100. package/fesm2022/cmat-services-platform.mjs +3 -3
  101. package/fesm2022/cmat-services-splash-screen.mjs +3 -3
  102. package/fesm2022/cmat-services-title.mjs +3 -3
  103. package/fesm2022/cmat-services-translation.mjs +3 -3
  104. package/fesm2022/cmat-services-utils.mjs +3 -3
  105. package/fesm2022/cmat.mjs +964 -1000
  106. package/fesm2022/cmat.mjs.map +1 -1
  107. package/package.json +1 -1
  108. package/types/cmat-components-carousel.d.ts +2 -2
  109. package/types/cmat-components-cascade.d.ts +3 -3
  110. package/types/cmat-components-custom-formly.d.ts +8 -9
  111. package/types/cmat-components-date-range.d.ts +1 -1
  112. package/types/cmat-components-drawer.d.ts +2 -2
  113. package/types/cmat-components-image-viewer.d.ts +5 -6
  114. package/types/cmat-components-json-editor.d.ts +0 -1
  115. package/types/cmat-components-knob-input.d.ts +2 -2
  116. package/types/cmat-components-masonry.d.ts +1 -2
  117. package/types/cmat-components-material-color-picker.d.ts +1 -2
  118. package/types/cmat-components-material-datetimepicker.d.ts +6 -9
  119. package/types/cmat-components-navigation.d.ts +10 -7
  120. package/types/cmat-components-pagination.d.ts +5 -4
  121. package/types/cmat-components-password-strength.d.ts +1 -2
  122. package/types/cmat-components-popover.d.ts +0 -1
  123. package/types/cmat-components-progress-bar.d.ts +6 -7
  124. package/types/cmat-components-rating.d.ts +6 -7
  125. package/types/cmat-components-select-search.d.ts +1 -1
  126. package/types/cmat-components-select-table.d.ts +7 -8
  127. package/types/cmat-components-select-tree.d.ts +10 -11
  128. package/types/cmat-components-speed-dial.d.ts +1 -2
  129. package/types/cmat-components-toast.d.ts +1 -2
  130. package/types/cmat-components-transfer-picker.d.ts +21 -11
  131. package/types/cmat-components-treetable.d.ts +3 -4
  132. package/types/cmat-components-upload.d.ts +5 -7
  133. package/types/cmat.d.ts +83 -88
@@ -2,7 +2,7 @@ import { Overlay } from '@angular/cdk/overlay';
2
2
  import { TemplatePortal } from '@angular/cdk/portal';
3
3
  import { NgClass } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, ElementRef, forwardRef, Input, ViewChild, Output, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
5
+ import { EventEmitter, signal, inject, ViewContainerRef, ElementRef, forwardRef, Input, ViewChild, Output, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { FormControl, Validators, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
8
8
  import * as i2 from '@angular/material/button';
@@ -26,10 +26,10 @@ class CmatDateRangeComponent {
26
26
  month1: null,
27
27
  month2: null
28
28
  };
29
+ this.refreshVersion = signal(0, ...(ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []));
29
30
  this.setWhichDate = 'start';
30
31
  this._overlay = inject(Overlay);
31
32
  this._viewContainerRef = inject(ViewContainerRef);
32
- this._changeDetectorRef = inject(ChangeDetectorRef);
33
33
  this._range = {
34
34
  start: null,
35
35
  end: null
@@ -170,7 +170,7 @@ class CmatDateRangeComponent {
170
170
  writeValue(range) {
171
171
  this._programmaticChange = true;
172
172
  this.range = range;
173
- this._changeDetectorRef.markForCheck();
173
+ this.refreshVersion.update(value => value + 1);
174
174
  }
175
175
  ngOnInit() {
176
176
  this._init();
@@ -261,7 +261,7 @@ class CmatDateRangeComponent {
261
261
  newRange.whichDate = this.setWhichDate;
262
262
  this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';
263
263
  this.range = newRange;
264
- this._changeDetectorRef.markForCheck();
264
+ this.refreshVersion.update(value => value + 1);
265
265
  }
266
266
  prev() {
267
267
  this.activeDates.month1 = dayjs(this.activeDates.month1).subtract(1, 'month');
@@ -292,7 +292,7 @@ class CmatDateRangeComponent {
292
292
  end: this._range.end.clone().toISOString(),
293
293
  whichDate: 'start'
294
294
  };
295
- this._changeDetectorRef.markForCheck();
295
+ this.refreshVersion.update(value => value + 1);
296
296
  }
297
297
  }
298
298
  updateEndTime(event) {
@@ -316,7 +316,7 @@ class CmatDateRangeComponent {
316
316
  end: endDate.toISOString(),
317
317
  whichDate: 'end'
318
318
  };
319
- this._changeDetectorRef.markForCheck();
319
+ this.refreshVersion.update(value => value + 1);
320
320
  }
321
321
  }
322
322
  _init() {
@@ -334,7 +334,7 @@ class CmatDateRangeComponent {
334
334
  }
335
335
  this._programmaticChange = true;
336
336
  this.timeRange = this.timeRange ?? true;
337
- this._changeDetectorRef.markForCheck();
337
+ this.refreshVersion.update(value => value + 1);
338
338
  }
339
339
  _parseTime(value) {
340
340
  const timeArr = value.split(this._timeRegExp).filter(part => part !== '');
@@ -344,16 +344,16 @@ class CmatDateRangeComponent {
344
344
  }
345
345
  return dayjs(value, 'HH:mm').second(0);
346
346
  }
347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatDateRangeComponent, isStandalone: true, selector: "cmat-date-range", inputs: { controlClass: "controlClass", initData: "initData", readonly: "readonly", dateFormat: "dateFormat", timeFormat: "timeFormat", timeRange: "timeRange", range: "range" }, outputs: { rangeChanged: "rangeChanged" }, providers: [
347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
348
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDateRangeComponent, isStandalone: true, selector: "cmat-date-range", inputs: { controlClass: "controlClass", initData: "initData", readonly: "readonly", dateFormat: "dateFormat", timeFormat: "timeFormat", timeRange: "timeRange", range: "range" }, outputs: { rangeChanged: "rangeChanged" }, providers: [
349
349
  {
350
350
  provide: NG_VALUE_ACCESSOR,
351
351
  useExisting: forwardRef(() => CmatDateRangeComponent),
352
352
  multi: true
353
353
  }
354
- ], viewQueries: [{ propertyName: "_matMonthView1", first: true, predicate: ["matMonthView1"], descendants: true }, { propertyName: "_matMonthView2", first: true, predicate: ["matMonthView2"], descendants: true }, { propertyName: "_pickerPanelOrigin", first: true, predicate: ["pickerPanelOrigin"], descendants: true, read: ElementRef }, { propertyName: "_pickerPanel", first: true, predicate: ["pickerPanel"], descendants: true }], exportAs: ["cmatDateRange"], ngImport: i0, template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.startDate}}</div>\r\n @if (range?.startTime) {\r\n <div class=\"time\">{{range?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.endDate}}</div>\r\n @if (range?.endTime) {\r\n <div class=\"time\">{{range?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n \r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month1\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n \r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month2\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>\r\n", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:4px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "component", type: MatMonthView, selector: "mat-month-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName", "activeDrag"], outputs: ["selectedChange", "_userSelection", "dragStarted", "dragEnded", "activeDateChange"], exportAs: ["matMonthView"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
354
+ ], viewQueries: [{ propertyName: "_matMonthView1", first: true, predicate: ["matMonthView1"], descendants: true }, { propertyName: "_matMonthView2", first: true, predicate: ["matMonthView2"], descendants: true }, { propertyName: "_pickerPanelOrigin", first: true, predicate: ["pickerPanelOrigin"], descendants: true, read: ElementRef }, { propertyName: "_pickerPanel", first: true, predicate: ["pickerPanel"], descendants: true }], exportAs: ["cmatDateRange"], ngImport: i0, template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" [attr.data-refresh]=\"refreshVersion()\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.startDate}}</div>\r\n @if (range?.startTime) {\r\n <div class=\"time\">{{range?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.endDate}}</div>\r\n @if (range?.endTime) {\r\n <div class=\"time\">{{range?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n \r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month1\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n \r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month2\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>\r\n", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:4px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "component", type: MatMonthView, selector: "mat-month-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName", "activeDrag"], outputs: ["selectedChange", "_userSelection", "dragStarted", "dragEnded", "activeDateChange"], exportAs: ["matMonthView"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
355
355
  }
356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDateRangeComponent, decorators: [{
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDateRangeComponent, decorators: [{
357
357
  type: Component,
358
358
  args: [{ selector: 'cmat-date-range', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDateRange', providers: [
359
359
  {
@@ -363,7 +363,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
363
363
  }
364
364
  ], imports: [FormsModule, ReactiveFormsModule, MatButtonModule, MatIconModule,
365
365
  MatFormFieldModule, MatMonthView,
366
- MatInputModule, NgClass], template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.startDate}}</div>\r\n @if (range?.startTime) {\r\n <div class=\"time\">{{range?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.endDate}}</div>\r\n @if (range?.endTime) {\r\n <div class=\"time\">{{range?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n \r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month1\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n \r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month2\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>\r\n", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:4px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"] }]
366
+ MatInputModule, NgClass], template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" [attr.data-refresh]=\"refreshVersion()\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.startDate}}</div>\r\n @if (range?.startTime) {\r\n <div class=\"time\">{{range?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.endDate}}</div>\r\n @if (range?.endTime) {\r\n <div class=\"time\">{{range?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n \r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month1\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n \r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month2\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>\r\n", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:4px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"] }]
367
367
  }], ctorParameters: () => [], propDecorators: { controlClass: [{
368
368
  type: Input
369
369
  }], initData: [{
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-date-range.mjs","sources":["../../../projects/cmat/components/date-range/date-range.component.ts","../../../projects/cmat/components/date-range/date-range.component.html","../../../projects/cmat/components/date-range/cmat-components-date-range.ts"],"sourcesContent":["import { Overlay } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation, inject } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCalendarCellCssClasses, MatMonthView } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\n\r\n@Component({\r\n selector: 'cmat-date-range',\r\n templateUrl: './date-range.component.html',\r\n styleUrls: ['./date-range.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDateRange',\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatDateRangeComponent),\r\n multi: true\r\n }\r\n ],\r\n imports: [FormsModule, ReactiveFormsModule, MatButtonModule, MatIconModule,\r\n MatFormFieldModule, MatMonthView,\r\n MatInputModule, NgClass]\r\n})\r\nexport class CmatDateRangeComponent implements ControlValueAccessor, OnInit, OnDestroy {\r\n @Input() controlClass: string = '';\r\n @Input() initData: boolean = true\r\n\r\n @Output() readonly rangeChanged: EventEmitter<{ start: string; end: string }> = new EventEmitter<{ start: string; end: string }>();\r\n @ViewChild('matMonthView1') private _matMonthView1: MatMonthView<any>;\r\n @ViewChild('matMonthView2') private _matMonthView2: MatMonthView<any>;\r\n @ViewChild('pickerPanelOrigin', { read: ElementRef }) private _pickerPanelOrigin: ElementRef;\r\n @ViewChild('pickerPanel') private _pickerPanel: TemplateRef<any>;\r\n\r\n activeDates: { month1: Dayjs | null; month2: Dayjs | null } = {\r\n month1: null,\r\n month2: null\r\n };\r\n setWhichDate: 'start' | 'end' = 'start';\r\n startTimeFormControl: FormControl;\r\n endTimeFormControl: FormControl;\r\n\r\n private _overlay = inject(Overlay);\r\n private _viewContainerRef = inject(ViewContainerRef);\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n private _dateFormat: string;\r\n private _onChange: (value: any) => void;\r\n private _onTouched: (value: any) => void;\r\n private _programmaticChange!: boolean;\r\n private _range: { start: Dayjs | null; end: Dayjs | null } = {\r\n start: null,\r\n end: null\r\n };\r\n private _timeFormat: string;\r\n private _timeRange: boolean;\r\n private _readonly: boolean;\r\n private readonly _timeRegExp: RegExp = new RegExp('^(0[0-9]|1[0-9]|2[0-4]|[0-9]):([0-5][0-9])(A|(?:AM)|P|(?:PM))?$', 'i');\r\n\r\n\r\n\r\n constructor() {\r\n dayjs.extend(isBetween);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this._onChange = (): void => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this._onTouched = (): void => { };\r\n this.dateFormat = 'YYYY/MM/DD';\r\n this.timeFormat = '12';\r\n }\r\n\r\n get readonly(): boolean {\r\n return this._readonly;\r\n }\r\n\r\n @Input()\r\n set readonly(value) {\r\n this._readonly = value;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateFormat(): string {\r\n return this._dateFormat;\r\n }\r\n @Input()\r\n set dateFormat(value: string) {\r\n if (this._dateFormat === value) {\r\n return;\r\n }\r\n this._dateFormat = value;\r\n }\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get timeFormat(): string {\r\n return this._timeFormat;\r\n }\r\n @Input()\r\n set timeFormat(value: string) {\r\n if (this._timeFormat === value) {\r\n return;\r\n }\r\n this._timeFormat = value === '12' ? 'hh:mmA' : 'HH:mm';\r\n }\r\n\r\n\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get timeRange(): boolean {\r\n return this._timeRange;\r\n }\r\n @Input()\r\n set timeRange(value: boolean) {\r\n if (this._timeRange === value) {\r\n return;\r\n }\r\n this._timeRange = value;\r\n if (!value && this._range?.start && this._range?.end) {\r\n this.range = {\r\n start: this._range.start.clone().startOf('day'),\r\n end: this._range.end.clone().endOf('day')\r\n };\r\n }\r\n }\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get range(): any {\r\n if (this._range.start && this._range.end) {\r\n const start = this._range?.start.clone();\r\n const end = this._range?.end.clone();\r\n return {\r\n startDate: start ? start.clone().format(this.dateFormat) : null,\r\n startTime: this.timeRange && start ? start.clone().format(this.timeFormat) : null,\r\n endDate: end ? end.clone().format(this.dateFormat) : null,\r\n endTime: end && this.timeRange ? end.clone().format(this.timeFormat) : null\r\n };\r\n }\r\n\r\n return void 0;\r\n }\r\n\r\n @Input()\r\n set range(value) {\r\n if (!(value?.start && value.end)) {\r\n this.activeDates = {\r\n month1: dayjs(),\r\n month2: dayjs().add(1, 'month')\r\n };\r\n\r\n return;\r\n }\r\n const whichDate = value.whichDate ?? null;\r\n const start = dayjs(value.start);\r\n const end = dayjs(value.end);\r\n if (whichDate === 'start') {\r\n this._range.start = start.clone();\r\n if (this._range.end && this._range.start.isAfter(this._range.end)) {\r\n const endDate = start.clone().hour(this._range.end.hour()).minute(this._range.end.minute()).second(this._range.end.second());\r\n if (this._range.start.isBefore(endDate)) {\r\n this._range.end = endDate;\r\n }\r\n else {\r\n this._range.end = start.clone();\r\n }\r\n }\r\n }\r\n if (whichDate === 'end') {\r\n this._range.end = end.clone();\r\n if (this._range.start?.isAfter(this._range.end)) {\r\n const startDate = end.clone().hour(this._range.start.hour()).minute(this._range.start.minute()).second(this._range.start.second());\r\n if (this._range.end.isAfter(startDate)) {\r\n this._range.start = startDate;\r\n }\r\n else {\r\n this._range.start = end.clone();\r\n }\r\n }\r\n }\r\n if (!whichDate) {\r\n this._range.start = start.clone();\r\n this._range.end = start.isBefore(end) ? end.clone() : start.clone();\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n const range = {\r\n start: this._range.start.clone().toISOString(),\r\n end: this._range.end.clone().toISOString()\r\n };\r\n this.rangeChanged.emit(range);\r\n if (!this._programmaticChange) {\r\n this._onTouched(range);\r\n this._onChange(range);\r\n }\r\n this.activeDates = {\r\n month1: this._range.start.clone(),\r\n month2: this._range.start.clone().add(1, 'month')\r\n };\r\n this.startTimeFormControl.setValue(this._range.start.clone().format(this._timeFormat).toString());\r\n this.endTimeFormControl.setValue(this._range.end.clone().format(this._timeFormat).toString());\r\n }\r\n if (this._matMonthView1 && this._matMonthView2) {\r\n this._matMonthView1.ngAfterContentInit();\r\n this._matMonthView2.ngAfterContentInit();\r\n }\r\n this._programmaticChange = false;\r\n }\r\n\r\n \r\n registerOnChange(fn: any): void {\r\n this._onChange = fn;\r\n }\r\n\r\n \r\n registerOnTouched(fn: any): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n \r\n writeValue(range: { start: string; end: string }): void {\r\n this._programmaticChange = true;\r\n this.range = range;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n ngOnInit(): void {\r\n this._init();\r\n }\r\n \r\n ngOnDestroy(): void {\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this.writeValue = (): void => { };\r\n }\r\n\r\n \r\n openPickerPanel(): void {\r\n if (this.readonly)\r\n return;\r\n const overlayRef = this._overlay.create({\r\n panelClass: 'cmat-date-range-panel',\r\n backdropClass: '',\r\n hasBackdrop: true,\r\n scrollStrategy: this._overlay.scrollStrategies.reposition(),\r\n positionStrategy: this._overlay.position()\r\n .flexibleConnectedTo(this._pickerPanelOrigin)\r\n .withPositions([\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetY: 8\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetY: -8\r\n }\r\n ])\r\n });\r\n const templatePortal = new TemplatePortal(this._pickerPanel, this._viewContainerRef);\r\n overlayRef.backdropClick().subscribe(() => {\r\n if (templatePortal?.isAttached) {\r\n templatePortal.detach();\r\n }\r\n if (overlayRef?.hasAttached()) {\r\n overlayRef.detach();\r\n overlayRef.dispose();\r\n }\r\n });\r\n overlayRef.attach(templatePortal);\r\n }\r\n\r\n \r\n getMonthLabel(month: number): string | void {\r\n if (month === 1) {\r\n return this.activeDates.month1?.clone().format('YYYY MMMM');\r\n }\r\n\r\n return this.activeDates.month2?.clone().format('YYYY MMMM');\r\n }\r\n\r\n \r\n dateClass(): any {\r\n return (date: Dayjs): MatCalendarCellCssClasses | void => {\r\n const start = this._range.start ?? dayjs();\r\n const end = this._range.end ?? dayjs().add(1, 'day').endOf('day')\r\n if (date.isSame(start, 'day') && date.isSame(end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];\r\n }\r\n if (date.isSame(start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n if (date.isSame(end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-end'];\r\n }\r\n if (date.isBetween(start, end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-mid'];\r\n }\r\n\r\n return void 0;\r\n };\r\n }\r\n\r\n \r\n dateFilter(): any {\r\n return (date: Dayjs): boolean => !(this.setWhichDate === 'end' && date.isBefore(this._range.start, 'day'));\r\n }\r\n\r\n \r\n onSelectedDateChange(date: Dayjs): void {\r\n const newRange = {\r\n start: dayjs().toISOString(),\r\n end: dayjs().toISOString(),\r\n whichDate: ''\r\n };\r\n if (this.setWhichDate === 'start') {\r\n newRange.start = dayjs(newRange.start).year(date.year()).month(date.month()).date(date.date()).toISOString();\r\n }\r\n else {\r\n newRange.end = dayjs(newRange.end).year(date.year()).month(date.month()).date(date.date()).toISOString();\r\n }\r\n newRange.whichDate = this.setWhichDate;\r\n this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';\r\n this.range = newRange;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n\r\n }\r\n\r\n \r\n prev(): void {\r\n this.activeDates.month1 = dayjs(this.activeDates.month1).subtract(1, 'month');\r\n this.activeDates.month2 = dayjs(this.activeDates.month2).subtract(1, 'month');\r\n }\r\n\r\n \r\n next(): void {\r\n this.activeDates.month1 = dayjs(this.activeDates.month1).add(1, 'month');\r\n this.activeDates.month2 = dayjs(this.activeDates.month2).add(1, 'month');\r\n }\r\n\r\n \r\n updateStartTime(event: any): void {\r\n const parsedTime = this._parseTime(event.target.value);\r\n if (this.startTimeFormControl.invalid) {\r\n if (this._range.start) {\r\n const time = this._range.start.clone().format(this._timeFormat);\r\n this.startTimeFormControl.setValue(time);\r\n }\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n const startDate = this._range.start.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n if (startDate.isAfter(this._range.end)) {\r\n const endDateHours = this._range.end.hour();\r\n const endDateMinutes = this._range.end.minute();\r\n startDate.hour(endDateHours).minute(endDateMinutes);\r\n }\r\n this.range = {\r\n start: startDate.toISOString(),\r\n end: this._range.end.clone().toISOString(),\r\n whichDate: 'start'\r\n };\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n \r\n updateEndTime(event: any): void {\r\n const parsedTime = this._parseTime(event.target.value);\r\n if (this.endTimeFormControl.invalid) {\r\n if (this._range.end) {\r\n const time = this._range.end.clone().format(this._timeFormat);\r\n this.endTimeFormControl.setValue(time);\r\n }\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n const endDate = this._range.end.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n if (endDate.isBefore(this._range.start)) {\r\n const startDateHours = this._range.start.hour();\r\n const startDateMinutes = this._range.start.minute();\r\n endDate.hour(startDateHours).minute(startDateMinutes);\r\n }\r\n this.range = {\r\n start: this._range.start.clone().toISOString(),\r\n end: endDate.toISOString(),\r\n whichDate: 'end'\r\n };\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n \r\n private _init(): void {\r\n this.startTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this.endTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this._programmaticChange = true;\r\n if (this.initData) {\r\n this.range = {\r\n start: dayjs().startOf('day').toISOString(),\r\n end: dayjs().add(1, 'day').endOf('day').toISOString()\r\n };\r\n } else {\r\n this.range = {};\r\n }\r\n this._programmaticChange = true;\r\n\r\n this.timeRange = this.timeRange ?? true;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n \r\n private _parseTime(value: string): Dayjs {\r\n const timeArr = value.split(this._timeRegExp).filter(part => part !== '');\r\n const meridiem = timeArr[2] || null;\r\n if (meridiem) {\r\n return dayjs(value, 'hh:mmA').second(0);\r\n }\r\n return dayjs(value, 'HH:mm').second(0);\r\n }\r\n}\r\n","<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.startDate}}</div>\r\n @if (range?.startTime) {\r\n <div class=\"time\">{{range?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.endDate}}</div>\r\n @if (range?.endTime) {\r\n <div class=\"time\">{{range?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n \r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month1\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>开始时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n \r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month2\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>结束时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MA+Ba,sBAAsB,CAAA;AAqC/B,IAAA,WAAA,GAAA;QApCS,IAAA,CAAA,YAAY,GAAW,EAAE;QACzB,IAAA,CAAA,QAAQ,GAAY,IAAI;AAEd,QAAA,IAAA,CAAA,YAAY,GAAiD,IAAI,YAAY,EAAkC;AAMlI,QAAA,IAAA,CAAA,WAAW,GAAmD;AAC1D,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,MAAM,EAAE;SACX;QACD,IAAA,CAAA,YAAY,GAAoB,OAAO;AAI/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;AAC1B,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAM9C,QAAA,IAAA,CAAA,MAAM,GAA+C;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AA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAElB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAlBlC,SAAS;+BACI,iBAAiB,EAAA,aAAA,EAGZ,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,eAAe,EAAA,SAAA,EACd;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,4BAA4B,CAAC;AACrD,4BAAA,KAAK,EAAE;AACV;AACJ,qBAAA,EAAA,OAAA,EACQ,CAAC,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa;AACtE,wBAAA,kBAAkB,EAAE,YAAY;wBAChC,cAAc,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,+qFAAA,EAAA,MAAA,EAAA,CAAA,kuKAAA,CAAA,EAAA;;sBAG3B;;sBACA;;sBAEA;;sBACA,SAAS;uBAAC,eAAe;;sBACzB,SAAS;uBAAC,eAAe;;sBACzB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;sBACnD,SAAS;uBAAC,aAAa;;sBA4CvB;;sBASA;;sBAaA;;sBAeA;;sBA+BA;;;AEvJL;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-date-range.mjs","sources":["../../../projects/cmat/components/date-range/date-range.component.ts","../../../projects/cmat/components/date-range/date-range.component.html","../../../projects/cmat/components/date-range/cmat-components-date-range.ts"],"sourcesContent":["import { Overlay } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, forwardRef, Input, OnDestroy, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation, inject, signal } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCalendarCellCssClasses, MatMonthView } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\n\r\n@Component({\r\n selector: 'cmat-date-range',\r\n templateUrl: './date-range.component.html',\r\n styleUrls: ['./date-range.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDateRange',\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatDateRangeComponent),\r\n multi: true\r\n }\r\n ],\r\n imports: [FormsModule, ReactiveFormsModule, MatButtonModule, MatIconModule,\r\n MatFormFieldModule, MatMonthView,\r\n MatInputModule, NgClass]\r\n})\r\nexport class CmatDateRangeComponent implements ControlValueAccessor, OnInit, OnDestroy {\r\n @Input() controlClass: string = '';\r\n @Input() initData: boolean = true\r\n\r\n @Output() readonly rangeChanged: EventEmitter<{ start: string; end: string }> = new EventEmitter<{ start: string; end: string }>();\r\n @ViewChild('matMonthView1') private _matMonthView1: MatMonthView<any>;\r\n @ViewChild('matMonthView2') private _matMonthView2: MatMonthView<any>;\r\n @ViewChild('pickerPanelOrigin', { read: ElementRef }) private _pickerPanelOrigin: ElementRef;\r\n @ViewChild('pickerPanel') private _pickerPanel: TemplateRef<any>;\r\n\r\n activeDates: { month1: Dayjs | null; month2: Dayjs | null } = {\r\n month1: null,\r\n month2: null\r\n };\r\n readonly refreshVersion = signal(0);\r\n setWhichDate: 'start' | 'end' = 'start';\r\n startTimeFormControl: FormControl;\r\n endTimeFormControl: FormControl;\r\n\r\n private _overlay = inject(Overlay);\r\n private _viewContainerRef = inject(ViewContainerRef);\r\n\r\n private _dateFormat: string;\r\n private _onChange: (value: any) => void;\r\n private _onTouched: (value: any) => void;\r\n private _programmaticChange!: boolean;\r\n private _range: { start: Dayjs | null; end: Dayjs | null } = {\r\n start: null,\r\n end: null\r\n };\r\n private _timeFormat: string;\r\n private _timeRange: boolean;\r\n private _readonly: boolean;\r\n private readonly _timeRegExp: RegExp = new RegExp('^(0[0-9]|1[0-9]|2[0-4]|[0-9]):([0-5][0-9])(A|(?:AM)|P|(?:PM))?$', 'i');\r\n\r\n\r\n\r\n constructor() {\r\n dayjs.extend(isBetween);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this._onChange = (): void => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this._onTouched = (): void => { };\r\n this.dateFormat = 'YYYY/MM/DD';\r\n this.timeFormat = '12';\r\n }\r\n\r\n get readonly(): boolean {\r\n return this._readonly;\r\n }\r\n\r\n @Input()\r\n set readonly(value) {\r\n this._readonly = value;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get dateFormat(): string {\r\n return this._dateFormat;\r\n }\r\n @Input()\r\n set dateFormat(value: string) {\r\n if (this._dateFormat === value) {\r\n return;\r\n }\r\n this._dateFormat = value;\r\n }\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get timeFormat(): string {\r\n return this._timeFormat;\r\n }\r\n @Input()\r\n set timeFormat(value: string) {\r\n if (this._timeFormat === value) {\r\n return;\r\n }\r\n this._timeFormat = value === '12' ? 'hh:mmA' : 'HH:mm';\r\n }\r\n\r\n\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get timeRange(): boolean {\r\n return this._timeRange;\r\n }\r\n @Input()\r\n set timeRange(value: boolean) {\r\n if (this._timeRange === value) {\r\n return;\r\n }\r\n this._timeRange = value;\r\n if (!value && this._range?.start && this._range?.end) {\r\n this.range = {\r\n start: this._range.start.clone().startOf('day'),\r\n end: this._range.end.clone().endOf('day')\r\n };\r\n }\r\n }\r\n\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n get range(): any {\r\n if (this._range.start && this._range.end) {\r\n const start = this._range?.start.clone();\r\n const end = this._range?.end.clone();\r\n return {\r\n startDate: start ? start.clone().format(this.dateFormat) : null,\r\n startTime: this.timeRange && start ? start.clone().format(this.timeFormat) : null,\r\n endDate: end ? end.clone().format(this.dateFormat) : null,\r\n endTime: end && this.timeRange ? end.clone().format(this.timeFormat) : null\r\n };\r\n }\r\n\r\n return void 0;\r\n }\r\n\r\n @Input()\r\n set range(value) {\r\n if (!(value?.start && value.end)) {\r\n this.activeDates = {\r\n month1: dayjs(),\r\n month2: dayjs().add(1, 'month')\r\n };\r\n\r\n return;\r\n }\r\n const whichDate = value.whichDate ?? null;\r\n const start = dayjs(value.start);\r\n const end = dayjs(value.end);\r\n if (whichDate === 'start') {\r\n this._range.start = start.clone();\r\n if (this._range.end && this._range.start.isAfter(this._range.end)) {\r\n const endDate = start.clone().hour(this._range.end.hour()).minute(this._range.end.minute()).second(this._range.end.second());\r\n if (this._range.start.isBefore(endDate)) {\r\n this._range.end = endDate;\r\n }\r\n else {\r\n this._range.end = start.clone();\r\n }\r\n }\r\n }\r\n if (whichDate === 'end') {\r\n this._range.end = end.clone();\r\n if (this._range.start?.isAfter(this._range.end)) {\r\n const startDate = end.clone().hour(this._range.start.hour()).minute(this._range.start.minute()).second(this._range.start.second());\r\n if (this._range.end.isAfter(startDate)) {\r\n this._range.start = startDate;\r\n }\r\n else {\r\n this._range.start = end.clone();\r\n }\r\n }\r\n }\r\n if (!whichDate) {\r\n this._range.start = start.clone();\r\n this._range.end = start.isBefore(end) ? end.clone() : start.clone();\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n const range = {\r\n start: this._range.start.clone().toISOString(),\r\n end: this._range.end.clone().toISOString()\r\n };\r\n this.rangeChanged.emit(range);\r\n if (!this._programmaticChange) {\r\n this._onTouched(range);\r\n this._onChange(range);\r\n }\r\n this.activeDates = {\r\n month1: this._range.start.clone(),\r\n month2: this._range.start.clone().add(1, 'month')\r\n };\r\n this.startTimeFormControl.setValue(this._range.start.clone().format(this._timeFormat).toString());\r\n this.endTimeFormControl.setValue(this._range.end.clone().format(this._timeFormat).toString());\r\n }\r\n if (this._matMonthView1 && this._matMonthView2) {\r\n this._matMonthView1.ngAfterContentInit();\r\n this._matMonthView2.ngAfterContentInit();\r\n }\r\n this._programmaticChange = false;\r\n }\r\n\r\n \r\n registerOnChange(fn: any): void {\r\n this._onChange = fn;\r\n }\r\n\r\n \r\n registerOnTouched(fn: any): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n \r\n writeValue(range: { start: string; end: string }): void {\r\n this._programmaticChange = true;\r\n this.range = range;\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n }\r\n\r\n ngOnInit(): void {\r\n this._init();\r\n }\r\n \r\n ngOnDestroy(): void {\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this.writeValue = (): void => { };\r\n }\r\n\r\n \r\n openPickerPanel(): void {\r\n if (this.readonly)\r\n return;\r\n const overlayRef = this._overlay.create({\r\n panelClass: 'cmat-date-range-panel',\r\n backdropClass: '',\r\n hasBackdrop: true,\r\n scrollStrategy: this._overlay.scrollStrategies.reposition(),\r\n positionStrategy: this._overlay.position()\r\n .flexibleConnectedTo(this._pickerPanelOrigin)\r\n .withPositions([\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetY: 8\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetY: -8\r\n }\r\n ])\r\n });\r\n const templatePortal = new TemplatePortal(this._pickerPanel, this._viewContainerRef);\r\n overlayRef.backdropClick().subscribe(() => {\r\n if (templatePortal?.isAttached) {\r\n templatePortal.detach();\r\n }\r\n if (overlayRef?.hasAttached()) {\r\n overlayRef.detach();\r\n overlayRef.dispose();\r\n }\r\n });\r\n overlayRef.attach(templatePortal);\r\n }\r\n\r\n \r\n getMonthLabel(month: number): string | void {\r\n if (month === 1) {\r\n return this.activeDates.month1?.clone().format('YYYY MMMM');\r\n }\r\n\r\n return this.activeDates.month2?.clone().format('YYYY MMMM');\r\n }\r\n\r\n \r\n dateClass(): any {\r\n return (date: Dayjs): MatCalendarCellCssClasses | void => {\r\n const start = this._range.start ?? dayjs();\r\n const end = this._range.end ?? dayjs().add(1, 'day').endOf('day')\r\n if (date.isSame(start, 'day') && date.isSame(end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];\r\n }\r\n if (date.isSame(start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n if (date.isSame(end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-end'];\r\n }\r\n if (date.isBetween(start, end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-mid'];\r\n }\r\n\r\n return void 0;\r\n };\r\n }\r\n\r\n \r\n dateFilter(): any {\r\n return (date: Dayjs): boolean => !(this.setWhichDate === 'end' && date.isBefore(this._range.start, 'day'));\r\n }\r\n\r\n \r\n onSelectedDateChange(date: Dayjs): void {\r\n const newRange = {\r\n start: dayjs().toISOString(),\r\n end: dayjs().toISOString(),\r\n whichDate: ''\r\n };\r\n if (this.setWhichDate === 'start') {\r\n newRange.start = dayjs(newRange.start).year(date.year()).month(date.month()).date(date.date()).toISOString();\r\n }\r\n else {\r\n newRange.end = dayjs(newRange.end).year(date.year()).month(date.month()).date(date.date()).toISOString();\r\n }\r\n newRange.whichDate = this.setWhichDate;\r\n this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';\r\n this.range = newRange;\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n\r\n }\r\n\r\n \r\n prev(): void {\r\n this.activeDates.month1 = dayjs(this.activeDates.month1).subtract(1, 'month');\r\n this.activeDates.month2 = dayjs(this.activeDates.month2).subtract(1, 'month');\r\n }\r\n\r\n \r\n next(): void {\r\n this.activeDates.month1 = dayjs(this.activeDates.month1).add(1, 'month');\r\n this.activeDates.month2 = dayjs(this.activeDates.month2).add(1, 'month');\r\n }\r\n\r\n \r\n updateStartTime(event: any): void {\r\n const parsedTime = this._parseTime(event.target.value);\r\n if (this.startTimeFormControl.invalid) {\r\n if (this._range.start) {\r\n const time = this._range.start.clone().format(this._timeFormat);\r\n this.startTimeFormControl.setValue(time);\r\n }\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n const startDate = this._range.start.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n if (startDate.isAfter(this._range.end)) {\r\n const endDateHours = this._range.end.hour();\r\n const endDateMinutes = this._range.end.minute();\r\n startDate.hour(endDateHours).minute(endDateMinutes);\r\n }\r\n this.range = {\r\n start: startDate.toISOString(),\r\n end: this._range.end.clone().toISOString(),\r\n whichDate: 'start'\r\n };\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n }\r\n }\r\n\r\n \r\n updateEndTime(event: any): void {\r\n const parsedTime = this._parseTime(event.target.value);\r\n if (this.endTimeFormControl.invalid) {\r\n if (this._range.end) {\r\n const time = this._range.end.clone().format(this._timeFormat);\r\n this.endTimeFormControl.setValue(time);\r\n }\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n const endDate = this._range.end.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n if (endDate.isBefore(this._range.start)) {\r\n const startDateHours = this._range.start.hour();\r\n const startDateMinutes = this._range.start.minute();\r\n endDate.hour(startDateHours).minute(startDateMinutes);\r\n }\r\n this.range = {\r\n start: this._range.start.clone().toISOString(),\r\n end: endDate.toISOString(),\r\n whichDate: 'end'\r\n };\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n }\r\n }\r\n\r\n \r\n private _init(): void {\r\n this.startTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this.endTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this._programmaticChange = true;\r\n if (this.initData) {\r\n this.range = {\r\n start: dayjs().startOf('day').toISOString(),\r\n end: dayjs().add(1, 'day').endOf('day').toISOString()\r\n };\r\n } else {\r\n this.range = {};\r\n }\r\n this._programmaticChange = true;\r\n\r\n this.timeRange = this.timeRange ?? true;\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n }\r\n\r\n \r\n private _parseTime(value: string): Dayjs {\r\n const timeArr = value.split(this._timeRegExp).filter(part => part !== '');\r\n const meridiem = timeArr[2] || null;\r\n if (meridiem) {\r\n return dayjs(value, 'hh:mmA').second(0);\r\n }\r\n return dayjs(value, 'HH:mm').second(0);\r\n }\r\n}\r\n","<div #pickerPanelOrigin role=\"presentation\" class=\"range\" [attr.data-refresh]=\"refreshVersion()\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.startDate}}</div>\r\n @if (range?.startTime) {\r\n <div class=\"time\">{{range?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass\">\r\n <div class=\"date\">{{range?.endDate}}</div>\r\n @if (range?.endTime) {\r\n <div class=\"time\">{{range?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n \r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month1\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>开始时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n \r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilter()\" [dateClass]=\"dateClass()\"\r\n [(activeDate)]=\"activeDates.month2\" (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>结束时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MA+Ba,sBAAsB,CAAA;AAqC/B,IAAA,WAAA,GAAA;QApCS,IAAA,CAAA,YAAY,GAAW,EAAE;QACzB,IAAA,CAAA,QAAQ,GAAY,IAAI;AAEd,QAAA,IAAA,CAAA,YAAY,GAAiD,IAAI,YAAY,EAAkC;AAMlI,QAAA,IAAA,CAAA,WAAW,GAAmD;AAC1D,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,MAAM,EAAE;SACX;AACQ,QAAA,IAAA,CAAA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A4CvB;;sBASA;;sBAaA;;sBAeA;;sBA+BA;;;AEvJL;;AAEG;;;;"}
@@ -9,10 +9,10 @@ class CmatDateTimeDisplayComponent {
9
9
  this.prefix = '';
10
10
  this.emptyText = '-';
11
11
  }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDateTimeDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatDateTimeDisplayComponent, isStandalone: true, selector: "cmat-date-time-display", inputs: { value: "value", format: "format", timezone: "timezone", prefix: "prefix", emptyText: "emptyText" }, ngImport: i0, template: "<span class=\"inline-flex items-center gap-1 text-sm text-slate-600 dark:text-slate-50\">\r\n @if (prefix) {\r\n <span class=\"text-slate-400 dark:text-slate-300 \">{{ prefix }}</span>\r\n }\r\n\r\n @if (value) {\r\n <span>{{ value | date: format: timezone }}</span>\r\n } @else {\r\n <span>{{ emptyText }}</span>\r\n }\r\n</span>\r\n", styles: [":host{display:inline-flex}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDateTimeDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatDateTimeDisplayComponent, isStandalone: true, selector: "cmat-date-time-display", inputs: { value: "value", format: "format", timezone: "timezone", prefix: "prefix", emptyText: "emptyText" }, ngImport: i0, template: "<span class=\"inline-flex items-center gap-1 text-sm text-slate-600 dark:text-slate-50\">\r\n @if (prefix) {\r\n <span class=\"text-slate-400 dark:text-slate-300 \">{{ prefix }}</span>\r\n }\r\n\r\n @if (value) {\r\n <span>{{ value | date: format: timezone }}</span>\r\n } @else {\r\n <span>{{ emptyText }}</span>\r\n }\r\n</span>\r\n", styles: [":host{display:inline-flex}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14
14
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDateTimeDisplayComponent, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDateTimeDisplayComponent, decorators: [{
16
16
  type: Component,
17
17
  args: [{ selector: 'cmat-date-time-display', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DatePipe], template: "<span class=\"inline-flex items-center gap-1 text-sm text-slate-600 dark:text-slate-50\">\r\n @if (prefix) {\r\n <span class=\"text-slate-400 dark:text-slate-300 \">{{ prefix }}</span>\r\n }\r\n\r\n @if (value) {\r\n <span>{{ value | date: format: timezone }}</span>\r\n } @else {\r\n <span>{{ emptyText }}</span>\r\n }\r\n</span>\r\n", styles: [":host{display:inline-flex}\n"] }]
18
18
  }], propDecorators: { value: [{
@@ -1,6 +1,6 @@
1
1
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, inject, EventEmitter, ElementRef, Renderer2, ChangeDetectorRef, HostListener, HostBinding, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { Injectable, inject, EventEmitter, signal, ElementRef, Renderer2, HostListener, HostBinding, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
4
4
  import { CmatUtilsService } from 'cmat/services/utils';
5
5
 
6
6
  class CmatDrawerService {
@@ -16,10 +16,10 @@ class CmatDrawerService {
16
16
  getComponent(name) {
17
17
  return this._componentRegistry.get(name);
18
18
  }
19
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
20
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDrawerService, providedIn: 'root' }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
20
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerService, providedIn: 'root' }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDrawerService, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerService, decorators: [{
23
23
  type: Injectable,
24
24
  args: [{
25
25
  providedIn: 'root'
@@ -39,13 +39,13 @@ class CmatDrawerComponent {
39
39
  this.modeChanged = new EventEmitter();
40
40
  this.openedChanged = new EventEmitter();
41
41
  this.positionChanged = new EventEmitter();
42
+ this.refreshVersion = signal(0, ...(ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []));
42
43
  this._elementRef = inject(ElementRef);
43
44
  this._renderer2 = inject(Renderer2);
44
45
  this._cmatDrawerService = inject(CmatDrawerService);
45
46
  this._animationsEnabled = false;
46
47
  this._hovered = false;
47
48
  this._overlayClickDestroyFn = null;
48
- this._changeDetectorRef = inject(ChangeDetectorRef);
49
49
  }
50
50
  get classList() {
51
51
  /* eslint-disable @typescript-eslint/naming-convention */
@@ -192,15 +192,15 @@ class CmatDrawerComponent {
192
192
  this._hideOverlay();
193
193
  }
194
194
  }
195
- this._changeDetectorRef.markForCheck();
195
+ this.refreshVersion.update(value => value + 1);
196
196
  this.openedChanged.emit(open);
197
197
  }
198
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CmatDrawerComponent, isStandalone: true, selector: "cmat-drawer", inputs: { fixed: "fixed", mode: "mode", name: "name", opened: "opened", position: "position", transparentOverlay: "transparentOverlay" }, outputs: { fixedChanged: "fixedChanged", modeChanged: "modeChanged", openedChanged: "openedChanged", positionChanged: "positionChanged" }, host: { listeners: { "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" }, properties: { "class": "this.classList", "style": "this.styleList" } }, exportAs: ["cmatDrawer"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}.cmat-drawer-overlay.cmat-drawer-overlay-enter{animation:drawer-overlay-enter .3s cubic-bezier(.25,.8,.25,1)}.cmat-drawer-overlay.cmat-drawer-overlay-leave{animation:drawer-overlay-leave .3s cubic-bezier(.25,.8,.25,1)}@keyframes drawer-overlay-enter{0%{opacity:0}to{opacity:1}}@keyframes drawer-overlay-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: CmatDrawerComponent, isStandalone: true, selector: "cmat-drawer", inputs: { fixed: "fixed", mode: "mode", name: "name", opened: "opened", position: "position", transparentOverlay: "transparentOverlay" }, outputs: { fixedChanged: "fixedChanged", modeChanged: "modeChanged", openedChanged: "openedChanged", positionChanged: "positionChanged" }, host: { listeners: { "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" }, properties: { "class": "this.classList", "style": "this.styleList" } }, exportAs: ["cmatDrawer"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class=\"cmat-drawer-wrapper\" [attr.data-refresh]=\"refreshVersion()\" [class.cmat-drawer-opened]=\"opened\">\r\n</div>\r\n", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}.cmat-drawer-overlay.cmat-drawer-overlay-enter{animation:drawer-overlay-enter .3s cubic-bezier(.25,.8,.25,1)}.cmat-drawer-overlay.cmat-drawer-overlay-leave{animation:drawer-overlay-leave .3s cubic-bezier(.25,.8,.25,1)}@keyframes drawer-overlay-enter{0%{opacity:0}to{opacity:1}}@keyframes drawer-overlay-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
200
200
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatDrawerComponent, decorators: [{
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerComponent, decorators: [{
202
202
  type: Component,
203
- args: [{ selector: 'cmat-drawer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDrawer', template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}.cmat-drawer-overlay.cmat-drawer-overlay-enter{animation:drawer-overlay-enter .3s cubic-bezier(.25,.8,.25,1)}.cmat-drawer-overlay.cmat-drawer-overlay-leave{animation:drawer-overlay-leave .3s cubic-bezier(.25,.8,.25,1)}@keyframes drawer-overlay-enter{0%{opacity:0}to{opacity:1}}@keyframes drawer-overlay-leave{0%{opacity:1}to{opacity:0}}\n"] }]
203
+ args: [{ selector: 'cmat-drawer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDrawer', template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class=\"cmat-drawer-wrapper\" [attr.data-refresh]=\"refreshVersion()\" [class.cmat-drawer-opened]=\"opened\">\r\n</div>\r\n", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}.cmat-drawer-overlay.cmat-drawer-overlay-enter{animation:drawer-overlay-enter .3s cubic-bezier(.25,.8,.25,1)}.cmat-drawer-overlay.cmat-drawer-overlay-leave{animation:drawer-overlay-leave .3s cubic-bezier(.25,.8,.25,1)}@keyframes drawer-overlay-enter{0%{opacity:0}to{opacity:1}}@keyframes drawer-overlay-leave{0%{opacity:1}to{opacity:0}}\n"] }]
204
204
  }], propDecorators: { fixed: [{
205
205
  type: Input
206
206
  }], mode: [{
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-drawer.mjs","sources":["../../../projects/cmat/components/drawer/drawer.service.ts","../../../projects/cmat/components/drawer/drawer.component.ts","../../../projects/cmat/components/drawer/drawer.component.html","../../../projects/cmat/components/drawer/cmat-components-drawer.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { CmatDrawerComponent } from './drawer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatDrawerService {\r\n private _componentRegistry: Map<string, CmatDrawerComponent> = new Map<string, CmatDrawerComponent>();\r\n \r\n registerComponent(name: string, component: CmatDrawerComponent): void {\r\n this._componentRegistry.set(name, component);\r\n }\r\n\r\n \r\n deregisterComponent(name: string): void {\r\n this._componentRegistry.delete(name);\r\n }\r\n\r\n \r\n getComponent(name: string): CmatDrawerComponent | void {\r\n return this._componentRegistry.get(name);\r\n }\r\n}\r\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnChanges, OnDestroy, OnInit, Output, Renderer2, SimpleChanges, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatDrawerService } from './drawer.service';\r\nimport { CmatDrawerMode, CmatDrawerPosition } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'cmat-drawer',\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDrawer'\r\n})\r\nexport class CmatDrawerComponent implements OnChanges, OnInit, OnDestroy {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n static ngAcceptInputType_fixed: BooleanInput;\r\n static ngAcceptInputType_opened: BooleanInput;\r\n static ngAcceptInputType_transparentOverlay: BooleanInput;\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n\r\n @Input() fixed: boolean = false;\r\n @Input() mode: CmatDrawerMode = 'side';\r\n @Input() name: string = inject(CmatUtilsService).randomId();\r\n @Input() opened: boolean = false;\r\n @Input() position: CmatDrawerPosition = 'left';\r\n @Input() transparentOverlay: boolean = false;\r\n @Output() readonly fixedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly modeChanged: EventEmitter<CmatDrawerMode> = new EventEmitter<CmatDrawerMode>();\r\n @Output() readonly openedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly positionChanged: EventEmitter<CmatDrawerPosition> = new EventEmitter<CmatDrawerPosition>();\r\n\r\n private _elementRef = inject(ElementRef);\r\n private _renderer2 = inject(Renderer2);\r\n private _cmatDrawerService = inject(CmatDrawerService);\r\n\r\n private _animationsEnabled: boolean = false;\r\n private _hovered: boolean = false;\r\n private _overlay: HTMLElement | null;\r\n private _overlayClickDestroyFn: (() => void) | null = null;\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n\r\n @HostBinding('class') get classList(): any {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n return {\r\n 'cmat-drawer-animations-enabled': this._animationsEnabled,\r\n 'cmat-drawer-fixed': this.fixed,\r\n 'cmat-drawer-hover': this._hovered,\r\n [`cmat-drawer-mode-${this.mode}`]: true,\r\n 'cmat-drawer-opened': this.opened,\r\n [`cmat-drawer-position-${this.position}`]: true\r\n };\r\n }\r\n\r\n @HostBinding('style') get styleList(): any {\r\n return {\r\n 'visibility': this.opened ? 'visible' : 'hidden'\r\n };\r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseenter(): void {\r\n this._enableAnimations();\r\n this._hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseleave(): void {\r\n this._enableAnimations();\r\n this._hovered = false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ('fixed' in changes) {\r\n this.fixed = coerceBooleanProperty(changes['fixed'].currentValue);\r\n this.fixedChanged.emit(this.fixed);\r\n }\r\n if ('mode' in changes) {\r\n const previousMode = changes['mode'].previousValue;\r\n const currentMode = changes['mode'].currentValue;\r\n this._disableAnimations();\r\n if (previousMode === 'over' && currentMode === 'side') {\r\n this._hideOverlay();\r\n }\r\n if (previousMode === 'side' && currentMode === 'over') {\r\n if (this.opened) {\r\n this._showOverlay();\r\n }\r\n }\r\n this.modeChanged.emit(currentMode);\r\n setTimeout(() => {\r\n this._enableAnimations();\r\n }, 500);\r\n }\r\n if ('opened' in changes) {\r\n const open = coerceBooleanProperty(changes['opened'].currentValue);\r\n this._toggleOpened(open);\r\n }\r\n if ('position' in changes) {\r\n this.positionChanged.emit(this.position);\r\n }\r\n if ('transparentOverlay' in changes) {\r\n this.transparentOverlay = coerceBooleanProperty(changes['transparentOverlay'].currentValue);\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this._cmatDrawerService.registerComponent(this.name, this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._cmatDrawerService.deregisterComponent(this.name);\r\n }\r\n\r\n open(): void {\r\n if (this.opened) {\r\n return;\r\n }\r\n this._toggleOpened(true);\r\n }\r\n\r\n close(): void {\r\n if (!this.opened) {\r\n return;\r\n }\r\n this._toggleOpened(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.opened) {\r\n this.close();\r\n }\r\n else {\r\n this.open();\r\n }\r\n }\r\n\r\n \r\n private _enableAnimations(): void {\r\n if (this._animationsEnabled) {\r\n return;\r\n }\r\n this._animationsEnabled = true;\r\n }\r\n\r\n \r\n private _disableAnimations(): void {\r\n if (!this._animationsEnabled) {\r\n return;\r\n }\r\n this._animationsEnabled = false;\r\n }\r\n\r\n \r\n private _showOverlay(): void {\r\n this._overlay = this._renderer2.createElement('div');\r\n if (!this._overlay) {\r\n return;\r\n }\r\n this._overlay.classList.add('cmat-drawer-overlay');\r\n if (this.fixed) {\r\n this._overlay.classList.add('cmat-drawer-overlay-fixed');\r\n }\r\n if (this.transparentOverlay) {\r\n this._overlay.classList.add('cmat-drawer-overlay-transparent');\r\n }\r\n this._renderer2.appendChild(this._elementRef.nativeElement.parentElement, this._overlay);\r\n\r\n this._overlay?.classList.add('cmat-drawer-overlay-enter');\r\n\r\n this._overlayClickDestroyFn = this._renderer2.listen(this._overlay, 'click', () => {\r\n this.close();\r\n });\r\n }\r\n\r\n \r\n private _hideOverlay(): void {\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n this._overlay.classList.remove('cmat-drawer-overlay-enter');\r\n\r\n const handleAnimationEnd = (event: AnimationEvent): void => {\r\n if (event.animationName === 'drawer-overlay-leave') {\r\n this._overlay?.removeEventListener('animationend', handleAnimationEnd);\r\n\r\n if (this._overlayClickDestroyFn) {\r\n this._overlayClickDestroyFn();\r\n this._overlayClickDestroyFn = null;\r\n }\r\n\r\n if (this._overlay) {\r\n this._overlay.parentNode?.removeChild(this._overlay);\r\n this._overlay = null;\r\n }\r\n }\r\n };\r\n\r\n this._overlay.addEventListener('animationend', handleAnimationEnd);\r\n\r\n this._overlay.classList.add('cmat-drawer-overlay-leave');\r\n }\r\n\r\n \r\n private _toggleOpened(open: boolean): void {\r\n this.opened = open;\r\n this._enableAnimations();\r\n if (this.mode === 'over') {\r\n if (open) {\r\n this._showOverlay();\r\n }\r\n else {\r\n this._hideOverlay();\r\n }\r\n }\r\n\r\n this._changeDetectorRef.markForCheck();\r\n this.openedChanged.emit(open);\r\n }\r\n}\r\n","<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';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A,WAAW;uBAAC,OAAO;;sBAYnB,WAAW;uBAAC,OAAO;;sBAMnB,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AElE9B;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-drawer.mjs","sources":["../../../projects/cmat/components/drawer/drawer.service.ts","../../../projects/cmat/components/drawer/drawer.component.ts","../../../projects/cmat/components/drawer/drawer.component.html","../../../projects/cmat/components/drawer/cmat-components-drawer.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { CmatDrawerComponent } from './drawer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatDrawerService {\r\n private _componentRegistry: Map<string, CmatDrawerComponent> = new Map<string, CmatDrawerComponent>();\r\n \r\n registerComponent(name: string, component: CmatDrawerComponent): void {\r\n this._componentRegistry.set(name, component);\r\n }\r\n\r\n \r\n deregisterComponent(name: string): void {\r\n this._componentRegistry.delete(name);\r\n }\r\n\r\n \r\n getComponent(name: string): CmatDrawerComponent | void {\r\n return this._componentRegistry.get(name);\r\n }\r\n}\r\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnChanges, OnDestroy, OnInit, Output, Renderer2, SimpleChanges, ViewEncapsulation, inject, signal } from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatDrawerService } from './drawer.service';\r\nimport { CmatDrawerMode, CmatDrawerPosition } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'cmat-drawer',\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDrawer'\r\n})\r\nexport class CmatDrawerComponent implements OnChanges, OnInit, OnDestroy {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n static ngAcceptInputType_fixed: BooleanInput;\r\n static ngAcceptInputType_opened: BooleanInput;\r\n static ngAcceptInputType_transparentOverlay: BooleanInput;\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n\r\n @Input() fixed: boolean = false;\r\n @Input() mode: CmatDrawerMode = 'side';\r\n @Input() name: string = inject(CmatUtilsService).randomId();\r\n @Input() opened: boolean = false;\r\n @Input() position: CmatDrawerPosition = 'left';\r\n @Input() transparentOverlay: boolean = false;\r\n @Output() readonly fixedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly modeChanged: EventEmitter<CmatDrawerMode> = new EventEmitter<CmatDrawerMode>();\r\n @Output() readonly openedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly positionChanged: EventEmitter<CmatDrawerPosition> = new EventEmitter<CmatDrawerPosition>();\r\n\r\n readonly refreshVersion = signal(0);\r\n\r\n private _elementRef = inject(ElementRef);\r\n private _renderer2 = inject(Renderer2);\r\n private _cmatDrawerService = inject(CmatDrawerService);\r\n\r\n private _animationsEnabled: boolean = false;\r\n private _hovered: boolean = false;\r\n private _overlay: HTMLElement | null;\r\n private _overlayClickDestroyFn: (() => void) | null = null;\r\n\r\n @HostBinding('class') get classList(): any {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n return {\r\n 'cmat-drawer-animations-enabled': this._animationsEnabled,\r\n 'cmat-drawer-fixed': this.fixed,\r\n 'cmat-drawer-hover': this._hovered,\r\n [`cmat-drawer-mode-${this.mode}`]: true,\r\n 'cmat-drawer-opened': this.opened,\r\n [`cmat-drawer-position-${this.position}`]: true\r\n };\r\n }\r\n\r\n @HostBinding('style') get styleList(): any {\r\n return {\r\n 'visibility': this.opened ? 'visible' : 'hidden'\r\n };\r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseenter(): void {\r\n this._enableAnimations();\r\n this._hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseleave(): void {\r\n this._enableAnimations();\r\n this._hovered = false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if ('fixed' in changes) {\r\n this.fixed = coerceBooleanProperty(changes['fixed'].currentValue);\r\n this.fixedChanged.emit(this.fixed);\r\n }\r\n if ('mode' in changes) {\r\n const previousMode = changes['mode'].previousValue;\r\n const currentMode = changes['mode'].currentValue;\r\n this._disableAnimations();\r\n if (previousMode === 'over' && currentMode === 'side') {\r\n this._hideOverlay();\r\n }\r\n if (previousMode === 'side' && currentMode === 'over') {\r\n if (this.opened) {\r\n this._showOverlay();\r\n }\r\n }\r\n this.modeChanged.emit(currentMode);\r\n setTimeout(() => {\r\n this._enableAnimations();\r\n }, 500);\r\n }\r\n if ('opened' in changes) {\r\n const open = coerceBooleanProperty(changes['opened'].currentValue);\r\n this._toggleOpened(open);\r\n }\r\n if ('position' in changes) {\r\n this.positionChanged.emit(this.position);\r\n }\r\n if ('transparentOverlay' in changes) {\r\n this.transparentOverlay = coerceBooleanProperty(changes['transparentOverlay'].currentValue);\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this._cmatDrawerService.registerComponent(this.name, this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._cmatDrawerService.deregisterComponent(this.name);\r\n }\r\n\r\n open(): void {\r\n if (this.opened) {\r\n return;\r\n }\r\n this._toggleOpened(true);\r\n }\r\n\r\n close(): void {\r\n if (!this.opened) {\r\n return;\r\n }\r\n this._toggleOpened(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.opened) {\r\n this.close();\r\n }\r\n else {\r\n this.open();\r\n }\r\n }\r\n\r\n\r\n private _enableAnimations(): void {\r\n if (this._animationsEnabled) {\r\n return;\r\n }\r\n this._animationsEnabled = true;\r\n }\r\n\r\n\r\n private _disableAnimations(): void {\r\n if (!this._animationsEnabled) {\r\n return;\r\n }\r\n this._animationsEnabled = false;\r\n }\r\n\r\n\r\n private _showOverlay(): void {\r\n this._overlay = this._renderer2.createElement('div');\r\n if (!this._overlay) {\r\n return;\r\n }\r\n this._overlay.classList.add('cmat-drawer-overlay');\r\n if (this.fixed) {\r\n this._overlay.classList.add('cmat-drawer-overlay-fixed');\r\n }\r\n if (this.transparentOverlay) {\r\n this._overlay.classList.add('cmat-drawer-overlay-transparent');\r\n }\r\n this._renderer2.appendChild(this._elementRef.nativeElement.parentElement, this._overlay);\r\n\r\n this._overlay?.classList.add('cmat-drawer-overlay-enter');\r\n\r\n this._overlayClickDestroyFn = this._renderer2.listen(this._overlay, 'click', () => {\r\n this.close();\r\n });\r\n }\r\n\r\n\r\n private _hideOverlay(): void {\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n this._overlay.classList.remove('cmat-drawer-overlay-enter');\r\n\r\n const handleAnimationEnd = (event: AnimationEvent): void => {\r\n if (event.animationName === 'drawer-overlay-leave') {\r\n this._overlay?.removeEventListener('animationend', handleAnimationEnd);\r\n\r\n if (this._overlayClickDestroyFn) {\r\n this._overlayClickDestroyFn();\r\n this._overlayClickDestroyFn = null;\r\n }\r\n\r\n if (this._overlay) {\r\n this._overlay.parentNode?.removeChild(this._overlay);\r\n this._overlay = null;\r\n }\r\n }\r\n };\r\n\r\n this._overlay.addEventListener('animationend', handleAnimationEnd);\r\n\r\n this._overlay.classList.add('cmat-drawer-overlay-leave');\r\n }\r\n\r\n\r\n private _toggleOpened(open: boolean): void {\r\n this.opened = open;\r\n this._enableAnimations();\r\n if (this.mode === 'over') {\r\n if (open) {\r\n this._showOverlay();\r\n }\r\n else {\r\n this._hideOverlay();\r\n }\r\n }\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n this.openedChanged.emit(open);\r\n }\r\n}\r\n","<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class=\"cmat-drawer-wrapper\" [attr.data-refresh]=\"refreshVersion()\" [class.cmat-drawer-opened]=\"opened\">\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAMa,iBAAiB,CAAA;AAH9B,IAAA,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sBAYnB,WAAW;uBAAC,OAAO;;sBAMnB,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,YAAY;;;AEnE9B;;AAEG;;;;"}
@@ -17,10 +17,10 @@ class CmatEmptyStateComponent {
17
17
  emitAction() {
18
18
  this.ctaClick.emit();
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: "icon", title: "title", description: "description", ctaLabel: "ctaLabel", ctaDisabled: "ctaDisabled" }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div class=\"flex flex-col items-center justify-center rounded-2xl bg-card px-6 py-10 text-center shadow-sm\">\r\n @if (icon) {\r\n <div class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\">\r\n <mat-icon [svgIcon]=\"icon\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold\">{{ title }}</h3>\r\n\r\n @if (description) {\r\n <p class=\"mt-2 max-w-xl text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description }}</p>\r\n }\r\n\r\n @if (ctaLabel) {\r\n <div class=\"mt-4\">\r\n <button matButton=\"outlined\" type=\"button\" [disabled]=\"ctaDisabled\" (click)=\"emitAction()\">{{ ctaLabel }}</button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: "icon", title: "title", description: "description", ctaLabel: "ctaLabel", ctaDisabled: "ctaDisabled" }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div class=\"flex flex-col items-center justify-center rounded-2xl bg-card px-6 py-10 text-center shadow-sm\">\r\n @if (icon) {\r\n <div class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\">\r\n <mat-icon [svgIcon]=\"icon\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold\">{{ title }}</h3>\r\n\r\n @if (description) {\r\n <p class=\"mt-2 max-w-xl text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description }}</p>\r\n }\r\n\r\n @if (ctaLabel) {\r\n <div class=\"mt-4\">\r\n <button matButton=\"outlined\" type=\"button\" [disabled]=\"ctaDisabled\" (click)=\"emitAction()\">{{ ctaLabel }}</button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CmatEmptyStateComponent, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatEmptyStateComponent, decorators: [{
24
24
  type: Component,
25
25
  args: [{ selector: 'cmat-empty-state', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule], template: "<div class=\"flex flex-col items-center justify-center rounded-2xl bg-card px-6 py-10 text-center shadow-sm\">\r\n @if (icon) {\r\n <div class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\">\r\n <mat-icon [svgIcon]=\"icon\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold\">{{ title }}</h3>\r\n\r\n @if (description) {\r\n <p class=\"mt-2 max-w-xl text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description }}</p>\r\n }\r\n\r\n @if (ctaLabel) {\r\n <div class=\"mt-4\">\r\n <button matButton=\"outlined\" type=\"button\" [disabled]=\"ctaDisabled\" (click)=\"emitAction()\">{{ ctaLabel }}</button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"] }]
26
26
  }], propDecorators: { icon: [{